id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
38,700
roboconf/roboconf-platform
core/roboconf-dm/src/main/java/net/roboconf/dm/internal/api/impl/ApplicationTemplateMngrImpl.java
ApplicationTemplateMngrImpl.unregisterTargets
private void unregisterTargets( Set<String> newTargetIds ) { for( String targetId : newTargetIds ) { try { this.targetsMngr.deleteTarget( targetId ); } catch( Exception e ) { this.logger.severe( "A target ID that has just been registered could not be created. That's weird." ); Utils.logException( ...
java
private void unregisterTargets( Set<String> newTargetIds ) { for( String targetId : newTargetIds ) { try { this.targetsMngr.deleteTarget( targetId ); } catch( Exception e ) { this.logger.severe( "A target ID that has just been registered could not be created. That's weird." ); Utils.logException( ...
[ "private", "void", "unregisterTargets", "(", "Set", "<", "String", ">", "newTargetIds", ")", "{", "for", "(", "String", "targetId", ":", "newTargetIds", ")", "{", "try", "{", "this", ".", "targetsMngr", ".", "deleteTarget", "(", "targetId", ")", ";", "}", ...
Unregisters targets. @param newTargetIds a non-null set of target IDs
[ "Unregisters", "targets", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-dm/src/main/java/net/roboconf/dm/internal/api/impl/ApplicationTemplateMngrImpl.java#L317-L328
38,701
roboconf/roboconf-platform
core/roboconf-dm/src/main/java/net/roboconf/dm/internal/api/impl/beans/InstanceContext.java
InstanceContext.parse
public static InstanceContext parse( String s ) { String name = null, qualifier = null, instancePathOrComponentName = null; if( s != null ) { Matcher m = Pattern.compile( "(.*)::(.*)::(.*)" ).matcher( s ); if( m.matches()) { name = m.group( 1 ).equals( "null" ) ? null : m.group( 1 ); qualifier = m.gr...
java
public static InstanceContext parse( String s ) { String name = null, qualifier = null, instancePathOrComponentName = null; if( s != null ) { Matcher m = Pattern.compile( "(.*)::(.*)::(.*)" ).matcher( s ); if( m.matches()) { name = m.group( 1 ).equals( "null" ) ? null : m.group( 1 ); qualifier = m.gr...
[ "public", "static", "InstanceContext", "parse", "(", "String", "s", ")", "{", "String", "name", "=", "null", ",", "qualifier", "=", "null", ",", "instancePathOrComponentName", "=", "null", ";", "if", "(", "s", "!=", "null", ")", "{", "Matcher", "m", "=",...
Parses a string to resolve a target mapping key. @param s a string (can be null) @return a target mapping key (never null)
[ "Parses", "a", "string", "to", "resolve", "a", "target", "mapping", "key", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-dm/src/main/java/net/roboconf/dm/internal/api/impl/beans/InstanceContext.java#L104-L117
38,702
roboconf/roboconf-platform
core/roboconf-messaging-api/src/main/java/net/roboconf/messaging/api/utils/MessagingUtils.java
MessagingUtils.buildTopicNameForAgent
public static String buildTopicNameForAgent( Instance instance ) { Instance scopedInstance = InstanceHelpers.findScopedInstance( instance ); return buildTopicNameForAgent( InstanceHelpers.computeInstancePath( scopedInstance )); }
java
public static String buildTopicNameForAgent( Instance instance ) { Instance scopedInstance = InstanceHelpers.findScopedInstance( instance ); return buildTopicNameForAgent( InstanceHelpers.computeInstancePath( scopedInstance )); }
[ "public", "static", "String", "buildTopicNameForAgent", "(", "Instance", "instance", ")", "{", "Instance", "scopedInstance", "=", "InstanceHelpers", ".", "findScopedInstance", "(", "instance", ")", ";", "return", "buildTopicNameForAgent", "(", "InstanceHelpers", ".", ...
Builds the default topic name for an agent. @param instance an instance managed by the agent @return a non-null string
[ "Builds", "the", "default", "topic", "name", "for", "an", "agent", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-messaging-api/src/main/java/net/roboconf/messaging/api/utils/MessagingUtils.java#L51-L54
38,703
roboconf/roboconf-platform
core/roboconf-messaging-api/src/main/java/net/roboconf/messaging/api/utils/MessagingUtils.java
MessagingUtils.escapeInstancePath
public static String escapeInstancePath( String instancePath ) { String result; if( Utils.isEmptyOrWhitespaces( instancePath )) result = ""; else result = instancePath.replaceFirst( "^/*", "" ).replaceFirst( "/*$", "" ).replaceAll( "/+", "." ); return result; }
java
public static String escapeInstancePath( String instancePath ) { String result; if( Utils.isEmptyOrWhitespaces( instancePath )) result = ""; else result = instancePath.replaceFirst( "^/*", "" ).replaceFirst( "/*$", "" ).replaceAll( "/+", "." ); return result; }
[ "public", "static", "String", "escapeInstancePath", "(", "String", "instancePath", ")", "{", "String", "result", ";", "if", "(", "Utils", ".", "isEmptyOrWhitespaces", "(", "instancePath", ")", ")", "result", "=", "\"\"", ";", "else", "result", "=", "instancePa...
Removes unnecessary slashes and transforms the others into dots. @param instancePath an instance path @return a non-null string
[ "Removes", "unnecessary", "slashes", "and", "transforms", "the", "others", "into", "dots", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-messaging-api/src/main/java/net/roboconf/messaging/api/utils/MessagingUtils.java#L72-L81
38,704
roboconf/roboconf-platform
core/roboconf-messaging-api/src/main/java/net/roboconf/messaging/api/utils/MessagingUtils.java
MessagingUtils.buildId
public static String buildId( RecipientKind ownerKind, String domain, String applicationName, String scopedInstancePath ) { StringBuilder sb = new StringBuilder(); sb.append( "[ " ); sb.append( domain ); sb.append( " ] " ); if( ownerKind == RecipientKind.DM ) { sb.append( "DM" ); } else { ...
java
public static String buildId( RecipientKind ownerKind, String domain, String applicationName, String scopedInstancePath ) { StringBuilder sb = new StringBuilder(); sb.append( "[ " ); sb.append( domain ); sb.append( " ] " ); if( ownerKind == RecipientKind.DM ) { sb.append( "DM" ); } else { ...
[ "public", "static", "String", "buildId", "(", "RecipientKind", "ownerKind", ",", "String", "domain", ",", "String", "applicationName", ",", "String", "scopedInstancePath", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "sb", ".", ...
Builds a string identifying a messaging client. @param ownerKind {@link RecipientKind#DM} or {@link RecipientKind#AGENTS} @param domain the domain @param applicationName the application name (only makes sense for agents) @param scopedInstancePath the scoped instance path (only makes sense for agents) @return a non-nul...
[ "Builds", "a", "string", "identifying", "a", "messaging", "client", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-messaging-api/src/main/java/net/roboconf/messaging/api/utils/MessagingUtils.java#L92-L112
38,705
roboconf/roboconf-platform
core/roboconf-target-iaas-openstack/src/main/java/net/roboconf/target/openstack/internal/OpenstackMachineConfigurator.java
OpenstackMachineConfigurator.checkVmIsOnline
private boolean checkVmIsOnline() { String zoneName = OpenstackIaasHandler.findZoneName( this.novaApi, this.targetProperties ); Server server = this.novaApi.getServerApiForZone( zoneName ).get(this.machineId); return Status.ACTIVE.equals(server.getStatus()); }
java
private boolean checkVmIsOnline() { String zoneName = OpenstackIaasHandler.findZoneName( this.novaApi, this.targetProperties ); Server server = this.novaApi.getServerApiForZone( zoneName ).get(this.machineId); return Status.ACTIVE.equals(server.getStatus()); }
[ "private", "boolean", "checkVmIsOnline", "(", ")", "{", "String", "zoneName", "=", "OpenstackIaasHandler", ".", "findZoneName", "(", "this", ".", "novaApi", ",", "this", ".", "targetProperties", ")", ";", "Server", "server", "=", "this", ".", "novaApi", ".", ...
Checks whether a VM is created. @return true if it is online, false otherwise
[ "Checks", "whether", "a", "VM", "is", "created", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-target-iaas-openstack/src/main/java/net/roboconf/target/openstack/internal/OpenstackMachineConfigurator.java#L178-L183
38,706
roboconf/roboconf-platform
core/roboconf-target-iaas-openstack/src/main/java/net/roboconf/target/openstack/internal/OpenstackMachineConfigurator.java
OpenstackMachineConfigurator.prepareObjectStorage
public boolean prepareObjectStorage() throws TargetException { String domains = this.targetProperties.get( OBJ_STORAGE_DOMAINS ); if( ! Utils.isEmptyOrWhitespaces( domains )) { // Get the Swift API String zoneName = OpenstackIaasHandler.findZoneName( this.novaApi, this.targetProperties ); SwiftApi swiftA...
java
public boolean prepareObjectStorage() throws TargetException { String domains = this.targetProperties.get( OBJ_STORAGE_DOMAINS ); if( ! Utils.isEmptyOrWhitespaces( domains )) { // Get the Swift API String zoneName = OpenstackIaasHandler.findZoneName( this.novaApi, this.targetProperties ); SwiftApi swiftA...
[ "public", "boolean", "prepareObjectStorage", "(", ")", "throws", "TargetException", "{", "String", "domains", "=", "this", ".", "targetProperties", ".", "get", "(", "OBJ_STORAGE_DOMAINS", ")", ";", "if", "(", "!", "Utils", ".", "isEmptyOrWhitespaces", "(", "doma...
Configures the object storage. @return true if the configuration is over @throws TargetException
[ "Configures", "the", "object", "storage", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-target-iaas-openstack/src/main/java/net/roboconf/target/openstack/internal/OpenstackMachineConfigurator.java#L244-L283
38,707
roboconf/roboconf-platform
core/roboconf-core/src/main/java/net/roboconf/core/internal/dsl/parsing/FileDefinitionParser.java
FileDefinitionParser.splitFromInlineComment
String[] splitFromInlineComment( String line ) { String[] result = new String[] { line, "" }; int index = line.indexOf( ParsingConstants.COMMENT_DELIMITER ); if( index >= 0 ) { result[ 0 ] = line.substring( 0, index ); if( ! this.ignoreComments ) { // Find extra spaces before the in-line comment and pu...
java
String[] splitFromInlineComment( String line ) { String[] result = new String[] { line, "" }; int index = line.indexOf( ParsingConstants.COMMENT_DELIMITER ); if( index >= 0 ) { result[ 0 ] = line.substring( 0, index ); if( ! this.ignoreComments ) { // Find extra spaces before the in-line comment and pu...
[ "String", "[", "]", "splitFromInlineComment", "(", "String", "line", ")", "{", "String", "[", "]", "result", "=", "new", "String", "[", "]", "{", "line", ",", "\"\"", "}", ";", "int", "index", "=", "line", ".", "indexOf", "(", "ParsingConstants", ".", ...
Splits the line from the comment delimiter. @param line a string (not null) @return an array of 2 strings <p> Index 0: the line without the in-line comment. Never null.<br> Index 1: the in-line comment (if not null, it starts with a '#' symbol). </p>
[ "Splits", "the", "line", "from", "the", "comment", "delimiter", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-core/src/main/java/net/roboconf/core/internal/dsl/parsing/FileDefinitionParser.java#L334-L354
38,708
roboconf/roboconf-platform
core/roboconf-core/src/main/java/net/roboconf/core/internal/dsl/parsing/FileDefinitionParser.java
FileDefinitionParser.fillIn
private void fillIn() throws IOException { BufferedReader br = null; InputStream in = null; try { in = new FileInputStream( this.definitionFile.getEditedFile()); br = new BufferedReader( new InputStreamReader( in, StandardCharsets.UTF_8 )); String line; while(( line = nextLine( br )) != null ) { ...
java
private void fillIn() throws IOException { BufferedReader br = null; InputStream in = null; try { in = new FileInputStream( this.definitionFile.getEditedFile()); br = new BufferedReader( new InputStreamReader( in, StandardCharsets.UTF_8 )); String line; while(( line = nextLine( br )) != null ) { ...
[ "private", "void", "fillIn", "(", ")", "throws", "IOException", "{", "BufferedReader", "br", "=", "null", ";", "InputStream", "in", "=", "null", ";", "try", "{", "in", "=", "new", "FileInputStream", "(", "this", ".", "definitionFile", ".", "getEditedFile", ...
Parses the file and fills-in the resulting structure. @throws IOException
[ "Parses", "the", "file", "and", "fills", "-", "in", "the", "resulting", "structure", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-core/src/main/java/net/roboconf/core/internal/dsl/parsing/FileDefinitionParser.java#L574-L636
38,709
roboconf/roboconf-platform
miscellaneous/roboconf-tooling-core/src/main/java/net/roboconf/tooling/core/textactions/CommentAction.java
CommentAction.commentLine
public static String commentLine( String line ) { String result = line; if( ! Utils.isEmptyOrWhitespaces( line ) && ! line.trim().startsWith( ParsingConstants.COMMENT_DELIMITER )) result = ParsingConstants.COMMENT_DELIMITER + line; return result; }
java
public static String commentLine( String line ) { String result = line; if( ! Utils.isEmptyOrWhitespaces( line ) && ! line.trim().startsWith( ParsingConstants.COMMENT_DELIMITER )) result = ParsingConstants.COMMENT_DELIMITER + line; return result; }
[ "public", "static", "String", "commentLine", "(", "String", "line", ")", "{", "String", "result", "=", "line", ";", "if", "(", "!", "Utils", ".", "isEmptyOrWhitespaces", "(", "line", ")", "&&", "!", "line", ".", "trim", "(", ")", ".", "startsWith", "("...
Comments a line. @param line a non-null line @return a non-null line
[ "Comments", "a", "line", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/miscellaneous/roboconf-tooling-core/src/main/java/net/roboconf/tooling/core/textactions/CommentAction.java#L47-L55
38,710
roboconf/roboconf-platform
core/roboconf-dm-rest-services/src/main/java/net/roboconf/dm/rest/services/internal/filters/AuthenticationFilter.java
AuthenticationFilter.cleanPath
static String cleanPath( String path ) { return path .replaceFirst( "^" + ServletRegistrationComponent.REST_CONTEXT + "/", "/" ) .replaceFirst( "^" + ServletRegistrationComponent.WEBSOCKET_CONTEXT + "/", "/" ) .replaceFirst( "\\?.*", "" ); }
java
static String cleanPath( String path ) { return path .replaceFirst( "^" + ServletRegistrationComponent.REST_CONTEXT + "/", "/" ) .replaceFirst( "^" + ServletRegistrationComponent.WEBSOCKET_CONTEXT + "/", "/" ) .replaceFirst( "\\?.*", "" ); }
[ "static", "String", "cleanPath", "(", "String", "path", ")", "{", "return", "path", ".", "replaceFirst", "(", "\"^\"", "+", "ServletRegistrationComponent", ".", "REST_CONTEXT", "+", "\"/\"", ",", "\"/\"", ")", ".", "replaceFirst", "(", "\"^\"", "+", "ServletRe...
Cleans the path by removing the servlet paths and URL parameters. @param path a non-null path @return a non-null path
[ "Cleans", "the", "path", "by", "removing", "the", "servlet", "paths", "and", "URL", "parameters", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-dm-rest-services/src/main/java/net/roboconf/dm/rest/services/internal/filters/AuthenticationFilter.java#L260-L266
38,711
roboconf/roboconf-platform
core/roboconf-agent/src/main/java/net/roboconf/agent/internal/PluginProxy.java
PluginProxy.resetAllCounters
public static synchronized void resetAllCounters() { initializeCount.set(0); deployCount.set(0); undeployCount.set(0); startCount.set(0); stopCount.set(0); updateCount.set(0); errorCount.set( 0 ); }
java
public static synchronized void resetAllCounters() { initializeCount.set(0); deployCount.set(0); undeployCount.set(0); startCount.set(0); stopCount.set(0); updateCount.set(0); errorCount.set( 0 ); }
[ "public", "static", "synchronized", "void", "resetAllCounters", "(", ")", "{", "initializeCount", ".", "set", "(", "0", ")", ";", "deployCount", ".", "set", "(", "0", ")", ";", "undeployCount", ".", "set", "(", "0", ")", ";", "startCount", ".", "set", ...
Resets all counters.
[ "Resets", "all", "counters", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-agent/src/main/java/net/roboconf/agent/internal/PluginProxy.java#L63-L71
38,712
roboconf/roboconf-platform
core/roboconf-agent-monitoring/src/main/java/net/roboconf/agent/monitoring/internal/nagios/LiveStatusClient.java
LiveStatusClient.queryLivestatus
public String queryLivestatus( String nagiosQuery ) throws UnknownHostException, IOException { Socket liveStatusSocket = null; try { this.logger.fine( "About to open a connection through Live Status..." ); liveStatusSocket = new Socket( this.host, this.port ); this.logger.fine( "A connection was establish...
java
public String queryLivestatus( String nagiosQuery ) throws UnknownHostException, IOException { Socket liveStatusSocket = null; try { this.logger.fine( "About to open a connection through Live Status..." ); liveStatusSocket = new Socket( this.host, this.port ); this.logger.fine( "A connection was establish...
[ "public", "String", "queryLivestatus", "(", "String", "nagiosQuery", ")", "throws", "UnknownHostException", ",", "IOException", "{", "Socket", "liveStatusSocket", "=", "null", ";", "try", "{", "this", ".", "logger", ".", "fine", "(", "\"About to open a connection th...
Queries a live status server. @param nagiosQuery the query to pass through a socket (not null) @return the response @throws UnknownHostException @throws IOException
[ "Queries", "a", "live", "status", "server", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-agent-monitoring/src/main/java/net/roboconf/agent/monitoring/internal/nagios/LiveStatusClient.java#L73-L101
38,713
roboconf/roboconf-platform
core/roboconf-dm-rest-services/src/main/java/net/roboconf/dm/rest/services/internal/resources/impl/DebugResource.java
DebugResource.createDiagnostic
Diagnostic createDiagnostic( Instance instance ) { Diagnostic result = new Diagnostic( InstanceHelpers.computeInstancePath( instance )); for( Map.Entry<String,Boolean> entry : ComponentHelpers.findComponentDependenciesFor( instance.getComponent()).entrySet()) { String facetOrComponentName = entry.getKey(); ...
java
Diagnostic createDiagnostic( Instance instance ) { Diagnostic result = new Diagnostic( InstanceHelpers.computeInstancePath( instance )); for( Map.Entry<String,Boolean> entry : ComponentHelpers.findComponentDependenciesFor( instance.getComponent()).entrySet()) { String facetOrComponentName = entry.getKey(); ...
[ "Diagnostic", "createDiagnostic", "(", "Instance", "instance", ")", "{", "Diagnostic", "result", "=", "new", "Diagnostic", "(", "InstanceHelpers", ".", "computeInstancePath", "(", "instance", ")", ")", ";", "for", "(", "Map", ".", "Entry", "<", "String", ",", ...
Creates a diagnostic for an instance. @param instance a non-null instance @return a non-null diagnostic
[ "Creates", "a", "diagnostic", "for", "an", "instance", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-dm-rest-services/src/main/java/net/roboconf/dm/rest/services/internal/resources/impl/DebugResource.java#L184-L198
38,714
roboconf/roboconf-platform
core/roboconf-core/src/main/java/net/roboconf/core/model/helpers/VariableHelpers.java
VariableHelpers.parseExportedVariables
public static Map<String,ExportedVariable> parseExportedVariables( String line ) { Pattern randomPattern = Pattern.compile( ParsingConstants.PROPERTY_GRAPH_RANDOM_PATTERN, Pattern.CASE_INSENSITIVE ); Pattern varPattern = Pattern.compile( "([^,=]+)(\\s*=\\s*(\"([^\",]+)\"|([^,]+)))?" ); Map<String,ExportedVariab...
java
public static Map<String,ExportedVariable> parseExportedVariables( String line ) { Pattern randomPattern = Pattern.compile( ParsingConstants.PROPERTY_GRAPH_RANDOM_PATTERN, Pattern.CASE_INSENSITIVE ); Pattern varPattern = Pattern.compile( "([^,=]+)(\\s*=\\s*(\"([^\",]+)\"|([^,]+)))?" ); Map<String,ExportedVariab...
[ "public", "static", "Map", "<", "String", ",", "ExportedVariable", ">", "parseExportedVariables", "(", "String", "line", ")", "{", "Pattern", "randomPattern", "=", "Pattern", ".", "compile", "(", "ParsingConstants", ".", "PROPERTY_GRAPH_RANDOM_PATTERN", ",", "Patter...
Parse a list of exported variables. @param line a non-null line @return a non-null map of exported variables
[ "Parse", "a", "list", "of", "exported", "variables", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-core/src/main/java/net/roboconf/core/model/helpers/VariableHelpers.java#L114-L154
38,715
roboconf/roboconf-platform
core/roboconf-core/src/main/java/net/roboconf/core/model/helpers/VariableHelpers.java
VariableHelpers.findPrefixesForExportedVariables
public static Set<String> findPrefixesForExportedVariables( Instance instance ) { Set<String> result = new HashSet<> (); for( String exportedVariableName : InstanceHelpers.findAllExportedVariables( instance ).keySet()) result.add( VariableHelpers.parseVariableName( exportedVariableName ).getKey()); return re...
java
public static Set<String> findPrefixesForExportedVariables( Instance instance ) { Set<String> result = new HashSet<> (); for( String exportedVariableName : InstanceHelpers.findAllExportedVariables( instance ).keySet()) result.add( VariableHelpers.parseVariableName( exportedVariableName ).getKey()); return re...
[ "public", "static", "Set", "<", "String", ">", "findPrefixesForExportedVariables", "(", "Instance", "instance", ")", "{", "Set", "<", "String", ">", "result", "=", "new", "HashSet", "<>", "(", ")", ";", "for", "(", "String", "exportedVariableName", ":", "Ins...
Finds the component and facet names that prefix the variables an instance exports. @param instance an instance @return a non-null set with all the component and facet names this instance exports
[ "Finds", "the", "component", "and", "facet", "names", "that", "prefix", "the", "variables", "an", "instance", "exports", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-core/src/main/java/net/roboconf/core/model/helpers/VariableHelpers.java#L162-L169
38,716
roboconf/roboconf-platform
core/roboconf-core/src/main/java/net/roboconf/core/model/helpers/VariableHelpers.java
VariableHelpers.findPrefixesForImportedVariables
public static Set<String> findPrefixesForImportedVariables( Instance instance ) { Set<String> result = new HashSet<> (); for( ImportedVariable var : ComponentHelpers.findAllImportedVariables( instance.getComponent()).values()) result.add( VariableHelpers.parseVariableName( var.getName()).getKey()); return re...
java
public static Set<String> findPrefixesForImportedVariables( Instance instance ) { Set<String> result = new HashSet<> (); for( ImportedVariable var : ComponentHelpers.findAllImportedVariables( instance.getComponent()).values()) result.add( VariableHelpers.parseVariableName( var.getName()).getKey()); return re...
[ "public", "static", "Set", "<", "String", ">", "findPrefixesForImportedVariables", "(", "Instance", "instance", ")", "{", "Set", "<", "String", ">", "result", "=", "new", "HashSet", "<>", "(", ")", ";", "for", "(", "ImportedVariable", "var", ":", "ComponentH...
Finds the component and facet names that prefix the variables an instance imports. @param instance an instance @return a non-null set with all the component and facet names this instance imports
[ "Finds", "the", "component", "and", "facet", "names", "that", "prefix", "the", "variables", "an", "instance", "imports", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-core/src/main/java/net/roboconf/core/model/helpers/VariableHelpers.java#L177-L184
38,717
roboconf/roboconf-platform
miscellaneous/roboconf-dm-rest-client/src/main/java/net/roboconf/dm/rest/client/delegates/ApplicationWsDelegate.java
ApplicationWsDelegate.setDescription
public void setDescription( String applicationName, String newDesc ) throws ApplicationWsException { this.logger.finer( "Updating the description of application " + applicationName + "." ); WebResource path = this.resource.path( UrlConstants.APP ).path( applicationName ).path( "description" ); ClientResponse r...
java
public void setDescription( String applicationName, String newDesc ) throws ApplicationWsException { this.logger.finer( "Updating the description of application " + applicationName + "." ); WebResource path = this.resource.path( UrlConstants.APP ).path( applicationName ).path( "description" ); ClientResponse r...
[ "public", "void", "setDescription", "(", "String", "applicationName", ",", "String", "newDesc", ")", "throws", "ApplicationWsException", "{", "this", ".", "logger", ".", "finer", "(", "\"Updating the description of application \"", "+", "applicationName", "+", "\".\"", ...
Changes the description of an application. @param applicationName the application name @param newDesc the new description to set @throws ApplicationWsException if something went wrong
[ "Changes", "the", "description", "of", "an", "application", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/miscellaneous/roboconf-dm-rest-client/src/main/java/net/roboconf/dm/rest/client/delegates/ApplicationWsDelegate.java#L108-L120
38,718
roboconf/roboconf-platform
miscellaneous/roboconf-dm-rest-client/src/main/java/net/roboconf/dm/rest/client/delegates/ApplicationWsDelegate.java
ApplicationWsDelegate.undeployAll
public void undeployAll( String applicationName, String instancePath ) throws ApplicationWsException { this.logger.finer( "Undeploying instances in " + applicationName + " from instance = " + instancePath ); WebResource path = this.resource.path( UrlConstants.APP ).path( applicationName ).path( "undeploy-all" )...
java
public void undeployAll( String applicationName, String instancePath ) throws ApplicationWsException { this.logger.finer( "Undeploying instances in " + applicationName + " from instance = " + instancePath ); WebResource path = this.resource.path( UrlConstants.APP ).path( applicationName ).path( "undeploy-all" )...
[ "public", "void", "undeployAll", "(", "String", "applicationName", ",", "String", "instancePath", ")", "throws", "ApplicationWsException", "{", "this", ".", "logger", ".", "finer", "(", "\"Undeploying instances in \"", "+", "applicationName", "+", "\" from instance = \"...
Undeploys several instances at once. @param applicationName the application name @param instancePath the path of the instance to undeploy (null for all the application instances) @throws ApplicationWsException if something went wrong
[ "Undeploys", "several", "instances", "at", "once", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/miscellaneous/roboconf-dm-rest-client/src/main/java/net/roboconf/dm/rest/client/delegates/ApplicationWsDelegate.java#L177-L192
38,719
roboconf/roboconf-platform
miscellaneous/roboconf-dm-rest-client/src/main/java/net/roboconf/dm/rest/client/delegates/ApplicationWsDelegate.java
ApplicationWsDelegate.listChildrenInstances
public List<Instance> listChildrenInstances( String applicationName, String instancePath, boolean all ) { this.logger.finer( "Listing children instances for " + instancePath + " in " + applicationName + "." ); WebResource path = this.resource .path( UrlConstants.APP ).path( applicationName ).path( "instances" ...
java
public List<Instance> listChildrenInstances( String applicationName, String instancePath, boolean all ) { this.logger.finer( "Listing children instances for " + instancePath + " in " + applicationName + "." ); WebResource path = this.resource .path( UrlConstants.APP ).path( applicationName ).path( "instances" ...
[ "public", "List", "<", "Instance", ">", "listChildrenInstances", "(", "String", "applicationName", ",", "String", "instancePath", ",", "boolean", "all", ")", "{", "this", ".", "logger", ".", "finer", "(", "\"Listing children instances for \"", "+", "instancePath", ...
Lists all the children of an instance. @param applicationName the application name @param instancePath the instance path (null to get root instances) @param all true to list indirect children too, false to only list direct children @return a non-null list of instance paths
[ "Lists", "all", "the", "children", "of", "an", "instance", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/miscellaneous/roboconf-dm-rest-client/src/main/java/net/roboconf/dm/rest/client/delegates/ApplicationWsDelegate.java#L202-L226
38,720
roboconf/roboconf-platform
miscellaneous/roboconf-dm-rest-client/src/main/java/net/roboconf/dm/rest/client/delegates/ApplicationWsDelegate.java
ApplicationWsDelegate.addInstance
public void addInstance( String applicationName, String parentInstancePath, Instance instance ) throws ApplicationWsException { this.logger.finer( "Adding an instance to the application " + applicationName + "..." ); WebResource path = this.resource.path( UrlConstants.APP ).path( applicationName ).path( "instances...
java
public void addInstance( String applicationName, String parentInstancePath, Instance instance ) throws ApplicationWsException { this.logger.finer( "Adding an instance to the application " + applicationName + "..." ); WebResource path = this.resource.path( UrlConstants.APP ).path( applicationName ).path( "instances...
[ "public", "void", "addInstance", "(", "String", "applicationName", ",", "String", "parentInstancePath", ",", "Instance", "instance", ")", "throws", "ApplicationWsException", "{", "this", ".", "logger", ".", "finer", "(", "\"Adding an instance to the application \"", "+"...
Adds an instance into an application. @param applicationName the application name @param parentInstancePath the path of the parent instance (null to create a root instance) @param instance the instance to add @throws ApplicationWsException if a problem occurred with the instance management
[ "Adds", "an", "instance", "into", "an", "application", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/miscellaneous/roboconf-dm-rest-client/src/main/java/net/roboconf/dm/rest/client/delegates/ApplicationWsDelegate.java#L236-L249
38,721
roboconf/roboconf-platform
miscellaneous/roboconf-dm-rest-client/src/main/java/net/roboconf/dm/rest/client/delegates/ApplicationWsDelegate.java
ApplicationWsDelegate.removeInstance
public void removeInstance( String applicationName, String instancePath ) { this.logger.finer( String.format( "Removing instance \"%s\" from application \"%s\"...", instancePath, applicationName ) ); WebResource path = this.resource .path( UrlConstants.APP ) .path( applicationName ) .path( "instanc...
java
public void removeInstance( String applicationName, String instancePath ) { this.logger.finer( String.format( "Removing instance \"%s\" from application \"%s\"...", instancePath, applicationName ) ); WebResource path = this.resource .path( UrlConstants.APP ) .path( applicationName ) .path( "instanc...
[ "public", "void", "removeInstance", "(", "String", "applicationName", ",", "String", "instancePath", ")", "{", "this", ".", "logger", ".", "finer", "(", "String", ".", "format", "(", "\"Removing instance \\\"%s\\\" from application \\\"%s\\\"...\"", ",", "instancePath",...
Removes an instance. @param applicationName the application name @param instancePath the path of the instance to remove
[ "Removes", "an", "instance", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/miscellaneous/roboconf-dm-rest-client/src/main/java/net/roboconf/dm/rest/client/delegates/ApplicationWsDelegate.java#L258-L271
38,722
roboconf/roboconf-platform
miscellaneous/roboconf-dm-rest-client/src/main/java/net/roboconf/dm/rest/client/delegates/ApplicationWsDelegate.java
ApplicationWsDelegate.bindApplication
public void bindApplication( String applicationName, String boundTplName, String boundApp ) throws ApplicationWsException { this.logger.finer( "Creating a binding for external exports in " + applicationName + "..." ); WebResource path = this.resource.path( UrlConstants.APP ) .path( applicationName ).path( "b...
java
public void bindApplication( String applicationName, String boundTplName, String boundApp ) throws ApplicationWsException { this.logger.finer( "Creating a binding for external exports in " + applicationName + "..." ); WebResource path = this.resource.path( UrlConstants.APP ) .path( applicationName ).path( "b...
[ "public", "void", "bindApplication", "(", "String", "applicationName", ",", "String", "boundTplName", ",", "String", "boundApp", ")", "throws", "ApplicationWsException", "{", "this", ".", "logger", ".", "finer", "(", "\"Creating a binding for external exports in \"", "+...
Binds an application for external exports. @param applicationName the application name @param boundTplName the template name (no qualifier as it does not make sense for external exports) @param boundApp the name of the application (instance of <code>tplName</code>) @throws ApplicationWsException if something went wrong
[ "Binds", "an", "application", "for", "external", "exports", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/miscellaneous/roboconf-dm-rest-client/src/main/java/net/roboconf/dm/rest/client/delegates/ApplicationWsDelegate.java#L380-L392
38,723
roboconf/roboconf-platform
miscellaneous/roboconf-dm-rest-client/src/main/java/net/roboconf/dm/rest/client/delegates/ApplicationWsDelegate.java
ApplicationWsDelegate.listAllCommands
public List<String> listAllCommands( String applicationName ) { this.logger.finer( "Listing commands in " + applicationName + "..." ); WebResource path = this.resource.path( UrlConstants.APP ) .path( applicationName ).path( "commands" ); List<String> result = this.wsClient.createBuilder( path ) .accep...
java
public List<String> listAllCommands( String applicationName ) { this.logger.finer( "Listing commands in " + applicationName + "..." ); WebResource path = this.resource.path( UrlConstants.APP ) .path( applicationName ).path( "commands" ); List<String> result = this.wsClient.createBuilder( path ) .accep...
[ "public", "List", "<", "String", ">", "listAllCommands", "(", "String", "applicationName", ")", "{", "this", ".", "logger", ".", "finer", "(", "\"Listing commands in \"", "+", "applicationName", "+", "\"...\"", ")", ";", "WebResource", "path", "=", "this", "."...
Lists application commands. @param applicationName an application name @return a non-null list of command names
[ "Lists", "application", "commands", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/miscellaneous/roboconf-dm-rest-client/src/main/java/net/roboconf/dm/rest/client/delegates/ApplicationWsDelegate.java#L400-L419
38,724
roboconf/roboconf-platform
core/roboconf-agent/src/main/java/net/roboconf/agent/internal/Agent.java
Agent.findPlugin
public PluginInterface findPlugin( Instance instance ) { // Find a plug-in PluginInterface result = null; if( this.simulatePlugins ) { this.logger.finer( "Simulating plugins..." ); result = new PluginMock(); } else { String installerName = null; if( instance.getComponent() != null ) installerN...
java
public PluginInterface findPlugin( Instance instance ) { // Find a plug-in PluginInterface result = null; if( this.simulatePlugins ) { this.logger.finer( "Simulating plugins..." ); result = new PluginMock(); } else { String installerName = null; if( instance.getComponent() != null ) installerN...
[ "public", "PluginInterface", "findPlugin", "(", "Instance", "instance", ")", "{", "// Find a plug-in", "PluginInterface", "result", "=", "null", ";", "if", "(", "this", ".", "simulatePlugins", ")", "{", "this", ".", "logger", ".", "finer", "(", "\"Simulating plu...
Finds the right plug-in for an instance. @param instance a non-null instance @return the plug-in associated with the instance's installer name
[ "Finds", "the", "right", "plug", "-", "in", "for", "an", "instance", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-agent/src/main/java/net/roboconf/agent/internal/Agent.java#L213-L243
38,725
roboconf/roboconf-platform
core/roboconf-agent/src/main/java/net/roboconf/agent/internal/Agent.java
Agent.listPlugins
public void listPlugins() { if( this.plugins.isEmpty()) { this.logger.info( "No plug-in was found for Roboconf's agent." ); } else { StringBuilder sb = new StringBuilder( "Available plug-ins in Roboconf's agent: " ); for( Iterator<PluginInterface> it = this.plugins.iterator(); it.hasNext(); ) { sb.ap...
java
public void listPlugins() { if( this.plugins.isEmpty()) { this.logger.info( "No plug-in was found for Roboconf's agent." ); } else { StringBuilder sb = new StringBuilder( "Available plug-ins in Roboconf's agent: " ); for( Iterator<PluginInterface> it = this.plugins.iterator(); it.hasNext(); ) { sb.ap...
[ "public", "void", "listPlugins", "(", ")", "{", "if", "(", "this", ".", "plugins", ".", "isEmpty", "(", ")", ")", "{", "this", ".", "logger", ".", "info", "(", "\"No plug-in was found for Roboconf's agent.\"", ")", ";", "}", "else", "{", "StringBuilder", "...
This method lists the available plug-ins and logs it.
[ "This", "method", "lists", "the", "available", "plug", "-", "ins", "and", "logs", "it", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-agent/src/main/java/net/roboconf/agent/internal/Agent.java#L249-L265
38,726
roboconf/roboconf-platform
core/roboconf-agent/src/main/java/net/roboconf/agent/internal/Agent.java
Agent.pluginAppears
public void pluginAppears( PluginInterface pi ) { if( pi != null ) { this.logger.info( "Plugin '" + pi.getPluginName() + "' is now available in Roboconf's agent." ); this.plugins.add( pi ); listPlugins(); } }
java
public void pluginAppears( PluginInterface pi ) { if( pi != null ) { this.logger.info( "Plugin '" + pi.getPluginName() + "' is now available in Roboconf's agent." ); this.plugins.add( pi ); listPlugins(); } }
[ "public", "void", "pluginAppears", "(", "PluginInterface", "pi", ")", "{", "if", "(", "pi", "!=", "null", ")", "{", "this", ".", "logger", ".", "info", "(", "\"Plugin '\"", "+", "pi", ".", "getPluginName", "(", ")", "+", "\"' is now available in Roboconf's a...
This method is invoked by iPojo every time a new plug-in appears. @param pi the appearing plugin.
[ "This", "method", "is", "invoked", "by", "iPojo", "every", "time", "a", "new", "plug", "-", "in", "appears", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-agent/src/main/java/net/roboconf/agent/internal/Agent.java#L272-L278
38,727
roboconf/roboconf-platform
core/roboconf-agent/src/main/java/net/roboconf/agent/internal/Agent.java
Agent.pluginDisappears
public void pluginDisappears( PluginInterface pi ) { // May happen if a plug-in could not be instantiated // (iPojo uses proxies). In this case, it results in a NPE here. if( pi == null ) { this.logger.info( "An invalid plugin is removed." ); } else { this.plugins.remove( pi ); this.logger.info( "Plug...
java
public void pluginDisappears( PluginInterface pi ) { // May happen if a plug-in could not be instantiated // (iPojo uses proxies). In this case, it results in a NPE here. if( pi == null ) { this.logger.info( "An invalid plugin is removed." ); } else { this.plugins.remove( pi ); this.logger.info( "Plug...
[ "public", "void", "pluginDisappears", "(", "PluginInterface", "pi", ")", "{", "// May happen if a plug-in could not be instantiated", "// (iPojo uses proxies). In this case, it results in a NPE here.", "if", "(", "pi", "==", "null", ")", "{", "this", ".", "logger", ".", "in...
This method is invoked by iPojo every time a plug-in disappears. @param pi the disappearing plugin.
[ "This", "method", "is", "invoked", "by", "iPojo", "every", "time", "a", "plug", "-", "in", "disappears", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-agent/src/main/java/net/roboconf/agent/internal/Agent.java#L285-L297
38,728
roboconf/roboconf-platform
core/roboconf-agent/src/main/java/net/roboconf/agent/internal/Agent.java
Agent.reloadUserData
void reloadUserData() { if( Utils.isEmptyOrWhitespaces( this.parameters )) { this.logger.warning( "No parameters were specified in the agent configuration. No user data will be retrieved." ); } else if( ! this.overrideProperties ) { this.logger.fine( "User data are NOT supposed to be used." ); } else if(...
java
void reloadUserData() { if( Utils.isEmptyOrWhitespaces( this.parameters )) { this.logger.warning( "No parameters were specified in the agent configuration. No user data will be retrieved." ); } else if( ! this.overrideProperties ) { this.logger.fine( "User data are NOT supposed to be used." ); } else if(...
[ "void", "reloadUserData", "(", ")", "{", "if", "(", "Utils", ".", "isEmptyOrWhitespaces", "(", "this", ".", "parameters", ")", ")", "{", "this", ".", "logger", ".", "warning", "(", "\"No parameters were specified in the agent configuration. No user data will be retrieve...
Reloads user data.
[ "Reloads", "user", "data", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-agent/src/main/java/net/roboconf/agent/internal/Agent.java#L367-L430
38,729
stephanrauh/AngularFaces
AngularFaces_2.0/incubator/AngularFaces-widgets/src/main/java/de/beyondjava/angularFaces/secure/NGDefaultSecurityFilter.java
NGDefaultSecurityFilter.checkParameter
@Override public boolean checkParameter(String key, String value) { if (null == value) { return true; } value = value.toLowerCase(); if (value.contains("'")) { return false; } if (value.contains("--")) { return false; } if (value.contains("d...
java
@Override public boolean checkParameter(String key, String value) { if (null == value) { return true; } value = value.toLowerCase(); if (value.contains("'")) { return false; } if (value.contains("--")) { return false; } if (value.contains("d...
[ "@", "Override", "public", "boolean", "checkParameter", "(", "String", "key", ",", "String", "value", ")", "{", "if", "(", "null", "==", "value", ")", "{", "return", "true", ";", "}", "value", "=", "value", ".", "toLowerCase", "(", ")", ";", "if", "(...
returns true if the parameter seems to be ok.
[ "returns", "true", "if", "the", "parameter", "seems", "to", "be", "ok", "." ]
43d915f004645b1bbbf2625214294dab0858ba01
https://github.com/stephanrauh/AngularFaces/blob/43d915f004645b1bbbf2625214294dab0858ba01/AngularFaces_2.0/incubator/AngularFaces-widgets/src/main/java/de/beyondjava/angularFaces/secure/NGDefaultSecurityFilter.java#L35-L68
38,730
roboconf/roboconf-platform
miscellaneous/roboconf-dm-rest-client/src/main/java/net/roboconf/dm/rest/client/delegates/SchedulerWsDelegate.java
SchedulerWsDelegate.createOrUpdateJob
public String createOrUpdateJob( String jobId, String jobName, String appName, String cmdName, String cron ) throws SchedulerWsException { if( jobId == null ) this.logger.finer( "Creating a new scheduled job." ); else this.logger.finer( "Updating the following scheduled job: " + jobId ); WebResource pat...
java
public String createOrUpdateJob( String jobId, String jobName, String appName, String cmdName, String cron ) throws SchedulerWsException { if( jobId == null ) this.logger.finer( "Creating a new scheduled job." ); else this.logger.finer( "Updating the following scheduled job: " + jobId ); WebResource pat...
[ "public", "String", "createOrUpdateJob", "(", "String", "jobId", ",", "String", "jobName", ",", "String", "appName", ",", "String", "cmdName", ",", "String", "cron", ")", "throws", "SchedulerWsException", "{", "if", "(", "jobId", "==", "null", ")", "this", "...
Creates or updates a scheduled job. @param jobId the job's ID (null to create a new job) @param jobName the job's name @param appName the application's name @param cmdName the name of the commands file to execute @param cron the CRON expression to trigger the job @return the created (or updated) job @throws SchedulerWs...
[ "Creates", "or", "updates", "a", "scheduled", "job", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/miscellaneous/roboconf-dm-rest-client/src/main/java/net/roboconf/dm/rest/client/delegates/SchedulerWsDelegate.java#L131-L155
38,731
roboconf/roboconf-platform
miscellaneous/roboconf-dm-rest-client/src/main/java/net/roboconf/dm/rest/client/delegates/SchedulerWsDelegate.java
SchedulerWsDelegate.deleteJob
public void deleteJob( String jobId ) throws SchedulerWsException { this.logger.finer( "Deleting scheduled job: " + jobId ); WebResource path = this.resource.path( UrlConstants.SCHEDULER ).path( jobId ); ClientResponse response = this.wsClient.createBuilder( path ) .accept( MediaType.APPLICATION_JSON ) ...
java
public void deleteJob( String jobId ) throws SchedulerWsException { this.logger.finer( "Deleting scheduled job: " + jobId ); WebResource path = this.resource.path( UrlConstants.SCHEDULER ).path( jobId ); ClientResponse response = this.wsClient.createBuilder( path ) .accept( MediaType.APPLICATION_JSON ) ...
[ "public", "void", "deleteJob", "(", "String", "jobId", ")", "throws", "SchedulerWsException", "{", "this", ".", "logger", ".", "finer", "(", "\"Deleting scheduled job: \"", "+", "jobId", ")", ";", "WebResource", "path", "=", "this", ".", "resource", ".", "path...
Deletes a scheduled job. @param jobId the job's ID @throws SchedulerWsException if the deletion failed
[ "Deletes", "a", "scheduled", "job", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/miscellaneous/roboconf-dm-rest-client/src/main/java/net/roboconf/dm/rest/client/delegates/SchedulerWsDelegate.java#L163-L173
38,732
roboconf/roboconf-platform
miscellaneous/roboconf-dm-rest-client/src/main/java/net/roboconf/dm/rest/client/delegates/SchedulerWsDelegate.java
SchedulerWsDelegate.getJobProperties
public ScheduledJob getJobProperties( String jobId ) throws SchedulerWsException { this.logger.finer( "Getting the properties of a scheduled job: " + jobId ); WebResource path = this.resource.path( UrlConstants.SCHEDULER ).path( jobId ); ClientResponse response = this.wsClient.createBuilder( path ) .acce...
java
public ScheduledJob getJobProperties( String jobId ) throws SchedulerWsException { this.logger.finer( "Getting the properties of a scheduled job: " + jobId ); WebResource path = this.resource.path( UrlConstants.SCHEDULER ).path( jobId ); ClientResponse response = this.wsClient.createBuilder( path ) .acce...
[ "public", "ScheduledJob", "getJobProperties", "(", "String", "jobId", ")", "throws", "SchedulerWsException", "{", "this", ".", "logger", ".", "finer", "(", "\"Getting the properties of a scheduled job: \"", "+", "jobId", ")", ";", "WebResource", "path", "=", "this", ...
Gets the properties of a scheduled job. @param jobId the job's ID @throws SchedulerWsException if the retrieving failed
[ "Gets", "the", "properties", "of", "a", "scheduled", "job", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/miscellaneous/roboconf-dm-rest-client/src/main/java/net/roboconf/dm/rest/client/delegates/SchedulerWsDelegate.java#L181-L192
38,733
roboconf/roboconf-platform
core/roboconf-core/src/main/java/net/roboconf/core/utils/ProcessStore.java
ProcessStore.getProcess
public static synchronized Process getProcess(String applicationName, String scopedInstancePath) { return PROCESS_MAP.get(toAgentId(applicationName, scopedInstancePath)); }
java
public static synchronized Process getProcess(String applicationName, String scopedInstancePath) { return PROCESS_MAP.get(toAgentId(applicationName, scopedInstancePath)); }
[ "public", "static", "synchronized", "Process", "getProcess", "(", "String", "applicationName", ",", "String", "scopedInstancePath", ")", "{", "return", "PROCESS_MAP", ".", "get", "(", "toAgentId", "(", "applicationName", ",", "scopedInstancePath", ")", ")", ";", "...
Retrieves a stored process, when found. @return The process
[ "Retrieves", "a", "stored", "process", "when", "found", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-core/src/main/java/net/roboconf/core/utils/ProcessStore.java#L54-L56
38,734
roboconf/roboconf-platform
core/roboconf-core/src/main/java/net/roboconf/core/utils/ProcessStore.java
ProcessStore.clearProcess
public static synchronized Process clearProcess(String applicationName, String scopedInstancePath) { return PROCESS_MAP.remove(toAgentId(applicationName, scopedInstancePath)); }
java
public static synchronized Process clearProcess(String applicationName, String scopedInstancePath) { return PROCESS_MAP.remove(toAgentId(applicationName, scopedInstancePath)); }
[ "public", "static", "synchronized", "Process", "clearProcess", "(", "String", "applicationName", ",", "String", "scopedInstancePath", ")", "{", "return", "PROCESS_MAP", ".", "remove", "(", "toAgentId", "(", "applicationName", ",", "scopedInstancePath", ")", ")", ";"...
Removes a stored process, if found.
[ "Removes", "a", "stored", "process", "if", "found", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-core/src/main/java/net/roboconf/core/utils/ProcessStore.java#L62-L64
38,735
stephanrauh/AngularFaces
AngularFaces_2.0/AngularFaces-core/src/main/java/de/beyondjava/angularFaces/core/transformation/AttributeUtilities.java
AttributeUtilities.getAttribute
public static Object getAttribute(UIComponent component, String attributeName) { Object value = component.getPassThroughAttributes().get(attributeName); if (null == value) { value = component.getAttributes().get(attributeName); } if (null == value) { if (!attributeName.equals(attributeName.toLowerCase()))...
java
public static Object getAttribute(UIComponent component, String attributeName) { Object value = component.getPassThroughAttributes().get(attributeName); if (null == value) { value = component.getAttributes().get(attributeName); } if (null == value) { if (!attributeName.equals(attributeName.toLowerCase()))...
[ "public", "static", "Object", "getAttribute", "(", "UIComponent", "component", ",", "String", "attributeName", ")", "{", "Object", "value", "=", "component", ".", "getPassThroughAttributes", "(", ")", ".", "get", "(", "attributeName", ")", ";", "if", "(", "nul...
Apache MyFaces make HMTL attributes of HTML elements pass-through-attributes. This method finds the attribute, no matter whether it is stored as an ordinary or as an pass-through-attribute.
[ "Apache", "MyFaces", "make", "HMTL", "attributes", "of", "HTML", "elements", "pass", "-", "through", "-", "attributes", ".", "This", "method", "finds", "the", "attribute", "no", "matter", "whether", "it", "is", "stored", "as", "an", "ordinary", "or", "as", ...
43d915f004645b1bbbf2625214294dab0858ba01
https://github.com/stephanrauh/AngularFaces/blob/43d915f004645b1bbbf2625214294dab0858ba01/AngularFaces_2.0/AngularFaces-core/src/main/java/de/beyondjava/angularFaces/core/transformation/AttributeUtilities.java#L37-L51
38,736
stephanrauh/AngularFaces
AngularFaces_2.0/AngularFaces-core/src/main/java/de/beyondjava/angularFaces/core/transformation/AttributeUtilities.java
AttributeUtilities.getAttributeAsString
public static String getAttributeAsString(UIComponent component, String attributeName) { try { Object attribute = getAttribute(component, attributeName); if (null != attribute) { if (attribute instanceof ValueExpression) { return (String) ((ValueExpression) attribute) .getValue(FacesContext.getC...
java
public static String getAttributeAsString(UIComponent component, String attributeName) { try { Object attribute = getAttribute(component, attributeName); if (null != attribute) { if (attribute instanceof ValueExpression) { return (String) ((ValueExpression) attribute) .getValue(FacesContext.getC...
[ "public", "static", "String", "getAttributeAsString", "(", "UIComponent", "component", ",", "String", "attributeName", ")", "{", "try", "{", "Object", "attribute", "=", "getAttribute", "(", "component", ",", "attributeName", ")", ";", "if", "(", "null", "!=", ...
Apache MyFaces sometimes returns a ValueExpression when you read an attribute. Mojarra does not, but requires a second call. The method treats both frameworks in a uniform way and evaluates the expression, if needed, returning a String value.
[ "Apache", "MyFaces", "sometimes", "returns", "a", "ValueExpression", "when", "you", "read", "an", "attribute", ".", "Mojarra", "does", "not", "but", "requires", "a", "second", "call", ".", "The", "method", "treats", "both", "frameworks", "in", "a", "uniform", ...
43d915f004645b1bbbf2625214294dab0858ba01
https://github.com/stephanrauh/AngularFaces/blob/43d915f004645b1bbbf2625214294dab0858ba01/AngularFaces_2.0/AngularFaces-core/src/main/java/de/beyondjava/angularFaces/core/transformation/AttributeUtilities.java#L60-L86
38,737
roboconf/roboconf-platform
core/roboconf-plugin-script/src/main/java/net/roboconf/plugin/script/internal/PluginScript.java
PluginScript.generateTemplate
protected File generateTemplate(File template, Instance instance) throws IOException { String scriptName = instance.getName().replace( "\\s+", "_" ); File generated = File.createTempFile( scriptName, ".script"); InstanceTemplateHelper.injectInstanceImports(instance, template, generated); return generated; }
java
protected File generateTemplate(File template, Instance instance) throws IOException { String scriptName = instance.getName().replace( "\\s+", "_" ); File generated = File.createTempFile( scriptName, ".script"); InstanceTemplateHelper.injectInstanceImports(instance, template, generated); return generated; }
[ "protected", "File", "generateTemplate", "(", "File", "template", ",", "Instance", "instance", ")", "throws", "IOException", "{", "String", "scriptName", "=", "instance", ".", "getName", "(", ")", ".", "replace", "(", "\"\\\\s+\"", ",", "\"_\"", ")", ";", "F...
Generates a file from the template and the instance. @param template @param instance @return the generated file @throws IOException
[ "Generates", "a", "file", "from", "the", "template", "and", "the", "instance", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-plugin-script/src/main/java/net/roboconf/plugin/script/internal/PluginScript.java#L215-L222
38,738
roboconf/roboconf-platform
miscellaneous/roboconf-maven-plugin/src/main/java/net/roboconf/maven/MavenPluginUtils.java
MavenPluginUtils.formatErrors
public static StringBuilder formatErrors( Collection<? extends RoboconfError> errors, Log log ) { StringBuilder result = new StringBuilder(); for( Map.Entry<RoboconfError,String> entry : RoboconfErrorHelpers.formatErrors( errors, null, true ).entrySet()) { if( entry.getKey().getErrorCode().getLevel() == ErrorLe...
java
public static StringBuilder formatErrors( Collection<? extends RoboconfError> errors, Log log ) { StringBuilder result = new StringBuilder(); for( Map.Entry<RoboconfError,String> entry : RoboconfErrorHelpers.formatErrors( errors, null, true ).entrySet()) { if( entry.getKey().getErrorCode().getLevel() == ErrorLe...
[ "public", "static", "StringBuilder", "formatErrors", "(", "Collection", "<", "?", "extends", "RoboconfError", ">", "errors", ",", "Log", "log", ")", "{", "StringBuilder", "result", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", "Map", ".", "Entry", ...
Formats a Roboconf errors and outputs it in the logs. @param error an error @param log the Maven logger @return a string builder with the output
[ "Formats", "a", "Roboconf", "errors", "and", "outputs", "it", "in", "the", "logs", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/miscellaneous/roboconf-maven-plugin/src/main/java/net/roboconf/maven/MavenPluginUtils.java#L56-L70
38,739
stephanrauh/AngularFaces
AngularFaces_2.0/incubator/AngularFaces-widgets/src/main/java/de/beyondjava/angularFaces/secure/NGSecureRenderer.java
NGSecureRenderer.encodeBegin
@Override public void encodeBegin(FacesContext context, UIComponent component) throws IOException { long timer = System.nanoTime(); long random = (long) (Math.random() * Integer.MAX_VALUE); long token = timer ^ random; NGSecureUtilities.setSecurityToken(String.valueOf(token), compone...
java
@Override public void encodeBegin(FacesContext context, UIComponent component) throws IOException { long timer = System.nanoTime(); long random = (long) (Math.random() * Integer.MAX_VALUE); long token = timer ^ random; NGSecureUtilities.setSecurityToken(String.valueOf(token), compone...
[ "@", "Override", "public", "void", "encodeBegin", "(", "FacesContext", "context", ",", "UIComponent", "component", ")", "throws", "IOException", "{", "long", "timer", "=", "System", ".", "nanoTime", "(", ")", ";", "long", "random", "=", "(", "long", ")", "...
Stores a unique token in the session to prevent repeated submission of the same form.
[ "Stores", "a", "unique", "token", "in", "the", "session", "to", "prevent", "repeated", "submission", "of", "the", "same", "form", "." ]
43d915f004645b1bbbf2625214294dab0858ba01
https://github.com/stephanrauh/AngularFaces/blob/43d915f004645b1bbbf2625214294dab0858ba01/AngularFaces_2.0/incubator/AngularFaces-widgets/src/main/java/de/beyondjava/angularFaces/secure/NGSecureRenderer.java#L54-L64
38,740
roboconf/roboconf-platform
core/roboconf-target-docker/src/main/java/net/roboconf/target/docker/internal/DockerUtils.java
DockerUtils.createDockerClient
public static DockerClient createDockerClient( Map<String,String> targetProperties ) throws TargetException { // Validate what needs to be validated. Logger logger = Logger.getLogger( DockerHandler.class.getName()); logger.fine( "Setting the target properties." ); String edpt = targetProperties.get( DockerHan...
java
public static DockerClient createDockerClient( Map<String,String> targetProperties ) throws TargetException { // Validate what needs to be validated. Logger logger = Logger.getLogger( DockerHandler.class.getName()); logger.fine( "Setting the target properties." ); String edpt = targetProperties.get( DockerHan...
[ "public", "static", "DockerClient", "createDockerClient", "(", "Map", "<", "String", ",", "String", ">", "targetProperties", ")", "throws", "TargetException", "{", "// Validate what needs to be validated.", "Logger", "logger", "=", "Logger", ".", "getLogger", "(", "Do...
Creates a Docker client from target properties. @param targetProperties a non-null map @return a Docker client @throws TargetException if something went wrong
[ "Creates", "a", "Docker", "client", "from", "target", "properties", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-target-docker/src/main/java/net/roboconf/target/docker/internal/DockerUtils.java#L71-L94
38,741
roboconf/roboconf-platform
core/roboconf-target-docker/src/main/java/net/roboconf/target/docker/internal/DockerUtils.java
DockerUtils.deleteImageIfItExists
public static void deleteImageIfItExists( String imageId, DockerClient dockerClient ) { if( imageId != null ) { List<Image> images = dockerClient.listImagesCmd().exec(); if( findImageById( imageId, images ) != null ) dockerClient.removeImageCmd( imageId ).withForce( true ).exec(); } }
java
public static void deleteImageIfItExists( String imageId, DockerClient dockerClient ) { if( imageId != null ) { List<Image> images = dockerClient.listImagesCmd().exec(); if( findImageById( imageId, images ) != null ) dockerClient.removeImageCmd( imageId ).withForce( true ).exec(); } }
[ "public", "static", "void", "deleteImageIfItExists", "(", "String", "imageId", ",", "DockerClient", "dockerClient", ")", "{", "if", "(", "imageId", "!=", "null", ")", "{", "List", "<", "Image", ">", "images", "=", "dockerClient", ".", "listImagesCmd", "(", "...
Deletes a Docker image if it exists. @param imageId the image ID (not null) @param dockerClient a Docker client
[ "Deletes", "a", "Docker", "image", "if", "it", "exists", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-target-docker/src/main/java/net/roboconf/target/docker/internal/DockerUtils.java#L102-L109
38,742
roboconf/roboconf-platform
core/roboconf-target-docker/src/main/java/net/roboconf/target/docker/internal/DockerUtils.java
DockerUtils.findImageByIdOrByTag
public static Image findImageByIdOrByTag( String name, DockerClient dockerClient ) { Image image = null; if( ! Utils.isEmptyOrWhitespaces( name )) { Logger logger = Logger.getLogger( DockerUtils.class.getName()); List<Image> images = dockerClient.listImagesCmd().exec(); if(( image = DockerUtils.findImage...
java
public static Image findImageByIdOrByTag( String name, DockerClient dockerClient ) { Image image = null; if( ! Utils.isEmptyOrWhitespaces( name )) { Logger logger = Logger.getLogger( DockerUtils.class.getName()); List<Image> images = dockerClient.listImagesCmd().exec(); if(( image = DockerUtils.findImage...
[ "public", "static", "Image", "findImageByIdOrByTag", "(", "String", "name", ",", "DockerClient", "dockerClient", ")", "{", "Image", "image", "=", "null", ";", "if", "(", "!", "Utils", ".", "isEmptyOrWhitespaces", "(", "name", ")", ")", "{", "Logger", "logger...
Finds an image by ID or by tag. @param name an image ID or a tag name (can be null) @param dockerClient a Docker client (not null) @return an image, or null if none matched
[ "Finds", "an", "image", "by", "ID", "or", "by", "tag", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-target-docker/src/main/java/net/roboconf/target/docker/internal/DockerUtils.java#L118-L132
38,743
roboconf/roboconf-platform
core/roboconf-target-docker/src/main/java/net/roboconf/target/docker/internal/DockerUtils.java
DockerUtils.findImageById
public static Image findImageById( String imageId, List<Image> images ) { Image result = null; for( Image img : images ) { if( img.getId().equals(imageId)) { result = img; break; } } return result; }
java
public static Image findImageById( String imageId, List<Image> images ) { Image result = null; for( Image img : images ) { if( img.getId().equals(imageId)) { result = img; break; } } return result; }
[ "public", "static", "Image", "findImageById", "(", "String", "imageId", ",", "List", "<", "Image", ">", "images", ")", "{", "Image", "result", "=", "null", ";", "for", "(", "Image", "img", ":", "images", ")", "{", "if", "(", "img", ".", "getId", "(",...
Finds an image by ID. @param imageId the image ID (not null) @param images a non-null list of images @return an image, or null if none was found
[ "Finds", "an", "image", "by", "ID", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-target-docker/src/main/java/net/roboconf/target/docker/internal/DockerUtils.java#L141-L152
38,744
roboconf/roboconf-platform
core/roboconf-target-docker/src/main/java/net/roboconf/target/docker/internal/DockerUtils.java
DockerUtils.findImageByTag
public static Image findImageByTag( String imageTag, List<Image> images ) { Image result = null; for( Image img : images ) { String[] tags = img.getRepoTags(); if( tags == null ) continue; for( String s : tags ) { if( s.contains( imageTag )) { result = img; break; } } } retu...
java
public static Image findImageByTag( String imageTag, List<Image> images ) { Image result = null; for( Image img : images ) { String[] tags = img.getRepoTags(); if( tags == null ) continue; for( String s : tags ) { if( s.contains( imageTag )) { result = img; break; } } } retu...
[ "public", "static", "Image", "findImageByTag", "(", "String", "imageTag", ",", "List", "<", "Image", ">", "images", ")", "{", "Image", "result", "=", "null", ";", "for", "(", "Image", "img", ":", "images", ")", "{", "String", "[", "]", "tags", "=", "...
Finds an image by tag. @param imageTag the image tag (not null) @param images a non-null list of images @return an image, or null if none was found
[ "Finds", "an", "image", "by", "tag", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-target-docker/src/main/java/net/roboconf/target/docker/internal/DockerUtils.java#L161-L178
38,745
roboconf/roboconf-platform
core/roboconf-target-docker/src/main/java/net/roboconf/target/docker/internal/DockerUtils.java
DockerUtils.findContainerByIdOrByName
public static Container findContainerByIdOrByName( String name, DockerClient dockerClient ) { Container result = null; List<Container> containers = dockerClient.listContainersCmd().withShowAll( true ).exec(); for( Container container : containers ) { List<String> names = Arrays.asList( container.getNames()); ...
java
public static Container findContainerByIdOrByName( String name, DockerClient dockerClient ) { Container result = null; List<Container> containers = dockerClient.listContainersCmd().withShowAll( true ).exec(); for( Container container : containers ) { List<String> names = Arrays.asList( container.getNames()); ...
[ "public", "static", "Container", "findContainerByIdOrByName", "(", "String", "name", ",", "DockerClient", "dockerClient", ")", "{", "Container", "result", "=", "null", ";", "List", "<", "Container", ">", "containers", "=", "dockerClient", ".", "listContainersCmd", ...
Finds a container by ID or by name. @param name the container ID or name (not null) @param dockerClient a Docker client @return a container, or null if none was found
[ "Finds", "a", "container", "by", "ID", "or", "by", "name", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-target-docker/src/main/java/net/roboconf/target/docker/internal/DockerUtils.java#L187-L204
38,746
roboconf/roboconf-platform
core/roboconf-target-docker/src/main/java/net/roboconf/target/docker/internal/DockerUtils.java
DockerUtils.getContainerState
public static ContainerState getContainerState( String containerId, DockerClient dockerClient ) { ContainerState result = null; try { InspectContainerResponse resp = dockerClient.inspectContainerCmd( containerId ).exec(); if( resp != null ) result = resp.getState(); } catch( Exception e ) { // noth...
java
public static ContainerState getContainerState( String containerId, DockerClient dockerClient ) { ContainerState result = null; try { InspectContainerResponse resp = dockerClient.inspectContainerCmd( containerId ).exec(); if( resp != null ) result = resp.getState(); } catch( Exception e ) { // noth...
[ "public", "static", "ContainerState", "getContainerState", "(", "String", "containerId", ",", "DockerClient", "dockerClient", ")", "{", "ContainerState", "result", "=", "null", ";", "try", "{", "InspectContainerResponse", "resp", "=", "dockerClient", ".", "inspectCont...
Gets the state of a container. @param containerId the container ID @param dockerClient the Docker client @return a container state, or null if the container was not found
[ "Gets", "the", "state", "of", "a", "container", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-target-docker/src/main/java/net/roboconf/target/docker/internal/DockerUtils.java#L213-L226
38,747
roboconf/roboconf-platform
core/roboconf-target-docker/src/main/java/net/roboconf/target/docker/internal/DockerUtils.java
DockerUtils.configureOptions
public static void configureOptions( Map<String,String> options, CreateContainerCmd cmd ) throws TargetException { Logger logger = Logger.getLogger( DockerUtils.class.getName()); // Basically, we had two choices: // 1. Map our properties to the Java REST API. // 2. By-pass it and send our custom JSon object....
java
public static void configureOptions( Map<String,String> options, CreateContainerCmd cmd ) throws TargetException { Logger logger = Logger.getLogger( DockerUtils.class.getName()); // Basically, we had two choices: // 1. Map our properties to the Java REST API. // 2. By-pass it and send our custom JSon object....
[ "public", "static", "void", "configureOptions", "(", "Map", "<", "String", ",", "String", ">", "options", ",", "CreateContainerCmd", "cmd", ")", "throws", "TargetException", "{", "Logger", "logger", "=", "Logger", ".", "getLogger", "(", "DockerUtils", ".", "cl...
Finds the options and tries to configure them on the creation command. @param options the options (key = name, value = option value) @param cmd a non-null command to create a container @throws TargetException
[ "Finds", "the", "options", "and", "tries", "to", "configure", "them", "on", "the", "creation", "command", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-target-docker/src/main/java/net/roboconf/target/docker/internal/DockerUtils.java#L235-L318
38,748
roboconf/roboconf-platform
core/roboconf-target-docker/src/main/java/net/roboconf/target/docker/internal/DockerUtils.java
DockerUtils.prepareParameter
public static Object prepareParameter( String rawValue, Class<?> clazz ) throws TargetException { // Simple types Object result; if( clazz == int.class || clazz == Integer.class ) result = Integer.parseInt( rawValue ); else if( clazz == long.class || clazz == Long.class ) result = Long.parseLong( rawValu...
java
public static Object prepareParameter( String rawValue, Class<?> clazz ) throws TargetException { // Simple types Object result; if( clazz == int.class || clazz == Integer.class ) result = Integer.parseInt( rawValue ); else if( clazz == long.class || clazz == Long.class ) result = Long.parseLong( rawValu...
[ "public", "static", "Object", "prepareParameter", "(", "String", "rawValue", ",", "Class", "<", "?", ">", "clazz", ")", "throws", "TargetException", "{", "// Simple types", "Object", "result", ";", "if", "(", "clazz", "==", "int", ".", "class", "||", "clazz"...
Prepares the parameter to pass it to the REST API. @param rawValue the raw value, as a string @param clazz the class associated with the input parameter @return the object, converted to the right class @throws TargetException
[ "Prepares", "the", "parameter", "to", "pass", "it", "to", "the", "REST", "API", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-target-docker/src/main/java/net/roboconf/target/docker/internal/DockerUtils.java#L328-L364
38,749
roboconf/roboconf-platform
core/roboconf-target-docker/src/main/java/net/roboconf/target/docker/internal/DockerUtils.java
DockerUtils.findDefaultImageVersion
public static String findDefaultImageVersion( String rawVersion ) { String rbcfVersion = rawVersion; if( rbcfVersion == null || rbcfVersion.toLowerCase().endsWith( "snapshot" )) rbcfVersion = LATEST; return rbcfVersion; }
java
public static String findDefaultImageVersion( String rawVersion ) { String rbcfVersion = rawVersion; if( rbcfVersion == null || rbcfVersion.toLowerCase().endsWith( "snapshot" )) rbcfVersion = LATEST; return rbcfVersion; }
[ "public", "static", "String", "findDefaultImageVersion", "(", "String", "rawVersion", ")", "{", "String", "rbcfVersion", "=", "rawVersion", ";", "if", "(", "rbcfVersion", "==", "null", "||", "rbcfVersion", ".", "toLowerCase", "(", ")", ".", "endsWith", "(", "\...
Finds the version of the default Docker image. @param rawVersion the raw version (e.g. ManifestUtils.findBundleVersion()) @return {@value #LATEST} if the raw version is null or a snapshot, a specific version otherwise
[ "Finds", "the", "version", "of", "the", "default", "Docker", "image", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-target-docker/src/main/java/net/roboconf/target/docker/internal/DockerUtils.java#L393-L401
38,750
roboconf/roboconf-platform
core/roboconf-target-docker/src/main/java/net/roboconf/target/docker/internal/DockerUtils.java
DockerUtils.buildContainerNameFrom
public static String buildContainerNameFrom( String scopedInstancePath, String applicationName ) { String containerName = scopedInstancePath + "_from_" + applicationName; containerName = containerName.replaceFirst( "^/", "" ).replace( "/", "-" ).replaceAll( "\\s+", "_" ); // Prevent container names from being t...
java
public static String buildContainerNameFrom( String scopedInstancePath, String applicationName ) { String containerName = scopedInstancePath + "_from_" + applicationName; containerName = containerName.replaceFirst( "^/", "" ).replace( "/", "-" ).replaceAll( "\\s+", "_" ); // Prevent container names from being t...
[ "public", "static", "String", "buildContainerNameFrom", "(", "String", "scopedInstancePath", ",", "String", "applicationName", ")", "{", "String", "containerName", "=", "scopedInstancePath", "+", "\"_from_\"", "+", "applicationName", ";", "containerName", "=", "containe...
Builds a container name. @param scopedInstancePath a scoped instance path @param applicationName an application name @return a non-null string
[ "Builds", "a", "container", "name", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-target-docker/src/main/java/net/roboconf/target/docker/internal/DockerUtils.java#L410-L420
38,751
roboconf/roboconf-platform
core/roboconf-core/src/main/java/net/roboconf/core/dsl/converters/FromInstances.java
FromInstances.buildFileDefinition
public FileDefinition buildFileDefinition( Collection<Instance> rootInstances, File targetFile, boolean addComment, boolean saveRuntimeInformation ) { FileDefinition result = new FileDefinition( targetFile ); result.setFileType( FileDefinition.INSTANCE ); if( addComment ) { String s = "# File created from an ...
java
public FileDefinition buildFileDefinition( Collection<Instance> rootInstances, File targetFile, boolean addComment, boolean saveRuntimeInformation ) { FileDefinition result = new FileDefinition( targetFile ); result.setFileType( FileDefinition.INSTANCE ); if( addComment ) { String s = "# File created from an ...
[ "public", "FileDefinition", "buildFileDefinition", "(", "Collection", "<", "Instance", ">", "rootInstances", ",", "File", "targetFile", ",", "boolean", "addComment", ",", "boolean", "saveRuntimeInformation", ")", "{", "FileDefinition", "result", "=", "new", "FileDefin...
Builds a file definition from a collection of instances. @param rootInstances the root instances (not null) @param targetFile the target file (will not be written) @param addComment true to insert generated comments @param saveRuntimeInformation true to save runtime information (such as IP...), false otherwise @return ...
[ "Builds", "a", "file", "definition", "from", "a", "collection", "of", "instances", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-core/src/main/java/net/roboconf/core/dsl/converters/FromInstances.java#L60-L75
38,752
roboconf/roboconf-platform
core/roboconf-plugin-file/src/main/java/net/roboconf/plugin/file/internal/PluginFile.java
PluginFile.readProperties
Properties readProperties( Instance instance ) throws PluginException { Properties result = null; File instanceDirectory = InstanceHelpers.findInstanceDirectoryOnAgent( instance ); File file = new File( instanceDirectory, FILE_NAME ); try { if( file.exists()) { result = Utils.readPropertiesFile( file )...
java
Properties readProperties( Instance instance ) throws PluginException { Properties result = null; File instanceDirectory = InstanceHelpers.findInstanceDirectoryOnAgent( instance ); File file = new File( instanceDirectory, FILE_NAME ); try { if( file.exists()) { result = Utils.readPropertiesFile( file )...
[ "Properties", "readProperties", "(", "Instance", "instance", ")", "throws", "PluginException", "{", "Properties", "result", "=", "null", ";", "File", "instanceDirectory", "=", "InstanceHelpers", ".", "findInstanceDirectoryOnAgent", "(", "instance", ")", ";", "File", ...
Reads the "instructions.properties" file. @param instance the instance @return a non-null properties object (potentially empty) @throws PluginException
[ "Reads", "the", "instructions", ".", "properties", "file", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-plugin-file/src/main/java/net/roboconf/plugin/file/internal/PluginFile.java#L139-L159
38,753
roboconf/roboconf-platform
core/roboconf-plugin-file/src/main/java/net/roboconf/plugin/file/internal/PluginFile.java
PluginFile.findActions
SortedSet<Action> findActions( String actionName, Properties properties ) { Pattern pattern = Pattern.compile( actionName + "\\.(\\d)+\\.(.*)", Pattern.CASE_INSENSITIVE ); SortedSet<Action> result = new TreeSet<Action>( new ActionComparator()); for( Map.Entry<Object,Object> entry : properties.entrySet()) { St...
java
SortedSet<Action> findActions( String actionName, Properties properties ) { Pattern pattern = Pattern.compile( actionName + "\\.(\\d)+\\.(.*)", Pattern.CASE_INSENSITIVE ); SortedSet<Action> result = new TreeSet<Action>( new ActionComparator()); for( Map.Entry<Object,Object> entry : properties.entrySet()) { St...
[ "SortedSet", "<", "Action", ">", "findActions", "(", "String", "actionName", ",", "Properties", "properties", ")", "{", "Pattern", "pattern", "=", "Pattern", ".", "compile", "(", "actionName", "+", "\"\\\\.(\\\\d)+\\\\.(.*)\"", ",", "Pattern", ".", "CASE_INSENSITI...
Finds the actions to execute for a given step. @return a non-null list of actions (sorted in the right execution order)
[ "Finds", "the", "actions", "to", "execute", "for", "a", "given", "step", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-plugin-file/src/main/java/net/roboconf/plugin/file/internal/PluginFile.java#L166-L183
38,754
roboconf/roboconf-platform
core/roboconf-plugin-file/src/main/java/net/roboconf/plugin/file/internal/PluginFile.java
PluginFile.executeAction
void executeAction( Action action ) throws PluginException { try { switch( action.actionType ) { case DELETE: this.logger.fine( "Deleting " + action.parameter + "..." ); File f = new File( action.parameter ); Utils.deleteFilesRecursively( f ); break; case DOWNLOAD: this.logger.fine( "Do...
java
void executeAction( Action action ) throws PluginException { try { switch( action.actionType ) { case DELETE: this.logger.fine( "Deleting " + action.parameter + "..." ); File f = new File( action.parameter ); Utils.deleteFilesRecursively( f ); break; case DOWNLOAD: this.logger.fine( "Do...
[ "void", "executeAction", "(", "Action", "action", ")", "throws", "PluginException", "{", "try", "{", "switch", "(", "action", ".", "actionType", ")", "{", "case", "DELETE", ":", "this", ".", "logger", ".", "fine", "(", "\"Deleting \"", "+", "action", ".", ...
Executes an action. @param action the action to execute @throws PluginException
[ "Executes", "an", "action", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-plugin-file/src/main/java/net/roboconf/plugin/file/internal/PluginFile.java#L191-L251
38,755
roboconf/roboconf-platform
core/roboconf-dm-rest-services/src/main/java/net/roboconf/dm/rest/services/internal/websocket/WebSocketHandler.java
WebSocketHandler.send
private void send( String message ) { if( ! this.enabled.get()) { this.logger.finest( "Notifications were disabled by the DM." ); } else if( message == null ) { this.logger.finest( "No message to send to web socket clients." ); } else synchronized( SESSIONS ) { for( Session session : SESSIONS ) { ...
java
private void send( String message ) { if( ! this.enabled.get()) { this.logger.finest( "Notifications were disabled by the DM." ); } else if( message == null ) { this.logger.finest( "No message to send to web socket clients." ); } else synchronized( SESSIONS ) { for( Session session : SESSIONS ) { ...
[ "private", "void", "send", "(", "String", "message", ")", "{", "if", "(", "!", "this", ".", "enabled", ".", "get", "(", ")", ")", "{", "this", ".", "logger", ".", "finest", "(", "\"Notifications were disabled by the DM.\"", ")", ";", "}", "else", "if", ...
Sends a message to all the connected sessions. @param message the message to send
[ "Sends", "a", "message", "to", "all", "the", "connected", "sessions", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-dm-rest-services/src/main/java/net/roboconf/dm/rest/services/internal/websocket/WebSocketHandler.java#L175-L201
38,756
roboconf/roboconf-platform
miscellaneous/roboconf-dm-rest-client/src/main/java/net/roboconf/dm/rest/client/delegates/AuthenticationWsDelegate.java
AuthenticationWsDelegate.login
public String login( String username, String password ) throws DebugWsException { this.logger.finer( "Logging in as " + username ); WebResource path = this.resource.path( UrlConstants.AUTHENTICATION ).path( "e" ); ClientResponse response = path .header( "u", username ) .header( "p", password ) ...
java
public String login( String username, String password ) throws DebugWsException { this.logger.finer( "Logging in as " + username ); WebResource path = this.resource.path( UrlConstants.AUTHENTICATION ).path( "e" ); ClientResponse response = path .header( "u", username ) .header( "p", password ) ...
[ "public", "String", "login", "(", "String", "username", ",", "String", "password", ")", "throws", "DebugWsException", "{", "this", ".", "logger", ".", "finer", "(", "\"Logging in as \"", "+", "username", ")", ";", "WebResource", "path", "=", "this", ".", "re...
Logs in with a user name and a password. @param username a user name @param password a password @return a session ID, or null if login failed @throws DebugWsException
[ "Logs", "in", "with", "a", "user", "name", "and", "a", "password", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/miscellaneous/roboconf-dm-rest-client/src/main/java/net/roboconf/dm/rest/client/delegates/AuthenticationWsDelegate.java#L70-L102
38,757
roboconf/roboconf-platform
miscellaneous/roboconf-dm-rest-client/src/main/java/net/roboconf/dm/rest/client/delegates/AuthenticationWsDelegate.java
AuthenticationWsDelegate.logout
public void logout( String sessionId ) throws DebugWsException { this.logger.finer( "Logging out... Session ID = " + sessionId ); WebResource path = this.resource.path( UrlConstants.AUTHENTICATION ).path( "s" ); ClientResponse response = this.wsClient.createBuilder( path ).get( ClientResponse.class ); this.log...
java
public void logout( String sessionId ) throws DebugWsException { this.logger.finer( "Logging out... Session ID = " + sessionId ); WebResource path = this.resource.path( UrlConstants.AUTHENTICATION ).path( "s" ); ClientResponse response = this.wsClient.createBuilder( path ).get( ClientResponse.class ); this.log...
[ "public", "void", "logout", "(", "String", "sessionId", ")", "throws", "DebugWsException", "{", "this", ".", "logger", ".", "finer", "(", "\"Logging out... Session ID = \"", "+", "sessionId", ")", ";", "WebResource", "path", "=", "this", ".", "resource", ".", ...
Terminates a session. @param sessionId a session ID @throws DebugWsException
[ "Terminates", "a", "session", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/miscellaneous/roboconf-dm-rest-client/src/main/java/net/roboconf/dm/rest/client/delegates/AuthenticationWsDelegate.java#L110-L117
38,758
roboconf/roboconf-platform
karaf/roboconf-karaf-commands-agent/src/main/java/net/roboconf/karaf/commands/agent/plugins/CancelRecipeCommand.java
CancelRecipeCommand.cancelRecipe
private void cancelRecipe(String applicationName, String scopedInstancePath) { if(Utils.isEmptyOrWhitespaces(applicationName)) applicationName = ""; if(Utils.isEmptyOrWhitespaces(scopedInstancePath)) scopedInstancePath = ""; this.out.println("looking up [" + applicationName + "] [" + scopedInstancePath + "]"); ...
java
private void cancelRecipe(String applicationName, String scopedInstancePath) { if(Utils.isEmptyOrWhitespaces(applicationName)) applicationName = ""; if(Utils.isEmptyOrWhitespaces(scopedInstancePath)) scopedInstancePath = ""; this.out.println("looking up [" + applicationName + "] [" + scopedInstancePath + "]"); ...
[ "private", "void", "cancelRecipe", "(", "String", "applicationName", ",", "String", "scopedInstancePath", ")", "{", "if", "(", "Utils", ".", "isEmptyOrWhitespaces", "(", "applicationName", ")", ")", "applicationName", "=", "\"\"", ";", "if", "(", "Utils", ".", ...
Cancels running recipe, if any.
[ "Cancels", "running", "recipe", "if", "any", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/karaf/roboconf-karaf-commands-agent/src/main/java/net/roboconf/karaf/commands/agent/plugins/CancelRecipeCommand.java#L108-L121
38,759
roboconf/roboconf-platform
core/roboconf-agent-monitoring/src/main/java/net/roboconf/agent/monitoring/internal/rest/RestHandler.java
RestHandler.httpsQuery
private String httpsQuery() { String response = null; try { // Create a trust manager that does not validate certificate chains TrustManager[] trustAllCerts = new TrustManager[] { new LocalX509TrustManager()}; // Install the all-trusting trust manager final SSLContext sc = SSLContext.getInstance("SSL"...
java
private String httpsQuery() { String response = null; try { // Create a trust manager that does not validate certificate chains TrustManager[] trustAllCerts = new TrustManager[] { new LocalX509TrustManager()}; // Install the all-trusting trust manager final SSLContext sc = SSLContext.getInstance("SSL"...
[ "private", "String", "httpsQuery", "(", ")", "{", "String", "response", "=", "null", ";", "try", "{", "// Create a trust manager that does not validate certificate chains", "TrustManager", "[", "]", "trustAllCerts", "=", "new", "TrustManager", "[", "]", "{", "new", ...
Query a https URL, ignoring certificates. @return The query response
[ "Query", "a", "https", "URL", "ignoring", "certificates", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-agent-monitoring/src/main/java/net/roboconf/agent/monitoring/internal/rest/RestHandler.java#L179-L205
38,760
roboconf/roboconf-platform
core/roboconf-agent-monitoring/src/main/java/net/roboconf/agent/monitoring/internal/rest/RestHandler.java
RestHandler.httpQuery
private String httpQuery() { String response = null; try { URL restUrl = new URL( this.url ); HttpURLConnection conn = (HttpURLConnection) restUrl.openConnection(); response = query( conn ); } catch( Exception e ) { this.logger.severe( "Cannot issue GET on URL " + this.url + ". Monitoring notificati...
java
private String httpQuery() { String response = null; try { URL restUrl = new URL( this.url ); HttpURLConnection conn = (HttpURLConnection) restUrl.openConnection(); response = query( conn ); } catch( Exception e ) { this.logger.severe( "Cannot issue GET on URL " + this.url + ". Monitoring notificati...
[ "private", "String", "httpQuery", "(", ")", "{", "String", "response", "=", "null", ";", "try", "{", "URL", "restUrl", "=", "new", "URL", "(", "this", ".", "url", ")", ";", "HttpURLConnection", "conn", "=", "(", "HttpURLConnection", ")", "restUrl", ".", ...
Query a http URL. @return The query response
[ "Query", "a", "http", "URL", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-agent-monitoring/src/main/java/net/roboconf/agent/monitoring/internal/rest/RestHandler.java#L211-L225
38,761
roboconf/roboconf-platform
miscellaneous/roboconf-tooling-core/src/main/java/net/roboconf/tooling/core/autocompletion/CompletionUtils.java
CompletionUtils.findGraphFilesToImport
public static Set<String> findGraphFilesToImport( File appDirectory, File editedFile, String fileContent ) { File graphDir = new File( appDirectory, Constants.PROJECT_DIR_GRAPH ); return findFilesToImport( graphDir, Constants.FILE_EXT_GRAPH, editedFile, fileContent ); }
java
public static Set<String> findGraphFilesToImport( File appDirectory, File editedFile, String fileContent ) { File graphDir = new File( appDirectory, Constants.PROJECT_DIR_GRAPH ); return findFilesToImport( graphDir, Constants.FILE_EXT_GRAPH, editedFile, fileContent ); }
[ "public", "static", "Set", "<", "String", ">", "findGraphFilesToImport", "(", "File", "appDirectory", ",", "File", "editedFile", ",", "String", "fileContent", ")", "{", "File", "graphDir", "=", "new", "File", "(", "appDirectory", ",", "Constants", ".", "PROJEC...
Finds all the graph files that can be imported. @param appDirectory the application's directory @param editedFile the graph file that is being edited @param fileContent the file content (not null) @return a non-null set of (relative) file paths
[ "Finds", "all", "the", "graph", "files", "that", "can", "be", "imported", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/miscellaneous/roboconf-tooling-core/src/main/java/net/roboconf/tooling/core/autocompletion/CompletionUtils.java#L76-L80
38,762
roboconf/roboconf-platform
miscellaneous/roboconf-tooling-core/src/main/java/net/roboconf/tooling/core/autocompletion/CompletionUtils.java
CompletionUtils.findInstancesFilesToImport
public static Set<String> findInstancesFilesToImport( File appDirectory, File editedFile, String fileContent ) { File instancesDir = new File( appDirectory, Constants.PROJECT_DIR_INSTANCES ); return findFilesToImport( instancesDir, Constants.FILE_EXT_INSTANCES, editedFile, fileContent ); }
java
public static Set<String> findInstancesFilesToImport( File appDirectory, File editedFile, String fileContent ) { File instancesDir = new File( appDirectory, Constants.PROJECT_DIR_INSTANCES ); return findFilesToImport( instancesDir, Constants.FILE_EXT_INSTANCES, editedFile, fileContent ); }
[ "public", "static", "Set", "<", "String", ">", "findInstancesFilesToImport", "(", "File", "appDirectory", ",", "File", "editedFile", ",", "String", "fileContent", ")", "{", "File", "instancesDir", "=", "new", "File", "(", "appDirectory", ",", "Constants", ".", ...
Finds all the instances files that can be imported. @param appDirectory the application's directory @param editedFile the graph file that is being edited @param fileContent the file content (not null) @return a non-null set of (relative) file paths
[ "Finds", "all", "the", "instances", "files", "that", "can", "be", "imported", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/miscellaneous/roboconf-tooling-core/src/main/java/net/roboconf/tooling/core/autocompletion/CompletionUtils.java#L90-L94
38,763
roboconf/roboconf-platform
miscellaneous/roboconf-tooling-core/src/main/java/net/roboconf/tooling/core/autocompletion/CompletionUtils.java
CompletionUtils.findFilesToImport
static Set<String> findFilesToImport( File searchDirectory, String fileExtension, File editedFile, String fileContent ) { // Find all the files Set<String> result = new TreeSet<> (); if( searchDirectory.exists()) { for( File f : Utils.listAllFiles( searchDirectory, fileExtension )) { if( f.eq...
java
static Set<String> findFilesToImport( File searchDirectory, String fileExtension, File editedFile, String fileContent ) { // Find all the files Set<String> result = new TreeSet<> (); if( searchDirectory.exists()) { for( File f : Utils.listAllFiles( searchDirectory, fileExtension )) { if( f.eq...
[ "static", "Set", "<", "String", ">", "findFilesToImport", "(", "File", "searchDirectory", ",", "String", "fileExtension", ",", "File", "editedFile", ",", "String", "fileContent", ")", "{", "// Find all the files", "Set", "<", "String", ">", "result", "=", "new",...
Finds all the files that can be imported. @param searchDirectory the search's directory @param fileExtension the file extension to search for @param editedFile the graph file that is being edited @param fileContent the file content (not null) @return a non-null set of (relative) file paths
[ "Finds", "all", "the", "files", "that", "can", "be", "imported", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/miscellaneous/roboconf-tooling-core/src/main/java/net/roboconf/tooling/core/autocompletion/CompletionUtils.java#L105-L136
38,764
roboconf/roboconf-platform
miscellaneous/roboconf-tooling-core/src/main/java/net/roboconf/tooling/core/autocompletion/CompletionUtils.java
CompletionUtils.basicProposal
public static RoboconfCompletionProposal basicProposal( String s, String lastWord, boolean trim ) { return new RoboconfCompletionProposal( s, trim ? s.trim() : s, null, lastWord.length()); }
java
public static RoboconfCompletionProposal basicProposal( String s, String lastWord, boolean trim ) { return new RoboconfCompletionProposal( s, trim ? s.trim() : s, null, lastWord.length()); }
[ "public", "static", "RoboconfCompletionProposal", "basicProposal", "(", "String", "s", ",", "String", "lastWord", ",", "boolean", "trim", ")", "{", "return", "new", "RoboconfCompletionProposal", "(", "s", ",", "trim", "?", "s", ".", "trim", "(", ")", ":", "s...
A convenience method to shorten the creation of a basic proposal. @param s @param lastWord @param trim @return a non-null proposal
[ "A", "convenience", "method", "to", "shorten", "the", "creation", "of", "a", "basic", "proposal", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/miscellaneous/roboconf-tooling-core/src/main/java/net/roboconf/tooling/core/autocompletion/CompletionUtils.java#L146-L148
38,765
roboconf/roboconf-platform
miscellaneous/roboconf-tooling-core/src/main/java/net/roboconf/tooling/core/autocompletion/CompletionUtils.java
CompletionUtils.findAllTypes
public static Map<String,RoboconfTypeBean> findAllTypes( File appDirectory ) { List<File> graphFiles = new ArrayList<> (); File graphDirectory = appDirectory; if( graphDirectory != null && graphDirectory.exists()) graphFiles = Utils.listAllFiles( graphDirectory, Constants.FILE_EXT_GRAPH ); Map<String,R...
java
public static Map<String,RoboconfTypeBean> findAllTypes( File appDirectory ) { List<File> graphFiles = new ArrayList<> (); File graphDirectory = appDirectory; if( graphDirectory != null && graphDirectory.exists()) graphFiles = Utils.listAllFiles( graphDirectory, Constants.FILE_EXT_GRAPH ); Map<String,R...
[ "public", "static", "Map", "<", "String", ",", "RoboconfTypeBean", ">", "findAllTypes", "(", "File", "appDirectory", ")", "{", "List", "<", "File", ">", "graphFiles", "=", "new", "ArrayList", "<>", "(", ")", ";", "File", "graphDirectory", "=", "appDirectory"...
Finds all the Roboconf types. @param appDirectory the application's directory (can be null) @return a non-null map of types (key = type name, value = type)
[ "Finds", "all", "the", "Roboconf", "types", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/miscellaneous/roboconf-tooling-core/src/main/java/net/roboconf/tooling/core/autocompletion/CompletionUtils.java#L181-L218
38,766
roboconf/roboconf-platform
miscellaneous/roboconf-tooling-core/src/main/java/net/roboconf/tooling/core/autocompletion/CompletionUtils.java
CompletionUtils.resolveStringDescription
public static String resolveStringDescription( String variableName, String defaultValue ) { String result = null; if( Constants.SPECIFIC_VARIABLE_IP.equalsIgnoreCase( variableName ) || variableName.toLowerCase().endsWith( "." + Constants.SPECIFIC_VARIABLE_IP )) result = SET_BY_ROBOCONF; else if( ! Utils.i...
java
public static String resolveStringDescription( String variableName, String defaultValue ) { String result = null; if( Constants.SPECIFIC_VARIABLE_IP.equalsIgnoreCase( variableName ) || variableName.toLowerCase().endsWith( "." + Constants.SPECIFIC_VARIABLE_IP )) result = SET_BY_ROBOCONF; else if( ! Utils.i...
[ "public", "static", "String", "resolveStringDescription", "(", "String", "variableName", ",", "String", "defaultValue", ")", "{", "String", "result", "=", "null", ";", "if", "(", "Constants", ".", "SPECIFIC_VARIABLE_IP", ".", "equalsIgnoreCase", "(", "variableName",...
Resolves the description to show for an exported variable. @param variableName a non-null variable name @param defaultValue the default value (can be null) @return a description (can be null)
[ "Resolves", "the", "description", "to", "show", "for", "an", "exported", "variable", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/miscellaneous/roboconf-tooling-core/src/main/java/net/roboconf/tooling/core/autocompletion/CompletionUtils.java#L263-L273
38,767
stephanrauh/AngularFaces
AngularFaces_2.0/incubator/AngularFaces-widgets/src/main/java/de/beyondjava/angularFaces/secure/NGSecure.java
NGSecure.getValue
@Override public Object getValue() { final List<String> tokens = NGSecureUtilities.getSecurityToken(); return tokens.get(tokens.size() - 1); }
java
@Override public Object getValue() { final List<String> tokens = NGSecureUtilities.getSecurityToken(); return tokens.get(tokens.size() - 1); }
[ "@", "Override", "public", "Object", "getValue", "(", ")", "{", "final", "List", "<", "String", ">", "tokens", "=", "NGSecureUtilities", ".", "getSecurityToken", "(", ")", ";", "return", "tokens", ".", "get", "(", "tokens", ".", "size", "(", ")", "-", ...
This components value is the security token.
[ "This", "components", "value", "is", "the", "security", "token", "." ]
43d915f004645b1bbbf2625214294dab0858ba01
https://github.com/stephanrauh/AngularFaces/blob/43d915f004645b1bbbf2625214294dab0858ba01/AngularFaces_2.0/incubator/AngularFaces-widgets/src/main/java/de/beyondjava/angularFaces/secure/NGSecure.java#L65-L69
38,768
roboconf/roboconf-platform
miscellaneous/roboconf-dm-rest-client/src/main/java/net/roboconf/dm/rest/client/delegates/DebugWsDelegate.java
DebugWsDelegate.checkMessagingConnectionForTheDm
public String checkMessagingConnectionForTheDm( String message ) throws DebugWsException { this.logger.finer( "Checking messaging connection with the DM: message=" + message ); WebResource path = this.resource.path( UrlConstants.DEBUG ).path( "check-dm" ); if( message != null ) path = path.queryParam( "mess...
java
public String checkMessagingConnectionForTheDm( String message ) throws DebugWsException { this.logger.finer( "Checking messaging connection with the DM: message=" + message ); WebResource path = this.resource.path( UrlConstants.DEBUG ).path( "check-dm" ); if( message != null ) path = path.queryParam( "mess...
[ "public", "String", "checkMessagingConnectionForTheDm", "(", "String", "message", ")", "throws", "DebugWsException", "{", "this", ".", "logger", ".", "finer", "(", "\"Checking messaging connection with the DM: message=\"", "+", "message", ")", ";", "WebResource", "path", ...
Checks the DM is correctly connected with the messaging server. @param message a customized message content @return the content of the response
[ "Checks", "the", "DM", "is", "correctly", "connected", "with", "the", "messaging", "server", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/miscellaneous/roboconf-dm-rest-client/src/main/java/net/roboconf/dm/rest/client/delegates/DebugWsDelegate.java#L70-L88
38,769
roboconf/roboconf-platform
miscellaneous/roboconf-dm-rest-client/src/main/java/net/roboconf/dm/rest/client/delegates/DebugWsDelegate.java
DebugWsDelegate.diagnoseInstance
public Diagnostic diagnoseInstance( String applicationName, String instancePath ) throws DebugWsException { this.logger.finer( "Diagnosing instance " + instancePath + " in application " + applicationName ); WebResource path = this.resource.path( UrlConstants.DEBUG ).path( "diagnose-instance" ); path = path.que...
java
public Diagnostic diagnoseInstance( String applicationName, String instancePath ) throws DebugWsException { this.logger.finer( "Diagnosing instance " + instancePath + " in application " + applicationName ); WebResource path = this.resource.path( UrlConstants.DEBUG ).path( "diagnose-instance" ); path = path.que...
[ "public", "Diagnostic", "diagnoseInstance", "(", "String", "applicationName", ",", "String", "instancePath", ")", "throws", "DebugWsException", "{", "this", ".", "logger", ".", "finer", "(", "\"Diagnosing instance \"", "+", "instancePath", "+", "\" in application \"", ...
Runs a diagnostic for a given instance. @return the instance @throws DebugWsException
[ "Runs", "a", "diagnostic", "for", "a", "given", "instance", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/miscellaneous/roboconf-dm-rest-client/src/main/java/net/roboconf/dm/rest/client/delegates/DebugWsDelegate.java#L128-L149
38,770
roboconf/roboconf-platform
miscellaneous/roboconf-dm-rest-client/src/main/java/net/roboconf/dm/rest/client/delegates/DebugWsDelegate.java
DebugWsDelegate.diagnoseApplication
public List<Diagnostic> diagnoseApplication( String applicationName ) { this.logger.finer( "Diagnosing application " + applicationName ); WebResource path = this.resource.path( UrlConstants.DEBUG ).path( "diagnose-application" ); path = path.queryParam( "application-name", applicationName ); List<Diagnostic> ...
java
public List<Diagnostic> diagnoseApplication( String applicationName ) { this.logger.finer( "Diagnosing application " + applicationName ); WebResource path = this.resource.path( UrlConstants.DEBUG ).path( "diagnose-application" ); path = path.queryParam( "application-name", applicationName ); List<Diagnostic> ...
[ "public", "List", "<", "Diagnostic", ">", "diagnoseApplication", "(", "String", "applicationName", ")", "{", "this", ".", "logger", ".", "finer", "(", "\"Diagnosing application \"", "+", "applicationName", ")", ";", "WebResource", "path", "=", "this", ".", "reso...
Runs a diagnostic for a given application. @return the diagnostic
[ "Runs", "a", "diagnostic", "for", "a", "given", "application", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/miscellaneous/roboconf-dm-rest-client/src/main/java/net/roboconf/dm/rest/client/delegates/DebugWsDelegate.java#L156-L170
38,771
roboconf/roboconf-platform
core/roboconf-dm/src/main/java/net/roboconf/dm/internal/api/impl/TargetHandlerResolverImpl.java
TargetHandlerResolverImpl.addTargetHandler
public void addTargetHandler( TargetHandler targetItf ) { if( targetItf != null ) { this.logger.info( "Target handler '" + targetItf.getTargetId() + "' is now available in Roboconf's DM." ); synchronized( this.targetHandlers ) { this.targetHandlers.add( targetItf ); } listTargets( this.targetHandle...
java
public void addTargetHandler( TargetHandler targetItf ) { if( targetItf != null ) { this.logger.info( "Target handler '" + targetItf.getTargetId() + "' is now available in Roboconf's DM." ); synchronized( this.targetHandlers ) { this.targetHandlers.add( targetItf ); } listTargets( this.targetHandle...
[ "public", "void", "addTargetHandler", "(", "TargetHandler", "targetItf", ")", "{", "if", "(", "targetItf", "!=", "null", ")", "{", "this", ".", "logger", ".", "info", "(", "\"Target handler '\"", "+", "targetItf", ".", "getTargetId", "(", ")", "+", "\"' is n...
Adds a new target handler. @param targetItf a target handler
[ "Adds", "a", "new", "target", "handler", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-dm/src/main/java/net/roboconf/dm/internal/api/impl/TargetHandlerResolverImpl.java#L52-L63
38,772
roboconf/roboconf-platform
core/roboconf-dm/src/main/java/net/roboconf/dm/internal/api/impl/TargetHandlerResolverImpl.java
TargetHandlerResolverImpl.removeTargetHandler
public void removeTargetHandler( TargetHandler targetItf ) { // May happen if a target could not be instantiated // (iPojo uses proxies). In this case, it results in a NPE here. if( targetItf == null ) { this.logger.info( "An invalid target handler is removed." ); } else { synchronized( this.targetHandl...
java
public void removeTargetHandler( TargetHandler targetItf ) { // May happen if a target could not be instantiated // (iPojo uses proxies). In this case, it results in a NPE here. if( targetItf == null ) { this.logger.info( "An invalid target handler is removed." ); } else { synchronized( this.targetHandl...
[ "public", "void", "removeTargetHandler", "(", "TargetHandler", "targetItf", ")", "{", "// May happen if a target could not be instantiated", "// (iPojo uses proxies). In this case, it results in a NPE here.", "if", "(", "targetItf", "==", "null", ")", "{", "this", ".", "logger"...
Removes a target handler. @param targetItf a target handler
[ "Removes", "a", "target", "handler", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-dm/src/main/java/net/roboconf/dm/internal/api/impl/TargetHandlerResolverImpl.java#L70-L86
38,773
roboconf/roboconf-platform
core/roboconf-dm/src/main/java/net/roboconf/dm/internal/api/impl/TargetHandlerResolverImpl.java
TargetHandlerResolverImpl.listTargets
public static void listTargets( List<TargetHandler> targetHandlers, Logger logger ) { if( targetHandlers.isEmpty()) { logger.info( "No target was found for Roboconf's DM." ); } else { StringBuilder sb = new StringBuilder( "Available target in Roboconf's DM: " ); for( Iterator<TargetHandler> it = targetHa...
java
public static void listTargets( List<TargetHandler> targetHandlers, Logger logger ) { if( targetHandlers.isEmpty()) { logger.info( "No target was found for Roboconf's DM." ); } else { StringBuilder sb = new StringBuilder( "Available target in Roboconf's DM: " ); for( Iterator<TargetHandler> it = targetHa...
[ "public", "static", "void", "listTargets", "(", "List", "<", "TargetHandler", ">", "targetHandlers", ",", "Logger", "logger", ")", "{", "if", "(", "targetHandlers", ".", "isEmpty", "(", ")", ")", "{", "logger", ".", "info", "(", "\"No target was found for Robo...
This method lists the available target and logs them.
[ "This", "method", "lists", "the", "available", "target", "and", "logs", "them", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-dm/src/main/java/net/roboconf/dm/internal/api/impl/TargetHandlerResolverImpl.java#L128-L144
38,774
roboconf/roboconf-platform
core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java
Utils.capitalize
public static String capitalize( String s ) { String result = s; if( ! Utils.isEmptyOrWhitespaces( s )) result = Character.toUpperCase( s.charAt( 0 )) + s.substring( 1 ).toLowerCase(); return result; }
java
public static String capitalize( String s ) { String result = s; if( ! Utils.isEmptyOrWhitespaces( s )) result = Character.toUpperCase( s.charAt( 0 )) + s.substring( 1 ).toLowerCase(); return result; }
[ "public", "static", "String", "capitalize", "(", "String", "s", ")", "{", "String", "result", "=", "s", ";", "if", "(", "!", "Utils", ".", "isEmptyOrWhitespaces", "(", "s", ")", ")", "result", "=", "Character", ".", "toUpperCase", "(", "s", ".", "charA...
Capitalizes a string. @param s a string @return the capitalized string
[ "Capitalizes", "a", "string", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java#L100-L107
38,775
roboconf/roboconf-platform
core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java
Utils.removeFileExtension
public static String removeFileExtension( String filename ) { String result = filename; int index = filename.lastIndexOf( '.' ); if( index != -1 ) result= filename.substring( 0, index ); return result; }
java
public static String removeFileExtension( String filename ) { String result = filename; int index = filename.lastIndexOf( '.' ); if( index != -1 ) result= filename.substring( 0, index ); return result; }
[ "public", "static", "String", "removeFileExtension", "(", "String", "filename", ")", "{", "String", "result", "=", "filename", ";", "int", "index", "=", "filename", ".", "lastIndexOf", "(", "'", "'", ")", ";", "if", "(", "index", "!=", "-", "1", ")", "...
Removes the extension from a file name. @param filename a non-null file name @return a non-null string
[ "Removes", "the", "extension", "from", "a", "file", "name", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java#L115-L123
38,776
roboconf/roboconf-platform
core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java
Utils.filterEmptyValues
public static List<String> filterEmptyValues( List<String> values ) { List<String> result = new ArrayList<> (); for( String s : values ) { if( ! Utils.isEmptyOrWhitespaces( s )) result.add( s ); } return result; }
java
public static List<String> filterEmptyValues( List<String> values ) { List<String> result = new ArrayList<> (); for( String s : values ) { if( ! Utils.isEmptyOrWhitespaces( s )) result.add( s ); } return result; }
[ "public", "static", "List", "<", "String", ">", "filterEmptyValues", "(", "List", "<", "String", ">", "values", ")", "{", "List", "<", "String", ">", "result", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", "String", "s", ":", "values", ")...
Creates a new list and only keeps values that are not null or made up of white characters. @param values a non-null list of items (can contain null and "empty" values) @return a list of items (never null), with no null or "empty" values
[ "Creates", "a", "new", "list", "and", "only", "keeps", "values", "that", "are", "not", "null", "or", "made", "up", "of", "white", "characters", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java#L167-L176
38,777
roboconf/roboconf-platform
core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java
Utils.format
public static String format( Collection<String> items, String separator ) { StringBuilder sb = new StringBuilder(); for( Iterator<String> it = items.iterator(); it.hasNext(); ) { sb.append( it.next()); if( it.hasNext()) sb.append( separator ); } return sb.toString(); }
java
public static String format( Collection<String> items, String separator ) { StringBuilder sb = new StringBuilder(); for( Iterator<String> it = items.iterator(); it.hasNext(); ) { sb.append( it.next()); if( it.hasNext()) sb.append( separator ); } return sb.toString(); }
[ "public", "static", "String", "format", "(", "Collection", "<", "String", ">", "items", ",", "String", "separator", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", "Iterator", "<", "String", ">", "it", "=", "items...
Formats a collection of elements as a string. @param items a non-null list of items @param separator a string to separate items @return a non-null string
[ "Formats", "a", "collection", "of", "elements", "as", "a", "string", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java#L185-L195
38,778
roboconf/roboconf-platform
core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java
Utils.copyStream
public static void copyStream( File inputFile, File outputFile ) throws IOException { InputStream is = new FileInputStream( inputFile ); try { copyStream( is, outputFile ); } finally { is.close(); } }
java
public static void copyStream( File inputFile, File outputFile ) throws IOException { InputStream is = new FileInputStream( inputFile ); try { copyStream( is, outputFile ); } finally { is.close(); } }
[ "public", "static", "void", "copyStream", "(", "File", "inputFile", ",", "File", "outputFile", ")", "throws", "IOException", "{", "InputStream", "is", "=", "new", "FileInputStream", "(", "inputFile", ")", ";", "try", "{", "copyStream", "(", "is", ",", "outpu...
Copies the content from inputFile into outputFile. @param inputFile an input file (must be a file and exist) @param outputFile will be created if it does not exist @throws IOException if something went wrong
[ "Copies", "the", "content", "from", "inputFile", "into", "outputFile", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java#L371-L378
38,779
roboconf/roboconf-platform
core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java
Utils.copyStream
public static void copyStream( File inputFile, OutputStream os ) throws IOException { InputStream is = new FileInputStream( inputFile ); try { copyStreamUnsafelyUseWithCaution( is, os ); } finally { is.close(); } }
java
public static void copyStream( File inputFile, OutputStream os ) throws IOException { InputStream is = new FileInputStream( inputFile ); try { copyStreamUnsafelyUseWithCaution( is, os ); } finally { is.close(); } }
[ "public", "static", "void", "copyStream", "(", "File", "inputFile", ",", "OutputStream", "os", ")", "throws", "IOException", "{", "InputStream", "is", "=", "new", "FileInputStream", "(", "inputFile", ")", ";", "try", "{", "copyStreamUnsafelyUseWithCaution", "(", ...
Copies the content from inputFile into an output stream. @param inputFile an input file (must be a file and exist) @param os the output stream @throws IOException if something went wrong
[ "Copies", "the", "content", "from", "inputFile", "into", "an", "output", "stream", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java#L388-L395
38,780
roboconf/roboconf-platform
core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java
Utils.appendStringInto
public static void appendStringInto( String s, File outputFile ) throws IOException { OutputStreamWriter fw = null; try { fw = new OutputStreamWriter( new FileOutputStream( outputFile, true ), StandardCharsets.UTF_8 ); fw.append( s ); } finally { Utils.closeQuietly( fw ); } }
java
public static void appendStringInto( String s, File outputFile ) throws IOException { OutputStreamWriter fw = null; try { fw = new OutputStreamWriter( new FileOutputStream( outputFile, true ), StandardCharsets.UTF_8 ); fw.append( s ); } finally { Utils.closeQuietly( fw ); } }
[ "public", "static", "void", "appendStringInto", "(", "String", "s", ",", "File", "outputFile", ")", "throws", "IOException", "{", "OutputStreamWriter", "fw", "=", "null", ";", "try", "{", "fw", "=", "new", "OutputStreamWriter", "(", "new", "FileOutputStream", ...
Appends a string into a file. @param s the string to write (not null) @param outputFile the file to write into @throws IOException if something went wrong
[ "Appends", "a", "string", "into", "a", "file", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java#L418-L428
38,781
roboconf/roboconf-platform
core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java
Utils.readPropertiesFile
public static Properties readPropertiesFile( File file ) throws IOException { Properties result = new Properties(); InputStream in = null; try { in = new FileInputStream( file ); result.load( in ); } finally { closeQuietly( in ); } return result; }
java
public static Properties readPropertiesFile( File file ) throws IOException { Properties result = new Properties(); InputStream in = null; try { in = new FileInputStream( file ); result.load( in ); } finally { closeQuietly( in ); } return result; }
[ "public", "static", "Properties", "readPropertiesFile", "(", "File", "file", ")", "throws", "IOException", "{", "Properties", "result", "=", "new", "Properties", "(", ")", ";", "InputStream", "in", "=", "null", ";", "try", "{", "in", "=", "new", "FileInputSt...
Reads properties from a file. @param file a properties file @return a {@link Properties} instance @throws IOException if reading failed
[ "Reads", "properties", "from", "a", "file", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java#L533-L546
38,782
roboconf/roboconf-platform
core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java
Utils.readPropertiesFileQuietly
public static Properties readPropertiesFileQuietly( File file, Logger logger ) { Properties result = new Properties(); try { if( file != null && file.exists()) result = readPropertiesFile( file ); } catch( Exception e ) { logger.severe( "Properties file " + file + " could not be read." ); logExcept...
java
public static Properties readPropertiesFileQuietly( File file, Logger logger ) { Properties result = new Properties(); try { if( file != null && file.exists()) result = readPropertiesFile( file ); } catch( Exception e ) { logger.severe( "Properties file " + file + " could not be read." ); logExcept...
[ "public", "static", "Properties", "readPropertiesFileQuietly", "(", "File", "file", ",", "Logger", "logger", ")", "{", "Properties", "result", "=", "new", "Properties", "(", ")", ";", "try", "{", "if", "(", "file", "!=", "null", "&&", "file", ".", "exists"...
Reads properties from a file but does not throw any error in case of problem. @param file a properties file (can be null) @param logger a logger (not null) @return a {@link Properties} instance (never null)
[ "Reads", "properties", "from", "a", "file", "but", "does", "not", "throw", "any", "error", "in", "case", "of", "problem", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java#L555-L568
38,783
roboconf/roboconf-platform
core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java
Utils.readPropertiesQuietly
public static Properties readPropertiesQuietly( String fileContent, Logger logger ) { Properties result = new Properties(); try { if( fileContent != null ) { InputStream in = new ByteArrayInputStream( fileContent.getBytes( StandardCharsets.UTF_8 )); result.load( in ); } } catch( Exception e ) { ...
java
public static Properties readPropertiesQuietly( String fileContent, Logger logger ) { Properties result = new Properties(); try { if( fileContent != null ) { InputStream in = new ByteArrayInputStream( fileContent.getBytes( StandardCharsets.UTF_8 )); result.load( in ); } } catch( Exception e ) { ...
[ "public", "static", "Properties", "readPropertiesQuietly", "(", "String", "fileContent", ",", "Logger", "logger", ")", "{", "Properties", "result", "=", "new", "Properties", "(", ")", ";", "try", "{", "if", "(", "fileContent", "!=", "null", ")", "{", "InputS...
Reads properties from a string. @param file a properties file @param logger a logger (not null) @return a {@link Properties} instance
[ "Reads", "properties", "from", "a", "string", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java#L577-L592
38,784
roboconf/roboconf-platform
core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java
Utils.writePropertiesFile
public static void writePropertiesFile( Properties properties, File file ) throws IOException { OutputStream out = null; try { out = new FileOutputStream( file ); properties.store( out, "" ); } finally { closeQuietly( out ); } }
java
public static void writePropertiesFile( Properties properties, File file ) throws IOException { OutputStream out = null; try { out = new FileOutputStream( file ); properties.store( out, "" ); } finally { closeQuietly( out ); } }
[ "public", "static", "void", "writePropertiesFile", "(", "Properties", "properties", ",", "File", "file", ")", "throws", "IOException", "{", "OutputStream", "out", "=", "null", ";", "try", "{", "out", "=", "new", "FileOutputStream", "(", "file", ")", ";", "pr...
Writes Java properties into a file. @param properties non-null properties @param file a properties file @throws IOException if writing failed
[ "Writes", "Java", "properties", "into", "a", "file", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java#L601-L611
38,785
roboconf/roboconf-platform
core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java
Utils.cleanNameWithAccents
public static String cleanNameWithAccents( String name ) { String temp = Normalizer.normalize( name, Normalizer.Form.NFD ); Pattern pattern = Pattern.compile( "\\p{InCombiningDiacriticalMarks}+" ); return pattern.matcher( temp ).replaceAll( "" ).trim(); }
java
public static String cleanNameWithAccents( String name ) { String temp = Normalizer.normalize( name, Normalizer.Form.NFD ); Pattern pattern = Pattern.compile( "\\p{InCombiningDiacriticalMarks}+" ); return pattern.matcher( temp ).replaceAll( "" ).trim(); }
[ "public", "static", "String", "cleanNameWithAccents", "(", "String", "name", ")", "{", "String", "temp", "=", "Normalizer", ".", "normalize", "(", "name", ",", "Normalizer", ".", "Form", ".", "NFD", ")", ";", "Pattern", "pattern", "=", "Pattern", ".", "com...
Replaces all the accents in a string. @param name a non-null string @return a non-null string, with their accents replaced by their neutral equivalent
[ "Replaces", "all", "the", "accents", "in", "a", "string", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java#L619-L624
38,786
roboconf/roboconf-platform
core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java
Utils.updateProperties
public static String updateProperties( String propertiesContent, Map<String,String> keyToNewValue ) { for( Map.Entry<String,String> entry : keyToNewValue.entrySet()) { propertiesContent = propertiesContent.replaceFirst( "(?mi)^\\s*" + entry.getKey() + "\\s*[:=][^\n]*$", entry.getKey() + " = " + entry.ge...
java
public static String updateProperties( String propertiesContent, Map<String,String> keyToNewValue ) { for( Map.Entry<String,String> entry : keyToNewValue.entrySet()) { propertiesContent = propertiesContent.replaceFirst( "(?mi)^\\s*" + entry.getKey() + "\\s*[:=][^\n]*$", entry.getKey() + " = " + entry.ge...
[ "public", "static", "String", "updateProperties", "(", "String", "propertiesContent", ",", "Map", "<", "String", ",", "String", ">", "keyToNewValue", ")", "{", "for", "(", "Map", ".", "Entry", "<", "String", ",", "String", ">", "entry", ":", "keyToNewValue",...
Updates string properties. @param propertiesContent the properties file as a string @param keyToNewValue the keys to update with their new values @return a non-null string
[ "Updates", "string", "properties", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java#L656-L665
38,787
roboconf/roboconf-platform
core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java
Utils.listDirectories
public static List<File> listDirectories( File root ) { List<File> result = new ArrayList<> (); File[] files = root.listFiles( new DirectoryFileFilter()); if( files != null ) result.addAll( Arrays.asList( files )); Collections.sort( result, new FileNameComparator()); return result; }
java
public static List<File> listDirectories( File root ) { List<File> result = new ArrayList<> (); File[] files = root.listFiles( new DirectoryFileFilter()); if( files != null ) result.addAll( Arrays.asList( files )); Collections.sort( result, new FileNameComparator()); return result; }
[ "public", "static", "List", "<", "File", ">", "listDirectories", "(", "File", "root", ")", "{", "List", "<", "File", ">", "result", "=", "new", "ArrayList", "<>", "(", ")", ";", "File", "[", "]", "files", "=", "root", ".", "listFiles", "(", "new", ...
Lists directories located under a given file. @param root a file @return a non-null list of directories, sorted alphabetically by file names
[ "Lists", "directories", "located", "under", "a", "given", "file", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java#L794-L803
38,788
roboconf/roboconf-platform
core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java
Utils.computeFileRelativeLocation
public static String computeFileRelativeLocation( File rootDirectory, File subFile ) { String rootPath = rootDirectory.getAbsolutePath(); String subPath = subFile.getAbsolutePath(); if( ! subPath.startsWith( rootPath )) throw new IllegalArgumentException( "The sub-file must be contained in the directory." );...
java
public static String computeFileRelativeLocation( File rootDirectory, File subFile ) { String rootPath = rootDirectory.getAbsolutePath(); String subPath = subFile.getAbsolutePath(); if( ! subPath.startsWith( rootPath )) throw new IllegalArgumentException( "The sub-file must be contained in the directory." );...
[ "public", "static", "String", "computeFileRelativeLocation", "(", "File", "rootDirectory", ",", "File", "subFile", ")", "{", "String", "rootPath", "=", "rootDirectory", ".", "getAbsolutePath", "(", ")", ";", "String", "subPath", "=", "subFile", ".", "getAbsolutePa...
Computes the relative location of a file with respect to a root directory. @param rootDirectory a directory @param subFile a file contained (directly or indirectly) in the directory @return a non-null string
[ "Computes", "the", "relative", "location", "of", "a", "file", "with", "respect", "to", "a", "root", "directory", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java#L899-L910
38,789
roboconf/roboconf-platform
core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java
Utils.extractZipArchive
public static void extractZipArchive( File zipFile, File targetDirectory ) throws IOException { extractZipArchive( zipFile, targetDirectory, null, null ); }
java
public static void extractZipArchive( File zipFile, File targetDirectory ) throws IOException { extractZipArchive( zipFile, targetDirectory, null, null ); }
[ "public", "static", "void", "extractZipArchive", "(", "File", "zipFile", ",", "File", "targetDirectory", ")", "throws", "IOException", "{", "extractZipArchive", "(", "zipFile", ",", "targetDirectory", ",", "null", ",", "null", ")", ";", "}" ]
Extracts a ZIP archive in a directory. @param zipFile a ZIP file (not null, must exist) @param targetDirectory the target directory (may not exist but must be a directory) @throws IOException if something went wrong
[ "Extracts", "a", "ZIP", "archive", "in", "a", "directory", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java#L919-L923
38,790
roboconf/roboconf-platform
core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java
Utils.isAncestor
public static boolean isAncestor( File ancestorCandidate, File file ) { String path = ancestorCandidate.getAbsolutePath(); if( ! path.endsWith( "/" )) path += "/"; return file.getAbsolutePath().startsWith( path ); }
java
public static boolean isAncestor( File ancestorCandidate, File file ) { String path = ancestorCandidate.getAbsolutePath(); if( ! path.endsWith( "/" )) path += "/"; return file.getAbsolutePath().startsWith( path ); }
[ "public", "static", "boolean", "isAncestor", "(", "File", "ancestorCandidate", ",", "File", "file", ")", "{", "String", "path", "=", "ancestorCandidate", ".", "getAbsolutePath", "(", ")", ";", "if", "(", "!", "path", ".", "endsWith", "(", "\"/\"", ")", ")"...
Determines whether a directory contains a given file. @param ancestorCandidate the directory @param file the file @return true if the directory directly or indirectly contains the file
[ "Determines", "whether", "a", "directory", "contains", "a", "given", "file", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java#L1009-L1016
38,791
roboconf/roboconf-platform
core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java
Utils.deleteFilesRecursively
public static void deleteFilesRecursively( File... files ) throws IOException { if( files == null ) return; List<File> filesToDelete = new ArrayList<> (); filesToDelete.addAll( Arrays.asList( files )); while( ! filesToDelete.isEmpty()) { File currentFile = filesToDelete.remove( 0 ); if( currentFile =...
java
public static void deleteFilesRecursively( File... files ) throws IOException { if( files == null ) return; List<File> filesToDelete = new ArrayList<> (); filesToDelete.addAll( Arrays.asList( files )); while( ! filesToDelete.isEmpty()) { File currentFile = filesToDelete.remove( 0 ); if( currentFile =...
[ "public", "static", "void", "deleteFilesRecursively", "(", "File", "...", "files", ")", "throws", "IOException", "{", "if", "(", "files", "==", "null", ")", "return", ";", "List", "<", "File", ">", "filesToDelete", "=", "new", "ArrayList", "<>", "(", ")", ...
Deletes files recursively. @param files the files to delete @throws IOException if a file could not be deleted
[ "Deletes", "files", "recursively", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java#L1024-L1048
38,792
roboconf/roboconf-platform
core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java
Utils.deleteFilesRecursivelyAndQuietly
public static void deleteFilesRecursivelyAndQuietly( File... files ) { try { deleteFilesRecursively( files ); } catch( IOException e ) { Logger logger = Logger.getLogger( Utils.class.getName()); logException( logger, e ); } }
java
public static void deleteFilesRecursivelyAndQuietly( File... files ) { try { deleteFilesRecursively( files ); } catch( IOException e ) { Logger logger = Logger.getLogger( Utils.class.getName()); logException( logger, e ); } }
[ "public", "static", "void", "deleteFilesRecursivelyAndQuietly", "(", "File", "...", "files", ")", "{", "try", "{", "deleteFilesRecursively", "(", "files", ")", ";", "}", "catch", "(", "IOException", "e", ")", "{", "Logger", "logger", "=", "Logger", ".", "get...
Deletes files recursively and remains quiet even if an exception is thrown. @param files the files to delete
[ "Deletes", "files", "recursively", "and", "remains", "quiet", "even", "if", "an", "exception", "is", "thrown", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java#L1055-L1064
38,793
roboconf/roboconf-platform
core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java
Utils.logException
public static void logException( Logger logger, Throwable t ) { logException( logger, Level.FINEST, t ); }
java
public static void logException( Logger logger, Throwable t ) { logException( logger, Level.FINEST, t ); }
[ "public", "static", "void", "logException", "(", "Logger", "logger", ",", "Throwable", "t", ")", "{", "logException", "(", "logger", ",", "Level", ".", "FINEST", ",", "t", ")", ";", "}" ]
Logs an exception with the given logger and the FINEST level. @param logger the logger @param t an exception or a throwable
[ "Logs", "an", "exception", "with", "the", "given", "logger", "and", "the", "FINEST", "level", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java#L1136-L1138
38,794
roboconf/roboconf-platform
core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java
Utils.closeStatement
public static void closeStatement( PreparedStatement ps, Logger logger ) { try { if( ps != null ) ps.close(); } catch( SQLException e ) { // Not important. Utils.logException( logger, e ); } }
java
public static void closeStatement( PreparedStatement ps, Logger logger ) { try { if( ps != null ) ps.close(); } catch( SQLException e ) { // Not important. Utils.logException( logger, e ); } }
[ "public", "static", "void", "closeStatement", "(", "PreparedStatement", "ps", ",", "Logger", "logger", ")", "{", "try", "{", "if", "(", "ps", "!=", "null", ")", "ps", ".", "close", "(", ")", ";", "}", "catch", "(", "SQLException", "e", ")", "{", "// ...
Closes a prepared statement. @param ps @param logger
[ "Closes", "a", "prepared", "statement", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java#L1146-L1156
38,795
roboconf/roboconf-platform
core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java
Utils.closeStatement
public static void closeStatement( Statement st, Logger logger ) { try { if( st != null ) st.close(); } catch( SQLException e ) { // Not important. Utils.logException( logger, e ); } }
java
public static void closeStatement( Statement st, Logger logger ) { try { if( st != null ) st.close(); } catch( SQLException e ) { // Not important. Utils.logException( logger, e ); } }
[ "public", "static", "void", "closeStatement", "(", "Statement", "st", ",", "Logger", "logger", ")", "{", "try", "{", "if", "(", "st", "!=", "null", ")", "st", ".", "close", "(", ")", ";", "}", "catch", "(", "SQLException", "e", ")", "{", "// Not impo...
Closes a statement. @param st @param logger
[ "Closes", "a", "statement", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java#L1164-L1174
38,796
roboconf/roboconf-platform
core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java
Utils.closeResultSet
public static void closeResultSet( ResultSet resultSet, Logger logger ) { try { if( resultSet != null ) resultSet.close(); } catch( SQLException e ) { // Not important. Utils.logException( logger, e ); } }
java
public static void closeResultSet( ResultSet resultSet, Logger logger ) { try { if( resultSet != null ) resultSet.close(); } catch( SQLException e ) { // Not important. Utils.logException( logger, e ); } }
[ "public", "static", "void", "closeResultSet", "(", "ResultSet", "resultSet", ",", "Logger", "logger", ")", "{", "try", "{", "if", "(", "resultSet", "!=", "null", ")", "resultSet", ".", "close", "(", ")", ";", "}", "catch", "(", "SQLException", "e", ")", ...
Closes a result set. @param st @param logger
[ "Closes", "a", "result", "set", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java#L1182-L1192
38,797
roboconf/roboconf-platform
core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java
Utils.closeConnection
public static void closeConnection( Connection conn, Logger logger ) { try { if( conn != null ) conn.close(); } catch( SQLException e ) { // Not important. Utils.logException( logger, e ); } }
java
public static void closeConnection( Connection conn, Logger logger ) { try { if( conn != null ) conn.close(); } catch( SQLException e ) { // Not important. Utils.logException( logger, e ); } }
[ "public", "static", "void", "closeConnection", "(", "Connection", "conn", ",", "Logger", "logger", ")", "{", "try", "{", "if", "(", "conn", "!=", "null", ")", "conn", ".", "close", "(", ")", ";", "}", "catch", "(", "SQLException", "e", ")", "{", "// ...
Closes a connection to a database. @param conn @param logger
[ "Closes", "a", "connection", "to", "a", "database", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java#L1200-L1210
38,798
roboconf/roboconf-platform
core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java
Utils.findUrlAndPort
public static Map.Entry<String,Integer> findUrlAndPort( String url ) { Matcher m = Pattern.compile( ".*(:\\d+).*" ).matcher( url ); String portAsString = m.find() ? m.group( 1 ).substring( 1 ) : null; Integer port = portAsString == null ? - 1 : Integer.parseInt( portAsString ); String address = portAsString ==...
java
public static Map.Entry<String,Integer> findUrlAndPort( String url ) { Matcher m = Pattern.compile( ".*(:\\d+).*" ).matcher( url ); String portAsString = m.find() ? m.group( 1 ).substring( 1 ) : null; Integer port = portAsString == null ? - 1 : Integer.parseInt( portAsString ); String address = portAsString ==...
[ "public", "static", "Map", ".", "Entry", "<", "String", ",", "Integer", ">", "findUrlAndPort", "(", "String", "url", ")", "{", "Matcher", "m", "=", "Pattern", ".", "compile", "(", "\".*(:\\\\d+).*\"", ")", ".", "matcher", "(", "url", ")", ";", "String", ...
Parses a raw URL and extracts the host and port. @param url a raw URL (not null) @return a non-null map entry (key = host URL without the port, value = the port, -1 if not specified)
[ "Parses", "a", "raw", "URL", "and", "extracts", "the", "host", "and", "port", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java#L1268-L1276
38,799
roboconf/roboconf-platform
core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java
Utils.getValue
public static String getValue(Map<String,String> map, String key, String defaultValue) { return map.containsKey( key ) ? map.get( key ) : defaultValue; }
java
public static String getValue(Map<String,String> map, String key, String defaultValue) { return map.containsKey( key ) ? map.get( key ) : defaultValue; }
[ "public", "static", "String", "getValue", "(", "Map", "<", "String", ",", "String", ">", "map", ",", "String", "key", ",", "String", "defaultValue", ")", "{", "return", "map", ".", "containsKey", "(", "key", ")", "?", "map", ".", "get", "(", "key", "...
Returns the value contained in a map of string if it exists using the key. @param map a map of string @param key a string @param defaultValue the default value
[ "Returns", "the", "value", "contained", "in", "a", "map", "of", "string", "if", "it", "exists", "using", "the", "key", "." ]
add54eead479effb138d0ff53a2d637902b82702
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-core/src/main/java/net/roboconf/core/utils/Utils.java#L1285-L1287