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
16,000
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/configuration/DescribableServiceUtil.java
DescribableServiceUtil.descriptionForProvider
public static Description descriptionForProvider( final boolean includeFieldProperties, final Object providerForType ) { if (providerForType instanceof Describable) { final Describable desc = (Describable) providerForType; return desc.getDescription(); ...
java
public static Description descriptionForProvider( final boolean includeFieldProperties, final Object providerForType ) { if (providerForType instanceof Describable) { final Describable desc = (Describable) providerForType; return desc.getDescription(); ...
[ "public", "static", "Description", "descriptionForProvider", "(", "final", "boolean", "includeFieldProperties", ",", "final", "Object", "providerForType", ")", "{", "if", "(", "providerForType", "instanceof", "Describable", ")", "{", "final", "Describable", "desc", "=...
Get or build the description of a plugin instance of a given type @param includeFieldProperties true to include introspected field properties @param providerForType plugin instance @return description, or null
[ "Get", "or", "build", "the", "description", "of", "a", "plugin", "instance", "of", "a", "given", "type" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/configuration/DescribableServiceUtil.java#L72-L86
16,001
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/utils/cache/FileCache.java
FileCache.remove
public synchronized void remove(final File file) { final T t = cache.get(file); expiry.remove(file); cache.remove(file); if (null != t && t instanceof Expireable) { final Expireable exp = (Expireable) t; exp.expire(); } }
java
public synchronized void remove(final File file) { final T t = cache.get(file); expiry.remove(file); cache.remove(file); if (null != t && t instanceof Expireable) { final Expireable exp = (Expireable) t; exp.expire(); } }
[ "public", "synchronized", "void", "remove", "(", "final", "File", "file", ")", "{", "final", "T", "t", "=", "cache", ".", "get", "(", "file", ")", ";", "expiry", ".", "remove", "(", "file", ")", ";", "cache", ".", "remove", "(", "file", ")", ";", ...
Remove entry for a file. @param file file
[ "Remove", "entry", "for", "a", "file", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/utils/cache/FileCache.java#L60-L68
16,002
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/common/FrameworkProjectConfig.java
FrameworkProjectConfig.create
public static FrameworkProjectConfig create( final String name, final File propertyFile, final IFilesystemFramework filesystemFramework ) { return new FrameworkProjectConfig(name, propertyFile, filesystemFramework); }
java
public static FrameworkProjectConfig create( final String name, final File propertyFile, final IFilesystemFramework filesystemFramework ) { return new FrameworkProjectConfig(name, propertyFile, filesystemFramework); }
[ "public", "static", "FrameworkProjectConfig", "create", "(", "final", "String", "name", ",", "final", "File", "propertyFile", ",", "final", "IFilesystemFramework", "filesystemFramework", ")", "{", "return", "new", "FrameworkProjectConfig", "(", "name", ",", "propertyF...
Create from existing file @param name @param propertyFile @param filesystemFramework @return
[ "Create", "from", "existing", "file" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/common/FrameworkProjectConfig.java#L71-L78
16,003
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/common/FrameworkProjectConfig.java
FrameworkProjectConfig.create
public static FrameworkProjectConfig create( final String name, final File propertyFile, final Properties properties, final IFilesystemFramework filesystemFramework ) { if (!propertyFile.exists() ) { generateProjectPropertiesFile(name, propert...
java
public static FrameworkProjectConfig create( final String name, final File propertyFile, final Properties properties, final IFilesystemFramework filesystemFramework ) { if (!propertyFile.exists() ) { generateProjectPropertiesFile(name, propert...
[ "public", "static", "FrameworkProjectConfig", "create", "(", "final", "String", "name", ",", "final", "File", "propertyFile", ",", "final", "Properties", "properties", ",", "final", "IFilesystemFramework", "filesystemFramework", ")", "{", "if", "(", "!", "propertyFi...
Create and generate file with the given properties if not null @param name @param propertyFile @param properties @param filesystemFramework @return
[ "Create", "and", "generate", "file", "with", "the", "given", "properties", "if", "not", "null" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/common/FrameworkProjectConfig.java#L88-L100
16,004
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/common/FrameworkProjectConfig.java
FrameworkProjectConfig.setProjectProperties
public void setProjectProperties(final Properties properties) { generateProjectPropertiesFile(getName(), propertyFile, true, properties, false, null, false); loadProperties(); }
java
public void setProjectProperties(final Properties properties) { generateProjectPropertiesFile(getName(), propertyFile, true, properties, false, null, false); loadProperties(); }
[ "public", "void", "setProjectProperties", "(", "final", "Properties", "properties", ")", "{", "generateProjectPropertiesFile", "(", "getName", "(", ")", ",", "propertyFile", ",", "true", ",", "properties", ",", "false", ",", "null", ",", "false", ")", ";", "lo...
Set the project properties file contents exactly @param properties new properties to use in the file
[ "Set", "the", "project", "properties", "file", "contents", "exactly" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/common/FrameworkProjectConfig.java#L138-L141
16,005
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/utils/LogReformatter.java
LogReformatter.reformat
public String reformat(final Map<String, String> context, final String message) { final HashMap<String, String> tokens = new HashMap<String, String>(); if (null != context) { tokens.putAll(context); } if (null != generator) { tokens.putAll(generator.getMap()); ...
java
public String reformat(final Map<String, String> context, final String message) { final HashMap<String, String> tokens = new HashMap<String, String>(); if (null != context) { tokens.putAll(context); } if (null != generator) { tokens.putAll(generator.getMap()); ...
[ "public", "String", "reformat", "(", "final", "Map", "<", "String", ",", "String", ">", "context", ",", "final", "String", "message", ")", "{", "final", "HashMap", "<", "String", ",", "String", ">", "tokens", "=", "new", "HashMap", "<", "String", ",", ...
Combines the context data, and the local static or dynamic context data, and reformats the message @param context input data @param message message string @return reformatted message string
[ "Combines", "the", "context", "data", "and", "the", "local", "static", "or", "dynamic", "context", "data", "and", "reformats", "the", "message" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/utils/LogReformatter.java#L97-L117
16,006
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/rules/States.java
States.state
public static StateObj state(StateObj... states) { MutableStateObj mutable = mutable(); for (StateObj state : states) { mutable.updateState(state); } return state(mutable.getState()); }
java
public static StateObj state(StateObj... states) { MutableStateObj mutable = mutable(); for (StateObj state : states) { mutable.updateState(state); } return state(mutable.getState()); }
[ "public", "static", "StateObj", "state", "(", "StateObj", "...", "states", ")", "{", "MutableStateObj", "mutable", "=", "mutable", "(", ")", ";", "for", "(", "StateObj", "state", ":", "states", ")", "{", "mutable", ".", "updateState", "(", "state", ")", ...
merge multiple state objects in order @param states states @return
[ "merge", "multiple", "state", "objects", "in", "order" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/rules/States.java#L29-L35
16,007
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/authorization/AclsUtil.java
AclsUtil.getGroups
public static Set<String> getGroups(AclRuleSetSource source){ HashSet<String> strings = new HashSet<>(); for (AclRule rule : source.getRuleSet().getRules()) { if(rule.getGroup()!=null) { strings.add(rule.getGroup()); } } return strings; }
java
public static Set<String> getGroups(AclRuleSetSource source){ HashSet<String> strings = new HashSet<>(); for (AclRule rule : source.getRuleSet().getRules()) { if(rule.getGroup()!=null) { strings.add(rule.getGroup()); } } return strings; }
[ "public", "static", "Set", "<", "String", ">", "getGroups", "(", "AclRuleSetSource", "source", ")", "{", "HashSet", "<", "String", ">", "strings", "=", "new", "HashSet", "<>", "(", ")", ";", "for", "(", "AclRule", "rule", ":", "source", ".", "getRuleSet"...
collect the set of groups used in a rule set @param source source @return group names
[ "collect", "the", "set", "of", "groups", "used", "in", "a", "rule", "set" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/authorization/AclsUtil.java#L38-L46
16,008
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/authorization/AclsUtil.java
AclsUtil.append
public static Authorization append(Authorization a, Authorization b) { if (a instanceof AclRuleSetSource && b instanceof AclRuleSetSource) { return RuleEvaluator.createRuleEvaluator( merge((AclRuleSetSource) a, (AclRuleSetSource) b) ); } return new Mul...
java
public static Authorization append(Authorization a, Authorization b) { if (a instanceof AclRuleSetSource && b instanceof AclRuleSetSource) { return RuleEvaluator.createRuleEvaluator( merge((AclRuleSetSource) a, (AclRuleSetSource) b) ); } return new Mul...
[ "public", "static", "Authorization", "append", "(", "Authorization", "a", ",", "Authorization", "b", ")", "{", "if", "(", "a", "instanceof", "AclRuleSetSource", "&&", "b", "instanceof", "AclRuleSetSource", ")", "{", "return", "RuleEvaluator", ".", "createRuleEvalu...
Merge to authorization resources @param a authorization @param b authorization @return a new Authorization that merges both authorization a and b
[ "Merge", "to", "authorization", "resources" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/authorization/AclsUtil.java#L54-L61
16,009
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/configuration/RuntimePropertyResolver.java
RuntimePropertyResolver.resolvePropertyValue
public String resolvePropertyValue(final String name, final PropertyScope scope) { if (null == scope || scope == PropertyScope.Unspecified) { throw new IllegalArgumentException("scope must be specified"); } String value = null; if (scope.isInstanceLevel()) { if (n...
java
public String resolvePropertyValue(final String name, final PropertyScope scope) { if (null == scope || scope == PropertyScope.Unspecified) { throw new IllegalArgumentException("scope must be specified"); } String value = null; if (scope.isInstanceLevel()) { if (n...
[ "public", "String", "resolvePropertyValue", "(", "final", "String", "name", ",", "final", "PropertyScope", "scope", ")", "{", "if", "(", "null", "==", "scope", "||", "scope", "==", "PropertyScope", ".", "Unspecified", ")", "{", "throw", "new", "IllegalArgument...
Resolve the property value @throws IllegalArgumentException if the scope is null or {@link PropertyScope#Unspecified}
[ "Resolve", "the", "property", "value" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/configuration/RuntimePropertyResolver.java#L55-L89
16,010
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/execution/workflow/steps/node/impl/ScriptURLNodeStepExecutor.java
ScriptURLNodeStepExecutor.expandUrlString
public static String expandUrlString( final String urlString, final MultiDataContext<ContextView, DataContext> dataContext, final String nodename ) { final int qindex = urlString.indexOf('?'); final StringBuilder builder = new StringBuilder(); builder...
java
public static String expandUrlString( final String urlString, final MultiDataContext<ContextView, DataContext> dataContext, final String nodename ) { final int qindex = urlString.indexOf('?'); final StringBuilder builder = new StringBuilder(); builder...
[ "public", "static", "String", "expandUrlString", "(", "final", "String", "urlString", ",", "final", "MultiDataContext", "<", "ContextView", ",", "DataContext", ">", "dataContext", ",", "final", "String", "nodename", ")", "{", "final", "int", "qindex", "=", "urlS...
Expand data references in a URL string, using proper encoding for path and query parts. @param urlString url @param dataContext multi context @param nodename default node context @return expanded string
[ "Expand", "data", "references", "in", "a", "URL", "string", "using", "proper", "encoding", "for", "path", "and", "query", "parts", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/execution/workflow/steps/node/impl/ScriptURLNodeStepExecutor.java#L235-L271
16,011
rundeck/rundeck
rundeck-storage/rundeck-storage-filesys/src/main/java/org/rundeck/storage/data/file/DirectFilepathMapper.java
DirectFilepathMapper.withPath
private File withPath(Path path, File dir) { return new File(dir, path.getPath()); }
java
private File withPath(Path path, File dir) { return new File(dir, path.getPath()); }
[ "private", "File", "withPath", "(", "Path", "path", ",", "File", "dir", ")", "{", "return", "new", "File", "(", "dir", ",", "path", ".", "getPath", "(", ")", ")", ";", "}" ]
file for a given path in the specified subdir @param path path @param dir dir @return file
[ "file", "for", "a", "given", "path", "in", "the", "specified", "subdir" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/rundeck-storage/rundeck-storage-filesys/src/main/java/org/rundeck/storage/data/file/DirectFilepathMapper.java#L48-L50
16,012
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/BaseProviderRegistryService.java
BaseProviderRegistryService.providerOfType
public T providerOfType(final String providerName) throws ExecutionServiceException { if (null == providerName) { throw new NullPointerException("provider name was null for Service: " + getName()); } if (isCacheInstances()) { if (null == instanceregistry.get(providerName)...
java
public T providerOfType(final String providerName) throws ExecutionServiceException { if (null == providerName) { throw new NullPointerException("provider name was null for Service: " + getName()); } if (isCacheInstances()) { if (null == instanceregistry.get(providerName)...
[ "public", "T", "providerOfType", "(", "final", "String", "providerName", ")", "throws", "ExecutionServiceException", "{", "if", "(", "null", "==", "providerName", ")", "{", "throw", "new", "NullPointerException", "(", "\"provider name was null for Service: \"", "+", "...
Return the provider instance of the given name.
[ "Return", "the", "provider", "instance", "of", "the", "given", "name", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/BaseProviderRegistryService.java#L92-L106
16,013
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/execution/service/ScriptPluginFileCopier.java
ScriptPluginFileCopier.copyFile
public String copyFile(final ExecutionContext executionContext, final File file, final INodeEntry node, final String destination) throws FileCopierException { return copyFile(executionContext, file, null, null, node, destination); }
java
public String copyFile(final ExecutionContext executionContext, final File file, final INodeEntry node, final String destination) throws FileCopierException { return copyFile(executionContext, file, null, null, node, destination); }
[ "public", "String", "copyFile", "(", "final", "ExecutionContext", "executionContext", ",", "final", "File", "file", ",", "final", "INodeEntry", "node", ",", "final", "String", "destination", ")", "throws", "FileCopierException", "{", "return", "copyFile", "(", "ex...
Copy existing file
[ "Copy", "existing", "file" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/execution/service/ScriptPluginFileCopier.java#L95-L98
16,014
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/execution/service/ScriptPluginFileCopier.java
ScriptPluginFileCopier.copyScriptContent
public String copyScriptContent(final ExecutionContext executionContext, final String s, final INodeEntry node, final String destination) throws FileCopierException { return copyFile(executionContext, null, null, s, n...
java
public String copyScriptContent(final ExecutionContext executionContext, final String s, final INodeEntry node, final String destination) throws FileCopierException { return copyFile(executionContext, null, null, s, n...
[ "public", "String", "copyScriptContent", "(", "final", "ExecutionContext", "executionContext", ",", "final", "String", "s", ",", "final", "INodeEntry", "node", ",", "final", "String", "destination", ")", "throws", "FileCopierException", "{", "return", "copyFile", "(...
Copy string content
[ "Copy", "string", "content" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/execution/service/ScriptPluginFileCopier.java#L103-L107
16,015
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/common/impl/URLFileUpdater.java
URLFileUpdater.loadCacheData
private Properties loadCacheData(final File cacheFile) { final Properties cacheProperties = new Properties(); if (cacheFile.isFile()) { //try to load cache data if present try { final FileInputStream fileInputStream = new FileInputStream(cacheFile); ...
java
private Properties loadCacheData(final File cacheFile) { final Properties cacheProperties = new Properties(); if (cacheFile.isFile()) { //try to load cache data if present try { final FileInputStream fileInputStream = new FileInputStream(cacheFile); ...
[ "private", "Properties", "loadCacheData", "(", "final", "File", "cacheFile", ")", "{", "final", "Properties", "cacheProperties", "=", "new", "Properties", "(", ")", ";", "if", "(", "cacheFile", ".", "isFile", "(", ")", ")", "{", "//try to load cache data if pres...
Load properties file with some cache data @param cacheFile file
[ "Load", "properties", "file", "with", "some", "cache", "data" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/common/impl/URLFileUpdater.java#L356-L372
16,016
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/common/impl/URLFileUpdater.java
URLFileUpdater.cacheResponseInfo
private void cacheResponseInfo(final httpClientInteraction method, final File cacheFile) { //write cache data to file if present Properties newprops = new Properties(); if (null != method.getResponseHeader(LAST_MODIFIED)) { newprops.setProperty(LAST_MODIFIED, method.getResponseHeade...
java
private void cacheResponseInfo(final httpClientInteraction method, final File cacheFile) { //write cache data to file if present Properties newprops = new Properties(); if (null != method.getResponseHeader(LAST_MODIFIED)) { newprops.setProperty(LAST_MODIFIED, method.getResponseHeade...
[ "private", "void", "cacheResponseInfo", "(", "final", "httpClientInteraction", "method", ",", "final", "File", "cacheFile", ")", "{", "//write cache data to file if present", "Properties", "newprops", "=", "new", "Properties", "(", ")", ";", "if", "(", "null", "!=",...
Cache etag and last-modified header info for a response
[ "Cache", "etag", "and", "last", "-", "modified", "header", "info", "for", "a", "response" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/common/impl/URLFileUpdater.java#L377-L407
16,017
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/execution/dispatch/ParallelNodeDispatcher.java
ParallelNodeDispatcher.configureNodeContextThreadLocalsForProject
public static void configureNodeContextThreadLocalsForProject(final Project project) { final InheritableThreadLocal<String> localNodeName = new InheritableThreadLocal<>(); final InheritableThreadLocal<String> localUserName = new InheritableThreadLocal<>(); if (null == project.getReference(NODE_N...
java
public static void configureNodeContextThreadLocalsForProject(final Project project) { final InheritableThreadLocal<String> localNodeName = new InheritableThreadLocal<>(); final InheritableThreadLocal<String> localUserName = new InheritableThreadLocal<>(); if (null == project.getReference(NODE_N...
[ "public", "static", "void", "configureNodeContextThreadLocalsForProject", "(", "final", "Project", "project", ")", "{", "final", "InheritableThreadLocal", "<", "String", ">", "localNodeName", "=", "new", "InheritableThreadLocal", "<>", "(", ")", ";", "final", "Inherit...
Adds InheritableNodeLocal references to the Project for use by the node context tasks @param project the project
[ "Adds", "InheritableNodeLocal", "references", "to", "the", "Project", "for", "use", "by", "the", "node", "context", "tasks" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/execution/dispatch/ParallelNodeDispatcher.java#L265-L274
16,018
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/execution/dispatch/ParallelNodeDispatcher.java
ParallelNodeDispatcher.getThreadLocalForProject
public static String getThreadLocalForProject(final String nodeNameLocalRefId, final Project project) { final Object o = project.getReference(nodeNameLocalRefId); String thrNode = null; if (null != o && o instanceof InheritableThreadLocal) { InheritableThreadLocal<String> local = (In...
java
public static String getThreadLocalForProject(final String nodeNameLocalRefId, final Project project) { final Object o = project.getReference(nodeNameLocalRefId); String thrNode = null; if (null != o && o instanceof InheritableThreadLocal) { InheritableThreadLocal<String> local = (In...
[ "public", "static", "String", "getThreadLocalForProject", "(", "final", "String", "nodeNameLocalRefId", ",", "final", "Project", "project", ")", "{", "final", "Object", "o", "=", "project", ".", "getReference", "(", "nodeNameLocalRefId", ")", ";", "String", "thrNo...
Extract the threadlocal stored as a reference in the project, and return the string value or null. @param nodeNameLocalRefId refid for the thread local variable @param project Project @return value of the variable, or null if it is not found or the refid doesn't refer to a valid thread local
[ "Extract", "the", "threadlocal", "stored", "as", "a", "reference", "in", "the", "project", "and", "return", "the", "string", "value", "or", "null", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/execution/dispatch/ParallelNodeDispatcher.java#L284-L292
16,019
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/execution/dispatch/ParallelNodeDispatcher.java
ParallelNodeDispatcher.addNodeContextTasks
public static void addNodeContextTasks(final INodeEntry nodeentry, final Project project, final Sequential seq) { //set thread local node name final Task nodenamelocal = genSetThreadLocalRefValue(NODE_NAME_LOCAL_REF_ID, nodeentry.getNodename()); nodenam...
java
public static void addNodeContextTasks(final INodeEntry nodeentry, final Project project, final Sequential seq) { //set thread local node name final Task nodenamelocal = genSetThreadLocalRefValue(NODE_NAME_LOCAL_REF_ID, nodeentry.getNodename()); nodenam...
[ "public", "static", "void", "addNodeContextTasks", "(", "final", "INodeEntry", "nodeentry", ",", "final", "Project", "project", ",", "final", "Sequential", "seq", ")", "{", "//set thread local node name", "final", "Task", "nodenamelocal", "=", "genSetThreadLocalRefValue...
Add tasks to the Sequential to set threadlocal values for the node name and username @param nodeentry node entry @param project ant Project @param seq Sequential
[ "Add", "tasks", "to", "the", "Sequential", "to", "set", "threadlocal", "values", "for", "the", "node", "name", "and", "username" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/execution/dispatch/ParallelNodeDispatcher.java#L301-L315
16,020
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/execution/dispatch/ParallelNodeDispatcher.java
ParallelNodeDispatcher.genSetThreadLocalRefValue
private static Task genSetThreadLocalRefValue(final String refid, final String value) { final SetThreadLocalTask task = new SetThreadLocalTask(); task.setRefid(refid); task.setValue(value); return task; }
java
private static Task genSetThreadLocalRefValue(final String refid, final String value) { final SetThreadLocalTask task = new SetThreadLocalTask(); task.setRefid(refid); task.setValue(value); return task; }
[ "private", "static", "Task", "genSetThreadLocalRefValue", "(", "final", "String", "refid", ",", "final", "String", "value", ")", "{", "final", "SetThreadLocalTask", "task", "=", "new", "SetThreadLocalTask", "(", ")", ";", "task", ".", "setRefid", "(", "refid", ...
Return a task configured to set the thread local value for a particular refid @param refid the refid @param value the value to set @return the Task
[ "Return", "a", "task", "configured", "to", "set", "the", "thread", "local", "value", "for", "a", "particular", "refid" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/execution/dispatch/ParallelNodeDispatcher.java#L325-L330
16,021
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/utils/FormattedOutputStream.java
FormattedOutputStream.formatMessage
private String formatMessage(final String message) { if (null != reformatter) { return reformatter.reformat(context, message); } else { return message; } }
java
private String formatMessage(final String message) { if (null != reformatter) { return reformatter.reformat(context, message); } else { return message; } }
[ "private", "String", "formatMessage", "(", "final", "String", "message", ")", "{", "if", "(", "null", "!=", "reformatter", ")", "{", "return", "reformatter", ".", "reformat", "(", "context", ",", "message", ")", ";", "}", "else", "{", "return", "message", ...
Return the reformatted message, or the original if no reformatter is specified. @param message input message @return reformatted result
[ "Return", "the", "reformatted", "message", "or", "the", "original", "if", "no", "reformatter", "is", "specified", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/utils/FormattedOutputStream.java#L65-L71
16,022
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/utils/FormattedOutputStream.java
FormattedOutputStream.writeBufferedData
private void writeBufferedData() throws IOException { if (buffer.length() > 0) { out.write(formatMessage(buffer.toString()).getBytes()); out.write('\n'); buffer = new StringBuffer(); } }
java
private void writeBufferedData() throws IOException { if (buffer.length() > 0) { out.write(formatMessage(buffer.toString()).getBytes()); out.write('\n'); buffer = new StringBuffer(); } }
[ "private", "void", "writeBufferedData", "(", ")", "throws", "IOException", "{", "if", "(", "buffer", ".", "length", "(", ")", ">", "0", ")", "{", "out", ".", "write", "(", "formatMessage", "(", "buffer", ".", "toString", "(", ")", ")", ".", "getBytes",...
If the buffer has content, then reformat and write the content to the output stream. @throws IOException
[ "If", "the", "buffer", "has", "content", "then", "reformat", "and", "write", "the", "content", "to", "the", "output", "stream", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/utils/FormattedOutputStream.java#L92-L98
16,023
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/common/ProjectNodeSupport.java
ProjectNodeSupport.getNodeSet
@Override public INodeSet getNodeSet() { //iterate through sources, and add nodes final NodeSetMerge list = getNodeSetMerge(); Map<String,Exception> exceptions = Collections.synchronizedMap(new HashMap<>()); int index=1; nodesSourceExceptions.clear(); for (final Reso...
java
@Override public INodeSet getNodeSet() { //iterate through sources, and add nodes final NodeSetMerge list = getNodeSetMerge(); Map<String,Exception> exceptions = Collections.synchronizedMap(new HashMap<>()); int index=1; nodesSourceExceptions.clear(); for (final Reso...
[ "@", "Override", "public", "INodeSet", "getNodeSet", "(", ")", "{", "//iterate through sources, and add nodes", "final", "NodeSetMerge", "list", "=", "getNodeSetMerge", "(", ")", ";", "Map", "<", "String", ",", "Exception", ">", "exceptions", "=", "Collections", "...
Returns the set of nodes for the project @return an instance of {@link INodeSet}
[ "Returns", "the", "set", "of", "nodes", "for", "the", "project" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/common/ProjectNodeSupport.java#L126-L188
16,024
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/common/ProjectNodeSupport.java
ProjectNodeSupport.unloadSources
private synchronized void unloadSources() { nodesSourceList = new ArrayList<>(); Closeables.closeQuietly(nodeSourceReferences); nodeSourceReferences = new HashSet<>(); sourcesOpened = false; }
java
private synchronized void unloadSources() { nodesSourceList = new ArrayList<>(); Closeables.closeQuietly(nodeSourceReferences); nodeSourceReferences = new HashSet<>(); sourcesOpened = false; }
[ "private", "synchronized", "void", "unloadSources", "(", ")", "{", "nodesSourceList", "=", "new", "ArrayList", "<>", "(", ")", ";", "Closeables", ".", "closeQuietly", "(", "nodeSourceReferences", ")", ";", "nodeSourceReferences", "=", "new", "HashSet", "<>", "("...
Clear the sources list and close all plugin loader references
[ "Clear", "the", "sources", "list", "and", "close", "all", "plugin", "loader", "references" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/common/ProjectNodeSupport.java#L255-L260
16,025
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/common/ProjectNodeSupport.java
ProjectNodeSupport.listNodeEnhancerConfigurations
@Override public synchronized List<ExtPluginConfiguration> listNodeEnhancerConfigurations() { return listPluginConfigurations( projectConfig.getProjectProperties(), NODE_ENHANCER_PROP_PREFIX, ServiceNameConstants.NodeEnhancer ); }
java
@Override public synchronized List<ExtPluginConfiguration> listNodeEnhancerConfigurations() { return listPluginConfigurations( projectConfig.getProjectProperties(), NODE_ENHANCER_PROP_PREFIX, ServiceNameConstants.NodeEnhancer ); }
[ "@", "Override", "public", "synchronized", "List", "<", "ExtPluginConfiguration", ">", "listNodeEnhancerConfigurations", "(", ")", "{", "return", "listPluginConfigurations", "(", "projectConfig", ".", "getProjectProperties", "(", ")", ",", "NODE_ENHANCER_PROP_PREFIX", ","...
list the configurations of node enhancer providers. @return a list of PluginConfiguration
[ "list", "the", "configurations", "of", "node", "enhancer", "providers", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/common/ProjectNodeSupport.java#L555-L562
16,026
rundeck/rundeck
core/src/main/java/com/dtolabs/shared/resources/ResourceXMLGenerator.java
ResourceXMLGenerator.addNode
public void addNode(final INodeEntry node) { //convert to entity final ResourceXMLParser.Entity entity = createEntity(node); addEntity(entity); }
java
public void addNode(final INodeEntry node) { //convert to entity final ResourceXMLParser.Entity entity = createEntity(node); addEntity(entity); }
[ "public", "void", "addNode", "(", "final", "INodeEntry", "node", ")", "{", "//convert to entity", "final", "ResourceXMLParser", ".", "Entity", "entity", "=", "createEntity", "(", "node", ")", ";", "addEntity", "(", "entity", ")", ";", "}" ]
Add Node object @param node node
[ "Add", "Node", "object" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/shared/resources/ResourceXMLGenerator.java#L103-L107
16,027
rundeck/rundeck
core/src/main/java/com/dtolabs/shared/resources/ResourceXMLGenerator.java
ResourceXMLGenerator.createEntity
private ResourceXMLParser.Entity createEntity(final INodeEntry node) { final ResourceXMLParser.Entity ent = new ResourceXMLParser.Entity(); ent.setName(node.getNodename()); ent.setResourceType(NODE_ENTITY_TAG); if(null!=node.getAttributes()){ for (final String setNa...
java
private ResourceXMLParser.Entity createEntity(final INodeEntry node) { final ResourceXMLParser.Entity ent = new ResourceXMLParser.Entity(); ent.setName(node.getNodename()); ent.setResourceType(NODE_ENTITY_TAG); if(null!=node.getAttributes()){ for (final String setNa...
[ "private", "ResourceXMLParser", ".", "Entity", "createEntity", "(", "final", "INodeEntry", "node", ")", "{", "final", "ResourceXMLParser", ".", "Entity", "ent", "=", "new", "ResourceXMLParser", ".", "Entity", "(", ")", ";", "ent", ".", "setName", "(", "node", ...
Create entity from Node @param node node @return entity
[ "Create", "entity", "from", "Node" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/shared/resources/ResourceXMLGenerator.java#L122-L141
16,028
rundeck/rundeck
core/src/main/java/com/dtolabs/shared/resources/ResourceXMLGenerator.java
ResourceXMLGenerator.joinStrings
private static String joinStrings(final Set tags, final String delim) { ArrayList<String> strings = new ArrayList<String>(tags); String[] objects = strings.toArray(new String[strings.size()]); Arrays.sort(objects); final StringBuffer sb = new StringBuffer(); for (final String tag...
java
private static String joinStrings(final Set tags, final String delim) { ArrayList<String> strings = new ArrayList<String>(tags); String[] objects = strings.toArray(new String[strings.size()]); Arrays.sort(objects); final StringBuffer sb = new StringBuffer(); for (final String tag...
[ "private", "static", "String", "joinStrings", "(", "final", "Set", "tags", ",", "final", "String", "delim", ")", "{", "ArrayList", "<", "String", ">", "strings", "=", "new", "ArrayList", "<", "String", ">", "(", "tags", ")", ";", "String", "[", "]", "o...
utility to join tags into string @param tags tags set @param delim delimiter string @return joined string
[ "utility", "to", "join", "tags", "into", "string" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/shared/resources/ResourceXMLGenerator.java#L151-L164
16,029
rundeck/rundeck
core/src/main/java/com/dtolabs/shared/resources/ResourceXMLGenerator.java
ResourceXMLGenerator.generate
public void generate() throws IOException { final Document doc = DocumentFactory.getInstance().createDocument(); final Element root = doc.addElement("project"); //iterate through entities in correct order for (final ResourceXMLParser.Entity entity : entities) { if (NODE_ENTIT...
java
public void generate() throws IOException { final Document doc = DocumentFactory.getInstance().createDocument(); final Element root = doc.addElement("project"); //iterate through entities in correct order for (final ResourceXMLParser.Entity entity : entities) { if (NODE_ENTIT...
[ "public", "void", "generate", "(", ")", "throws", "IOException", "{", "final", "Document", "doc", "=", "DocumentFactory", ".", "getInstance", "(", ")", ".", "createDocument", "(", ")", ";", "final", "Element", "root", "=", "doc", ".", "addElement", "(", "\...
Generate and store the XML file @throws IOException on error
[ "Generate", "and", "store", "the", "XML", "file" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/shared/resources/ResourceXMLGenerator.java#L171-L192
16,030
rundeck/rundeck
core/src/main/java/com/dtolabs/shared/resources/ResourceXMLGenerator.java
ResourceXMLGenerator.genAttributes
private void genAttributes(final Element ent, final ResourceXMLParser.Entity entity) { if (null == entity.getProperties() ) { return; } for (final String key:entity.getProperties().stringPropertyNames()){ if (!ResourceXMLConstants.allPropSet.contains(key)) { ...
java
private void genAttributes(final Element ent, final ResourceXMLParser.Entity entity) { if (null == entity.getProperties() ) { return; } for (final String key:entity.getProperties().stringPropertyNames()){ if (!ResourceXMLConstants.allPropSet.contains(key)) { ...
[ "private", "void", "genAttributes", "(", "final", "Element", "ent", ",", "final", "ResourceXMLParser", ".", "Entity", "entity", ")", "{", "if", "(", "null", "==", "entity", ".", "getProperties", "(", ")", ")", "{", "return", ";", "}", "for", "(", "final"...
Generate resources section and resource references @param ent element @param entity entity
[ "Generate", "resources", "section", "and", "resource", "references" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/shared/resources/ResourceXMLGenerator.java#L200-L218
16,031
rundeck/rundeck
core/src/main/java/com/dtolabs/shared/resources/ResourceXMLGenerator.java
ResourceXMLGenerator.genNode
private void genNode(final Element ent, final ResourceXMLParser.Entity entity) { for (final String nodeProp : nodeProps) { ent.addAttribute(nodeProp, notNull(entity.getProperty(nodeProp))); } genAttributes(ent, entity); }
java
private void genNode(final Element ent, final ResourceXMLParser.Entity entity) { for (final String nodeProp : nodeProps) { ent.addAttribute(nodeProp, notNull(entity.getProperty(nodeProp))); } genAttributes(ent, entity); }
[ "private", "void", "genNode", "(", "final", "Element", "ent", ",", "final", "ResourceXMLParser", ".", "Entity", "entity", ")", "{", "for", "(", "final", "String", "nodeProp", ":", "nodeProps", ")", "{", "ent", ".", "addAttribute", "(", "nodeProp", ",", "no...
Gen "node" tag contents @param ent element @param entity entity
[ "Gen", "node", "tag", "contents" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/shared/resources/ResourceXMLGenerator.java#L253-L258
16,032
rundeck/rundeck
core/src/main/java/com/dtolabs/shared/resources/ResourceXMLGenerator.java
ResourceXMLGenerator.genEntityCommon
private Element genEntityCommon(final Element root, final ResourceXMLParser.Entity entity) { final Element tag = root.addElement(entity.getResourceType()); tag.addAttribute(COMMON_NAME, entity.getName()); tag.addAttribute(COMMON_DESCRIPTION, notNull(entity.getProperty(COMMON_DESCRIPTION))); ...
java
private Element genEntityCommon(final Element root, final ResourceXMLParser.Entity entity) { final Element tag = root.addElement(entity.getResourceType()); tag.addAttribute(COMMON_NAME, entity.getName()); tag.addAttribute(COMMON_DESCRIPTION, notNull(entity.getProperty(COMMON_DESCRIPTION))); ...
[ "private", "Element", "genEntityCommon", "(", "final", "Element", "root", ",", "final", "ResourceXMLParser", ".", "Entity", "entity", ")", "{", "final", "Element", "tag", "=", "root", ".", "addElement", "(", "entity", ".", "getResourceType", "(", ")", ")", "...
Create entity tag based on resourceType of entity, and add common attributes @param root element @param entity entity @return element
[ "Create", "entity", "tag", "based", "on", "resourceType", "of", "entity", "and", "add", "common", "attributes" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/shared/resources/ResourceXMLGenerator.java#L271-L277
16,033
rundeck/rundeck
core/src/main/java/com/dtolabs/shared/resources/ResourceXMLGenerator.java
ResourceXMLGenerator.serializeDocToStream
private static void serializeDocToStream(final OutputStream output, final Document doc) throws IOException { final OutputFormat format = OutputFormat.createPrettyPrint(); final XMLWriter writer = new XMLWriter(output, format); writer.write(doc); writer.flush(); }
java
private static void serializeDocToStream(final OutputStream output, final Document doc) throws IOException { final OutputFormat format = OutputFormat.createPrettyPrint(); final XMLWriter writer = new XMLWriter(output, format); writer.write(doc); writer.flush(); }
[ "private", "static", "void", "serializeDocToStream", "(", "final", "OutputStream", "output", ",", "final", "Document", "doc", ")", "throws", "IOException", "{", "final", "OutputFormat", "format", "=", "OutputFormat", ".", "createPrettyPrint", "(", ")", ";", "final...
Write Document to a file @param output stream @param doc document @throws IOException on error
[ "Write", "Document", "to", "a", "file" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/shared/resources/ResourceXMLGenerator.java#L300-L305
16,034
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/utils/ThreadBoundOutputStream.java
ThreadBoundOutputStream.removeThreadStream
public OutputStream removeThreadStream() { final OutputStream orig = inheritOutputStream.get(); inheritOutputStream.set(null); return orig; }
java
public OutputStream removeThreadStream() { final OutputStream orig = inheritOutputStream.get(); inheritOutputStream.set(null); return orig; }
[ "public", "OutputStream", "removeThreadStream", "(", ")", "{", "final", "OutputStream", "orig", "=", "inheritOutputStream", ".", "get", "(", ")", ";", "inheritOutputStream", ".", "set", "(", "null", ")", ";", "return", "orig", ";", "}" ]
Remove the custom stream for the current thread. @return thread bound OutputStream or null if none exists
[ "Remove", "the", "custom", "stream", "for", "the", "current", "thread", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/utils/ThreadBoundOutputStream.java#L98-L102
16,035
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/configuration/Validator.java
Validator.errorReport
public static Report errorReport(String key, String message) { return buildReport().error(key, message).build(); }
java
public static Report errorReport(String key, String message) { return buildReport().error(key, message).build(); }
[ "public", "static", "Report", "errorReport", "(", "String", "key", ",", "String", "message", ")", "{", "return", "buildReport", "(", ")", ".", "error", "(", "key", ",", "message", ")", ".", "build", "(", ")", ";", "}" ]
Return a report for a single error item @param key key @param message message @return report
[ "Return", "a", "report", "for", "a", "single", "error", "item" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/configuration/Validator.java#L41-L43
16,036
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/configuration/Validator.java
Validator.validate
private static void validate(Properties props, Report report, List<Property> properties, PropertyScope ignoredScope) { if(null!=properties){ for (final Property property : properties) { if (null != ignoredScope && property.getScope() != null && property.getSco...
java
private static void validate(Properties props, Report report, List<Property> properties, PropertyScope ignoredScope) { if(null!=properties){ for (final Property property : properties) { if (null != ignoredScope && property.getScope() != null && property.getSco...
[ "private", "static", "void", "validate", "(", "Properties", "props", ",", "Report", "report", ",", "List", "<", "Property", ">", "properties", ",", "PropertyScope", "ignoredScope", ")", "{", "if", "(", "null", "!=", "properties", ")", "{", "for", "(", "fin...
Validate, ignoring properties below a scope, if set @param props input properties @param report report @param properties property definitions @param ignoredScope ignore scope
[ "Validate", "ignoring", "properties", "below", "a", "scope", "if", "set" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/configuration/Validator.java#L136-L165
16,037
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/configuration/Validator.java
Validator.mapProperties
public static Map<String, String> mapProperties(final Map<String, String> input, final Description desc) { final Map<String, String> mapping = desc.getPropertiesMapping(); if (null == mapping) { return input; } return performMapping(input, mapping, false); }
java
public static Map<String, String> mapProperties(final Map<String, String> input, final Description desc) { final Map<String, String> mapping = desc.getPropertiesMapping(); if (null == mapping) { return input; } return performMapping(input, mapping, false); }
[ "public", "static", "Map", "<", "String", ",", "String", ">", "mapProperties", "(", "final", "Map", "<", "String", ",", "String", ">", "input", ",", "final", "Description", "desc", ")", "{", "final", "Map", "<", "String", ",", "String", ">", "mapping", ...
Converts a set of input configuration keys using the description's configuration to property mapping, or the same input if the description has no mapping @param input input map @param desc plugin description @return mapped values
[ "Converts", "a", "set", "of", "input", "configuration", "keys", "using", "the", "description", "s", "configuration", "to", "property", "mapping", "or", "the", "same", "input", "if", "the", "description", "has", "no", "mapping" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/configuration/Validator.java#L240-L246
16,038
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/configuration/Validator.java
Validator.performMapping
public static Map<String, String> performMapping(final Map<String, String> input, final Map<String, String> mapping, final boolean skip) { final Map<String, String> props = new HashMap<String, String>(); for (final Map.Entry<String, String> entry :...
java
public static Map<String, String> performMapping(final Map<String, String> input, final Map<String, String> mapping, final boolean skip) { final Map<String, String> props = new HashMap<String, String>(); for (final Map.Entry<String, String> entry :...
[ "public", "static", "Map", "<", "String", ",", "String", ">", "performMapping", "(", "final", "Map", "<", "String", ",", "String", ">", "input", ",", "final", "Map", "<", "String", ",", "String", ">", "mapping", ",", "final", "boolean", "skip", ")", "{...
Convert input keys via the supplied mapping. @param input data @param mapping map to convert key names @param skip if true, ignore input entries when the key is not present in the mapping
[ "Convert", "input", "keys", "via", "the", "supplied", "mapping", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/configuration/Validator.java#L254-L268
16,039
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/configuration/Validator.java
Validator.demapProperties
public static Map<String, String> demapProperties(final Map<String, String> input, final Description desc) { final Map<String, String> mapping = desc.getPropertiesMapping(); return demapProperties(input, mapping, true); }
java
public static Map<String, String> demapProperties(final Map<String, String> input, final Description desc) { final Map<String, String> mapping = desc.getPropertiesMapping(); return demapProperties(input, mapping, true); }
[ "public", "static", "Map", "<", "String", ",", "String", ">", "demapProperties", "(", "final", "Map", "<", "String", ",", "String", ">", "input", ",", "final", "Description", "desc", ")", "{", "final", "Map", "<", "String", ",", "String", ">", "mapping",...
Reverses a set of properties mapped using the description's configuration to property mapping, or the same input if the description has no mapping @param input input map @param desc plugin description @return mapped values
[ "Reverses", "a", "set", "of", "properties", "mapped", "using", "the", "description", "s", "configuration", "to", "property", "mapping", "or", "the", "same", "input", "if", "the", "description", "has", "no", "mapping" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/configuration/Validator.java#L277-L280
16,040
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/configuration/Validator.java
Validator.demapProperties
public static Map<String, String> demapProperties( final Map<String, String> input, final Map<String, String> mapping, final boolean skip ) { if (null == mapping) { return input; } final Map<String, String> rev = new HashMap<String, String>...
java
public static Map<String, String> demapProperties( final Map<String, String> input, final Map<String, String> mapping, final boolean skip ) { if (null == mapping) { return input; } final Map<String, String> rev = new HashMap<String, String>...
[ "public", "static", "Map", "<", "String", ",", "String", ">", "demapProperties", "(", "final", "Map", "<", "String", ",", "String", ">", "input", ",", "final", "Map", "<", "String", ",", "String", ">", "mapping", ",", "final", "boolean", "skip", ")", "...
Reverses a set of properties mapped using the specified property mapping, or the same input if the description has no mapping @param input input map @param mapping key value mapping @param skip if true, ignore input entries when the key is not present in the mapping @return mapped values
[ "Reverses", "a", "set", "of", "properties", "mapped", "using", "the", "specified", "property", "mapping", "or", "the", "same", "input", "if", "the", "description", "has", "no", "mapping" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/configuration/Validator.java#L290-L304
16,041
rundeck/rundeck
core/src/main/java/com/dtolabs/utils/Streams.java
Streams.copyStreamCount
public static int copyStreamCount(final InputStream in, final OutputStream out) throws IOException { final byte[] buffer = new byte[10240]; int tot=0; int c; c = in.read(buffer); while (c >= 0) { if (c > 0) { out.write(buffer, 0, c); to...
java
public static int copyStreamCount(final InputStream in, final OutputStream out) throws IOException { final byte[] buffer = new byte[10240]; int tot=0; int c; c = in.read(buffer); while (c >= 0) { if (c > 0) { out.write(buffer, 0, c); to...
[ "public", "static", "int", "copyStreamCount", "(", "final", "InputStream", "in", ",", "final", "OutputStream", "out", ")", "throws", "IOException", "{", "final", "byte", "[", "]", "buffer", "=", "new", "byte", "[", "10240", "]", ";", "int", "tot", "=", "...
Read the data from the input stream and copy to the outputstream. @param in inputstream @param out outpustream @return number of bytes copied @throws java.io.IOException if thrown by underlying io operations
[ "Read", "the", "data", "from", "the", "input", "stream", "and", "copy", "to", "the", "outputstream", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/utils/Streams.java#L60-L73
16,042
rundeck/rundeck
core/src/main/java/com/dtolabs/utils/Streams.java
Streams.copyWriterCount
public static int copyWriterCount(final Reader in, final Writer out) throws IOException { final char[] buffer = new char[10240]; int tot=0; int c; c = in.read(buffer); while (c >= 0) { if (c > 0) { out.write(buffer, 0, c); tot += c; ...
java
public static int copyWriterCount(final Reader in, final Writer out) throws IOException { final char[] buffer = new char[10240]; int tot=0; int c; c = in.read(buffer); while (c >= 0) { if (c > 0) { out.write(buffer, 0, c); tot += c; ...
[ "public", "static", "int", "copyWriterCount", "(", "final", "Reader", "in", ",", "final", "Writer", "out", ")", "throws", "IOException", "{", "final", "char", "[", "]", "buffer", "=", "new", "char", "[", "10240", "]", ";", "int", "tot", "=", "0", ";", ...
Read the data from the reader and copy to the writer. @param in inputstream @param out outpustream @return number of bytes copied @throws java.io.IOException if thrown by underlying io operations
[ "Read", "the", "data", "from", "the", "reader", "and", "copy", "to", "the", "writer", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/utils/Streams.java#L83-L96
16,043
rundeck/rundeck
core/src/main/java/com/dtolabs/utils/Streams.java
Streams.copyStreamWithFilterSet
public static void copyStreamWithFilterSet(final InputStream in, final OutputStream out, final FilterSet set) throws IOException { final BufferedReader reader = new BufferedReader(new InputStreamReader(in)); final BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(out)); S...
java
public static void copyStreamWithFilterSet(final InputStream in, final OutputStream out, final FilterSet set) throws IOException { final BufferedReader reader = new BufferedReader(new InputStreamReader(in)); final BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(out)); S...
[ "public", "static", "void", "copyStreamWithFilterSet", "(", "final", "InputStream", "in", ",", "final", "OutputStream", "out", ",", "final", "FilterSet", "set", ")", "throws", "IOException", "{", "final", "BufferedReader", "reader", "=", "new", "BufferedReader", "...
Read the data from the input stream and write to the outputstream, filtering with an Ant FilterSet. @param in inputstream @param out outputstream @param set FilterSet to use @throws java.io.IOException if thrown by underlying io operations
[ "Read", "the", "data", "from", "the", "input", "stream", "and", "write", "to", "the", "outputstream", "filtering", "with", "an", "Ant", "FilterSet", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/utils/Streams.java#L148-L160
16,044
rundeck/rundeck
core/src/main/java/com/dtolabs/utils/Mapper.java
Mapper.concat
public static Mapper concat(final Mapper first, final Mapper second){ return new ConcatMapper(new Mapper[]{first,second}); }
java
public static Mapper concat(final Mapper first, final Mapper second){ return new ConcatMapper(new Mapper[]{first,second}); }
[ "public", "static", "Mapper", "concat", "(", "final", "Mapper", "first", ",", "final", "Mapper", "second", ")", "{", "return", "new", "ConcatMapper", "(", "new", "Mapper", "[", "]", "{", "first", ",", "second", "}", ")", ";", "}" ]
Concatenate two Mappers. @param first first mapper to apply @param second second mapper to apply @return mapper
[ "Concatenate", "two", "Mappers", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/utils/Mapper.java#L155-L157
16,045
rundeck/rundeck
core/src/main/java/com/dtolabs/utils/Mapper.java
Mapper.map
public static Collection map(Mapper mapper, Object o) { return java.util.Collections.singleton(mapper.map(o)); }
java
public static Collection map(Mapper mapper, Object o) { return java.util.Collections.singleton(mapper.map(o)); }
[ "public", "static", "Collection", "map", "(", "Mapper", "mapper", ",", "Object", "o", ")", "{", "return", "java", ".", "util", ".", "Collections", ".", "singleton", "(", "mapper", ".", "map", "(", "o", ")", ")", ";", "}" ]
Trivial case of a single object. @param mapper an Mapper @param o an Object @return a Collection of the results.
[ "Trivial", "case", "of", "a", "single", "object", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/utils/Mapper.java#L266-L268
16,046
rundeck/rundeck
core/src/main/java/com/dtolabs/utils/Mapper.java
Mapper.makeMap
public static Map makeMap(Mapper mapper, Object[] a) { return makeMap(mapper, java.util.Arrays.asList(a), false); }
java
public static Map makeMap(Mapper mapper, Object[] a) { return makeMap(mapper, java.util.Arrays.asList(a), false); }
[ "public", "static", "Map", "makeMap", "(", "Mapper", "mapper", ",", "Object", "[", "]", "a", ")", "{", "return", "makeMap", "(", "mapper", ",", "java", ".", "util", ".", "Arrays", ".", "asList", "(", "a", ")", ",", "false", ")", ";", "}" ]
Create a new Map by using the array objects as keys, and the mapping result as values. Discard keys which return null values from the mapper. @param mapper a Mapper to map the values @param a array of items @return a new Map with values mapped
[ "Create", "a", "new", "Map", "by", "using", "the", "array", "objects", "as", "keys", "and", "the", "mapping", "result", "as", "values", ".", "Discard", "keys", "which", "return", "null", "values", "from", "the", "mapper", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/utils/Mapper.java#L488-L490
16,047
rundeck/rundeck
core/src/main/java/com/dtolabs/utils/Mapper.java
Mapper.makeMap
public static Map makeMap(Mapper mapper, Collection c) { return makeMap(mapper, c.iterator(), false); }
java
public static Map makeMap(Mapper mapper, Collection c) { return makeMap(mapper, c.iterator(), false); }
[ "public", "static", "Map", "makeMap", "(", "Mapper", "mapper", ",", "Collection", "c", ")", "{", "return", "makeMap", "(", "mapper", ",", "c", ".", "iterator", "(", ")", ",", "false", ")", ";", "}" ]
Create a new Map by using the collection objects as keys, and the mapping result as values. Discard keys which return null values from the mapper. @param mapper a Mapper to map the values @param c Collection of items @return a new Map with values mapped
[ "Create", "a", "new", "Map", "by", "using", "the", "collection", "objects", "as", "keys", "and", "the", "mapping", "result", "as", "values", ".", "Discard", "keys", "which", "return", "null", "values", "from", "the", "mapper", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/utils/Mapper.java#L519-L521
16,048
rundeck/rundeck
core/src/main/java/com/dtolabs/utils/Mapper.java
Mapper.makeMap
public static Map makeMap(Mapper mapper, Collection c, boolean includeNull) { return makeMap(mapper, c.iterator(), includeNull); }
java
public static Map makeMap(Mapper mapper, Collection c, boolean includeNull) { return makeMap(mapper, c.iterator(), includeNull); }
[ "public", "static", "Map", "makeMap", "(", "Mapper", "mapper", ",", "Collection", "c", ",", "boolean", "includeNull", ")", "{", "return", "makeMap", "(", "mapper", ",", "c", ".", "iterator", "(", ")", ",", "includeNull", ")", ";", "}" ]
Create a new Map by using the collection objects as keys, and the mapping result as values. @param mapper a Mapper to map the values @param c Collection of items @param includeNull true to include null @return a new Map with values mapped
[ "Create", "a", "new", "Map", "by", "using", "the", "collection", "objects", "as", "keys", "and", "the", "mapping", "result", "as", "values", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/utils/Mapper.java#L535-L537
16,049
rundeck/rundeck
core/src/main/java/com/dtolabs/utils/Mapper.java
Mapper.makeMap
public static Map makeMap(Mapper mapper, Iterator i) { return makeMap(mapper, i, false); }
java
public static Map makeMap(Mapper mapper, Iterator i) { return makeMap(mapper, i, false); }
[ "public", "static", "Map", "makeMap", "(", "Mapper", "mapper", ",", "Iterator", "i", ")", "{", "return", "makeMap", "(", "mapper", ",", "i", ",", "false", ")", ";", "}" ]
Create a new Map by using the iterator objects as keys, and the mapping result as values. Discard keys which return null values from the mapper. @param mapper a Mapper to map the values @param i Iterator @return a new Map with values mapped
[ "Create", "a", "new", "Map", "by", "using", "the", "iterator", "objects", "as", "keys", "and", "the", "mapping", "result", "as", "values", ".", "Discard", "keys", "which", "return", "null", "values", "from", "the", "mapper", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/utils/Mapper.java#L548-L550
16,050
rundeck/rundeck
core/src/main/java/com/dtolabs/utils/Mapper.java
Mapper.makeMap
public static Map makeMap(Mapper mapper, Iterator i, boolean includeNull) { HashMap h = new HashMap(); for (; i.hasNext();) { Object k = i.next(); Object v = mapper.map(k); if (includeNull || v != null) { h.put(k, v); } } re...
java
public static Map makeMap(Mapper mapper, Iterator i, boolean includeNull) { HashMap h = new HashMap(); for (; i.hasNext();) { Object k = i.next(); Object v = mapper.map(k); if (includeNull || v != null) { h.put(k, v); } } re...
[ "public", "static", "Map", "makeMap", "(", "Mapper", "mapper", ",", "Iterator", "i", ",", "boolean", "includeNull", ")", "{", "HashMap", "h", "=", "new", "HashMap", "(", ")", ";", "for", "(", ";", "i", ".", "hasNext", "(", ")", ";", ")", "{", "Obje...
Create a new Map by using the iterator objects as keys, and the mapping result as values. @param mapper a Mapper to map the values @param i Iterator @param includeNull true to include null @return a new Map with values mapped
[ "Create", "a", "new", "Map", "by", "using", "the", "iterator", "objects", "as", "keys", "and", "the", "mapping", "result", "as", "values", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/utils/Mapper.java#L564-L574
16,051
rundeck/rundeck
core/src/main/java/com/dtolabs/utils/Mapper.java
Mapper.makeMap
public static Map makeMap(Mapper mapper, Enumeration en) { return makeMap(mapper, en, false); }
java
public static Map makeMap(Mapper mapper, Enumeration en) { return makeMap(mapper, en, false); }
[ "public", "static", "Map", "makeMap", "(", "Mapper", "mapper", ",", "Enumeration", "en", ")", "{", "return", "makeMap", "(", "mapper", ",", "en", ",", "false", ")", ";", "}" ]
Create a new Map by using the enumeration objects as keys, and the mapping result as values. Discard keys which return null values from the mapper. @param mapper a Mapper to map the values @param en Enumeration @return a new Map with values mapped
[ "Create", "a", "new", "Map", "by", "using", "the", "enumeration", "objects", "as", "keys", "and", "the", "mapping", "result", "as", "values", ".", "Discard", "keys", "which", "return", "null", "values", "from", "the", "mapper", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/utils/Mapper.java#L585-L587
16,052
rundeck/rundeck
core/src/main/java/com/dtolabs/utils/Mapper.java
Mapper.makeMap
public static Map makeMap(Mapper mapper, Enumeration en, boolean includeNull) { HashMap h = new HashMap(); for (; en.hasMoreElements();) { Object k = en.nextElement(); Object v = mapper.map(k); if (includeNull || v != null) { h.put(k, v); }...
java
public static Map makeMap(Mapper mapper, Enumeration en, boolean includeNull) { HashMap h = new HashMap(); for (; en.hasMoreElements();) { Object k = en.nextElement(); Object v = mapper.map(k); if (includeNull || v != null) { h.put(k, v); }...
[ "public", "static", "Map", "makeMap", "(", "Mapper", "mapper", ",", "Enumeration", "en", ",", "boolean", "includeNull", ")", "{", "HashMap", "h", "=", "new", "HashMap", "(", ")", ";", "for", "(", ";", "en", ".", "hasMoreElements", "(", ")", ";", ")", ...
Create a new Map by using the enumeration objects as keys, and the mapping result as values. @param mapper a Mapper to map the values @param en Enumeration @param includeNull true to include null @return a new Map with values mapped
[ "Create", "a", "new", "Map", "by", "using", "the", "enumeration", "objects", "as", "keys", "and", "the", "mapping", "result", "as", "values", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/utils/Mapper.java#L601-L611
16,053
rundeck/rundeck
core/src/main/java/com/dtolabs/utils/Mapper.java
Mapper.beanMapper
public static Mapper beanMapper(final String property){ return new Mapper() { public Object map(Object a) { try { return BeanUtils.getProperty(a, property); } catch (Exception e) { throw new ClassCastException("Object was not the expected class: "...
java
public static Mapper beanMapper(final String property){ return new Mapper() { public Object map(Object a) { try { return BeanUtils.getProperty(a, property); } catch (Exception e) { throw new ClassCastException("Object was not the expected class: "...
[ "public", "static", "Mapper", "beanMapper", "(", "final", "String", "property", ")", "{", "return", "new", "Mapper", "(", ")", "{", "public", "Object", "map", "(", "Object", "a", ")", "{", "try", "{", "return", "BeanUtils", ".", "getProperty", "(", "a", ...
Create a mapper for bean properties @param property name of the bean property @return mapper
[ "Create", "a", "mapper", "for", "bean", "properties" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/utils/Mapper.java#L710-L720
16,054
rundeck/rundeck
core/src/main/java/com/dtolabs/utils/Mapper.java
Mapper.filterMapper
public static Mapper filterMapper(final Predicate pred){ return new Mapper(){ public Object map(Object a) { return pred.evaluate(a) ? a : null; } }; }
java
public static Mapper filterMapper(final Predicate pred){ return new Mapper(){ public Object map(Object a) { return pred.evaluate(a) ? a : null; } }; }
[ "public", "static", "Mapper", "filterMapper", "(", "final", "Predicate", "pred", ")", "{", "return", "new", "Mapper", "(", ")", "{", "public", "Object", "map", "(", "Object", "a", ")", "{", "return", "pred", ".", "evaluate", "(", "a", ")", "?", "a", ...
Return a mapper than maps an object to itself if the predicate evaluates to true, and to null otherwise. @param pred predicate @return mapper
[ "Return", "a", "mapper", "than", "maps", "an", "object", "to", "itself", "if", "the", "predicate", "evaluates", "to", "true", "and", "to", "null", "otherwise", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/utils/Mapper.java#L742-L748
16,055
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/resources/format/ResourceFormatGeneratorService.java
ResourceFormatGeneratorService.getGeneratorForFileExtension
public ResourceFormatGenerator getGeneratorForFileExtension(final File file) throws UnsupportedFormatException { String extension = file.getName().lastIndexOf(".") > 0 ? file.getName().substring(file.getName().lastIndexOf( ".") + 1) : null; if (null != extension) { return getGene...
java
public ResourceFormatGenerator getGeneratorForFileExtension(final File file) throws UnsupportedFormatException { String extension = file.getName().lastIndexOf(".") > 0 ? file.getName().substring(file.getName().lastIndexOf( ".") + 1) : null; if (null != extension) { return getGene...
[ "public", "ResourceFormatGenerator", "getGeneratorForFileExtension", "(", "final", "File", "file", ")", "throws", "UnsupportedFormatException", "{", "String", "extension", "=", "file", ".", "getName", "(", ")", ".", "lastIndexOf", "(", "\".\"", ")", ">", "0", "?",...
Return a generator for a file, based on the file extension. @param file the file @return the generator found for the extension @throws UnsupportedFormatException if the file extension does not match an available generator, or if the file has no extension
[ "Return", "a", "generator", "for", "a", "file", "based", "on", "the", "file", "extension", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/resources/format/ResourceFormatGeneratorService.java#L89-L97
16,056
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/resources/format/ResourceFormatGeneratorService.java
ResourceFormatGeneratorService.getGeneratorForFileExtension
public ResourceFormatGenerator getGeneratorForFileExtension(final String extension) throws UnsupportedFormatException { for (final ResourceFormatGenerator generator : listGenerators()) { if (generator.getFileExtensions().contains(extension)) { return generator; } ...
java
public ResourceFormatGenerator getGeneratorForFileExtension(final String extension) throws UnsupportedFormatException { for (final ResourceFormatGenerator generator : listGenerators()) { if (generator.getFileExtensions().contains(extension)) { return generator; } ...
[ "public", "ResourceFormatGenerator", "getGeneratorForFileExtension", "(", "final", "String", "extension", ")", "throws", "UnsupportedFormatException", "{", "for", "(", "final", "ResourceFormatGenerator", "generator", ":", "listGenerators", "(", ")", ")", "{", "if", "(",...
Return a generator for a file, based on the bare file extension. @param extension the file extension string @return the generator found for the extension @throws UnsupportedFormatException if the file extension does not match an available generator
[ "Return", "a", "generator", "for", "a", "file", "based", "on", "the", "bare", "file", "extension", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/resources/format/ResourceFormatGeneratorService.java#L108-L116
16,057
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/resources/format/ResourceFormatGeneratorService.java
ResourceFormatGeneratorService.getGeneratorForMIMEType
public ResourceFormatGenerator getGeneratorForMIMEType(final String mimeType) throws UnsupportedFormatException { //clean up encoding final String cleanMime; if (mimeType.indexOf(";") > 0) { cleanMime = mimeType.substring(0, mimeType.indexOf(";")); } else { cleanM...
java
public ResourceFormatGenerator getGeneratorForMIMEType(final String mimeType) throws UnsupportedFormatException { //clean up encoding final String cleanMime; if (mimeType.indexOf(";") > 0) { cleanMime = mimeType.substring(0, mimeType.indexOf(";")); } else { cleanM...
[ "public", "ResourceFormatGenerator", "getGeneratorForMIMEType", "(", "final", "String", "mimeType", ")", "throws", "UnsupportedFormatException", "{", "//clean up encoding", "final", "String", "cleanMime", ";", "if", "(", "mimeType", ".", "indexOf", "(", "\";\"", ")", ...
Return a generator for a mime type. @param mimeType the MIME type string @return The first matching parser for the mime type @throws UnsupportedFormatException if no generators are available for the MIME type
[ "Return", "a", "generator", "for", "a", "mime", "type", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/resources/format/ResourceFormatGeneratorService.java#L146-L175
16,058
rundeck/rundeck
rundeck-storage/rundeck-storage-conf/src/main/java/org/rundeck/storage/conf/TreeBuilder.java
TreeBuilder.builder
public static <T extends ContentMeta> TreeBuilder<T> builder() { return new TreeBuilder<T>().base(new EmptyTree<T>()); }
java
public static <T extends ContentMeta> TreeBuilder<T> builder() { return new TreeBuilder<T>().base(new EmptyTree<T>()); }
[ "public", "static", "<", "T", "extends", "ContentMeta", ">", "TreeBuilder", "<", "T", ">", "builder", "(", ")", "{", "return", "new", "TreeBuilder", "<", "T", ">", "(", ")", ".", "base", "(", "new", "EmptyTree", "<", "T", ">", "(", ")", ")", ";", ...
Build a new tree with an empty base @param <T> content type @return builder
[ "Build", "a", "new", "tree", "with", "an", "empty", "base" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/rundeck-storage/rundeck-storage-conf/src/main/java/org/rundeck/storage/conf/TreeBuilder.java#L45-L47
16,059
rundeck/rundeck
rundeck-storage/rundeck-storage-conf/src/main/java/org/rundeck/storage/conf/TreeBuilder.java
TreeBuilder.builder
public static <T extends ContentMeta> TreeBuilder<T> builder(Tree<T> base) { return new TreeBuilder<T>().base(base); }
java
public static <T extends ContentMeta> TreeBuilder<T> builder(Tree<T> base) { return new TreeBuilder<T>().base(base); }
[ "public", "static", "<", "T", "extends", "ContentMeta", ">", "TreeBuilder", "<", "T", ">", "builder", "(", "Tree", "<", "T", ">", "base", ")", "{", "return", "new", "TreeBuilder", "<", "T", ">", "(", ")", ".", "base", "(", "base", ")", ";", "}" ]
Build a new tree with given base @param base base tree @param <T> content type @return builder
[ "Build", "a", "new", "tree", "with", "given", "base" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/rundeck-storage/rundeck-storage-conf/src/main/java/org/rundeck/storage/conf/TreeBuilder.java#L57-L59
16,060
rundeck/rundeck
rundeck-storage/rundeck-storage-conf/src/main/java/org/rundeck/storage/conf/TreeBuilder.java
TreeBuilder.subTree
public TreeBuilder<T> subTree(Path path, Tree<T> subtree, boolean fullPath) { treeStack.add(new SubPathTree<T>(subtree, path, fullPath)); return this; }
java
public TreeBuilder<T> subTree(Path path, Tree<T> subtree, boolean fullPath) { treeStack.add(new SubPathTree<T>(subtree, path, fullPath)); return this; }
[ "public", "TreeBuilder", "<", "T", ">", "subTree", "(", "Path", "path", ",", "Tree", "<", "T", ">", "subtree", ",", "boolean", "fullPath", ")", "{", "treeStack", ".", "add", "(", "new", "SubPathTree", "<", "T", ">", "(", "subtree", ",", "path", ",", ...
Add a tree responsible for a subpath of the base tree. @param path sub path to handle @param subtree tree to delegate to for the path @param fullPath if true, send resources to the subtree with the original full path, otherwise store with a path relative to the path @return builder
[ "Add", "a", "tree", "responsible", "for", "a", "subpath", "of", "the", "base", "tree", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/rundeck-storage/rundeck-storage-conf/src/main/java/org/rundeck/storage/conf/TreeBuilder.java#L83-L86
16,061
rundeck/rundeck
rundeck-storage/rundeck-storage-conf/src/main/java/org/rundeck/storage/conf/TreeBuilder.java
TreeBuilder.convert
public TreeBuilder<T> convert(ContentConverter<T> converter, Path path) { return convert(converter, PathUtil.subpathSelector(path)); }
java
public TreeBuilder<T> convert(ContentConverter<T> converter, Path path) { return convert(converter, PathUtil.subpathSelector(path)); }
[ "public", "TreeBuilder", "<", "T", ">", "convert", "(", "ContentConverter", "<", "T", ">", "converter", ",", "Path", "path", ")", "{", "return", "convert", "(", "converter", ",", "PathUtil", ".", "subpathSelector", "(", "path", ")", ")", ";", "}" ]
Convert data content for all resources below the given path @param converter content converter @param path sub path to convert data @return builder
[ "Convert", "data", "content", "for", "all", "resources", "below", "the", "given", "path" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/rundeck-storage/rundeck-storage-conf/src/main/java/org/rundeck/storage/conf/TreeBuilder.java#L96-L98
16,062
rundeck/rundeck
rundeck-storage/rundeck-storage-conf/src/main/java/org/rundeck/storage/conf/TreeBuilder.java
TreeBuilder.convert
public TreeBuilder<T> convert(ContentConverter<T> converter, PathSelector selector) { return TreeBuilder.<T>builder(new ConverterTree<T>(build(), converter, selector)); }
java
public TreeBuilder<T> convert(ContentConverter<T> converter, PathSelector selector) { return TreeBuilder.<T>builder(new ConverterTree<T>(build(), converter, selector)); }
[ "public", "TreeBuilder", "<", "T", ">", "convert", "(", "ContentConverter", "<", "T", ">", "converter", ",", "PathSelector", "selector", ")", "{", "return", "TreeBuilder", ".", "<", "T", ">", "builder", "(", "new", "ConverterTree", "<", "T", ">", "(", "b...
Convert data content for all resource paths matched by the path selector @param converter content converter @param selector path selection @return builder
[ "Convert", "data", "content", "for", "all", "resource", "paths", "matched", "by", "the", "path", "selector" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/rundeck-storage/rundeck-storage-conf/src/main/java/org/rundeck/storage/conf/TreeBuilder.java#L108-L110
16,063
rundeck/rundeck
rundeck-storage/rundeck-storage-conf/src/main/java/org/rundeck/storage/conf/TreeBuilder.java
TreeBuilder.convert
public TreeBuilder<T> convert(ContentConverter<T> converter, Path subpath, ResourceSelector<T> resourceSelector) { return convert(converter, PathUtil.subpathSelector(subpath), resourceSelector); }
java
public TreeBuilder<T> convert(ContentConverter<T> converter, Path subpath, ResourceSelector<T> resourceSelector) { return convert(converter, PathUtil.subpathSelector(subpath), resourceSelector); }
[ "public", "TreeBuilder", "<", "T", ">", "convert", "(", "ContentConverter", "<", "T", ">", "converter", ",", "Path", "subpath", ",", "ResourceSelector", "<", "T", ">", "resourceSelector", ")", "{", "return", "convert", "(", "converter", ",", "PathUtil", ".",...
Convert data content for all resources matching the resource selector and within the sub path @param converter content converter @param subpath sub path @param resourceSelector resource selector @return builder
[ "Convert", "data", "content", "for", "all", "resources", "matching", "the", "resource", "selector", "and", "within", "the", "sub", "path" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/rundeck-storage/rundeck-storage-conf/src/main/java/org/rundeck/storage/conf/TreeBuilder.java#L133-L136
16,064
rundeck/rundeck
rundeck-storage/rundeck-storage-conf/src/main/java/org/rundeck/storage/conf/TreeBuilder.java
TreeBuilder.convert
public TreeBuilder<T> convert(ContentConverter<T> converter, PathSelector pathSelector, ResourceSelector<T> resourceSelector) { return TreeBuilder.<T>builder(new ConverterTree<T>(build(), converter, pathSelector, resourceSelector)); }
java
public TreeBuilder<T> convert(ContentConverter<T> converter, PathSelector pathSelector, ResourceSelector<T> resourceSelector) { return TreeBuilder.<T>builder(new ConverterTree<T>(build(), converter, pathSelector, resourceSelector)); }
[ "public", "TreeBuilder", "<", "T", ">", "convert", "(", "ContentConverter", "<", "T", ">", "converter", ",", "PathSelector", "pathSelector", ",", "ResourceSelector", "<", "T", ">", "resourceSelector", ")", "{", "return", "TreeBuilder", ".", "<", "T", ">", "b...
Convert data content for all resources matching the resource selector and the path selector @param converter content converter @param pathSelector path selector @param resourceSelector resource selector @return builder
[ "Convert", "data", "content", "for", "all", "resources", "matching", "the", "resource", "selector", "and", "the", "path", "selector" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/rundeck-storage/rundeck-storage-conf/src/main/java/org/rundeck/storage/conf/TreeBuilder.java#L147-L150
16,065
rundeck/rundeck
rundeck-storage/rundeck-storage-conf/src/main/java/org/rundeck/storage/conf/TreeBuilder.java
TreeBuilder.convert
public TreeBuilder<T> convert(ContentConverter<T> converter) { return TreeBuilder.<T>builder(new ConverterTree<T>(build(), converter, PathUtil.allpathSelector())); }
java
public TreeBuilder<T> convert(ContentConverter<T> converter) { return TreeBuilder.<T>builder(new ConverterTree<T>(build(), converter, PathUtil.allpathSelector())); }
[ "public", "TreeBuilder", "<", "T", ">", "convert", "(", "ContentConverter", "<", "T", ">", "converter", ")", "{", "return", "TreeBuilder", ".", "<", "T", ">", "builder", "(", "new", "ConverterTree", "<", "T", ">", "(", "build", "(", ")", ",", "converte...
Convert all content in the tree @param converter converter @return builder
[ "Convert", "all", "content", "in", "the", "tree" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/rundeck-storage/rundeck-storage-conf/src/main/java/org/rundeck/storage/conf/TreeBuilder.java#L159-L161
16,066
rundeck/rundeck
rundeck-storage/rundeck-storage-conf/src/main/java/org/rundeck/storage/conf/TreeBuilder.java
TreeBuilder.listen
public TreeBuilder<T> listen(Listener<T> listener) { return listen(listener, PathUtil.allpathSelector()); }
java
public TreeBuilder<T> listen(Listener<T> listener) { return listen(listener, PathUtil.allpathSelector()); }
[ "public", "TreeBuilder", "<", "T", ">", "listen", "(", "Listener", "<", "T", ">", "listener", ")", "{", "return", "listen", "(", "listener", ",", "PathUtil", ".", "allpathSelector", "(", ")", ")", ";", "}" ]
Listen to events on all paths of the tree @param listener listener @return builder
[ "Listen", "to", "events", "on", "all", "paths", "of", "the", "tree" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/rundeck-storage/rundeck-storage-conf/src/main/java/org/rundeck/storage/conf/TreeBuilder.java#L170-L172
16,067
rundeck/rundeck
rundeck-storage/rundeck-storage-conf/src/main/java/org/rundeck/storage/conf/TreeBuilder.java
TreeBuilder.listen
private TreeBuilder<T> listen(Listener<T> listener, String resourceSelector) { return TreeBuilder.<T>builder(new ListenerTree<T>(build(), listener, PathUtil.<T>resourceSelector(resourceSelector))); }
java
private TreeBuilder<T> listen(Listener<T> listener, String resourceSelector) { return TreeBuilder.<T>builder(new ListenerTree<T>(build(), listener, PathUtil.<T>resourceSelector(resourceSelector))); }
[ "private", "TreeBuilder", "<", "T", ">", "listen", "(", "Listener", "<", "T", ">", "listener", ",", "String", "resourceSelector", ")", "{", "return", "TreeBuilder", ".", "<", "T", ">", "builder", "(", "new", "ListenerTree", "<", "T", ">", "(", "build", ...
Listen to events on selective resources of the tree @param listener listener @param resourceSelector resource selector @return builder
[ "Listen", "to", "events", "on", "selective", "resources", "of", "the", "tree" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/rundeck-storage/rundeck-storage-conf/src/main/java/org/rundeck/storage/conf/TreeBuilder.java#L212-L215
16,068
rundeck/rundeck
rundeck-storage/rundeck-storage-conf/src/main/java/org/rundeck/storage/conf/TreeBuilder.java
TreeBuilder.build
public Tree<T> build() { Tree<T> result = base; if (null == base && treeStack.size() == 1) { result = treeStack.get(0); } else if (treeStack.size() > 0) { result = new TreeStack<T>(treeStack, base); }else if(null==base) { throw new IllegalArgumentExcep...
java
public Tree<T> build() { Tree<T> result = base; if (null == base && treeStack.size() == 1) { result = treeStack.get(0); } else if (treeStack.size() > 0) { result = new TreeStack<T>(treeStack, base); }else if(null==base) { throw new IllegalArgumentExcep...
[ "public", "Tree", "<", "T", ">", "build", "(", ")", "{", "Tree", "<", "T", ">", "result", "=", "base", ";", "if", "(", "null", "==", "base", "&&", "treeStack", ".", "size", "(", ")", "==", "1", ")", "{", "result", "=", "treeStack", ".", "get", ...
Build the tree @return the tree
[ "Build", "the", "tree" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/rundeck-storage/rundeck-storage-conf/src/main/java/org/rundeck/storage/conf/TreeBuilder.java#L237-L248
16,069
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/common/PropertiesCache.java
PropertiesCache.needsReload
public synchronized boolean needsReload(final File file) throws IOException { final long lastMod = file.lastModified(); if (!file.exists()) { mtimes.remove(file); } final Long aLong = mtimes.get(file); return null == aLong || lastMod > aLong; }
java
public synchronized boolean needsReload(final File file) throws IOException { final long lastMod = file.lastModified(); if (!file.exists()) { mtimes.remove(file); } final Long aLong = mtimes.get(file); return null == aLong || lastMod > aLong; }
[ "public", "synchronized", "boolean", "needsReload", "(", "final", "File", "file", ")", "throws", "IOException", "{", "final", "long", "lastMod", "=", "file", ".", "lastModified", "(", ")", ";", "if", "(", "!", "file", ".", "exists", "(", ")", ")", "{", ...
Returns true if the file does not exist, or has been modified since the last time it was loaded. @param file File to check @return true if the file needs to be reloaded. @throws IOException on io error
[ "Returns", "true", "if", "the", "file", "does", "not", "exist", "or", "has", "been", "modified", "since", "the", "last", "time", "it", "was", "loaded", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/common/PropertiesCache.java#L50-L57
16,070
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/common/PropertiesCache.java
PropertiesCache.getProperties
public synchronized Properties getProperties(final File file) throws IOException { final Properties fileprops; if (needsReload(file)) { fileprops = new Properties(); final InputStream is = new FileInputStream(file); try { fileprops.load(is); ...
java
public synchronized Properties getProperties(final File file) throws IOException { final Properties fileprops; if (needsReload(file)) { fileprops = new Properties(); final InputStream is = new FileInputStream(file); try { fileprops.load(is); ...
[ "public", "synchronized", "Properties", "getProperties", "(", "final", "File", "file", ")", "throws", "IOException", "{", "final", "Properties", "fileprops", ";", "if", "(", "needsReload", "(", "file", ")", ")", "{", "fileprops", "=", "new", "Properties", "(",...
Get the java Properties stored in the file, loading from disk only if the file has been modified since the last read, or the cached data has been invalidated. @param file java properties file @return java Properties @throws IOException due to file read or find error
[ "Get", "the", "java", "Properties", "stored", "in", "the", "file", "loading", "from", "disk", "only", "if", "the", "file", "has", "been", "modified", "since", "the", "last", "read", "or", "the", "cached", "data", "has", "been", "invalidated", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/common/PropertiesCache.java#L66-L84
16,071
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/rules/Rules.java
Rules.equalsCondition
public static Condition equalsCondition(final StateObj state) { return new Condition() { @Override public boolean test(final StateObj input) { return input.hasState(state); } @Override public String toString() { return ...
java
public static Condition equalsCondition(final StateObj state) { return new Condition() { @Override public boolean test(final StateObj input) { return input.hasState(state); } @Override public String toString() { return ...
[ "public", "static", "Condition", "equalsCondition", "(", "final", "StateObj", "state", ")", "{", "return", "new", "Condition", "(", ")", "{", "@", "Override", "public", "boolean", "test", "(", "final", "StateObj", "input", ")", "{", "return", "input", ".", ...
Create a condition when the given state is set @param state state @return new condition
[ "Create", "a", "condition", "when", "the", "given", "state", "is", "set" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/rules/Rules.java#L49-L61
16,072
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/rules/Rules.java
Rules.matchesCondition
public static Condition matchesCondition(String key, boolean keyRegex, String value, boolean valueRegex) { return new MatchesCondition(key, keyRegex, value, valueRegex); }
java
public static Condition matchesCondition(String key, boolean keyRegex, String value, boolean valueRegex) { return new MatchesCondition(key, keyRegex, value, valueRegex); }
[ "public", "static", "Condition", "matchesCondition", "(", "String", "key", ",", "boolean", "keyRegex", ",", "String", "value", ",", "boolean", "valueRegex", ")", "{", "return", "new", "MatchesCondition", "(", "key", ",", "keyRegex", ",", "value", ",", "valueRe...
Create a single match condition @param key key name or regular expression @param keyRegex true if the key is a regular expression key match, false for an equals match @param value value value string @param valueRegex true if the value is a regular expression match, false for an equals match @return new ...
[ "Create", "a", "single", "match", "condition" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/rules/Rules.java#L85-L87
16,073
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/rules/Rules.java
Rules.update
public static boolean update(RuleEngine ruleEngine, MutableStateObj state) { StateObj newState = ruleEngine.evaluateRules(state); state.updateState(newState); return newState.getState().size() > 0; }
java
public static boolean update(RuleEngine ruleEngine, MutableStateObj state) { StateObj newState = ruleEngine.evaluateRules(state); state.updateState(newState); return newState.getState().size() > 0; }
[ "public", "static", "boolean", "update", "(", "RuleEngine", "ruleEngine", ",", "MutableStateObj", "state", ")", "{", "StateObj", "newState", "=", "ruleEngine", ".", "evaluateRules", "(", "state", ")", ";", "state", ".", "updateState", "(", "newState", ")", ";"...
Update the state by evaluating the rules, and applying state changes @param ruleEngine rule engine @param state state @return true if state was modified, false if no state change occured
[ "Update", "the", "state", "by", "evaluating", "the", "rules", "and", "applying", "state", "changes" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/rules/Rules.java#L200-L205
16,074
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/dispatcher/DataContextUtils.java
DataContextUtils.merge
public static Map<String, Map<String, String>> merge( final Map<String, Map<String, String>> targetContext, final Map<String, Map<String, String>> newContext ) { final HashMap<String, Map<String, String>> result = deepCopy(targetContext); for (final Map.Entry<String, Map...
java
public static Map<String, Map<String, String>> merge( final Map<String, Map<String, String>> targetContext, final Map<String, Map<String, String>> newContext ) { final HashMap<String, Map<String, String>> result = deepCopy(targetContext); for (final Map.Entry<String, Map...
[ "public", "static", "Map", "<", "String", ",", "Map", "<", "String", ",", "String", ">", ">", "merge", "(", "final", "Map", "<", "String", ",", "Map", "<", "String", ",", "String", ">", ">", "targetContext", ",", "final", "Map", "<", "String", ",", ...
Merge one context onto another by adding or replacing values in a new map @param targetContext the target of the merge @param newContext context to merge @return merged data in a new map
[ "Merge", "one", "context", "onto", "another", "by", "adding", "or", "replacing", "values", "in", "a", "new", "map" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/dispatcher/DataContextUtils.java#L391-L407
16,075
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/dispatcher/DataContextUtils.java
DataContextUtils.addContext
public static Map<String, Map<String, String>> addContext(final String key, final Map<String, String> data, final Map<String, Map<String, String>> context) { final Map<String, Map<String, String>> newdata = new HashMap<>(); if (null != contex...
java
public static Map<String, Map<String, String>> addContext(final String key, final Map<String, String> data, final Map<String, Map<String, String>> context) { final Map<String, Map<String, String>> newdata = new HashMap<>(); if (null != contex...
[ "public", "static", "Map", "<", "String", ",", "Map", "<", "String", ",", "String", ">", ">", "addContext", "(", "final", "String", "key", ",", "final", "Map", "<", "String", ",", "String", ">", "data", ",", "final", "Map", "<", "String", ",", "Map",...
Return a new context with appended data set @param key data key @param data data content @param context original context @return new context containing original data and the new dataset
[ "Return", "a", "new", "context", "with", "appended", "data", "set" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/dispatcher/DataContextUtils.java#L500-L508
16,076
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/dispatcher/DataContextUtils.java
DataContextUtils.generateEnvVarsFromData
public static Map<String, String> generateEnvVarsFromData(final Map<String, String> options, final String prefix) { if (null == options) { return null; } final HashMap<String, String> envs = new HashMap<String, String>(); for (final Map.Entry<String, String> entry : options.e...
java
public static Map<String, String> generateEnvVarsFromData(final Map<String, String> options, final String prefix) { if (null == options) { return null; } final HashMap<String, String> envs = new HashMap<String, String>(); for (final Map.Entry<String, String> entry : options.e...
[ "public", "static", "Map", "<", "String", ",", "String", ">", "generateEnvVarsFromData", "(", "final", "Map", "<", "String", ",", "String", ">", "options", ",", "final", "String", "prefix", ")", "{", "if", "(", "null", "==", "options", ")", "{", "return"...
Convert option keys into environment variable names. Convert to uppercase and prepend "RD_" @param options the input options @param prefix prefix @return map of environment variable names to values, or null if options was null
[ "Convert", "option", "keys", "into", "environment", "variable", "names", ".", "Convert", "to", "uppercase", "and", "prepend", "RD_" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/dispatcher/DataContextUtils.java#L518-L529
16,077
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/dispatcher/DataContextUtils.java
DataContextUtils.addEnvVars
public static void addEnvVars( final EnvironmentConfigurable sshexecTask, final Map<String, Map<String, String>> dataContext) { final Map<String, String> environment = generateEnvVarsFromContext(dataContext); if (null != environment) { for (final Map.Entry<String, String> entry : environment...
java
public static void addEnvVars( final EnvironmentConfigurable sshexecTask, final Map<String, Map<String, String>> dataContext) { final Map<String, String> environment = generateEnvVarsFromContext(dataContext); if (null != environment) { for (final Map.Entry<String, String> entry : environment...
[ "public", "static", "void", "addEnvVars", "(", "final", "EnvironmentConfigurable", "sshexecTask", ",", "final", "Map", "<", "String", ",", "Map", "<", "String", ",", "String", ">", ">", "dataContext", ")", "{", "final", "Map", "<", "String", ",", "String", ...
add Env elements to pass environment variables to the ExtSSHExec @param sshexecTask task @param dataContext data
[ "add", "Env", "elements", "to", "pass", "environment", "variables", "to", "the", "ExtSSHExec" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/dispatcher/DataContextUtils.java#L537-L550
16,078
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/dispatcher/DataContextUtils.java
DataContextUtils.nodeData
public static Map<String, String> nodeData(final INodeEntry nodeentry) { final HashMap<String, String> data = new HashMap<String, String>(); if(null!=nodeentry) { HashSet<String> skipProps = new HashSet<String>(); skipProps.addAll(Arrays.asList("nodename", "osName", "osVersion", ...
java
public static Map<String, String> nodeData(final INodeEntry nodeentry) { final HashMap<String, String> data = new HashMap<String, String>(); if(null!=nodeentry) { HashSet<String> skipProps = new HashSet<String>(); skipProps.addAll(Arrays.asList("nodename", "osName", "osVersion", ...
[ "public", "static", "Map", "<", "String", ",", "String", ">", "nodeData", "(", "final", "INodeEntry", "nodeentry", ")", "{", "final", "HashMap", "<", "String", ",", "String", ">", "data", "=", "new", "HashMap", "<", "String", ",", "String", ">", "(", "...
Generate a dataset for a INodeEntry @param nodeentry node @return dataset
[ "Generate", "a", "dataset", "for", "a", "INodeEntry" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/dispatcher/DataContextUtils.java#L585-L611
16,079
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/dispatcher/DataContextUtils.java
DataContextUtils.join
public static String join(final Collection<String> list, final String separator) { final StringBuilder sb = new StringBuilder(); for (final String s : list) { if (sb.length() > 0) { sb.append(separator); } sb.append(s); } return sb.toSt...
java
public static String join(final Collection<String> list, final String separator) { final StringBuilder sb = new StringBuilder(); for (final String s : list) { if (sb.length() > 0) { sb.append(separator); } sb.append(s); } return sb.toSt...
[ "public", "static", "String", "join", "(", "final", "Collection", "<", "String", ">", "list", ",", "final", "String", "separator", ")", "{", "final", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", "final", "String", "s", "...
Join a list of strings into a single string with a separator @param list strings @param separator separator @return joined string
[ "Join", "a", "list", "of", "strings", "into", "a", "single", "string", "with", "a", "separator" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/dispatcher/DataContextUtils.java#L632-L641
16,080
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/dispatcher/DataContextUtils.java
DataContextUtils.addEnvVarsFromContextForExec
public static void addEnvVarsFromContextForExec(final ExecTask execTask, final Map<String, Map<String, String>> dataContext) { final Map<String, String> environment = generateEnvVarsFromContext(dataContext); if (null != environment) { for ...
java
public static void addEnvVarsFromContextForExec(final ExecTask execTask, final Map<String, Map<String, String>> dataContext) { final Map<String, String> environment = generateEnvVarsFromContext(dataContext); if (null != environment) { for ...
[ "public", "static", "void", "addEnvVarsFromContextForExec", "(", "final", "ExecTask", "execTask", ",", "final", "Map", "<", "String", ",", "Map", "<", "String", ",", "String", ">", ">", "dataContext", ")", "{", "final", "Map", "<", "String", ",", "String", ...
Add embedded env elements for any included context data for the script @param dataContext data @param execTask execTask
[ "Add", "embedded", "env", "elements", "for", "any", "included", "context", "data", "for", "the", "script" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/dispatcher/DataContextUtils.java#L649-L664
16,081
rundeck/rundeck
rundeckapp/src/main/groovy/org/rundeck/jaas/AbstractBaseLoginModule.java
AbstractBaseLoginModule.setSubjectPrincipals
private void setSubjectPrincipals() { if (null != userPrincipal) { this.subject.getPrincipals().add(userPrincipal); } if (null != rolePrincipals) { for (Principal rolePrincipal : rolePrincipals) { this.subject.getPrincipals().add(rolePrincipal); ...
java
private void setSubjectPrincipals() { if (null != userPrincipal) { this.subject.getPrincipals().add(userPrincipal); } if (null != rolePrincipals) { for (Principal rolePrincipal : rolePrincipals) { this.subject.getPrincipals().add(rolePrincipal); ...
[ "private", "void", "setSubjectPrincipals", "(", ")", "{", "if", "(", "null", "!=", "userPrincipal", ")", "{", "this", ".", "subject", ".", "getPrincipals", "(", ")", ".", "add", "(", "userPrincipal", ")", ";", "}", "if", "(", "null", "!=", "rolePrincipal...
Set the principals for the Subject
[ "Set", "the", "principals", "for", "the", "Subject" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/rundeckapp/src/main/groovy/org/rundeck/jaas/AbstractBaseLoginModule.java#L112-L121
16,082
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/utils/Pairs.java
Pairs.listFirst
public static <T,W> List<T> listFirst(List<Pair<T, W>> list) { ArrayList<T> ts = new ArrayList<T>(); for (Pair<T, W> twPair : list) { ts.add(twPair.getFirst()); } return ts; }
java
public static <T,W> List<T> listFirst(List<Pair<T, W>> list) { ArrayList<T> ts = new ArrayList<T>(); for (Pair<T, W> twPair : list) { ts.add(twPair.getFirst()); } return ts; }
[ "public", "static", "<", "T", ",", "W", ">", "List", "<", "T", ">", "listFirst", "(", "List", "<", "Pair", "<", "T", ",", "W", ">", ">", "list", ")", "{", "ArrayList", "<", "T", ">", "ts", "=", "new", "ArrayList", "<", "T", ">", "(", ")", "...
Return a List of the first items from a list of pairs @param list list @param <T> first type @param <W> second type @return list of firsts
[ "Return", "a", "List", "of", "the", "first", "items", "from", "a", "list", "of", "pairs" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/utils/Pairs.java#L36-L42
16,083
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/utils/Pairs.java
Pairs.listSecond
public static <T,W> List<W> listSecond(List<Pair<T, W>> list) { ArrayList<W> ts = new ArrayList<W>(); for (Pair<T, W> twPair : list) { ts.add(twPair.getSecond()); } return ts; }
java
public static <T,W> List<W> listSecond(List<Pair<T, W>> list) { ArrayList<W> ts = new ArrayList<W>(); for (Pair<T, W> twPair : list) { ts.add(twPair.getSecond()); } return ts; }
[ "public", "static", "<", "T", ",", "W", ">", "List", "<", "W", ">", "listSecond", "(", "List", "<", "Pair", "<", "T", ",", "W", ">", ">", "list", ")", "{", "ArrayList", "<", "W", ">", "ts", "=", "new", "ArrayList", "<", "W", ">", "(", ")", ...
Return a List of the second items from a list of pairs @param list list @param <T> first type @param <W> second type @return list of seconds
[ "Return", "a", "List", "of", "the", "second", "items", "from", "a", "list", "of", "pairs" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/utils/Pairs.java#L51-L57
16,084
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/plugins/step/GeneratedScriptBuilder.java
GeneratedScriptBuilder.script
public static GeneratedScript script(final String script, final String[] args, final String fileExtension) { return new GeneratedScriptBuilder(script, args, fileExtension); }
java
public static GeneratedScript script(final String script, final String[] args, final String fileExtension) { return new GeneratedScriptBuilder(script, args, fileExtension); }
[ "public", "static", "GeneratedScript", "script", "(", "final", "String", "script", ",", "final", "String", "[", "]", "args", ",", "final", "String", "fileExtension", ")", "{", "return", "new", "GeneratedScriptBuilder", "(", "script", ",", "args", ",", "fileExt...
Create a script @param script the script text @param args the arguments for the script @param fileExtension file extension @return the generated script
[ "Create", "a", "script" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/plugins/step/GeneratedScriptBuilder.java#L92-L94
16,085
rundeck/rundeck
core/src/main/java/com/dtolabs/launcher/Preferences.java
Preferences.convert2PropName
private static String convert2PropName(String argProp) throws Exception { //System.out.println("argProp: " + argProp); if (!argProp.startsWith("--")) { throw new Exception("argument: " + argProp + " does not start with --"); } if (argProp.indexOf("=") == -1) { t...
java
private static String convert2PropName(String argProp) throws Exception { //System.out.println("argProp: " + argProp); if (!argProp.startsWith("--")) { throw new Exception("argument: " + argProp + " does not start with --"); } if (argProp.indexOf("=") == -1) { t...
[ "private", "static", "String", "convert2PropName", "(", "String", "argProp", ")", "throws", "Exception", "{", "//System.out.println(\"argProp: \" + argProp);", "if", "(", "!", "argProp", ".", "startsWith", "(", "\"--\"", ")", ")", "{", "throw", "new", "Exception", ...
also check if it is a valid type of property
[ "also", "check", "if", "it", "is", "a", "valid", "type", "of", "property" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/launcher/Preferences.java#L225-L274
16,086
rundeck/rundeck
rundeckapp/src/main/groovy/com/dtolabs/rundeck/jetty/jaas/JettyCachingLdapLoginModule.java
JettyCachingLdapLoginModule.getUserRoles
@SuppressWarnings("unchecked") protected List getUserRoles(DirContext dirContext, String username) throws LoginException, NamingException { String userDn = _userRdnAttribute + "=" + username + "," + _userBaseDn; return getUserRolesByDn(dirContext, userDn, username); }
java
@SuppressWarnings("unchecked") protected List getUserRoles(DirContext dirContext, String username) throws LoginException, NamingException { String userDn = _userRdnAttribute + "=" + username + "," + _userBaseDn; return getUserRolesByDn(dirContext, userDn, username); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "protected", "List", "getUserRoles", "(", "DirContext", "dirContext", ",", "String", "username", ")", "throws", "LoginException", ",", "NamingException", "{", "String", "userDn", "=", "_userRdnAttribute", "+", "\"=...
attempts to get the users roles from the root context NOTE: this is not an user authenticated operation @param dirContext @param username @return @throws LoginException
[ "attempts", "to", "get", "the", "users", "roles", "from", "the", "root", "context" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/rundeckapp/src/main/groovy/com/dtolabs/rundeck/jetty/jaas/JettyCachingLdapLoginModule.java#L437-L443
16,087
rundeck/rundeck
rundeckapp/src/main/groovy/com/dtolabs/rundeck/jetty/jaas/JettyCachingLdapLoginModule.java
JettyCachingLdapLoginModule.getEnvironment
@SuppressWarnings("unchecked") public Hashtable getEnvironment() { Properties env = new Properties(); env.put(Context.INITIAL_CONTEXT_FACTORY, _contextFactory); String url = null; if(_providerUrl != null) { url = _providerUrl; } else { if (_hostname ...
java
@SuppressWarnings("unchecked") public Hashtable getEnvironment() { Properties env = new Properties(); env.put(Context.INITIAL_CONTEXT_FACTORY, _contextFactory); String url = null; if(_providerUrl != null) { url = _providerUrl; } else { if (_hostname ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "Hashtable", "getEnvironment", "(", ")", "{", "Properties", "env", "=", "new", "Properties", "(", ")", ";", "env", ".", "put", "(", "Context", ".", "INITIAL_CONTEXT_FACTORY", ",", "_contextFactory", ...
get the context for connection @return
[ "get", "the", "context", "for", "connection" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/rundeckapp/src/main/groovy/com/dtolabs/rundeck/jetty/jaas/JettyCachingLdapLoginModule.java#L1056-L1104
16,088
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/plugins/util/DescriptionBuilder.java
DescriptionBuilder.buildDescriptionWith
public static Description buildDescriptionWith(Consumer<DescriptionBuilder> builder) { DescriptionBuilder builder1 = builder(); builder.accept(builder1); return builder1.build(); }
java
public static Description buildDescriptionWith(Consumer<DescriptionBuilder> builder) { DescriptionBuilder builder1 = builder(); builder.accept(builder1); return builder1.build(); }
[ "public", "static", "Description", "buildDescriptionWith", "(", "Consumer", "<", "DescriptionBuilder", ">", "builder", ")", "{", "DescriptionBuilder", "builder1", "=", "builder", "(", ")", ";", "builder", ".", "accept", "(", "builder1", ")", ";", "return", "buil...
Build a description @param builder new DescriptionBuilder to build with @return built description
[ "Build", "a", "description" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/plugins/util/DescriptionBuilder.java#L82-L86
16,089
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/plugins/util/DescriptionBuilder.java
DescriptionBuilder.property
public DescriptionBuilder property(final Consumer<PropertyBuilder> builder) { PropertyBuilder propertyBuilder = PropertyBuilder.builder(); builder.accept(propertyBuilder); replaceOrAddProperty(propertyBuilder.build()); return this; }
java
public DescriptionBuilder property(final Consumer<PropertyBuilder> builder) { PropertyBuilder propertyBuilder = PropertyBuilder.builder(); builder.accept(propertyBuilder); replaceOrAddProperty(propertyBuilder.build()); return this; }
[ "public", "DescriptionBuilder", "property", "(", "final", "Consumer", "<", "PropertyBuilder", ">", "builder", ")", "{", "PropertyBuilder", "propertyBuilder", "=", "PropertyBuilder", ".", "builder", "(", ")", ";", "builder", ".", "accept", "(", "propertyBuilder", "...
Add a new property, or replace an existing property with the same name, with a consumer @param builder a new PropertyBuilder to modify @return this builder
[ "Add", "a", "new", "property", "or", "replace", "an", "existing", "property", "with", "the", "same", "name", "with", "a", "consumer" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/plugins/util/DescriptionBuilder.java#L287-L292
16,090
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/plugins/util/DescriptionBuilder.java
DescriptionBuilder.removeProperty
public DescriptionBuilder removeProperty(final String name) { final Property found = findProperty(name); if (null != found) { properties.remove(found); } return this; }
java
public DescriptionBuilder removeProperty(final String name) { final Property found = findProperty(name); if (null != found) { properties.remove(found); } return this; }
[ "public", "DescriptionBuilder", "removeProperty", "(", "final", "String", "name", ")", "{", "final", "Property", "found", "=", "findProperty", "(", "name", ")", ";", "if", "(", "null", "!=", "found", ")", "{", "properties", ".", "remove", "(", "found", ")"...
Remove a previously defined property by name @param name property name @return this builder
[ "Remove", "a", "previously", "defined", "property", "by", "name" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/plugins/util/DescriptionBuilder.java#L299-L305
16,091
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/plugins/util/DescriptionBuilder.java
DescriptionBuilder.metadata
public DescriptionBuilder metadata(final String key, final String value) { metadata.put(key, value); return this; }
java
public DescriptionBuilder metadata(final String key, final String value) { metadata.put(key, value); return this; }
[ "public", "DescriptionBuilder", "metadata", "(", "final", "String", "key", ",", "final", "String", "value", ")", "{", "metadata", ".", "put", "(", "key", ",", "value", ")", ";", "return", "this", ";", "}" ]
Set a metadata value @param key metadata key @param value metadata value @return this builder
[ "Set", "a", "metadata", "value" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/plugins/util/DescriptionBuilder.java#L352-L355
16,092
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/common/FrameworkProject.java
FrameworkProject.authorizationEnvironment
public static Set<Attribute> authorizationEnvironment(final String project) { return Collections.singleton(new Attribute(URI.create(EnvironmentalContext.URI_BASE + "project"), project)); }
java
public static Set<Attribute> authorizationEnvironment(final String project) { return Collections.singleton(new Attribute(URI.create(EnvironmentalContext.URI_BASE + "project"), project)); }
[ "public", "static", "Set", "<", "Attribute", ">", "authorizationEnvironment", "(", "final", "String", "project", ")", "{", "return", "Collections", ".", "singleton", "(", "new", "Attribute", "(", "URI", ".", "create", "(", "EnvironmentalContext", ".", "URI_BASE"...
Creates an authorization environment for a project. @param project project name @return environment to evaluate authorization for a project
[ "Creates", "an", "authorization", "environment", "for", "a", "project", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/common/FrameworkProject.java#L51-L54
16,093
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/common/FrameworkProject.java
FrameworkProject.createFileStructure
public static void createFileStructure(final File projectDir) throws IOException { /* * create an empty project file structure */ if (! projectDir.exists() && ! projectDir.mkdirs()) { throw new IOException("failed creating project base dir: " + projectDir.getAbsolutePath()); ...
java
public static void createFileStructure(final File projectDir) throws IOException { /* * create an empty project file structure */ if (! projectDir.exists() && ! projectDir.mkdirs()) { throw new IOException("failed creating project base dir: " + projectDir.getAbsolutePath()); ...
[ "public", "static", "void", "createFileStructure", "(", "final", "File", "projectDir", ")", "throws", "IOException", "{", "/*\n * create an empty project file structure\n */", "if", "(", "!", "projectDir", ".", "exists", "(", ")", "&&", "!", "projectDir", ...
Creates the file structure for a project @param projectDir The project base directory @throws IOException on io error
[ "Creates", "the", "file", "structure", "for", "a", "project" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/common/FrameworkProject.java#L309-L324
16,094
rundeck/rundeck
plugins/orchestrator-plugin/src/main/java/org/rundeck/plugin/example/RandomSubsetOrchestrator.java
RandomSubsetOrchestrator.select
private List<INodeEntry> select(final int count, final Collection<INodeEntry> nodes) { List<INodeEntry> source = new ArrayList<>(nodes); List<INodeEntry> selected = new ArrayList<>(); int total = Math.min(count, nodes.size()); for (int i = 0; i < total; i++) { selected.add(so...
java
private List<INodeEntry> select(final int count, final Collection<INodeEntry> nodes) { List<INodeEntry> source = new ArrayList<>(nodes); List<INodeEntry> selected = new ArrayList<>(); int total = Math.min(count, nodes.size()); for (int i = 0; i < total; i++) { selected.add(so...
[ "private", "List", "<", "INodeEntry", ">", "select", "(", "final", "int", "count", ",", "final", "Collection", "<", "INodeEntry", ">", "nodes", ")", "{", "List", "<", "INodeEntry", ">", "source", "=", "new", "ArrayList", "<>", "(", "nodes", ")", ";", "...
Select count random items from the input nodes, or if nodes is smaller than count, reorders them @param count number of nodes @param nodes input nodes @return list of count nodes
[ "Select", "count", "random", "items", "from", "the", "input", "nodes", "or", "if", "nodes", "is", "smaller", "than", "count", "reorders", "them" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/plugins/orchestrator-plugin/src/main/java/org/rundeck/plugin/example/RandomSubsetOrchestrator.java#L57-L65
16,095
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/execution/utils/ResponderTask.java
ResponderTask.createSequence
public Callable<ResponderResult> createSequence(final Responder responder, final ResultHandler resultHandler) { return new Sequence<>(this, this.chainResponder(responder, resultHandler)); }
java
public Callable<ResponderResult> createSequence(final Responder responder, final ResultHandler resultHandler) { return new Sequence<>(this, this.chainResponder(responder, resultHandler)); }
[ "public", "Callable", "<", "ResponderResult", ">", "createSequence", "(", "final", "Responder", "responder", ",", "final", "ResultHandler", "resultHandler", ")", "{", "return", "new", "Sequence", "<>", "(", "this", ",", "this", ".", "chainResponder", "(", "respo...
Create a Callable that will execute another responder if this one is successful, with a specified resultHandler for the second one. @param responder responder @param resultHandler handler @return sequence
[ "Create", "a", "Callable", "that", "will", "execute", "another", "responder", "if", "this", "one", "is", "successful", "with", "a", "specified", "resultHandler", "for", "the", "second", "one", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/execution/utils/ResponderTask.java#L238-L240
16,096
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/authorization/RuleEvaluator.java
RuleEvaluator.evaluate
private Decision evaluate( Map<String, String> resource, Subject subject, String action, Set<Attribute> environment, List<AclRule> matchedRules ) { Decision decision = internalEvaluate(resource, subject, action, environment, matchedRules); if(decision.isAuthorized()) { ...
java
private Decision evaluate( Map<String, String> resource, Subject subject, String action, Set<Attribute> environment, List<AclRule> matchedRules ) { Decision decision = internalEvaluate(resource, subject, action, environment, matchedRules); if(decision.isAuthorized()) { ...
[ "private", "Decision", "evaluate", "(", "Map", "<", "String", ",", "String", ">", "resource", ",", "Subject", "subject", ",", "String", "action", ",", "Set", "<", "Attribute", ">", "environment", ",", "List", "<", "AclRule", ">", "matchedRules", ")", "{", ...
Return the evaluation decision for the resource, subject, action, environment and contexts
[ "Return", "the", "evaluation", "decision", "for", "the", "resource", "subject", "action", "environment", "and", "contexts" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/authorization/RuleEvaluator.java#L245-L258
16,097
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/authorization/RuleEvaluator.java
RuleEvaluator.predicateMatchRules
@SuppressWarnings("rawtypes") boolean predicateMatchRules( final Map<String, String> resource, final Function<String, Predicate<String>> predicateTransformer, final Function<List, Predicate<String>> listpred, final Map<String, Object> ruleResource, final String source...
java
@SuppressWarnings("rawtypes") boolean predicateMatchRules( final Map<String, String> resource, final Function<String, Predicate<String>> predicateTransformer, final Function<List, Predicate<String>> listpred, final Map<String, Object> ruleResource, final String source...
[ "@", "SuppressWarnings", "(", "\"rawtypes\"", ")", "boolean", "predicateMatchRules", "(", "final", "Map", "<", "String", ",", "String", ">", "resource", ",", "final", "Function", "<", "String", ",", "Predicate", "<", "String", ">", ">", "predicateTransformer", ...
Return true if all entries in the "match" map pass the predicate tests for the resource @param resource the resource @param predicateTransformer transformer to convert a String into a Predicate check @param listpred @param ruleResource @param sourceIdentity
[ "Return", "true", "if", "all", "entries", "in", "the", "match", "map", "pass", "the", "predicate", "tests", "for", "the", "resource" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/authorization/RuleEvaluator.java#L787-L806
16,098
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/DirPluginScanner.java
DirPluginScanner.resolveProviderConflict
File resolveProviderConflict(final Collection<FileCache.MemoFile> matched){ final HashMap<File, VersionCompare> versions = new HashMap<File, VersionCompare>(); final ArrayList<File> toCompare = new ArrayList<File>(); for (final FileCache.MemoFile file : matched) { final String vers =...
java
File resolveProviderConflict(final Collection<FileCache.MemoFile> matched){ final HashMap<File, VersionCompare> versions = new HashMap<File, VersionCompare>(); final ArrayList<File> toCompare = new ArrayList<File>(); for (final FileCache.MemoFile file : matched) { final String vers =...
[ "File", "resolveProviderConflict", "(", "final", "Collection", "<", "FileCache", ".", "MemoFile", ">", "matched", ")", "{", "final", "HashMap", "<", "File", ",", "VersionCompare", ">", "versions", "=", "new", "HashMap", "<", "File", ",", "VersionCompare", ">",...
Return a single file that should be used among all te files matching a single provider identity, or null if the conflict cannot be resolved.
[ "Return", "a", "single", "file", "that", "should", "be", "used", "among", "all", "te", "files", "matching", "a", "single", "provider", "identity", "or", "null", "if", "the", "conflict", "cannot", "be", "resolved", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/DirPluginScanner.java#L76-L94
16,099
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/DirPluginScanner.java
DirPluginScanner.scanForFile
public final File scanForFile(final ProviderIdent ident) throws PluginScannerException { if (!extdir.exists() || !extdir.isDirectory()) { return null; } return scanFor(ident, extdir.listFiles(getFileFilter())); }
java
public final File scanForFile(final ProviderIdent ident) throws PluginScannerException { if (!extdir.exists() || !extdir.isDirectory()) { return null; } return scanFor(ident, extdir.listFiles(getFileFilter())); }
[ "public", "final", "File", "scanForFile", "(", "final", "ProviderIdent", "ident", ")", "throws", "PluginScannerException", "{", "if", "(", "!", "extdir", ".", "exists", "(", ")", "||", "!", "extdir", ".", "isDirectory", "(", ")", ")", "{", "return", "null"...
scan for matching file for the provider def
[ "scan", "for", "matching", "file", "for", "the", "provider", "def" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/DirPluginScanner.java#L104-L109