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
15,900
rundeck/rundeck
rundeck-storage/rundeck-storage-conf/src/main/java/org/rundeck/storage/conf/TreeStack.java
TreeStack.listStackDirectory
private Set<Resource<T>> listStackDirectory(Path path) { HashSet<Resource<T>> merge = new HashSet<Resource<T>>(); if (treeHandlerList.size() > 0) { for (SelectiveTree<T> treeHandler : treeHandlerList) { if (PathUtil.hasRoot(treeHandler.getSubPath(), path) && !PathUtil.equals(...
java
private Set<Resource<T>> listStackDirectory(Path path) { HashSet<Resource<T>> merge = new HashSet<Resource<T>>(); if (treeHandlerList.size() > 0) { for (SelectiveTree<T> treeHandler : treeHandlerList) { if (PathUtil.hasRoot(treeHandler.getSubPath(), path) && !PathUtil.equals(...
[ "private", "Set", "<", "Resource", "<", "T", ">", ">", "listStackDirectory", "(", "Path", "path", ")", "{", "HashSet", "<", "Resource", "<", "T", ">>", "merge", "=", "new", "HashSet", "<", "Resource", "<", "T", ">", ">", "(", ")", ";", "if", "(", ...
List all treeHandlers as directories which have the given path as a parent @param path path @return
[ "List", "all", "treeHandlers", "as", "directories", "which", "have", "the", "given", "path", "as", "a", "parent" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/rundeck-storage/rundeck-storage-conf/src/main/java/org/rundeck/storage/conf/TreeStack.java#L156-L172
15,901
rundeck/rundeck
plugins/orchestrator-plugin/src/main/java/org/rundeck/plugin/example/RandomSubsetOrchestratorPlugin.java
RandomSubsetOrchestratorPlugin.genSeed
public static long genSeed(final String ident) { try { MessageDigest instance = MessageDigest.getInstance("SHA-1"); byte[] strbytes = ident.getBytes("UTF-8"); byte[] digest = instance.digest(strbytes); //use first 8 bytes as a long return ByteBuffer.w...
java
public static long genSeed(final String ident) { try { MessageDigest instance = MessageDigest.getInstance("SHA-1"); byte[] strbytes = ident.getBytes("UTF-8"); byte[] digest = instance.digest(strbytes); //use first 8 bytes as a long return ByteBuffer.w...
[ "public", "static", "long", "genSeed", "(", "final", "String", "ident", ")", "{", "try", "{", "MessageDigest", "instance", "=", "MessageDigest", ".", "getInstance", "(", "\"SHA-1\"", ")", ";", "byte", "[", "]", "strbytes", "=", "ident", ".", "getBytes", "(...
generate random seed from unique ident string @param ident @return seed long
[ "generate", "random", "seed", "from", "unique", "ident", "string" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/plugins/orchestrator-plugin/src/main/java/org/rundeck/plugin/example/RandomSubsetOrchestratorPlugin.java#L58-L70
15,902
rundeck/rundeck
examples/example-java-logging-plugins/src/main/java/com/dtolabs/rundeck/plugin/example/ExampleStreamingLogWriterPlugin.java
ExampleStreamingLogWriterPlugin.openStream
public void openStream() throws IOException { socket = new Socket(host, port); socketStream = socket.getOutputStream(); if (null != context.get("name") && null != context.get("id")) { Object group = context.get("group"); String desc = (null != group ? group + "/" : "") + ...
java
public void openStream() throws IOException { socket = new Socket(host, port); socketStream = socket.getOutputStream(); if (null != context.get("name") && null != context.get("id")) { Object group = context.get("group"); String desc = (null != group ? group + "/" : "") + ...
[ "public", "void", "openStream", "(", ")", "throws", "IOException", "{", "socket", "=", "new", "Socket", "(", "host", ",", "port", ")", ";", "socketStream", "=", "socket", ".", "getOutputStream", "(", ")", ";", "if", "(", "null", "!=", "context", ".", "...
Open a stream, called before addEntry is called
[ "Open", "a", "stream", "called", "before", "addEntry", "is", "called" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/examples/example-java-logging-plugins/src/main/java/com/dtolabs/rundeck/plugin/example/ExampleStreamingLogWriterPlugin.java#L39-L48
15,903
rundeck/rundeck
examples/example-java-logging-plugins/src/main/java/com/dtolabs/rundeck/plugin/example/ExampleStreamingLogWriterPlugin.java
ExampleStreamingLogWriterPlugin.addEvent
public void addEvent(LogEvent event) { try { write(getString(event)); } catch (IOException e) { e.printStackTrace(); } }
java
public void addEvent(LogEvent event) { try { write(getString(event)); } catch (IOException e) { e.printStackTrace(); } }
[ "public", "void", "addEvent", "(", "LogEvent", "event", ")", "{", "try", "{", "write", "(", "getString", "(", "event", ")", ")", ";", "}", "catch", "(", "IOException", "e", ")", "{", "e", ".", "printStackTrace", "(", ")", ";", "}", "}" ]
Add a new event @param event
[ "Add", "a", "new", "event" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/examples/example-java-logging-plugins/src/main/java/com/dtolabs/rundeck/plugin/example/ExampleStreamingLogWriterPlugin.java#L55-L61
15,904
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/data/SharedDataContextUtils.java
SharedDataContextUtils.escapeShell
public static String escapeShell(final String s) { if(null==s){ return s; } if (s.startsWith("'") && s.endsWith("'")) { return s; } else if (s.startsWith("\"") && s.endsWith("\"")) { return s.replaceAll("([\\\\`])", "\\\\$1"); } return ...
java
public static String escapeShell(final String s) { if(null==s){ return s; } if (s.startsWith("'") && s.endsWith("'")) { return s; } else if (s.startsWith("\"") && s.endsWith("\"")) { return s.replaceAll("([\\\\`])", "\\\\$1"); } return ...
[ "public", "static", "String", "escapeShell", "(", "final", "String", "s", ")", "{", "if", "(", "null", "==", "s", ")", "{", "return", "s", ";", "}", "if", "(", "s", ".", "startsWith", "(", "\"'\"", ")", "&&", "s", ".", "endsWith", "(", "\"'\"", "...
Escape characters meaningful to bash shell unless the string is already surrounded in single quotes @param s string @return escaped string
[ "Escape", "characters", "meaningful", "to", "bash", "shell", "unless", "the", "string", "is", "already", "surrounded", "in", "single", "quotes" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/data/SharedDataContextUtils.java#L179-L189
15,905
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/data/SharedDataContextUtils.java
SharedDataContextUtils.escapeWindowsShell
public static String escapeWindowsShell(final String s) { if (null == s) { return s; } if (s.startsWith("'") && s.endsWith("'")) { return s; } else if (s.startsWith("\"") && s.endsWith("\"")) { return s.replaceAll("([`^])", "^$1"); } re...
java
public static String escapeWindowsShell(final String s) { if (null == s) { return s; } if (s.startsWith("'") && s.endsWith("'")) { return s; } else if (s.startsWith("\"") && s.endsWith("\"")) { return s.replaceAll("([`^])", "^$1"); } re...
[ "public", "static", "String", "escapeWindowsShell", "(", "final", "String", "s", ")", "{", "if", "(", "null", "==", "s", ")", "{", "return", "s", ";", "}", "if", "(", "s", ".", "startsWith", "(", "\"'\"", ")", "&&", "s", ".", "endsWith", "(", "\"'\...
Escape characters meaningful to windows unless the string is already surrounded in single quotes @param s string @return escaped string
[ "Escape", "characters", "meaningful", "to", "windows", "unless", "the", "string", "is", "already", "surrounded", "in", "single", "quotes" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/data/SharedDataContextUtils.java#L198-L208
15,906
rundeck/rundeck
core/src/main/java/com/dtolabs/utils/PropertiesUtil.java
PropertiesUtil.stringFromProperties
public static String stringFromProperties(Properties props) throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(2048); props.store(baos, null); String propsString; propsString = URLEncoder.encode(baos.toString("ISO-8859-1"), "ISO-8859-1"); return propsSt...
java
public static String stringFromProperties(Properties props) throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(2048); props.store(baos, null); String propsString; propsString = URLEncoder.encode(baos.toString("ISO-8859-1"), "ISO-8859-1"); return propsSt...
[ "public", "static", "String", "stringFromProperties", "(", "Properties", "props", ")", "throws", "IOException", "{", "ByteArrayOutputStream", "baos", "=", "new", "ByteArrayOutputStream", "(", "2048", ")", ";", "props", ".", "store", "(", "baos", ",", "null", ")"...
Returns the Properties formatted as a String @param props properties @return String format from the Properties @throws java.io.IOException if an error occurs
[ "Returns", "the", "Properties", "formatted", "as", "a", "String" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/utils/PropertiesUtil.java#L54-L62
15,907
rundeck/rundeck
core/src/main/java/com/dtolabs/utils/PropertiesUtil.java
PropertiesUtil.propertiesFromString
public static Properties propertiesFromString(String propString) throws IOException { Properties props = new Properties(); String pstring = URLDecoder.decode(propString, "ISO-8859-1"); props.load(new ByteArrayInputStream(pstring.getBytes())); return props; }
java
public static Properties propertiesFromString(String propString) throws IOException { Properties props = new Properties(); String pstring = URLDecoder.decode(propString, "ISO-8859-1"); props.load(new ByteArrayInputStream(pstring.getBytes())); return props; }
[ "public", "static", "Properties", "propertiesFromString", "(", "String", "propString", ")", "throws", "IOException", "{", "Properties", "props", "=", "new", "Properties", "(", ")", ";", "String", "pstring", "=", "URLDecoder", ".", "decode", "(", "propString", ",...
Convert a String into a Properties object @param propString properties string @return properties @throws IOException if an error occurs
[ "Convert", "a", "String", "into", "a", "Properties", "object" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/utils/PropertiesUtil.java#L73-L82
15,908
rundeck/rundeck
core/src/main/java/com/dtolabs/utils/PropertiesUtil.java
PropertiesUtil.listPropertiesWithPrefix
public static Collection listPropertiesWithPrefix(Properties props, String prefix) { final HashSet set = new HashSet(); for (Iterator i = props.keySet().iterator(); i.hasNext();) { String key = (String) i.next(); if (key.startsWith(prefix)) { set.add(props.getProp...
java
public static Collection listPropertiesWithPrefix(Properties props, String prefix) { final HashSet set = new HashSet(); for (Iterator i = props.keySet().iterator(); i.hasNext();) { String key = (String) i.next(); if (key.startsWith(prefix)) { set.add(props.getProp...
[ "public", "static", "Collection", "listPropertiesWithPrefix", "(", "Properties", "props", ",", "String", "prefix", ")", "{", "final", "HashSet", "set", "=", "new", "HashSet", "(", ")", ";", "for", "(", "Iterator", "i", "=", "props", ".", "keySet", "(", ")"...
Returns a Collection of all property values that have keys with a certain prefix. @param props the Properties to reaqd @param prefix the prefix @return Collection of all property values with keys with a certain prefix
[ "Returns", "a", "Collection", "of", "all", "property", "values", "that", "have", "keys", "with", "a", "certain", "prefix", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/utils/PropertiesUtil.java#L125-L134
15,909
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/AbstractDescribableScriptPlugin.java
AbstractDescribableScriptPlugin.loadConfigData
protected Map<String, Map<String, String>> loadConfigData( final ExecutionContext context, final Map<String, Object> instanceData, final Map<String, Map<String, String>> localDataContext, final Description description, final String serviceName ) throws Con...
java
protected Map<String, Map<String, String>> loadConfigData( final ExecutionContext context, final Map<String, Object> instanceData, final Map<String, Map<String, String>> localDataContext, final Description description, final String serviceName ) throws Con...
[ "protected", "Map", "<", "String", ",", "Map", "<", "String", ",", "String", ">", ">", "loadConfigData", "(", "final", "ExecutionContext", "context", ",", "final", "Map", "<", "String", ",", "Object", ">", "instanceData", ",", "final", "Map", "<", "String"...
Loads the plugin configuration values stored in project or framework properties, also @param context execution context @param localDataContext current context data @param description plugin description @param instanceData instance data @param serviceName service name @return context data with a new "config" ...
[ "Loads", "the", "plugin", "configuration", "values", "stored", "in", "project", "or", "framework", "properties", "also" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/AbstractDescribableScriptPlugin.java#L326-L374
15,910
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/AbstractDescribableScriptPlugin.java
AbstractDescribableScriptPlugin.loadContentConversionPropertyValues
protected void loadContentConversionPropertyValues( final Map<String, String> data, final ExecutionContext context, final List<Property> pluginProperties ) throws ConfigurationException { //look for "valueConversion" properties for (Property property : pluginP...
java
protected void loadContentConversionPropertyValues( final Map<String, String> data, final ExecutionContext context, final List<Property> pluginProperties ) throws ConfigurationException { //look for "valueConversion" properties for (Property property : pluginP...
[ "protected", "void", "loadContentConversionPropertyValues", "(", "final", "Map", "<", "String", ",", "String", ">", "data", ",", "final", "ExecutionContext", "context", ",", "final", "List", "<", "Property", ">", "pluginProperties", ")", "throws", "ConfigurationExce...
Looks for properties with content conversion, and converts the values @param data map of values for config properties @param context execution context @param pluginProperties definition of plugin properties
[ "Looks", "for", "properties", "with", "content", "conversion", "and", "converts", "the", "values" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/AbstractDescribableScriptPlugin.java#L383-L407
15,911
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/AbstractDescribableScriptPlugin.java
AbstractDescribableScriptPlugin.convertStoragePathValue
private void convertStoragePathValue( final Map<String, String> data, final StorageTree storageTree, final String name, final String propValue, final Map<String, Object> renderingOptions ) throws ConfigurationException { //a storage path proper...
java
private void convertStoragePathValue( final Map<String, String> data, final StorageTree storageTree, final String name, final String propValue, final Map<String, Object> renderingOptions ) throws ConfigurationException { //a storage path proper...
[ "private", "void", "convertStoragePathValue", "(", "final", "Map", "<", "String", ",", "String", ">", "data", ",", "final", "StorageTree", "storageTree", ",", "final", "String", "name", ",", "final", "String", "propValue", ",", "final", "Map", "<", "String", ...
Converts storage path properties by loading the values into the config data. @param data config data @param storageTree storage @param name property name @param propValue value to convert @param renderingOptions options @throws ConfigurationException
[ "Converts", "storage", "path", "properties", "by", "loading", "the", "values", "into", "the", "config", "data", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/AbstractDescribableScriptPlugin.java#L418-L472
15,912
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/AbstractDescribableScriptPlugin.java
AbstractDescribableScriptPlugin.convertPrivateDataValue
private void convertPrivateDataValue( final Map<String, String> data, final DataContext privateDataContext, final String name, final String propValue, final Map<String, Object> renderingOptions ) throws ConfigurationException { boolean clearVal...
java
private void convertPrivateDataValue( final Map<String, String> data, final DataContext privateDataContext, final String name, final String propValue, final Map<String, Object> renderingOptions ) throws ConfigurationException { boolean clearVal...
[ "private", "void", "convertPrivateDataValue", "(", "final", "Map", "<", "String", ",", "String", ">", "data", ",", "final", "DataContext", "privateDataContext", ",", "final", "String", "name", ",", "final", "String", "propValue", ",", "final", "Map", "<", "Str...
Converts properties that refer to a private data context value @param data config data @param privateDataContext private data @param name property name @param propValue value to convert
[ "Converts", "properties", "that", "refer", "to", "a", "private", "data", "context", "value" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/AbstractDescribableScriptPlugin.java#L481-L509
15,913
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/tasks/net/ThreadBoundJschLogger.java
ThreadBoundJschLogger.getInstance
public static ThreadBoundJschLogger getInstance(final PluginLogger logger, final int loggingLevel) { getInstance(); instance.setThreadLogger(logger, loggingLevel); return instance; }
java
public static ThreadBoundJschLogger getInstance(final PluginLogger logger, final int loggingLevel) { getInstance(); instance.setThreadLogger(logger, loggingLevel); return instance; }
[ "public", "static", "ThreadBoundJschLogger", "getInstance", "(", "final", "PluginLogger", "logger", ",", "final", "int", "loggingLevel", ")", "{", "getInstance", "(", ")", ";", "instance", ".", "setThreadLogger", "(", "logger", ",", "loggingLevel", ")", ";", "re...
Bind to static Jsch logger, and return the logger instance @return the shared instance @param logger logger @param loggingLevel level
[ "Bind", "to", "static", "Jsch", "logger", "and", "return", "the", "logger", "instance" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/tasks/net/ThreadBoundJschLogger.java#L58-L62
15,914
rundeck/rundeck
rundeck-storage/rundeck-storage-filesys/src/main/java/org/rundeck/storage/data/file/FileTree.java
FileTree.filterResources
private Set<Resource<T>> filterResources(Path path, Predicate<Resource> test) { validatePath(path); if (!hasDirectory(path)) { throw StorageException.listException(path, "not a directory path: " + path); } File file = filepathMapper.directoryForPath(path); HashSet<Res...
java
private Set<Resource<T>> filterResources(Path path, Predicate<Resource> test) { validatePath(path); if (!hasDirectory(path)) { throw StorageException.listException(path, "not a directory path: " + path); } File file = filepathMapper.directoryForPath(path); HashSet<Res...
[ "private", "Set", "<", "Resource", "<", "T", ">", ">", "filterResources", "(", "Path", "path", ",", "Predicate", "<", "Resource", ">", "test", ")", "{", "validatePath", "(", "path", ")", ";", "if", "(", "!", "hasDirectory", "(", "path", ")", ")", "{"...
Return a filtered set of resources @param path path @param test predicate test, or null to match all @return set of matching resources
[ "Return", "a", "filtered", "set", "of", "resources" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/rundeck-storage/rundeck-storage-filesys/src/main/java/org/rundeck/storage/data/file/FileTree.java#L163-L181
15,915
rundeck/rundeck
rundeck-storage/rundeck-storage-filesys/src/main/java/org/rundeck/storage/data/file/LockingTree.java
LockingTree.pathSynch
protected Object pathSynch(Path path) { Object newref = new Object(); Object oldref = locks.putIfAbsent(path.getPath(), newref); return null != oldref ? oldref : newref; }
java
protected Object pathSynch(Path path) { Object newref = new Object(); Object oldref = locks.putIfAbsent(path.getPath(), newref); return null != oldref ? oldref : newref; }
[ "protected", "Object", "pathSynch", "(", "Path", "path", ")", "{", "Object", "newref", "=", "new", "Object", "(", ")", ";", "Object", "oldref", "=", "locks", ".", "putIfAbsent", "(", "path", ".", "getPath", "(", ")", ",", "newref", ")", ";", "return", ...
Return an object that can be synchronized on for the given path. @param path path @return synch object
[ "Return", "an", "object", "that", "can", "be", "synchronized", "on", "for", "the", "given", "path", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/rundeck-storage/rundeck-storage-filesys/src/main/java/org/rundeck/storage/data/file/LockingTree.java#L47-L51
15,916
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/authorization/providers/YamlPolicyCollection.java
YamlPolicyCollection.load
private <T> void load(YamlSourceLoader<T> loader, YamlPolicyCreator<T> creator) throws IOException { int index = 1; try (final YamlSourceLoader<T> loader1 = loader) { for (T yamlDoc : loader1.loadAll()) { String ident = identity + "[" + index + "]"; ...
java
private <T> void load(YamlSourceLoader<T> loader, YamlPolicyCreator<T> creator) throws IOException { int index = 1; try (final YamlSourceLoader<T> loader1 = loader) { for (T yamlDoc : loader1.loadAll()) { String ident = identity + "[" + index + "]"; ...
[ "private", "<", "T", ">", "void", "load", "(", "YamlSourceLoader", "<", "T", ">", "loader", ",", "YamlPolicyCreator", "<", "T", ">", "creator", ")", "throws", "IOException", "{", "int", "index", "=", "1", ";", "try", "(", "final", "YamlSourceLoader", "<"...
load yaml stream as sequence of policy documents @throws IOException
[ "load", "yaml", "stream", "as", "sequence", "of", "policy", "documents" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/authorization/providers/YamlPolicyCollection.java#L81-L114
15,917
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/execution/ExecutionUtils.java
ExecutionUtils.getMessageLogLevel
public static String getMessageLogLevel(final int level, final String defLevel) { switch (level) { case (Constants.ERR_LEVEL): return Constants.MSG_ERR; case (Constants.DEBUG_LEVEL): return Constants.MSG_DEBUG; case (Constants.INFO_LEVEL): ...
java
public static String getMessageLogLevel(final int level, final String defLevel) { switch (level) { case (Constants.ERR_LEVEL): return Constants.MSG_ERR; case (Constants.DEBUG_LEVEL): return Constants.MSG_DEBUG; case (Constants.INFO_LEVEL): ...
[ "public", "static", "String", "getMessageLogLevel", "(", "final", "int", "level", ",", "final", "String", "defLevel", ")", "{", "switch", "(", "level", ")", "{", "case", "(", "Constants", ".", "ERR_LEVEL", ")", ":", "return", "Constants", ".", "MSG_ERR", "...
Get message loglevel string for the integer value @param level integer level @param defLevel default string to return if integer doesn't match @return loglevel string, or the default value
[ "Get", "message", "loglevel", "string", "for", "the", "integer", "value" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/execution/ExecutionUtils.java#L44-L59
15,918
rundeck/rundeck
rundeck-storage/rundeck-storage-api/src/main/java/org/rundeck/storage/api/PathUtil.java
PathUtil.parentPathString
public static String parentPathString(String path) { String[] split = componentsFromPathString(path); if (split.length > 1) { StringBuilder stringBuilder = new StringBuilder(); for (int i = 0; i < split.length - 1; i++) { if (i > 0) { stringBui...
java
public static String parentPathString(String path) { String[] split = componentsFromPathString(path); if (split.length > 1) { StringBuilder stringBuilder = new StringBuilder(); for (int i = 0; i < split.length - 1; i++) { if (i > 0) { stringBui...
[ "public", "static", "String", "parentPathString", "(", "String", "path", ")", "{", "String", "[", "]", "split", "=", "componentsFromPathString", "(", "path", ")", ";", "if", "(", "split", ".", "length", ">", "1", ")", "{", "StringBuilder", "stringBuilder", ...
Return the string representing the parent of the given path @param path path string @return parent path string
[ "Return", "the", "string", "representing", "the", "parent", "of", "the", "given", "path" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/rundeck-storage/rundeck-storage-api/src/main/java/org/rundeck/storage/api/PathUtil.java#L190-L203
15,919
rundeck/rundeck
rundeck-storage/rundeck-storage-api/src/main/java/org/rundeck/storage/api/PathUtil.java
PathUtil.cleanPath
public static String cleanPath(String path) { if (path.endsWith(SEPARATOR)) { path = path.replaceAll(SEPARATOR + "+$", ""); } if (path.startsWith(SEPARATOR)) { path = path.replaceAll("^" + SEPARATOR + "+", ""); } return path.replaceAll("/+", SEPARATOR); ...
java
public static String cleanPath(String path) { if (path.endsWith(SEPARATOR)) { path = path.replaceAll(SEPARATOR + "+$", ""); } if (path.startsWith(SEPARATOR)) { path = path.replaceAll("^" + SEPARATOR + "+", ""); } return path.replaceAll("/+", SEPARATOR); ...
[ "public", "static", "String", "cleanPath", "(", "String", "path", ")", "{", "if", "(", "path", ".", "endsWith", "(", "SEPARATOR", ")", ")", "{", "path", "=", "path", ".", "replaceAll", "(", "SEPARATOR", "+", "\"+$\"", ",", "\"\"", ")", ";", "}", "if"...
Clean the path string by removing leading and trailing slashes and removing duplicate slashes. @param path input path @return cleaned path string
[ "Clean", "the", "path", "string", "by", "removing", "leading", "and", "trailing", "slashes", "and", "removing", "duplicate", "slashes", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/rundeck-storage/rundeck-storage-api/src/main/java/org/rundeck/storage/api/PathUtil.java#L210-L218
15,920
rundeck/rundeck
rundeck-storage/rundeck-storage-api/src/main/java/org/rundeck/storage/api/PathUtil.java
PathUtil.exactMetadataResourceSelector
public static <T extends ContentMeta> ResourceSelector<T> exactMetadataResourceSelector(final Map<String, String> required, final boolean requireAll) { return new ResourceSelector<T>() { @Override public boolean matchesContent(T content) { for (String key : re...
java
public static <T extends ContentMeta> ResourceSelector<T> exactMetadataResourceSelector(final Map<String, String> required, final boolean requireAll) { return new ResourceSelector<T>() { @Override public boolean matchesContent(T content) { for (String key : re...
[ "public", "static", "<", "T", "extends", "ContentMeta", ">", "ResourceSelector", "<", "T", ">", "exactMetadataResourceSelector", "(", "final", "Map", "<", "String", ",", "String", ">", "required", ",", "final", "boolean", "requireAll", ")", "{", "return", "new...
A resource selector which requires metadata values to be equal to some required strings @param required required metadata strings @param requireAll if true, require all values are equal, otherwise require one value to be equal @param <T> content type @return selector for resources with all or some required m...
[ "A", "resource", "selector", "which", "requires", "metadata", "values", "to", "be", "equal", "to", "some", "required", "strings" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/rundeck-storage/rundeck-storage-api/src/main/java/org/rundeck/storage/api/PathUtil.java#L292-L311
15,921
rundeck/rundeck
rundeck-storage/rundeck-storage-api/src/main/java/org/rundeck/storage/api/PathUtil.java
PathUtil.regexMetadataResourceSelector
public static <T extends ContentMeta> ResourceSelector<T> regexMetadataResourceSelector(final Map<String, String> required, final boolean requireAll) { return new ResourceSelector<T>() { Map<String, Pattern> patternMap = new HashMap<String, Pattern>(); private Pattern forStr...
java
public static <T extends ContentMeta> ResourceSelector<T> regexMetadataResourceSelector(final Map<String, String> required, final boolean requireAll) { return new ResourceSelector<T>() { Map<String, Pattern> patternMap = new HashMap<String, Pattern>(); private Pattern forStr...
[ "public", "static", "<", "T", "extends", "ContentMeta", ">", "ResourceSelector", "<", "T", ">", "regexMetadataResourceSelector", "(", "final", "Map", "<", "String", ",", "String", ">", "required", ",", "final", "boolean", "requireAll", ")", "{", "return", "new...
A resource selector which requires metadata values to match regexes @param required required metadata regexes @param requireAll if true, require all values match regexes, otherwise require one value to match the regex @param <T> content type @return selector for resources with all or some matching metadata v...
[ "A", "resource", "selector", "which", "requires", "metadata", "values", "to", "match", "regexes" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/rundeck-storage/rundeck-storage-api/src/main/java/org/rundeck/storage/api/PathUtil.java#L322-L356
15,922
rundeck/rundeck
rundeck-storage/rundeck-storage-api/src/main/java/org/rundeck/storage/api/PathUtil.java
PathUtil.composeSelector
public static <T extends ContentMeta> ResourceSelector<T> composeSelector(final ResourceSelector<T> a, final ResourceSelector<T> b, final boolean and) { return new ResourceSelector<T>() { @Override public boolean matchesContent(T content) { boolean a1 = a.matc...
java
public static <T extends ContentMeta> ResourceSelector<T> composeSelector(final ResourceSelector<T> a, final ResourceSelector<T> b, final boolean and) { return new ResourceSelector<T>() { @Override public boolean matchesContent(T content) { boolean a1 = a.matc...
[ "public", "static", "<", "T", "extends", "ContentMeta", ">", "ResourceSelector", "<", "T", ">", "composeSelector", "(", "final", "ResourceSelector", "<", "T", ">", "a", ",", "final", "ResourceSelector", "<", "T", ">", "b", ",", "final", "boolean", "and", "...
compose two selectors @param a selector 1 @param b selector 2 @param and true indicates AND, otherwise OR @param <T> resource type @return new selector appyling the operator to the selector
[ "compose", "two", "selectors" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/rundeck-storage/rundeck-storage-api/src/main/java/org/rundeck/storage/api/PathUtil.java#L368-L380
15,923
rundeck/rundeck
rundeck-storage/rundeck-storage-api/src/main/java/org/rundeck/storage/api/PathUtil.java
PathUtil.allResourceSelector
public static <T extends ContentMeta> ResourceSelector<T> allResourceSelector() { return new ResourceSelector<T>() { @Override public boolean matchesContent(T content) { return true; } }; }
java
public static <T extends ContentMeta> ResourceSelector<T> allResourceSelector() { return new ResourceSelector<T>() { @Override public boolean matchesContent(T content) { return true; } }; }
[ "public", "static", "<", "T", "extends", "ContentMeta", ">", "ResourceSelector", "<", "T", ">", "allResourceSelector", "(", ")", "{", "return", "new", "ResourceSelector", "<", "T", ">", "(", ")", "{", "@", "Override", "public", "boolean", "matchesContent", "...
A resource selector which always matches @param <T> content type @return selector
[ "A", "resource", "selector", "which", "always", "matches" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/rundeck-storage/rundeck-storage-api/src/main/java/org/rundeck/storage/api/PathUtil.java#L389-L396
15,924
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/authorization/AuthorizationUtil.java
AuthorizationUtil.resourceType
public static Map<String, String> resourceType(String kind, Map<String, String> meta) { HashMap<String, String> authResource = new HashMap<String, String>(); if (null != meta) { authResource.putAll(meta); } authResource.put(TYPE_FIELD, GENERIC_RESOURCE_TYPE_NAME); aut...
java
public static Map<String, String> resourceType(String kind, Map<String, String> meta) { HashMap<String, String> authResource = new HashMap<String, String>(); if (null != meta) { authResource.putAll(meta); } authResource.put(TYPE_FIELD, GENERIC_RESOURCE_TYPE_NAME); aut...
[ "public", "static", "Map", "<", "String", ",", "String", ">", "resourceType", "(", "String", "kind", ",", "Map", "<", "String", ",", "String", ">", "meta", ")", "{", "HashMap", "<", "String", ",", "String", ">", "authResource", "=", "new", "HashMap", "...
Return a resource map for a generic resource type @param kind the resource type name @param meta the attributes about the resource type @return the resource map describing a resource type
[ "Return", "a", "resource", "map", "for", "a", "generic", "resource", "type" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/authorization/AuthorizationUtil.java#L113-L121
15,925
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/authorization/AuthorizationUtil.java
AuthorizationUtil.context
public static Set<Attribute> context(String key, String value){ if(null==key) { throw new IllegalArgumentException("key cannot be null"); } if(null==value){ throw new IllegalArgumentException("value cannot be null"); } return Collections.singleton( ...
java
public static Set<Attribute> context(String key, String value){ if(null==key) { throw new IllegalArgumentException("key cannot be null"); } if(null==value){ throw new IllegalArgumentException("value cannot be null"); } return Collections.singleton( ...
[ "public", "static", "Set", "<", "Attribute", ">", "context", "(", "String", "key", ",", "String", "value", ")", "{", "if", "(", "null", "==", "key", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"key cannot be null\"", ")", ";", "}", "if", ...
Create a singleton context attribute set @param key context key @param value context value @return attribute set
[ "Create", "a", "singleton", "context", "attribute", "set" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/authorization/AuthorizationUtil.java#L155-L168
15,926
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/authorization/AuthorizationUtil.java
AuthorizationUtil.contextAsString
public static String contextAsString(final Set<Attribute> context) { StringBuilder sb = new StringBuilder(); for (Attribute attribute : context) { if(sb.length()<1) { sb.append("{"); }else { sb.append(", "); } sb.append(Attr...
java
public static String contextAsString(final Set<Attribute> context) { StringBuilder sb = new StringBuilder(); for (Attribute attribute : context) { if(sb.length()<1) { sb.append("{"); }else { sb.append(", "); } sb.append(Attr...
[ "public", "static", "String", "contextAsString", "(", "final", "Set", "<", "Attribute", ">", "context", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", "Attribute", "attribute", ":", "context", ")", "{", "if", "(", ...
Generate a string representation of the context attribute set @param context context set @return string
[ "Generate", "a", "string", "representation", "of", "the", "context", "attribute", "set" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/authorization/AuthorizationUtil.java#L175-L190
15,927
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/BaseScriptPlugin.java
BaseScriptPlugin.runPluginScript
protected int runPluginScript( final PluginStepContext executionContext, final PrintStream outputStream, final PrintStream errorStream, final Framework framework, final Map<String, Object> configuration ) throws IOException, InterruptedExceptio...
java
protected int runPluginScript( final PluginStepContext executionContext, final PrintStream outputStream, final PrintStream errorStream, final Framework framework, final Map<String, Object> configuration ) throws IOException, InterruptedExceptio...
[ "protected", "int", "runPluginScript", "(", "final", "PluginStepContext", "executionContext", ",", "final", "PrintStream", "outputStream", ",", "final", "PrintStream", "errorStream", ",", "final", "Framework", "framework", ",", "final", "Map", "<", "String", ",", "O...
Runs the script configured for the script plugin and channels the output to two streams. @param executionContext context @param outputStream output stream @param errorStream error stream @param framework fwlk @param configuration configuration @return exit code @throws IOException if any I...
[ "Runs", "the", "script", "configured", "for", "the", "script", "plugin", "and", "channels", "the", "output", "to", "two", "streams", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/BaseScriptPlugin.java#L77-L119
15,928
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/BaseScriptPlugin.java
BaseScriptPlugin.createStepItemDataContext
protected Map<String, Map<String, String>> createStepItemDataContext(final Framework framework, final String project, final Map<String, Map<String, String>> context, ...
java
protected Map<String, Map<String, String>> createStepItemDataContext(final Framework framework, final String project, final Map<String, Map<String, String>> context, ...
[ "protected", "Map", "<", "String", ",", "Map", "<", "String", ",", "String", ">", ">", "createStepItemDataContext", "(", "final", "Framework", "framework", ",", "final", "String", "project", ",", "final", "Map", "<", "String", ",", "Map", "<", "String", ",...
Create a data context containing the plugin values "file","scriptfile" and "base", as well as all config values. @param framework fwk @param project project name @param context data context @param configuration configuration @return data context
[ "Create", "a", "data", "context", "containing", "the", "plugin", "values", "file", "scriptfile", "and", "base", "as", "well", "as", "all", "config", "values", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/BaseScriptPlugin.java#L129-L143
15,929
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/BaseScriptPlugin.java
BaseScriptPlugin.createScriptDataContext
protected DataContext createScriptDataContext( final Framework framework, final String project, final Map<String, Map<String, String>> context) { BaseDataContext localDataContext = new BaseDataContext(); localDataContext.merge(ScriptDataContextUtil.createScriptDataCon...
java
protected DataContext createScriptDataContext( final Framework framework, final String project, final Map<String, Map<String, String>> context) { BaseDataContext localDataContext = new BaseDataContext(); localDataContext.merge(ScriptDataContextUtil.createScriptDataCon...
[ "protected", "DataContext", "createScriptDataContext", "(", "final", "Framework", "framework", ",", "final", "String", "project", ",", "final", "Map", "<", "String", ",", "Map", "<", "String", ",", "String", ">", ">", "context", ")", "{", "BaseDataContext", "l...
create script data context @param framework fwk @param project project name @param context orig context @return new data context
[ "create", "script", "data", "context" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/BaseScriptPlugin.java#L152-L161
15,930
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/storage/StorageConverterPluginAdapter.java
StorageConverterPluginAdapter.filter
private ResourceMeta filter(Path path, ResourceMeta resourceMeta, Operation op) { ResourceMetaBuilder resourceMetaBuilder = StorageUtil.create(new HashMap<String, String>(resourceMeta.getMeta())); final HasInputStream result; switch (op) { case READ: case ...
java
private ResourceMeta filter(Path path, ResourceMeta resourceMeta, Operation op) { ResourceMetaBuilder resourceMetaBuilder = StorageUtil.create(new HashMap<String, String>(resourceMeta.getMeta())); final HasInputStream result; switch (op) { case READ: case ...
[ "private", "ResourceMeta", "filter", "(", "Path", "path", ",", "ResourceMeta", "resourceMeta", ",", "Operation", "op", ")", "{", "ResourceMetaBuilder", "resourceMetaBuilder", "=", "StorageUtil", ".", "create", "(", "new", "HashMap", "<", "String", ",", "String", ...
perform appropriate plugin filter method based on the operation enacted @param path path @param resourceMeta resource @param op operation @return new resource
[ "perform", "appropriate", "plugin", "filter", "method", "based", "on", "the", "operation", "enacted" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/storage/StorageConverterPluginAdapter.java#L52-L82
15,931
rundeck/rundeck
core/src/main/java/com/dtolabs/shared/resources/ResourceXMLParser.java
ResourceXMLParser.parse
public void parse() throws ResourceXMLParserException, IOException { final EntityResolver resolver = createEntityResolver(); final SAXReader reader = new SAXReader(false); reader.setEntityResolver(resolver); try { final Document doc; if(null==this.doc){ ...
java
public void parse() throws ResourceXMLParserException, IOException { final EntityResolver resolver = createEntityResolver(); final SAXReader reader = new SAXReader(false); reader.setEntityResolver(resolver); try { final Document doc; if(null==this.doc){ ...
[ "public", "void", "parse", "(", ")", "throws", "ResourceXMLParserException", ",", "IOException", "{", "final", "EntityResolver", "resolver", "=", "createEntityResolver", "(", ")", ";", "final", "SAXReader", "reader", "=", "new", "SAXReader", "(", "false", ")", "...
Parse the document, applying the configured Receiver to the parsed entities @throws ResourceXMLParserException parse error @throws java.io.IOException io error
[ "Parse", "the", "document", "applying", "the", "configured", "Receiver", "to", "the", "parsed", "entities" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/shared/resources/ResourceXMLParser.java#L97-L143
15,932
rundeck/rundeck
core/src/main/java/com/dtolabs/shared/resources/ResourceXMLParser.java
ResourceXMLParser.parseEnt
private Entity parseEnt(final Node node, final EntitySet set) throws ResourceXMLParserException { final Entity ent = parseResourceRef(set, node); ent.setResourceType(node.getName()); parseEntProperties(ent, node); parseEntSubAttributes(ent, node); return ent; }
java
private Entity parseEnt(final Node node, final EntitySet set) throws ResourceXMLParserException { final Entity ent = parseResourceRef(set, node); ent.setResourceType(node.getName()); parseEntProperties(ent, node); parseEntSubAttributes(ent, node); return ent; }
[ "private", "Entity", "parseEnt", "(", "final", "Node", "node", ",", "final", "EntitySet", "set", ")", "throws", "ResourceXMLParserException", "{", "final", "Entity", "ent", "=", "parseResourceRef", "(", "set", ",", "node", ")", ";", "ent", ".", "setResourceTyp...
Given xml Node and EntitySet, parse the entity defined in the Node @param node DOM node @param set entity set holder @return parsed Entity object @throws ResourceXMLParserException if entity definition was previously found, or another error occurs
[ "Given", "xml", "Node", "and", "EntitySet", "parse", "the", "entity", "defined", "in", "the", "Node" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/shared/resources/ResourceXMLParser.java#L183-L189
15,933
rundeck/rundeck
examples/example-java-storage-converter-plugin/src/main/java/org/rundeck/plugin/example/ExampleConverterPlugin.java
ExampleConverterPlugin.readResource
@Override public HasInputStream readResource(Path path, ResourceMetaBuilder resourceMetaBuilder, final HasInputStream hasResourceStream) { if (wasEncoded(resourceMetaBuilder)) { return decode(hasResourceStream); } //return null to indicate no change was performed on t...
java
@Override public HasInputStream readResource(Path path, ResourceMetaBuilder resourceMetaBuilder, final HasInputStream hasResourceStream) { if (wasEncoded(resourceMetaBuilder)) { return decode(hasResourceStream); } //return null to indicate no change was performed on t...
[ "@", "Override", "public", "HasInputStream", "readResource", "(", "Path", "path", ",", "ResourceMetaBuilder", "resourceMetaBuilder", ",", "final", "HasInputStream", "hasResourceStream", ")", "{", "if", "(", "wasEncoded", "(", "resourceMetaBuilder", ")", ")", "{", "r...
Reads stored data, so decodes a base64 stream if the metadata indicates it has been encoded @param path @param resourceMetaBuilder @param hasResourceStream @return
[ "Reads", "stored", "data", "so", "decodes", "a", "base64", "stream", "if", "the", "metadata", "indicates", "it", "has", "been", "encoded" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/examples/example-java-storage-converter-plugin/src/main/java/org/rundeck/plugin/example/ExampleConverterPlugin.java#L94-L102
15,934
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/utils/MapData.java
MapData.toStringStringMap
public static Map<String, String> toStringStringMap(Map input) { Map<String, String> map = new HashMap<>(); for (Object o : input.keySet()) { map.put(o.toString(), input.get(o) != null ? input.get(o).toString() : ""); } return map; }
java
public static Map<String, String> toStringStringMap(Map input) { Map<String, String> map = new HashMap<>(); for (Object o : input.keySet()) { map.put(o.toString(), input.get(o) != null ? input.get(o).toString() : ""); } return map; }
[ "public", "static", "Map", "<", "String", ",", "String", ">", "toStringStringMap", "(", "Map", "input", ")", "{", "Map", "<", "String", ",", "String", ">", "map", "=", "new", "HashMap", "<>", "(", ")", ";", "for", "(", "Object", "o", ":", "input", ...
Convert all values to string via toString @param input
[ "Convert", "all", "values", "to", "string", "via", "toString" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/utils/MapData.java#L173-L179
15,935
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/resources/DirectoryResourceModelSource.java
DirectoryResourceModelSource.loadFileSources
private void loadFileSources(final File directory, final String project) { //clear source sequence if (!directory.isDirectory()) { logger.warn("Not a directory: " + directory); } //get supported parser extensions final Set<String> exts = new HashSet<String>( ...
java
private void loadFileSources(final File directory, final String project) { //clear source sequence if (!directory.isDirectory()) { logger.warn("Not a directory: " + directory); } //get supported parser extensions final Set<String> exts = new HashSet<String>( ...
[ "private", "void", "loadFileSources", "(", "final", "File", "directory", ",", "final", "String", "project", ")", "{", "//clear source sequence", "if", "(", "!", "directory", ".", "isDirectory", "(", ")", ")", "{", "logger", ".", "warn", "(", "\"Not a directory...
Discover new files in the directory, and add file sources
[ "Discover", "new", "files", "in", "the", "directory", "and", "add", "file", "sources" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/resources/DirectoryResourceModelSource.java#L179-L223
15,936
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/cli/BaseTool.java
BaseTool.initOptions
protected void initOptions() { if (null != toolOptions && !optionsHaveInited) { for (CLIToolOptions toolOpts : toolOptions) { toolOpts.addOptions(options); } optionsHaveInited=true; } }
java
protected void initOptions() { if (null != toolOptions && !optionsHaveInited) { for (CLIToolOptions toolOpts : toolOptions) { toolOpts.addOptions(options); } optionsHaveInited=true; } }
[ "protected", "void", "initOptions", "(", ")", "{", "if", "(", "null", "!=", "toolOptions", "&&", "!", "optionsHaveInited", ")", "{", "for", "(", "CLIToolOptions", "toolOpts", ":", "toolOptions", ")", "{", "toolOpts", ".", "addOptions", "(", "options", ")", ...
initialize any options, will apply this for each CLIToolOptions added to the tool. subclasses may override this but should call super
[ "initialize", "any", "options", "will", "apply", "this", "for", "each", "CLIToolOptions", "added", "to", "the", "tool", ".", "subclasses", "may", "override", "this", "but", "should", "call", "super" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/cli/BaseTool.java#L83-L90
15,937
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/cli/BaseTool.java
BaseTool.optionDisplayString
protected String optionDisplayString(final String opt, boolean extended) { StringBuffer stringBuffer = new StringBuffer(); stringBuffer.append("-").append(opt); Option option = getOption(opt); if(null!=option) { if (option.getLongOpt() != null) { stringBuffer....
java
protected String optionDisplayString(final String opt, boolean extended) { StringBuffer stringBuffer = new StringBuffer(); stringBuffer.append("-").append(opt); Option option = getOption(opt); if(null!=option) { if (option.getLongOpt() != null) { stringBuffer....
[ "protected", "String", "optionDisplayString", "(", "final", "String", "opt", ",", "boolean", "extended", ")", "{", "StringBuffer", "stringBuffer", "=", "new", "StringBuffer", "(", ")", ";", "stringBuffer", ".", "append", "(", "\"-\"", ")", ".", "append", "(", ...
Return a string to display the specified option in help text @param extended if true, include full argument descriptor @param opt opt name @return display string
[ "Return", "a", "string", "to", "display", "the", "specified", "option", "in", "help", "text" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/cli/BaseTool.java#L111-L127
15,938
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/cli/BaseTool.java
BaseTool.run
public void run(final String[] args) throws CLIToolException { PropertyConfigurator.configure(Constants.getLog4jPropertiesFile().getAbsolutePath()); CommandLine cli = parseArgs(args); validateOptions(cli,args); go(); }
java
public void run(final String[] args) throws CLIToolException { PropertyConfigurator.configure(Constants.getLog4jPropertiesFile().getAbsolutePath()); CommandLine cli = parseArgs(args); validateOptions(cli,args); go(); }
[ "public", "void", "run", "(", "final", "String", "[", "]", "args", ")", "throws", "CLIToolException", "{", "PropertyConfigurator", ".", "configure", "(", "Constants", ".", "getLog4jPropertiesFile", "(", ")", ".", "getAbsolutePath", "(", ")", ")", ";", "Command...
Run the tool's lifecycle given the input arguments. @param args the cli arg vector @throws CLIToolException if an error occurs
[ "Run", "the", "tool", "s", "lifecycle", "given", "the", "input", "arguments", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/cli/BaseTool.java#L151-L156
15,939
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/cli/BaseTool.java
BaseTool.parseArgs
public CommandLine parseArgs(final String[] args) throws CLIToolOptionsException { initOptions(); final CommandLineParser parser = new PosixParser(); try { commandLine = parser.parse(getOptions(), args); } catch (ParseException e) { help(); throw new C...
java
public CommandLine parseArgs(final String[] args) throws CLIToolOptionsException { initOptions(); final CommandLineParser parser = new PosixParser(); try { commandLine = parser.parse(getOptions(), args); } catch (ParseException e) { help(); throw new C...
[ "public", "CommandLine", "parseArgs", "(", "final", "String", "[", "]", "args", ")", "throws", "CLIToolOptionsException", "{", "initOptions", "(", ")", ";", "final", "CommandLineParser", "parser", "=", "new", "PosixParser", "(", ")", ";", "try", "{", "commandL...
Parse the options, will apply this for each CLIToolOptions added to the tool. subclasses may override this but should call super
[ "Parse", "the", "options", "will", "apply", "this", "for", "each", "CLIToolOptions", "added", "to", "the", "tool", ".", "subclasses", "may", "override", "this", "but", "should", "call", "super" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/cli/BaseTool.java#L162-L177
15,940
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/cli/BaseTool.java
BaseTool.validateOptions
public void validateOptions(final CommandLine cli, final String[] args) throws CLIToolOptionsException { if (null != toolOptions) { for (final CLIToolOptions toolOpts : toolOptions) { toolOpts.validate(cli,args); } } }
java
public void validateOptions(final CommandLine cli, final String[] args) throws CLIToolOptionsException { if (null != toolOptions) { for (final CLIToolOptions toolOpts : toolOptions) { toolOpts.validate(cli,args); } } }
[ "public", "void", "validateOptions", "(", "final", "CommandLine", "cli", ",", "final", "String", "[", "]", "args", ")", "throws", "CLIToolOptionsException", "{", "if", "(", "null", "!=", "toolOptions", ")", "{", "for", "(", "final", "CLIToolOptions", "toolOpts...
Validate the values parsed by the options, will apply this for each CLIToolOptions added to the tool. subclasses may override this but should call super @param cli cli @param args args @throws CLIToolOptionsException if an error occurs
[ "Validate", "the", "values", "parsed", "by", "the", "options", "will", "apply", "this", "for", "each", "CLIToolOptions", "added", "to", "the", "tool", ".", "subclasses", "may", "override", "this", "but", "should", "call", "super" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/cli/BaseTool.java#L186-L192
15,941
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/cli/BaseTool.java
BaseTool.help
public void help() { final HelpFormatter formatter = new HelpFormatter(); final String helpString = getHelpString(); formatter.printHelp(80, helpString, "options:", getOptions(), "[RUNDECK version " + VersionConstants.VERSION + " (" + VersionCo...
java
public void help() { final HelpFormatter formatter = new HelpFormatter(); final String helpString = getHelpString(); formatter.printHelp(80, helpString, "options:", getOptions(), "[RUNDECK version " + VersionConstants.VERSION + " (" + VersionCo...
[ "public", "void", "help", "(", ")", "{", "final", "HelpFormatter", "formatter", "=", "new", "HelpFormatter", "(", ")", ";", "final", "String", "helpString", "=", "getHelpString", "(", ")", ";", "formatter", ".", "printHelp", "(", "80", ",", "helpString", "...
Writes help message .
[ "Writes", "help", "message", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/cli/BaseTool.java#L212-L220
15,942
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/common/UpdateUtils.java
UpdateUtils.updateFileFromFile
public static void updateFileFromFile(final File sourceFile, final String destinationFilePath) throws UpdateException { if (!sourceFile.exists()) { throw new UpdateException("Source file does not exist: " + sourceFile); } if (!sourceFile.isFile()) { throw new Upda...
java
public static void updateFileFromFile(final File sourceFile, final String destinationFilePath) throws UpdateException { if (!sourceFile.exists()) { throw new UpdateException("Source file does not exist: " + sourceFile); } if (!sourceFile.isFile()) { throw new Upda...
[ "public", "static", "void", "updateFileFromFile", "(", "final", "File", "sourceFile", ",", "final", "String", "destinationFilePath", ")", "throws", "UpdateException", "{", "if", "(", "!", "sourceFile", ".", "exists", "(", ")", ")", "{", "throw", "new", "Update...
Get the source File and store it to a destination file path @param sourceFile source @param destinationFilePath destination @throws UpdateException on error
[ "Get", "the", "source", "File", "and", "store", "it", "to", "a", "destination", "file", "path" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/common/UpdateUtils.java#L70-L87
15,943
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/common/UpdateUtils.java
UpdateUtils.moveFile
private static void moveFile(final File fromFile, final File toFile) throws UpdateException { try { // Create parent directory structure if necessary FileUtils.mkParentDirs(toFile); Files.move(fromFile.toPath(), toFile.toPath(), StandardCopyOption.REPLACE_...
java
private static void moveFile(final File fromFile, final File toFile) throws UpdateException { try { // Create parent directory structure if necessary FileUtils.mkParentDirs(toFile); Files.move(fromFile.toPath(), toFile.toPath(), StandardCopyOption.REPLACE_...
[ "private", "static", "void", "moveFile", "(", "final", "File", "fromFile", ",", "final", "File", "toFile", ")", "throws", "UpdateException", "{", "try", "{", "// Create parent directory structure if necessary", "FileUtils", ".", "mkParentDirs", "(", "toFile", ")", "...
Rename the file. Handle possible OS specific issues
[ "Rename", "the", "file", ".", "Handle", "possible", "OS", "specific", "issues" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/common/UpdateUtils.java#L104-L114
15,944
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/common/UpdateUtils.java
UpdateUtils.update
public static void update(final FileUpdater updater, final File destFile) throws UpdateException { final File lockFile = new File(destFile.getAbsolutePath() + ".lock"); final File newDestFile = new File(destFile.getAbsolutePath() + ".new"); try { // synchronize writing to file withi...
java
public static void update(final FileUpdater updater, final File destFile) throws UpdateException { final File lockFile = new File(destFile.getAbsolutePath() + ".lock"); final File newDestFile = new File(destFile.getAbsolutePath() + ".new"); try { // synchronize writing to file withi...
[ "public", "static", "void", "update", "(", "final", "FileUpdater", "updater", ",", "final", "File", "destFile", ")", "throws", "UpdateException", "{", "final", "File", "lockFile", "=", "new", "File", "(", "destFile", ".", "getAbsolutePath", "(", ")", "+", "\...
Update a destination file with an updater implementation, while maintaining appropriate locks around the action and file @param updater updater @param destFile destination @throws UpdateException on error
[ "Update", "a", "destination", "file", "with", "an", "updater", "implementation", "while", "maintaining", "appropriate", "locks", "around", "the", "action", "and", "file" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/common/UpdateUtils.java#L183-L213
15,945
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/execution/workflow/ContextStack.java
ContextStack.copyPush
public ContextStack<T> copyPush(final T value) { final ContextStack<T> stack1 = copy(); stack1.push(value); return stack1; }
java
public ContextStack<T> copyPush(final T value) { final ContextStack<T> stack1 = copy(); stack1.push(value); return stack1; }
[ "public", "ContextStack", "<", "T", ">", "copyPush", "(", "final", "T", "value", ")", "{", "final", "ContextStack", "<", "T", ">", "stack1", "=", "copy", "(", ")", ";", "stack1", ".", "push", "(", "value", ")", ";", "return", "stack1", ";", "}" ]
Return a new stack based with the same contents and one value pushed
[ "Return", "a", "new", "stack", "based", "with", "the", "same", "contents", "and", "one", "value", "pushed" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/execution/workflow/ContextStack.java#L95-L99
15,946
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/execution/workflow/ContextStack.java
ContextStack.copyPop
public ContextStack<T> copyPop() { final ContextStack<T> stack1 = copy(); stack1.pop(); return stack1; }
java
public ContextStack<T> copyPop() { final ContextStack<T> stack1 = copy(); stack1.pop(); return stack1; }
[ "public", "ContextStack", "<", "T", ">", "copyPop", "(", ")", "{", "final", "ContextStack", "<", "T", ">", "stack1", "=", "copy", "(", ")", ";", "stack1", ".", "pop", "(", ")", ";", "return", "stack1", ";", "}" ]
Return a new stack with the same contents but pop a value
[ "Return", "a", "new", "stack", "with", "the", "same", "contents", "but", "pop", "a", "value" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/execution/workflow/ContextStack.java#L104-L108
15,947
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/common/NodeSupport.java
NodeSupport.getFrameworkNodeHostname
@Override public String getFrameworkNodeHostname() { String hostname = getLookup().getProperty("framework.server.hostname"); if (null!=hostname) { return hostname.trim(); } else { return hostname; } }
java
@Override public String getFrameworkNodeHostname() { String hostname = getLookup().getProperty("framework.server.hostname"); if (null!=hostname) { return hostname.trim(); } else { return hostname; } }
[ "@", "Override", "public", "String", "getFrameworkNodeHostname", "(", ")", "{", "String", "hostname", "=", "getLookup", "(", ")", ".", "getProperty", "(", "\"framework.server.hostname\"", ")", ";", "if", "(", "null", "!=", "hostname", ")", "{", "return", "host...
Gets the value of "framework.server.hostname" property @return Returns value of framework.server.hostname property
[ "Gets", "the", "value", "of", "framework", ".", "server", ".", "hostname", "property" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/common/NodeSupport.java#L44-L52
15,948
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/common/NodeSupport.java
NodeSupport.getFrameworkNodeName
@Override public String getFrameworkNodeName() { String name = getLookup().getProperty("framework.server.name"); if (null!=name) { return name.trim(); } else { return name; } }
java
@Override public String getFrameworkNodeName() { String name = getLookup().getProperty("framework.server.name"); if (null!=name) { return name.trim(); } else { return name; } }
[ "@", "Override", "public", "String", "getFrameworkNodeName", "(", ")", "{", "String", "name", "=", "getLookup", "(", ")", ".", "getProperty", "(", "\"framework.server.name\"", ")", ";", "if", "(", "null", "!=", "name", ")", "{", "return", "name", ".", "tri...
Gets the value of "framework.server.name" property @return Returns value of framework.server.name property
[ "Gets", "the", "value", "of", "framework", ".", "server", ".", "name", "property" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/common/NodeSupport.java#L59-L67
15,949
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/utils/TextUtils.java
TextUtils.escape
public static String escape(String input, char echar, char[] special) { StringBuilder sb = new StringBuilder(); for (Character character : special) { sb.append(character); } sb.append(echar); String s = Matcher.quoteReplacement(new String(new char[]{echar})); ...
java
public static String escape(String input, char echar, char[] special) { StringBuilder sb = new StringBuilder(); for (Character character : special) { sb.append(character); } sb.append(echar); String s = Matcher.quoteReplacement(new String(new char[]{echar})); ...
[ "public", "static", "String", "escape", "(", "String", "input", ",", "char", "echar", ",", "char", "[", "]", "special", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", "Character", "character", ":", "special", ")"...
Escape the input string using the escape delimiter for the given special chars @param input input string @param echar escape char @param special all chars that should be escaped, the escape char itself will be automatically included @return escaped string
[ "Escape", "the", "input", "string", "using", "the", "escape", "delimiter", "for", "the", "given", "special", "chars" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/utils/TextUtils.java#L37-L45
15,950
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/utils/TextUtils.java
TextUtils.join
public static String join(String[] input, char separator) { //simple case, no escaping StringBuilder stringBuilder = new StringBuilder(); for (String s : input) { if (stringBuilder.length() > 0) { stringBuilder.append(separator); } stringBuilde...
java
public static String join(String[] input, char separator) { //simple case, no escaping StringBuilder stringBuilder = new StringBuilder(); for (String s : input) { if (stringBuilder.length() > 0) { stringBuilder.append(separator); } stringBuilde...
[ "public", "static", "String", "join", "(", "String", "[", "]", "input", ",", "char", "separator", ")", "{", "//simple case, no escaping", "StringBuilder", "stringBuilder", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", "String", "s", ":", "input", "...
Join an array of strings with the given separator, without escaping @param input input string @param separator separator @return joined string
[ "Join", "an", "array", "of", "strings", "with", "the", "given", "separator", "without", "escaping" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/utils/TextUtils.java#L170-L180
15,951
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/utils/TextUtils.java
TextUtils.joinEscaped
public static String joinEscaped(String[] input, char separator, char echar, char[] special) { StringBuilder sb = new StringBuilder(); char[] schars = new char[(special != null ? special.length : 0) + 1]; if (special != null && special.length > 0) { System.arraycopy(special, 0, schar...
java
public static String joinEscaped(String[] input, char separator, char echar, char[] special) { StringBuilder sb = new StringBuilder(); char[] schars = new char[(special != null ? special.length : 0) + 1]; if (special != null && special.length > 0) { System.arraycopy(special, 0, schar...
[ "public", "static", "String", "joinEscaped", "(", "String", "[", "]", "input", ",", "char", "separator", ",", "char", "echar", ",", "char", "[", "]", "special", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "char", "[", "...
Join an array of strings with the given separator, escape char, and other special chars for escaping @param input input string @param separator separator @param echar escape char @param special all special chars not necessarily including the echar or separator @return joined string
[ "Join", "an", "array", "of", "strings", "with", "the", "given", "separator", "escape", "char", "and", "other", "special", "chars", "for", "escaping" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/utils/TextUtils.java#L192-L206
15,952
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/resources/format/ResourceFormatParserService.java
ResourceFormatParserService.getParserForFileExtension
public ResourceFormatParser getParserForFileExtension(final File file) throws UnsupportedFormatException { String extension = getFileExtension(file.getName()); if (null != extension) { return getParserForFileExtension(extension); } else { throw new UnsupportedFormatExcept...
java
public ResourceFormatParser getParserForFileExtension(final File file) throws UnsupportedFormatException { String extension = getFileExtension(file.getName()); if (null != extension) { return getParserForFileExtension(extension); } else { throw new UnsupportedFormatExcept...
[ "public", "ResourceFormatParser", "getParserForFileExtension", "(", "final", "File", "file", ")", "throws", "UnsupportedFormatException", "{", "String", "extension", "=", "getFileExtension", "(", "file", ".", "getName", "(", ")", ")", ";", "if", "(", "null", "!=",...
Return a parser for a file, based on the file extension. @param file the file @return the parser found for the extension @throws UnsupportedFormatException if the file extension does not match an available parser, or if the file has no extension
[ "Return", "a", "parser", "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/ResourceFormatParserService.java#L104-L111
15,953
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/resources/format/ResourceFormatParserService.java
ResourceFormatParserService.getParserForFileExtension
public ResourceFormatParser getParserForFileExtension(final String extension) throws UnsupportedFormatException { for (final ResourceFormatParser resourceFormatParser : listParsers()) { if (resourceFormatParser.getFileExtensions().contains(extension)) { return resourceFormatParser; ...
java
public ResourceFormatParser getParserForFileExtension(final String extension) throws UnsupportedFormatException { for (final ResourceFormatParser resourceFormatParser : listParsers()) { if (resourceFormatParser.getFileExtensions().contains(extension)) { return resourceFormatParser; ...
[ "public", "ResourceFormatParser", "getParserForFileExtension", "(", "final", "String", "extension", ")", "throws", "UnsupportedFormatException", "{", "for", "(", "final", "ResourceFormatParser", "resourceFormatParser", ":", "listParsers", "(", ")", ")", "{", "if", "(", ...
Return a parser for a file, based on the bare file extension. @param extension the file extension string @return the parser found for the extension @throws UnsupportedFormatException if the file extension does not match an available parser, or if the file has no extension
[ "Return", "a", "parser", "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/ResourceFormatParserService.java#L132-L139
15,954
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/resources/format/ResourceFormatParserService.java
ResourceFormatParserService.getParserForMIMEType
public ResourceFormatParser getParserForMIMEType(final String mimeType) throws UnsupportedFormatException { //clean up encoding final String cleanMime; if (null != mimeType && mimeType.indexOf(";") > 0) { cleanMime = mimeType.substring(0, mimeType.indexOf(";")); } else { ...
java
public ResourceFormatParser getParserForMIMEType(final String mimeType) throws UnsupportedFormatException { //clean up encoding final String cleanMime; if (null != mimeType && mimeType.indexOf(";") > 0) { cleanMime = mimeType.substring(0, mimeType.indexOf(";")); } else { ...
[ "public", "ResourceFormatParser", "getParserForMIMEType", "(", "final", "String", "mimeType", ")", "throws", "UnsupportedFormatException", "{", "//clean up encoding", "final", "String", "cleanMime", ";", "if", "(", "null", "!=", "mimeType", "&&", "mimeType", ".", "ind...
Return a parser for a mime type. @param mimeType the MIME type string @return The first matching parser for the mime type @throws UnsupportedFormatException if no parser are available for the MIME type
[ "Return", "a", "parser", "for", "a", "mime", "type", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/resources/format/ResourceFormatParserService.java#L167-L196
15,955
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/utils/StringArrayUtil.java
StringArrayUtil.merge
public static String[] merge(final String[] input, final String[] list) { final List<String> v = new ArrayList<String>(Arrays.asList(list)); for (final String anInput : input) { if ((null != anInput) && !v.contains(anInput)) { v.add(anInput); } } r...
java
public static String[] merge(final String[] input, final String[] list) { final List<String> v = new ArrayList<String>(Arrays.asList(list)); for (final String anInput : input) { if ((null != anInput) && !v.contains(anInput)) { v.add(anInput); } } r...
[ "public", "static", "String", "[", "]", "merge", "(", "final", "String", "[", "]", "input", ",", "final", "String", "[", "]", "list", ")", "{", "final", "List", "<", "String", ">", "v", "=", "new", "ArrayList", "<", "String", ">", "(", "Arrays", "....
Merge to string arrays @param input Array elements to add @param list List to merge input into @return string array of merged set
[ "Merge", "to", "string", "arrays" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/utils/StringArrayUtil.java#L33-L41
15,956
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/utils/StringArrayUtil.java
StringArrayUtil.subtract
public static String[] subtract(final String[] input, final String[] list) { final Set<String> difference = new HashSet<String>(Arrays.asList(list)); difference.removeAll(Arrays.asList(input)); return difference.toArray(new String[difference.size()]); }
java
public static String[] subtract(final String[] input, final String[] list) { final Set<String> difference = new HashSet<String>(Arrays.asList(list)); difference.removeAll(Arrays.asList(input)); return difference.toArray(new String[difference.size()]); }
[ "public", "static", "String", "[", "]", "subtract", "(", "final", "String", "[", "]", "input", ",", "final", "String", "[", "]", "list", ")", "{", "final", "Set", "<", "String", ">", "difference", "=", "new", "HashSet", "<", "String", ">", "(", "Arra...
Subtract one string array from another @param input Array elements to subtract @param list List to subtract from @return string array of merged set
[ "Subtract", "one", "string", "array", "from", "another" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/utils/StringArrayUtil.java#L50-L54
15,957
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/utils/StringArrayUtil.java
StringArrayUtil.asString
public static String asString(final Object[] input, final String delim) { final StringBuffer sb = new StringBuffer(); for (int i = 0 ; i < input.length ; i++) { if (i > 0) { sb.append(delim); } sb.append(input[i].toString()); } return s...
java
public static String asString(final Object[] input, final String delim) { final StringBuffer sb = new StringBuffer(); for (int i = 0 ; i < input.length ; i++) { if (i > 0) { sb.append(delim); } sb.append(input[i].toString()); } return s...
[ "public", "static", "String", "asString", "(", "final", "Object", "[", "]", "input", ",", "final", "String", "delim", ")", "{", "final", "StringBuffer", "sb", "=", "new", "StringBuffer", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<",...
Format an array of objects as a string separated by a delimiter by calling toString on each object @param input List to format @param delim delimiter string to insert between elements @return formatted string
[ "Format", "an", "array", "of", "objects", "as", "a", "string", "separated", "by", "a", "delimiter", "by", "calling", "toString", "on", "each", "object" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/utils/StringArrayUtil.java#L63-L72
15,958
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/utils/StringArrayUtil.java
StringArrayUtil.difference
public static String[] difference(final String[] list1, final String[] list2) { HashSet<String> set = new HashSet<String>(); HashSet<String> set1 = new HashSet<String>(Arrays.asList(list1)); HashSet<String> set2 = new HashSet<String>(Arrays.asList(list2)); for (final String s : list1) { ...
java
public static String[] difference(final String[] list1, final String[] list2) { HashSet<String> set = new HashSet<String>(); HashSet<String> set1 = new HashSet<String>(Arrays.asList(list1)); HashSet<String> set2 = new HashSet<String>(Arrays.asList(list2)); for (final String s : list1) { ...
[ "public", "static", "String", "[", "]", "difference", "(", "final", "String", "[", "]", "list1", ",", "final", "String", "[", "]", "list2", ")", "{", "HashSet", "<", "String", ">", "set", "=", "new", "HashSet", "<", "String", ">", "(", ")", ";", "H...
The difference set operation @param list1 list1 @param list2 list2 @return the set of all items not in both lists
[ "The", "difference", "set", "operation" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/utils/StringArrayUtil.java#L96-L111
15,959
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/resources/FileResourceModelSource.java
FileResourceModelSource.parseFile
public static INodeSet parseFile(final File file, final Framework framework, final String project) throws ResourceModelSourceException, ConfigurationException { final FileResourceModelSource prov = new FileResourceModelSource(framework); prov.configure( Config...
java
public static INodeSet parseFile(final File file, final Framework framework, final String project) throws ResourceModelSourceException, ConfigurationException { final FileResourceModelSource prov = new FileResourceModelSource(framework); prov.configure( Config...
[ "public", "static", "INodeSet", "parseFile", "(", "final", "File", "file", ",", "final", "Framework", "framework", ",", "final", "String", "project", ")", "throws", "ResourceModelSourceException", ",", "ConfigurationException", "{", "final", "FileResourceModelSource", ...
Utility method to directly parse the nodes from a file @param file file @param framework fwk @param project project name @return nodes @throws ResourceModelSourceException if an error occurs @throws ConfigurationException if a configuration error occurs
[ "Utility", "method", "to", "directly", "parse", "the", "nodes", "from", "a", "file" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/resources/FileResourceModelSource.java#L203-L217
15,960
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/storage/StorageUtil.java
StorageUtil.create
public static ResourceMetaBuilder create(Map<String, String> meta) { ResourceMetaBuilder mutableRundeckResourceMeta = new ResourceMetaBuilder(meta); return mutableRundeckResourceMeta; }
java
public static ResourceMetaBuilder create(Map<String, String> meta) { ResourceMetaBuilder mutableRundeckResourceMeta = new ResourceMetaBuilder(meta); return mutableRundeckResourceMeta; }
[ "public", "static", "ResourceMetaBuilder", "create", "(", "Map", "<", "String", ",", "String", ">", "meta", ")", "{", "ResourceMetaBuilder", "mutableRundeckResourceMeta", "=", "new", "ResourceMetaBuilder", "(", "meta", ")", ";", "return", "mutableRundeckResourceMeta",...
Create a new builder with a set of metadata @param meta original metadata @return builder
[ "Create", "a", "new", "builder", "with", "a", "set", "of", "metadata" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/storage/StorageUtil.java#L87-L90
15,961
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/storage/StorageUtil.java
StorageUtil.deletePathRecursive
public static boolean deletePathRecursive(Tree<ResourceMeta> tree, Path path){ if(tree.hasResource(path)) { //delete just this resource return tree.deleteResource(path); }else if (tree.hasDirectory(path)) { //list resources and delete Set<Resource<Resource...
java
public static boolean deletePathRecursive(Tree<ResourceMeta> tree, Path path){ if(tree.hasResource(path)) { //delete just this resource return tree.deleteResource(path); }else if (tree.hasDirectory(path)) { //list resources and delete Set<Resource<Resource...
[ "public", "static", "boolean", "deletePathRecursive", "(", "Tree", "<", "ResourceMeta", ">", "tree", ",", "Path", "path", ")", "{", "if", "(", "tree", ".", "hasResource", "(", "path", ")", ")", "{", "//delete just this resource", "return", "tree", ".", "dele...
Delete all resources and subdirectories of the given resource path @param tree tree @param path path @return true if all resources were deleted successfully.
[ "Delete", "all", "resources", "and", "subdirectories", "of", "the", "given", "resource", "path" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/storage/StorageUtil.java#L123-L146
15,962
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/storage/StorageUtil.java
StorageUtil.resolvedTree
public static <S> StorageTree resolvedTree(S context, ExtTree<S, ResourceMeta> authStorage) { return ResolvedExtTree.with(context, authStorage); }
java
public static <S> StorageTree resolvedTree(S context, ExtTree<S, ResourceMeta> authStorage) { return ResolvedExtTree.with(context, authStorage); }
[ "public", "static", "<", "S", ">", "StorageTree", "resolvedTree", "(", "S", "context", ",", "ExtTree", "<", "S", ",", "ResourceMeta", ">", "authStorage", ")", "{", "return", "ResolvedExtTree", ".", "with", "(", "context", ",", "authStorage", ")", ";", "}" ...
Create a StorageTree using authorization context and authorizing tree @param context auth context @param authStorage authorizing storage tree @param <S> context type @return StorageTree for the authorization context
[ "Create", "a", "StorageTree", "using", "authorization", "context", "and", "authorizing", "tree" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/storage/StorageUtil.java#L184-L186
15,963
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/authorization/providers/PoliciesCache.java
PoliciesCache.fromFile
public static PoliciesCache fromFile(File singleFile, Set<Attribute> forcedContext) { return fromSourceProvider(YamlProvider.getFileProvider(singleFile), forcedContext); }
java
public static PoliciesCache fromFile(File singleFile, Set<Attribute> forcedContext) { return fromSourceProvider(YamlProvider.getFileProvider(singleFile), forcedContext); }
[ "public", "static", "PoliciesCache", "fromFile", "(", "File", "singleFile", ",", "Set", "<", "Attribute", ">", "forcedContext", ")", "{", "return", "fromSourceProvider", "(", "YamlProvider", ".", "getFileProvider", "(", "singleFile", ")", ",", "forcedContext", ")"...
Create a cache from a single file source @param singleFile file @return cache
[ "Create", "a", "cache", "from", "a", "single", "file", "source" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/authorization/providers/PoliciesCache.java#L155-L157
15,964
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/authorization/providers/PoliciesCache.java
PoliciesCache.fromSourceProvider
public static PoliciesCache fromSourceProvider( final SourceProvider provider, final Set<Attribute> forcedContext ) { return new PoliciesCache(provider, forcedContext); }
java
public static PoliciesCache fromSourceProvider( final SourceProvider provider, final Set<Attribute> forcedContext ) { return new PoliciesCache(provider, forcedContext); }
[ "public", "static", "PoliciesCache", "fromSourceProvider", "(", "final", "SourceProvider", "provider", ",", "final", "Set", "<", "Attribute", ">", "forcedContext", ")", "{", "return", "new", "PoliciesCache", "(", "provider", ",", "forcedContext", ")", ";", "}" ]
Create from a provider with a forced context @param provider source provider @param forcedContext forced context @return policies cache
[ "Create", "from", "a", "provider", "with", "a", "forced", "context" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/authorization/providers/PoliciesCache.java#L175-L181
15,965
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/authorization/providers/PoliciesCache.java
PoliciesCache.fromDir
public static PoliciesCache fromDir(File rootDir, final Set<Attribute> forcedContext) { return fromSourceProvider(YamlProvider.getDirProvider(rootDir),forcedContext); }
java
public static PoliciesCache fromDir(File rootDir, final Set<Attribute> forcedContext) { return fromSourceProvider(YamlProvider.getDirProvider(rootDir),forcedContext); }
[ "public", "static", "PoliciesCache", "fromDir", "(", "File", "rootDir", ",", "final", "Set", "<", "Attribute", ">", "forcedContext", ")", "{", "return", "fromSourceProvider", "(", "YamlProvider", ".", "getDirProvider", "(", "rootDir", ")", ",", "forcedContext", ...
Create a cache from a directory source @param rootDir base director @return cache
[ "Create", "a", "cache", "from", "a", "directory", "source" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/authorization/providers/PoliciesCache.java#L197-L199
15,966
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/plugins/util/PropertyBuilder.java
PropertyBuilder.renderingAsTextarea
public PropertyBuilder renderingAsTextarea() { if (this.type != Property.Type.String) { throw new IllegalStateException("stringRenderingTextarea can only be applied to a String property"); } return renderingOption(StringRenderingConstants.DISPLAY_TYPE_KEY, StringRenderingConstants.Di...
java
public PropertyBuilder renderingAsTextarea() { if (this.type != Property.Type.String) { throw new IllegalStateException("stringRenderingTextarea can only be applied to a String property"); } return renderingOption(StringRenderingConstants.DISPLAY_TYPE_KEY, StringRenderingConstants.Di...
[ "public", "PropertyBuilder", "renderingAsTextarea", "(", ")", "{", "if", "(", "this", ".", "type", "!=", "Property", ".", "Type", ".", "String", ")", "{", "throw", "new", "IllegalStateException", "(", "\"stringRenderingTextarea can only be applied to a String property\"...
Set the string property to display as a Multi-line Text area. @return this builder @throws IllegalStateException if the property type is not {@link Property.Type#String}
[ "Set", "the", "string", "property", "to", "display", "as", "a", "Multi", "-", "line", "Text", "area", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/plugins/util/PropertyBuilder.java#L315-L321
15,967
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/plugins/util/PropertyBuilder.java
PropertyBuilder.renderingAsPassword
public PropertyBuilder renderingAsPassword() { if (this.type != Property.Type.String) { throw new IllegalStateException("stringRenderingPassword can only be applied to a String property"); } return renderingOption(StringRenderingConstants.DISPLAY_TYPE_KEY, StringRenderingConstants.Di...
java
public PropertyBuilder renderingAsPassword() { if (this.type != Property.Type.String) { throw new IllegalStateException("stringRenderingPassword can only be applied to a String property"); } return renderingOption(StringRenderingConstants.DISPLAY_TYPE_KEY, StringRenderingConstants.Di...
[ "public", "PropertyBuilder", "renderingAsPassword", "(", ")", "{", "if", "(", "this", ".", "type", "!=", "Property", ".", "Type", ".", "String", ")", "{", "throw", "new", "IllegalStateException", "(", "\"stringRenderingPassword can only be applied to a String property\"...
Set the string property to display as a Password. @return this builder @throws IllegalStateException if the property type is not {@link Property.Type#String}
[ "Set", "the", "string", "property", "to", "display", "as", "a", "Password", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/plugins/util/PropertyBuilder.java#L327-L333
15,968
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/plugins/util/PropertyBuilder.java
PropertyBuilder.build
public Property build() { if (null == type) { throw new IllegalStateException("type is required"); } if (null == name) { throw new IllegalStateException("name is required"); } return PropertyUtil.forType( type, name, ...
java
public Property build() { if (null == type) { throw new IllegalStateException("type is required"); } if (null == name) { throw new IllegalStateException("name is required"); } return PropertyUtil.forType( type, name, ...
[ "public", "Property", "build", "(", ")", "{", "if", "(", "null", "==", "type", ")", "{", "throw", "new", "IllegalStateException", "(", "\"type is required\"", ")", ";", "}", "if", "(", "null", "==", "name", ")", "{", "throw", "new", "IllegalStateException"...
Build the Property object @return built property @throws IllegalStateException if type or name is not set
[ "Build", "the", "Property", "object" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/plugins/util/PropertyBuilder.java#L340-L361
15,969
rundeck/rundeck
rundeck-storage/rundeck-storage-conf/src/main/java/org/rundeck/storage/conf/SubPathTree.java
SubPathTree.translatePathExternal
private String translatePathExternal(String intpath) { if (fullPath) { return intpath; } else { return PathUtil.appendPath(rootPath.getPath(), intpath); } }
java
private String translatePathExternal(String intpath) { if (fullPath) { return intpath; } else { return PathUtil.appendPath(rootPath.getPath(), intpath); } }
[ "private", "String", "translatePathExternal", "(", "String", "intpath", ")", "{", "if", "(", "fullPath", ")", "{", "return", "intpath", ";", "}", "else", "{", "return", "PathUtil", ".", "appendPath", "(", "rootPath", ".", "getPath", "(", ")", ",", "intpath...
convert internal path to external @param intpath @return
[ "convert", "internal", "path", "to", "external" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/rundeck-storage/rundeck-storage-conf/src/main/java/org/rundeck/storage/conf/SubPathTree.java#L80-L86
15,970
rundeck/rundeck
rundeck-storage/rundeck-storage-conf/src/main/java/org/rundeck/storage/conf/SubPathTree.java
SubPathTree.translateResourceExternal
private Resource<T> translateResourceExternal(Resource<T> resource) { if (fullPath) { return resource; } return new translatedResource<T>(resource, translatePathExternal(resource.getPath())); }
java
private Resource<T> translateResourceExternal(Resource<T> resource) { if (fullPath) { return resource; } return new translatedResource<T>(resource, translatePathExternal(resource.getPath())); }
[ "private", "Resource", "<", "T", ">", "translateResourceExternal", "(", "Resource", "<", "T", ">", "resource", ")", "{", "if", "(", "fullPath", ")", "{", "return", "resource", ";", "}", "return", "new", "translatedResource", "<", "T", ">", "(", "resource",...
Expose a resource with a path that maps to external path @param resource @return
[ "Expose", "a", "resource", "with", "a", "path", "that", "maps", "to", "external", "path" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/rundeck-storage/rundeck-storage-conf/src/main/java/org/rundeck/storage/conf/SubPathTree.java#L183-L188
15,971
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/resources/ResourceModelSourceService.java
ResourceModelSourceService.factoryConverter
public static Function<ResourceModelSourceFactory, ResourceModelSource> factoryConverter( final Properties configuration ) { //nb: not using lambda due to inability to mock this class within grails tests, some conflict with cglib and // j8 lambdas return new Function<ResourceMode...
java
public static Function<ResourceModelSourceFactory, ResourceModelSource> factoryConverter( final Properties configuration ) { //nb: not using lambda due to inability to mock this class within grails tests, some conflict with cglib and // j8 lambdas return new Function<ResourceMode...
[ "public", "static", "Function", "<", "ResourceModelSourceFactory", ",", "ResourceModelSource", ">", "factoryConverter", "(", "final", "Properties", "configuration", ")", "{", "//nb: not using lambda due to inability to mock this class within grails tests, some conflict with cglib and",...
Given input configuration, produce a function to convert from a factory to model source @param configuration @return
[ "Given", "input", "configuration", "produce", "a", "function", "to", "convert", "from", "a", "factory", "to", "model", "source" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/resources/ResourceModelSourceService.java#L123-L139
15,972
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/execution/workflow/steps/node/NodeStepDataResultImpl.java
NodeStepDataResultImpl.with
public static NodeStepResult with(final NodeStepResult result, final WFSharedContext dataContext) { return new NodeStepDataResultImpl( result, result.getException(), result.getFailureReason(), result.getFailureMessage(), result.getF...
java
public static NodeStepResult with(final NodeStepResult result, final WFSharedContext dataContext) { return new NodeStepDataResultImpl( result, result.getException(), result.getFailureReason(), result.getFailureMessage(), result.getF...
[ "public", "static", "NodeStepResult", "with", "(", "final", "NodeStepResult", "result", ",", "final", "WFSharedContext", "dataContext", ")", "{", "return", "new", "NodeStepDataResultImpl", "(", "result", ",", "result", ".", "getException", "(", ")", ",", "result",...
Add a data context to a source result @param result @param dataContext @return
[ "Add", "a", "data", "context", "to", "a", "source", "result" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/execution/workflow/steps/node/NodeStepDataResultImpl.java#L43-L53
15,973
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/execution/ExecArgList.java
ExecArgList.buildCommandForNode
@Deprecated public ArrayList<String> buildCommandForNode(Map<String, Map<String, String>> dataContext, String osFamily) { return buildCommandForNode(this, dataContext, osFamily); }
java
@Deprecated public ArrayList<String> buildCommandForNode(Map<String, Map<String, String>> dataContext, String osFamily) { return buildCommandForNode(this, dataContext, osFamily); }
[ "@", "Deprecated", "public", "ArrayList", "<", "String", ">", "buildCommandForNode", "(", "Map", "<", "String", ",", "Map", "<", "String", ",", "String", ">", ">", "dataContext", ",", "String", "osFamily", ")", "{", "return", "buildCommandForNode", "(", "thi...
Generate the quoted and expanded argument list, by expanding property values given the data context, and quoting for the given OS @param dataContext property value data context @param osFamily OS family to determine quoting @return list of strings
[ "Generate", "the", "quoted", "and", "expanded", "argument", "list", "by", "expanding", "property", "values", "given", "the", "data", "context", "and", "quoting", "for", "the", "given", "OS" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/execution/ExecArgList.java#L140-L143
15,974
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/execution/ExecArgList.java
ExecArgList.visitWith
public void visitWith(ExecArg.Visitor visitor) { for (ExecArg arg : getList()) { arg.accept(visitor); } }
java
public void visitWith(ExecArg.Visitor visitor) { for (ExecArg arg : getList()) { arg.accept(visitor); } }
[ "public", "void", "visitWith", "(", "ExecArg", ".", "Visitor", "visitor", ")", "{", "for", "(", "ExecArg", "arg", ":", "getList", "(", ")", ")", "{", "arg", ".", "accept", "(", "visitor", ")", ";", "}", "}" ]
Visit with a visitor @param visitor visitor
[ "Visit", "with", "a", "visitor" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/execution/ExecArgList.java#L256-L260
15,975
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/utils/ZipUtil.java
ZipUtil.extractZip
public static void extractZip(final String path, final File dest) throws IOException { extractZip(path, dest, null); }
java
public static void extractZip(final String path, final File dest) throws IOException { extractZip(path, dest, null); }
[ "public", "static", "void", "extractZip", "(", "final", "String", "path", ",", "final", "File", "dest", ")", "throws", "IOException", "{", "extractZip", "(", "path", ",", "dest", ",", "null", ")", ";", "}" ]
Extracts all contents of the file to the destination directory @param path zip file path @param dest destination directory @throws IOException on io error
[ "Extracts", "all", "contents", "of", "the", "file", "to", "the", "destination", "directory" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/utils/ZipUtil.java#L45-L47
15,976
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/utils/ZipUtil.java
ZipUtil.extractZipFile
public static void extractZipFile(final String path, final File dest, final String fileName) throws IOException { FilenameFilter filter = null; if (null != fileName) { filter = new FilenameFilter() { public boolean accept(final File file, final String name) { ...
java
public static void extractZipFile(final String path, final File dest, final String fileName) throws IOException { FilenameFilter filter = null; if (null != fileName) { filter = new FilenameFilter() { public boolean accept(final File file, final String name) { ...
[ "public", "static", "void", "extractZipFile", "(", "final", "String", "path", ",", "final", "File", "dest", ",", "final", "String", "fileName", ")", "throws", "IOException", "{", "FilenameFilter", "filter", "=", "null", ";", "if", "(", "null", "!=", "fileNam...
Extracts a single entry from the zip @param path zip file path @param dest destination directory @param fileName specific filepath to extract @throws IOException on io error
[ "Extracts", "a", "single", "entry", "from", "the", "zip" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/utils/ZipUtil.java#L70-L80
15,977
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/common/FrameworkProjectMgr.java
FrameworkProjectMgr.createFrameworkProjectStrict
@Override public IRundeckProject createFrameworkProjectStrict(final String projectName, final Properties properties) { return createFrameworkProjectInt(projectName,properties,true); }
java
@Override public IRundeckProject createFrameworkProjectStrict(final String projectName, final Properties properties) { return createFrameworkProjectInt(projectName,properties,true); }
[ "@", "Override", "public", "IRundeckProject", "createFrameworkProjectStrict", "(", "final", "String", "projectName", ",", "final", "Properties", "properties", ")", "{", "return", "createFrameworkProjectInt", "(", "projectName", ",", "properties", ",", "true", ")", ";"...
Create a new project if it doesn't, otherwise throw exception @param projectName name of project @param properties config properties @return new project @throws IllegalArgumentException if the project already exists
[ "Create", "a", "new", "project", "if", "it", "doesn", "t", "otherwise", "throw", "exception" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/common/FrameworkProjectMgr.java#L107-L111
15,978
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/common/FrameworkProjectMgr.java
FrameworkProjectMgr.removeFrameworkProject
@Override public void removeFrameworkProject(final String projectName){ synchronized (projectCache) { removeSubDir(projectName); projectCache.remove(projectName); } }
java
@Override public void removeFrameworkProject(final String projectName){ synchronized (projectCache) { removeSubDir(projectName); projectCache.remove(projectName); } }
[ "@", "Override", "public", "void", "removeFrameworkProject", "(", "final", "String", "projectName", ")", "{", "synchronized", "(", "projectCache", ")", "{", "removeSubDir", "(", "projectName", ")", ";", "projectCache", ".", "remove", "(", "projectName", ")", ";"...
Remove a project definition @param projectName name of the project
[ "Remove", "a", "project", "definition" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/common/FrameworkProjectMgr.java#L158-L164
15,979
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/JarPluginProviderLoader.java
JarPluginProviderLoader.load
@SuppressWarnings("unchecked") public synchronized <T> T load(final PluggableService<T> service, final String providerName) throws ProviderLoaderException { final ProviderIdent ident = new ProviderIdent(service.getName(), providerName); debug("loadInstance for " + ident + ": " + pluginJa...
java
@SuppressWarnings("unchecked") public synchronized <T> T load(final PluggableService<T> service, final String providerName) throws ProviderLoaderException { final ProviderIdent ident = new ProviderIdent(service.getName(), providerName); debug("loadInstance for " + ident + ": " + pluginJa...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "synchronized", "<", "T", ">", "T", "load", "(", "final", "PluggableService", "<", "T", ">", "service", ",", "final", "String", "providerName", ")", "throws", "ProviderLoaderException", "{", "final", ...
Load provider instance for the service
[ "Load", "provider", "instance", "for", "the", "service" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/JarPluginProviderLoader.java#L169-L199
15,980
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/JarPluginProviderLoader.java
JarPluginProviderLoader.getClassnames
public String[] getClassnames() { final Attributes attributes = getMainAttributes(); if (null == attributes) { return null; } final String value = attributes.getValue(RUNDECK_PLUGIN_CLASSNAMES); if (null == value) { return null; } return va...
java
public String[] getClassnames() { final Attributes attributes = getMainAttributes(); if (null == attributes) { return null; } final String value = attributes.getValue(RUNDECK_PLUGIN_CLASSNAMES); if (null == value) { return null; } return va...
[ "public", "String", "[", "]", "getClassnames", "(", ")", "{", "final", "Attributes", "attributes", "=", "getMainAttributes", "(", ")", ";", "if", "(", "null", "==", "attributes", ")", "{", "return", "null", ";", "}", "final", "String", "value", "=", "att...
Get the declared list of provider classnames for the file
[ "Get", "the", "declared", "list", "of", "provider", "classnames", "for", "the", "file" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/JarPluginProviderLoader.java#L223-L233
15,981
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/JarPluginProviderLoader.java
JarPluginProviderLoader.getMainAttributes
private Attributes getMainAttributes() { if (null == mainAttributes) { mainAttributes = getJarMainAttributes(pluginJar); String pluginName = mainAttributes.getValue(RUNDECK_PLUGIN_NAME); if(pluginName == null) { //Fallback to something that will rarely change ...
java
private Attributes getMainAttributes() { if (null == mainAttributes) { mainAttributes = getJarMainAttributes(pluginJar); String pluginName = mainAttributes.getValue(RUNDECK_PLUGIN_NAME); if(pluginName == null) { //Fallback to something that will rarely change ...
[ "private", "Attributes", "getMainAttributes", "(", ")", "{", "if", "(", "null", "==", "mainAttributes", ")", "{", "mainAttributes", "=", "getJarMainAttributes", "(", "pluginJar", ")", ";", "String", "pluginName", "=", "mainAttributes", ".", "getValue", "(", "RUN...
return the main attributes from the jar manifest
[ "return", "the", "main", "attributes", "from", "the", "jar", "manifest" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/JarPluginProviderLoader.java#L272-L285
15,982
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/JarPluginProviderLoader.java
JarPluginProviderLoader.createProviderForClass
static <T,X extends T> T createProviderForClass(final PluggableService<T> service, final Class<X> cls) throws PluginException, ProviderCreationException { debug("Try loading provider " + cls.getName()); if(!(service instanceof JavaClassProviderLoadable)){ return null; } ...
java
static <T,X extends T> T createProviderForClass(final PluggableService<T> service, final Class<X> cls) throws PluginException, ProviderCreationException { debug("Try loading provider " + cls.getName()); if(!(service instanceof JavaClassProviderLoadable)){ return null; } ...
[ "static", "<", "T", ",", "X", "extends", "T", ">", "T", "createProviderForClass", "(", "final", "PluggableService", "<", "T", ">", "service", ",", "final", "Class", "<", "X", ">", "cls", ")", "throws", "PluginException", ",", "ProviderCreationException", "{"...
Attempt to create an instance of thea provider for the given service @param cls class @return created instance
[ "Attempt", "to", "create", "an", "instance", "of", "thea", "provider", "for", "the", "given", "service" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/JarPluginProviderLoader.java#L308-L325
15,983
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/JarPluginProviderLoader.java
JarPluginProviderLoader.getPluginMetadata
static Plugin getPluginMetadata(final Class<?> cls) throws PluginException { // try to get plugin provider name final String pluginname; if (!cls.isAnnotationPresent(Plugin.class)) { throw new PluginException("No Plugin annotation was found for the class: " + cls.getName()); ...
java
static Plugin getPluginMetadata(final Class<?> cls) throws PluginException { // try to get plugin provider name final String pluginname; if (!cls.isAnnotationPresent(Plugin.class)) { throw new PluginException("No Plugin annotation was found for the class: " + cls.getName()); ...
[ "static", "Plugin", "getPluginMetadata", "(", "final", "Class", "<", "?", ">", "cls", ")", "throws", "PluginException", "{", "// try to get plugin provider name", "final", "String", "pluginname", ";", "if", "(", "!", "cls", ".", "isAnnotationPresent", "(", "Plugin...
Get the Plugin annotation for the class
[ "Get", "the", "Plugin", "annotation", "for", "the", "class" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/JarPluginProviderLoader.java#L336-L354
15,984
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/JarPluginProviderLoader.java
JarPluginProviderLoader.createCachedJar
protected File createCachedJar(final File dir, final String jarName) throws PluginException { File cachedJar; try { cachedJar = new File(dir, jarName); cachedJar.deleteOnExit(); FileUtils.fileCopy(pluginJar, cachedJar, true); } catch (IOException e) { ...
java
protected File createCachedJar(final File dir, final String jarName) throws PluginException { File cachedJar; try { cachedJar = new File(dir, jarName); cachedJar.deleteOnExit(); FileUtils.fileCopy(pluginJar, cachedJar, true); } catch (IOException e) { ...
[ "protected", "File", "createCachedJar", "(", "final", "File", "dir", ",", "final", "String", "jarName", ")", "throws", "PluginException", "{", "File", "cachedJar", ";", "try", "{", "cachedJar", "=", "new", "File", "(", "dir", ",", "jarName", ")", ";", "cac...
Creates a single cached version of the pluginJar located within pluginJarCacheDirectory deleting all existing versions of pluginJar @param jarName
[ "Creates", "a", "single", "cached", "version", "of", "the", "pluginJar", "located", "within", "pluginJarCacheDirectory", "deleting", "all", "existing", "versions", "of", "pluginJar" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/JarPluginProviderLoader.java#L405-L415
15,985
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/JarPluginProviderLoader.java
JarPluginProviderLoader.loadClass
private Class<?> loadClass(final String classname) throws PluginException { if (null == classname) { throw new IllegalArgumentException("A null java class name was specified."); } if (null != classCache.get(classname)) { return classCache.get(classname); } ...
java
private Class<?> loadClass(final String classname) throws PluginException { if (null == classname) { throw new IllegalArgumentException("A null java class name was specified."); } if (null != classCache.get(classname)) { return classCache.get(classname); } ...
[ "private", "Class", "<", "?", ">", "loadClass", "(", "final", "String", "classname", ")", "throws", "PluginException", "{", "if", "(", "null", "==", "classname", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"A null java class name was specified.\"", ...
Load a class from the jar file by name
[ "Load", "a", "class", "from", "the", "jar", "file", "by", "name" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/JarPluginProviderLoader.java#L420-L441
15,986
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/JarPluginProviderLoader.java
JarPluginProviderLoader.extractDependentLibs
protected Collection<File> extractDependentLibs(final File cachedir) throws IOException { final Attributes attributes = getMainAttributes(); if (null == attributes) { debug("no manifest attributes"); return null; } final ArrayList<File> files = new ArrayList<File...
java
protected Collection<File> extractDependentLibs(final File cachedir) throws IOException { final Attributes attributes = getMainAttributes(); if (null == attributes) { debug("no manifest attributes"); return null; } final ArrayList<File> files = new ArrayList<File...
[ "protected", "Collection", "<", "File", ">", "extractDependentLibs", "(", "final", "File", "cachedir", ")", "throws", "IOException", "{", "final", "Attributes", "attributes", "=", "getMainAttributes", "(", ")", ";", "if", "(", "null", "==", "attributes", ")", ...
Extract the dependent libs and return the extracted jar files @return the collection of extracted files
[ "Extract", "the", "dependent", "libs", "and", "return", "the", "extracted", "jar", "files" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/JarPluginProviderLoader.java#L492-L519
15,987
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/JarPluginProviderLoader.java
JarPluginProviderLoader.isLoaderFor
public synchronized boolean isLoaderFor(final ProviderIdent ident) { final String[] strings = getClassnames(); for (final String classname : strings) { try { if (matchesProviderDeclaration(ident, loadClass(classname))) { return true; } ...
java
public synchronized boolean isLoaderFor(final ProviderIdent ident) { final String[] strings = getClassnames(); for (final String classname : strings) { try { if (matchesProviderDeclaration(ident, loadClass(classname))) { return true; } ...
[ "public", "synchronized", "boolean", "isLoaderFor", "(", "final", "ProviderIdent", "ident", ")", "{", "final", "String", "[", "]", "strings", "=", "getClassnames", "(", ")", ";", "for", "(", "final", "String", "classname", ":", "strings", ")", "{", "try", ...
Return true if the file has a class that provides the ident.
[ "Return", "true", "if", "the", "file", "has", "a", "class", "that", "provides", "the", "ident", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/JarPluginProviderLoader.java#L573-L585
15,988
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/JarPluginProviderLoader.java
JarPluginProviderLoader.close
@Override public void close() throws IOException { debug(String.format("close jar provider loader for: %s", pluginJar)); synchronized (this) { closed = true; } if (null != cachedJar) { cachedJar.close(); classCache.clear(); cachedJar = ...
java
@Override public void close() throws IOException { debug(String.format("close jar provider loader for: %s", pluginJar)); synchronized (this) { closed = true; } if (null != cachedJar) { cachedJar.close(); classCache.clear(); cachedJar = ...
[ "@", "Override", "public", "void", "close", "(", ")", "throws", "IOException", "{", "debug", "(", "String", ".", "format", "(", "\"close jar provider loader for: %s\"", ",", "pluginJar", ")", ")", ";", "synchronized", "(", "this", ")", "{", "closed", "=", "t...
Close class loaders and delete cached files @throws IOException
[ "Close", "class", "loaders", "and", "delete", "cached", "files" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/JarPluginProviderLoader.java#L624-L635
15,989
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/JarPluginProviderLoader.java
JarPluginProviderLoader.expire
public void expire() { synchronized (this) { expired = true; } int i = loadCount.get(); debug(String.format("expire jar provider loader for: %s (loadCount: %d)", pluginJar, i)); if (i <= 0) { try { close(); } catch (IOException ...
java
public void expire() { synchronized (this) { expired = true; } int i = loadCount.get(); debug(String.format("expire jar provider loader for: %s (loadCount: %d)", pluginJar, i)); if (i <= 0) { try { close(); } catch (IOException ...
[ "public", "void", "expire", "(", ")", "{", "synchronized", "(", "this", ")", "{", "expired", "=", "true", ";", "}", "int", "i", "=", "loadCount", ".", "get", "(", ")", ";", "debug", "(", "String", ".", "format", "(", "\"expire jar provider loader for: %s...
Expire the loader cache item
[ "Expire", "the", "loader", "cache", "item" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/JarPluginProviderLoader.java#L652-L665
15,990
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/JarPluginProviderLoader.java
JarPluginProviderLoader.isValidJarPlugin
public static boolean isValidJarPlugin(final File file) { try { try (final JarInputStream jarInputStream = new JarInputStream(new FileInputStream(file))) { final Manifest manifest = jarInputStream.getManifest(); if (null == manifest) { return false...
java
public static boolean isValidJarPlugin(final File file) { try { try (final JarInputStream jarInputStream = new JarInputStream(new FileInputStream(file))) { final Manifest manifest = jarInputStream.getManifest(); if (null == manifest) { return false...
[ "public", "static", "boolean", "isValidJarPlugin", "(", "final", "File", "file", ")", "{", "try", "{", "try", "(", "final", "JarInputStream", "jarInputStream", "=", "new", "JarInputStream", "(", "new", "FileInputStream", "(", "file", ")", ")", ")", "{", "fin...
Return true if the file is a valid jar plugin file
[ "Return", "true", "if", "the", "file", "is", "a", "valid", "jar", "plugin", "file" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/JarPluginProviderLoader.java#L707-L722
15,991
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/JarPluginProviderLoader.java
JarPluginProviderLoader.validateJarManifest
static void validateJarManifest(final Attributes mainAttributes) throws InvalidManifestException { final String value1 = mainAttributes.getValue(RUNDECK_PLUGIN_ARCHIVE); final String plugvers = mainAttributes.getValue(RUNDECK_PLUGIN_VERSION); final String plugclassnames = mainAttributes.getValu...
java
static void validateJarManifest(final Attributes mainAttributes) throws InvalidManifestException { final String value1 = mainAttributes.getValue(RUNDECK_PLUGIN_ARCHIVE); final String plugvers = mainAttributes.getValue(RUNDECK_PLUGIN_VERSION); final String plugclassnames = mainAttributes.getValu...
[ "static", "void", "validateJarManifest", "(", "final", "Attributes", "mainAttributes", ")", "throws", "InvalidManifestException", "{", "final", "String", "value1", "=", "mainAttributes", ".", "getValue", "(", "RUNDECK_PLUGIN_ARCHIVE", ")", ";", "final", "String", "plu...
Validate whether the jar file has a valid manifest, throw exception if invalid
[ "Validate", "whether", "the", "jar", "file", "has", "a", "valid", "manifest", "throw", "exception", "if", "invalid" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/JarPluginProviderLoader.java#L727-L761
15,992
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/JarPluginProviderLoader.java
JarPluginProviderLoader.getLoadLocalLibsFirstForFile
static boolean getLoadLocalLibsFirstForFile(final File file) { Attributes attributes = loadMainAttributes(file); if (null == attributes) { return false; } boolean loadFirstDefault=true; String loadFirst = attributes.getValue(RUNDECK_PLUGIN_LIBS_LOAD_FIRST); if...
java
static boolean getLoadLocalLibsFirstForFile(final File file) { Attributes attributes = loadMainAttributes(file); if (null == attributes) { return false; } boolean loadFirstDefault=true; String loadFirst = attributes.getValue(RUNDECK_PLUGIN_LIBS_LOAD_FIRST); if...
[ "static", "boolean", "getLoadLocalLibsFirstForFile", "(", "final", "File", "file", ")", "{", "Attributes", "attributes", "=", "loadMainAttributes", "(", "file", ")", ";", "if", "(", "null", "==", "attributes", ")", "{", "return", "false", ";", "}", "boolean", ...
Return true if the jar attributes declare it should load local dependency classes first. @param file plugin file @return true if plugin libs load first is set
[ "Return", "true", "if", "the", "jar", "attributes", "declare", "it", "should", "load", "local", "dependency", "classes", "first", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/JarPluginProviderLoader.java#L787-L798
15,993
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/common/ServiceSupport.java
ServiceSupport.initialize
public void initialize(Framework framework) { setFramework(framework); //plugin manager service inited first. any pluggable services will then be //able to try to load providers via the plugin manager NodeStepExecutionService.getInstanceForFramework(getFramework()); NodeExecutor...
java
public void initialize(Framework framework) { setFramework(framework); //plugin manager service inited first. any pluggable services will then be //able to try to load providers via the plugin manager NodeStepExecutionService.getInstanceForFramework(getFramework()); NodeExecutor...
[ "public", "void", "initialize", "(", "Framework", "framework", ")", "{", "setFramework", "(", "framework", ")", ";", "//plugin manager service inited first. any pluggable services will then be", "//able to try to load providers via the plugin manager", "NodeStepExecutionService", "....
Initialize children, the various resource management objects
[ "Initialize", "children", "the", "various", "resource", "management", "objects" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/common/ServiceSupport.java#L56-L70
15,994
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/common/ServiceSupport.java
ServiceSupport.setService
@Override public void setService(final String name, final FrameworkSupportService service){ synchronized (services){ if(null==services.get(name) && null!=service) { services.put(name, service); }else if(null==service) { services.remove(name); ...
java
@Override public void setService(final String name, final FrameworkSupportService service){ synchronized (services){ if(null==services.get(name) && null!=service) { services.put(name, service); }else if(null==service) { services.remove(name); ...
[ "@", "Override", "public", "void", "setService", "(", "final", "String", "name", ",", "final", "FrameworkSupportService", "service", ")", "{", "synchronized", "(", "services", ")", "{", "if", "(", "null", "==", "services", ".", "get", "(", "name", ")", "&&...
Set a service by name @param name name @param service service
[ "Set", "a", "service", "by", "name" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/common/ServiceSupport.java#L85-L94
15,995
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/execution/workflow/BaseWorkflowExecutor.java
BaseWorkflowExecutor.executeWFItem
protected StepExecutionResult executeWFItem( final StepExecutionContext executionContext, final Map<Integer, StepExecutionResult> failedMap, final int c, final StepExecutionItem cmd ) { boolean hasHandler= cmd instanceof HasFailureHandler; boolean ...
java
protected StepExecutionResult executeWFItem( final StepExecutionContext executionContext, final Map<Integer, StepExecutionResult> failedMap, final int c, final StepExecutionItem cmd ) { boolean hasHandler= cmd instanceof HasFailureHandler; boolean ...
[ "protected", "StepExecutionResult", "executeWFItem", "(", "final", "StepExecutionContext", "executionContext", ",", "final", "Map", "<", "Integer", ",", "StepExecutionResult", ">", "failedMap", ",", "final", "int", "c", ",", "final", "StepExecutionItem", "cmd", ")", ...
Execute a workflow item, returns true if the item succeeds. This method will throw an exception if the workflow item fails and the Workflow is has keepgoing==false. @param executionContext context @param failedMap List to add any messages if the item fails @param c index of the WF item @param cm...
[ "Execute", "a", "workflow", "item", "returns", "true", "if", "the", "item", "succeeds", ".", "This", "method", "will", "throw", "an", "exception", "if", "the", "workflow", "item", "fails", "and", "the", "Workflow", "is", "has", "keepgoing", "==", "false", ...
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/execution/workflow/BaseWorkflowExecutor.java#L259-L305
15,996
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/execution/workflow/BaseWorkflowExecutor.java
BaseWorkflowExecutor.executeWorkflowItemsForNodeSet
protected WorkflowStatusResult executeWorkflowItemsForNodeSet( final StepExecutionContext executionContext, final Map<Integer, StepExecutionResult> failedMap, final List<StepExecutionResult> resultList, final List<StepExecutionItem> iWorkflowCmdItems, final bo...
java
protected WorkflowStatusResult executeWorkflowItemsForNodeSet( final StepExecutionContext executionContext, final Map<Integer, StepExecutionResult> failedMap, final List<StepExecutionResult> resultList, final List<StepExecutionItem> iWorkflowCmdItems, final bo...
[ "protected", "WorkflowStatusResult", "executeWorkflowItemsForNodeSet", "(", "final", "StepExecutionContext", "executionContext", ",", "final", "Map", "<", "Integer", ",", "StepExecutionResult", ">", "failedMap", ",", "final", "List", "<", "StepExecutionResult", ">", "resu...
Execute the sequence of ExecutionItems within the context, and with the given keepgoing value @param executionContext context @param failedMap failures @param resultList results @param iWorkflowCmdItems list of steps @param keepgoing true to keepgoing on step failure @param beginStepIndex be...
[ "Execute", "the", "sequence", "of", "ExecutionItems", "within", "the", "context", "and", "with", "the", "given", "keepgoing", "value" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/execution/workflow/BaseWorkflowExecutor.java#L322-L372
15,997
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/execution/workflow/BaseWorkflowExecutor.java
BaseWorkflowExecutor.addStepFailureContextData
protected void addStepFailureContextData( StepExecutionResult stepResult, ExecutionContextImpl.Builder builder ) { HashMap<String, String> resultData = new HashMap<>(); if (null != stepResult.getFailureData()) { //convert values to string ...
java
protected void addStepFailureContextData( StepExecutionResult stepResult, ExecutionContextImpl.Builder builder ) { HashMap<String, String> resultData = new HashMap<>(); if (null != stepResult.getFailureData()) { //convert values to string ...
[ "protected", "void", "addStepFailureContextData", "(", "StepExecutionResult", "stepResult", ",", "ExecutionContextImpl", ".", "Builder", "builder", ")", "{", "HashMap", "<", "String", ",", "String", ">", "resultData", "=", "new", "HashMap", "<>", "(", ")", ";", ...
Add step result failure information to the data context @param stepResult result @return new context
[ "Add", "step", "result", "failure", "information", "to", "the", "data", "context" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/execution/workflow/BaseWorkflowExecutor.java#L381-L407
15,998
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/execution/workflow/BaseWorkflowExecutor.java
BaseWorkflowExecutor.addNodeStepFailureContextData
protected void addNodeStepFailureContextData( final StepExecutionResult dispatcherStepResult, final ExecutionContextImpl.Builder builder ) { final Map<String, ? extends NodeStepResult> resultMap; if (NodeDispatchStepExecutor.isWrappedDispatcherResult(dispatcherStepResult)...
java
protected void addNodeStepFailureContextData( final StepExecutionResult dispatcherStepResult, final ExecutionContextImpl.Builder builder ) { final Map<String, ? extends NodeStepResult> resultMap; if (NodeDispatchStepExecutor.isWrappedDispatcherResult(dispatcherStepResult)...
[ "protected", "void", "addNodeStepFailureContextData", "(", "final", "StepExecutionResult", "dispatcherStepResult", ",", "final", "ExecutionContextImpl", ".", "Builder", "builder", ")", "{", "final", "Map", "<", "String", ",", "?", "extends", "NodeStepResult", ">", "re...
Add any node-specific step failure information to the node-specific data contexts @param dispatcherStepResult result @param builder @return new context
[ "Add", "any", "node", "-", "specific", "step", "failure", "information", "to", "the", "node", "-", "specific", "data", "contexts" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/execution/workflow/BaseWorkflowExecutor.java#L417-L471
15,999
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/execution/workflow/BaseWorkflowExecutor.java
BaseWorkflowExecutor.convertFailures
protected Map<String, Collection<StepExecutionResult>> convertFailures( final Map<Integer, StepExecutionResult> failedMap ) { final Map<String, Collection<StepExecutionResult>> failures = new HashMap<>(); for (final Map.Entry<Integer, StepExecutionResult> entry : fai...
java
protected Map<String, Collection<StepExecutionResult>> convertFailures( final Map<Integer, StepExecutionResult> failedMap ) { final Map<String, Collection<StepExecutionResult>> failures = new HashMap<>(); for (final Map.Entry<Integer, StepExecutionResult> entry : fai...
[ "protected", "Map", "<", "String", ",", "Collection", "<", "StepExecutionResult", ">", ">", "convertFailures", "(", "final", "Map", "<", "Integer", ",", "StepExecutionResult", ">", "failedMap", ")", "{", "final", "Map", "<", "String", ",", "Collection", "<", ...
Convert map of step execution results keyed by step number, to a collection of step execution results keyed by node name @param failedMap failures @return converted
[ "Convert", "map", "of", "step", "execution", "results", "keyed", "by", "step", "number", "to", "a", "collection", "of", "step", "execution", "results", "keyed", "by", "node", "name" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/execution/workflow/BaseWorkflowExecutor.java#L498-L538