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,800
yidongnan/grpc-spring-boot-starter
grpc-client-spring-boot-autoconfigure/src/main/java/net/devh/boot/grpc/client/security/CallCredentialsHelper.java
CallCredentialsHelper.bearerAuth
public static CallCredentials bearerAuth(final String token) { final Metadata extraHeaders = new Metadata(); extraHeaders.put(AUTHORIZATION_HEADER, BEARER_AUTH_PREFIX + token); return new StaticSecurityHeaderCallCredentials(extraHeaders); }
java
public static CallCredentials bearerAuth(final String token) { final Metadata extraHeaders = new Metadata(); extraHeaders.put(AUTHORIZATION_HEADER, BEARER_AUTH_PREFIX + token); return new StaticSecurityHeaderCallCredentials(extraHeaders); }
[ "public", "static", "CallCredentials", "bearerAuth", "(", "final", "String", "token", ")", "{", "final", "Metadata", "extraHeaders", "=", "new", "Metadata", "(", ")", ";", "extraHeaders", ".", "put", "(", "AUTHORIZATION_HEADER", ",", "BEARER_AUTH_PREFIX", "+", "...
Creates a new call credential with the given token for bearer auth. <p> <b>Note:</b> This method uses experimental grpc-java-API features. </p> @param token the bearer token to use @return The newly created bearer auth credentials.
[ "Creates", "a", "new", "call", "credential", "with", "the", "given", "token", "for", "bearer", "auth", "." ]
07f8853cfafc9707584f2371aff012e590217b85
https://github.com/yidongnan/grpc-spring-boot-starter/blob/07f8853cfafc9707584f2371aff012e590217b85/grpc-client-spring-boot-autoconfigure/src/main/java/net/devh/boot/grpc/client/security/CallCredentialsHelper.java#L170-L174
15,801
yidongnan/grpc-spring-boot-starter
grpc-client-spring-boot-autoconfigure/src/main/java/net/devh/boot/grpc/client/security/CallCredentialsHelper.java
CallCredentialsHelper.basicAuth
public static CallCredentials basicAuth(final String username, final String password) { final Metadata extraHeaders = new Metadata(); extraHeaders.put(AUTHORIZATION_HEADER, encodeBasicAuth(username, password)); return new StaticSecurityHeaderCallCredentials(extraHeaders); }
java
public static CallCredentials basicAuth(final String username, final String password) { final Metadata extraHeaders = new Metadata(); extraHeaders.put(AUTHORIZATION_HEADER, encodeBasicAuth(username, password)); return new StaticSecurityHeaderCallCredentials(extraHeaders); }
[ "public", "static", "CallCredentials", "basicAuth", "(", "final", "String", "username", ",", "final", "String", "password", ")", "{", "final", "Metadata", "extraHeaders", "=", "new", "Metadata", "(", ")", ";", "extraHeaders", ".", "put", "(", "AUTHORIZATION_HEAD...
Creates a new call credential with the given username and password for basic auth. <p> <b>Note:</b> This method uses experimental grpc-java-API features. </p> @param username The username to use. @param password The password to use. @return The newly created basic auth credentials.
[ "Creates", "a", "new", "call", "credential", "with", "the", "given", "username", "and", "password", "for", "basic", "auth", "." ]
07f8853cfafc9707584f2371aff012e590217b85
https://github.com/yidongnan/grpc-spring-boot-starter/blob/07f8853cfafc9707584f2371aff012e590217b85/grpc-client-spring-boot-autoconfigure/src/main/java/net/devh/boot/grpc/client/security/CallCredentialsHelper.java#L187-L191
15,802
yidongnan/grpc-spring-boot-starter
examples/security-grpc-bearerAuth-server/src/main/java/net/devh/boot/grpc/examples/security/server/GrpcServerService.java
GrpcServerService.sayHello
@Override @Secured("ROLE_TEST") public void sayHello(final HelloRequest req, final StreamObserver<HelloReply> responseObserver) { final HelloReply reply = HelloReply.newBuilder().setMessage("Hello ==> " + req.getName()).build(); responseObserver.onNext(reply); responseObserver.onComplete...
java
@Override @Secured("ROLE_TEST") public void sayHello(final HelloRequest req, final StreamObserver<HelloReply> responseObserver) { final HelloReply reply = HelloReply.newBuilder().setMessage("Hello ==> " + req.getName()).build(); responseObserver.onNext(reply); responseObserver.onComplete...
[ "@", "Override", "@", "Secured", "(", "\"ROLE_TEST\"", ")", "public", "void", "sayHello", "(", "final", "HelloRequest", "req", ",", "final", "StreamObserver", "<", "HelloReply", ">", "responseObserver", ")", "{", "final", "HelloReply", "reply", "=", "HelloReply"...
A grpc method that requests the user to be authenticated and have the role "ROLE_GREET".
[ "A", "grpc", "method", "that", "requests", "the", "user", "to", "be", "authenticated", "and", "have", "the", "role", "ROLE_GREET", "." ]
07f8853cfafc9707584f2371aff012e590217b85
https://github.com/yidongnan/grpc-spring-boot-starter/blob/07f8853cfafc9707584f2371aff012e590217b85/examples/security-grpc-bearerAuth-server/src/main/java/net/devh/boot/grpc/examples/security/server/GrpcServerService.java#L37-L43
15,803
yidongnan/grpc-spring-boot-starter
grpc-client-spring-boot-autoconfigure/src/main/java/net/devh/boot/grpc/client/inject/GrpcClientBeanPostProcessor.java
GrpcClientBeanPostProcessor.processInjectionPoint
protected <T> T processInjectionPoint(final Member injectionTarget, final Class<T> injectionType, final GrpcClient annotation) { final List<ClientInterceptor> interceptors = interceptorsFromAnnotation(annotation); final String name = annotation.value(); final Channel channel; ...
java
protected <T> T processInjectionPoint(final Member injectionTarget, final Class<T> injectionType, final GrpcClient annotation) { final List<ClientInterceptor> interceptors = interceptorsFromAnnotation(annotation); final String name = annotation.value(); final Channel channel; ...
[ "protected", "<", "T", ">", "T", "processInjectionPoint", "(", "final", "Member", "injectionTarget", ",", "final", "Class", "<", "T", ">", "injectionType", ",", "final", "GrpcClient", "annotation", ")", "{", "final", "List", "<", "ClientInterceptor", ">", "int...
Processes the given injection point and computes the appropriate value for the injection. @param <T> The type of the value to be injected. @param injectionTarget The target of the injection. @param injectionType The class that will be used to compute injection. @param annotation The annotation on the target with the m...
[ "Processes", "the", "given", "injection", "point", "and", "computes", "the", "appropriate", "value", "for", "the", "injection", "." ]
07f8853cfafc9707584f2371aff012e590217b85
https://github.com/yidongnan/grpc-spring-boot-starter/blob/07f8853cfafc9707584f2371aff012e590217b85/grpc-client-spring-boot-autoconfigure/src/main/java/net/devh/boot/grpc/client/inject/GrpcClientBeanPostProcessor.java#L107-L127
15,804
yidongnan/grpc-spring-boot-starter
grpc-client-spring-boot-autoconfigure/src/main/java/net/devh/boot/grpc/client/inject/GrpcClientBeanPostProcessor.java
GrpcClientBeanPostProcessor.valueForMember
protected <T> T valueForMember(final String name, final Member injectionTarget, final Class<T> injectionType, final Channel channel) throws BeansException { if (Channel.class.equals(injectionType)) { return injectionType.cast(channel); } else if (AbstractStub.class.isAssignableFr...
java
protected <T> T valueForMember(final String name, final Member injectionTarget, final Class<T> injectionType, final Channel channel) throws BeansException { if (Channel.class.equals(injectionType)) { return injectionType.cast(channel); } else if (AbstractStub.class.isAssignableFr...
[ "protected", "<", "T", ">", "T", "valueForMember", "(", "final", "String", "name", ",", "final", "Member", "injectionTarget", ",", "final", "Class", "<", "T", ">", "injectionType", ",", "final", "Channel", "channel", ")", "throws", "BeansException", "{", "if...
Creates the instance to be injected for the given member. @param name The name that was used to create the channel. @param <T> The type of the instance to be injected. @param injectionTarget The target member for the injection. @param injectionType The class that should injected. @param channel The channel that should...
[ "Creates", "the", "instance", "to", "be", "injected", "for", "the", "given", "member", "." ]
07f8853cfafc9707584f2371aff012e590217b85
https://github.com/yidongnan/grpc-spring-boot-starter/blob/07f8853cfafc9707584f2371aff012e590217b85/grpc-client-spring-boot-autoconfigure/src/main/java/net/devh/boot/grpc/client/inject/GrpcClientBeanPostProcessor.java#L202-L227
15,805
yidongnan/grpc-spring-boot-starter
grpc-server-spring-boot-autoconfigure/src/main/java/net/devh/boot/grpc/server/security/check/AccessPredicateVoter.java
AccessPredicateVoter.find
private AccessPredicateConfigAttribute find(final Collection<ConfigAttribute> attributes) { for (final ConfigAttribute attribute : attributes) { if (attribute instanceof AccessPredicateConfigAttribute) { return (AccessPredicateConfigAttribute) attribute; } } ...
java
private AccessPredicateConfigAttribute find(final Collection<ConfigAttribute> attributes) { for (final ConfigAttribute attribute : attributes) { if (attribute instanceof AccessPredicateConfigAttribute) { return (AccessPredicateConfigAttribute) attribute; } } ...
[ "private", "AccessPredicateConfigAttribute", "find", "(", "final", "Collection", "<", "ConfigAttribute", ">", "attributes", ")", "{", "for", "(", "final", "ConfigAttribute", "attribute", ":", "attributes", ")", "{", "if", "(", "attribute", "instanceof", "AccessPredi...
Finds the first AccessPredicateConfigAttribute in the given collection. @param attributes The attributes to search in. @return The first found AccessPredicateConfigAttribute or null, if no such elements were found.
[ "Finds", "the", "first", "AccessPredicateConfigAttribute", "in", "the", "given", "collection", "." ]
07f8853cfafc9707584f2371aff012e590217b85
https://github.com/yidongnan/grpc-spring-boot-starter/blob/07f8853cfafc9707584f2371aff012e590217b85/grpc-server-spring-boot-autoconfigure/src/main/java/net/devh/boot/grpc/server/security/check/AccessPredicateVoter.java#L60-L67
15,806
yidongnan/grpc-spring-boot-starter
grpc-client-spring-boot-autoconfigure/src/main/java/net/devh/boot/grpc/client/nameresolver/DiscoveryClientResolverFactory.java
DiscoveryClientResolverFactory.heartbeat
@EventListener(HeartbeatEvent.class) public void heartbeat(final HeartbeatEvent event) { if (this.monitor.update(event.getValue())) { for (final DiscoveryClientNameResolver discoveryClientNameResolver : this.discoveryClientNameResolvers) { discoveryClientNameResolver.refresh(); ...
java
@EventListener(HeartbeatEvent.class) public void heartbeat(final HeartbeatEvent event) { if (this.monitor.update(event.getValue())) { for (final DiscoveryClientNameResolver discoveryClientNameResolver : this.discoveryClientNameResolvers) { discoveryClientNameResolver.refresh(); ...
[ "@", "EventListener", "(", "HeartbeatEvent", ".", "class", ")", "public", "void", "heartbeat", "(", "final", "HeartbeatEvent", "event", ")", "{", "if", "(", "this", ".", "monitor", ".", "update", "(", "event", ".", "getValue", "(", ")", ")", ")", "{", ...
Triggers a refresh of the registered name resolvers. @param event The event that triggered the update.
[ "Triggers", "a", "refresh", "of", "the", "registered", "name", "resolvers", "." ]
07f8853cfafc9707584f2371aff012e590217b85
https://github.com/yidongnan/grpc-spring-boot-starter/blob/07f8853cfafc9707584f2371aff012e590217b85/grpc-client-spring-boot-autoconfigure/src/main/java/net/devh/boot/grpc/client/nameresolver/DiscoveryClientResolverFactory.java#L100-L107
15,807
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/configuration/PropertyResolverFactory.java
PropertyResolverFactory.mapPropertyValues
public static Map<String, Object> mapPropertyValues(final List<Property> list, final PropertyResolver resolver) { final Map<String, Object> inputConfig = new HashMap<String, Object>(); for (final Property property : list) { final Object value = resolver.resolvePropertyValue(property.getName(...
java
public static Map<String, Object> mapPropertyValues(final List<Property> list, final PropertyResolver resolver) { final Map<String, Object> inputConfig = new HashMap<String, Object>(); for (final Property property : list) { final Object value = resolver.resolvePropertyValue(property.getName(...
[ "public", "static", "Map", "<", "String", ",", "Object", ">", "mapPropertyValues", "(", "final", "List", "<", "Property", ">", "list", ",", "final", "PropertyResolver", "resolver", ")", "{", "final", "Map", "<", "String", ",", "Object", ">", "inputConfig", ...
Return All property values for the input property set mapped by name to value. @param list property list @param resolver property resolver @return All mapped properties by name and value.
[ "Return", "All", "property", "values", "for", "the", "input", "property", "set", "mapped", "by", "name", "to", "value", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/configuration/PropertyResolverFactory.java#L70-L80
15,808
rundeck/rundeck
rundeckapp/src/main/groovy/com/dtolabs/rundeck/execution/ExecutionItemFactory.java
ExecutionItemFactory.createPluginNodeStepItem
public static StepExecutionItem createPluginNodeStepItem( final String type, final Map configuration, final boolean keepgoingOnSuccess, final StepExecutionItem handler, final String label, final List<PluginConfiguration> filterConfigurations ) ...
java
public static StepExecutionItem createPluginNodeStepItem( final String type, final Map configuration, final boolean keepgoingOnSuccess, final StepExecutionItem handler, final String label, final List<PluginConfiguration> filterConfigurations ) ...
[ "public", "static", "StepExecutionItem", "createPluginNodeStepItem", "(", "final", "String", "type", ",", "final", "Map", "configuration", ",", "final", "boolean", "keepgoingOnSuccess", ",", "final", "StepExecutionItem", "handler", ",", "final", "String", "label", ","...
Create a workflow execution item for a plugin node step.
[ "Create", "a", "workflow", "execution", "item", "for", "a", "plugin", "node", "step", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/rundeckapp/src/main/groovy/com/dtolabs/rundeck/execution/ExecutionItemFactory.java#L323-L341
15,809
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/VersionCompare.java
VersionCompare.comp
public static int comp(Integer v1, String s1, Integer v2, String s2) { if (v1 != null && v2 != null) { return v1.compareTo(v2); }else if(v1!=null){ return 1; }else if(v2!=null){ return -1; } else if (null == s1 && null == s2) { return 0; ...
java
public static int comp(Integer v1, String s1, Integer v2, String s2) { if (v1 != null && v2 != null) { return v1.compareTo(v2); }else if(v1!=null){ return 1; }else if(v2!=null){ return -1; } else if (null == s1 && null == s2) { return 0; ...
[ "public", "static", "int", "comp", "(", "Integer", "v1", ",", "String", "s1", ",", "Integer", "v2", ",", "String", "s2", ")", "{", "if", "(", "v1", "!=", "null", "&&", "v2", "!=", "null", ")", "{", "return", "v1", ".", "compareTo", "(", "v2", ")"...
Compares two version strings and their parsed integer values if available. Returns -1,0 or 1, if value 1 is less than, equal to, or greater than value 2, respectively. Compares integers if both are available, otherwise compares non-integer as less than integer. if no integers are available, comparse strings, and treat...
[ "Compares", "two", "version", "strings", "and", "their", "parsed", "integer", "values", "if", "available", ".", "Returns", "-", "1", "0", "or", "1", "if", "value", "1", "is", "less", "than", "equal", "to", "or", "greater", "than", "value", "2", "respecti...
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/VersionCompare.java#L48-L65
15,810
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/VersionCompare.java
VersionCompare.forString
public static VersionCompare forString(final String value) { VersionCompare vers = new VersionCompare(); if (null == value || "".equals(value)) { return vers; } String[] parr1 = value.split("-", 2); String[] v1arr = parr1[0].split("\\.", 3); if (v1arr.length...
java
public static VersionCompare forString(final String value) { VersionCompare vers = new VersionCompare(); if (null == value || "".equals(value)) { return vers; } String[] parr1 = value.split("-", 2); String[] v1arr = parr1[0].split("\\.", 3); if (v1arr.length...
[ "public", "static", "VersionCompare", "forString", "(", "final", "String", "value", ")", "{", "VersionCompare", "vers", "=", "new", "VersionCompare", "(", ")", ";", "if", "(", "null", "==", "value", "||", "\"\"", ".", "equals", "(", "value", ")", ")", "{...
Return a VersionCompare for the string
[ "Return", "a", "VersionCompare", "for", "the", "string" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/VersionCompare.java#L103-L137
15,811
rundeck/rundeck
rundeckapp/src/main/groovy/com/dtolabs/rundeck/jetty/jaas/JNDILoginModule.java
JNDILoginModule.getUserInfo
public UserInfo getUserInfo(String username) throws Exception { DirContext dir = context(); ArrayList roleList = new ArrayList(getUserRoles(username)); String credentials = getUserCredentials(username); return new UserInfo(username, Credential.getCredential(credentials), roleList); ...
java
public UserInfo getUserInfo(String username) throws Exception { DirContext dir = context(); ArrayList roleList = new ArrayList(getUserRoles(username)); String credentials = getUserCredentials(username); return new UserInfo(username, Credential.getCredential(credentials), roleList); ...
[ "public", "UserInfo", "getUserInfo", "(", "String", "username", ")", "throws", "Exception", "{", "DirContext", "dir", "=", "context", "(", ")", ";", "ArrayList", "roleList", "=", "new", "ArrayList", "(", "getUserRoles", "(", "username", ")", ")", ";", "Strin...
Get the UserInfo for a specified username @param username username @return the UserInfo @throws Exception
[ "Get", "the", "UserInfo", "for", "a", "specified", "username" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/rundeckapp/src/main/groovy/com/dtolabs/rundeck/jetty/jaas/JNDILoginModule.java#L64-L70
15,812
rundeck/rundeck
rundeckapp/src/main/groovy/com/dtolabs/rundeck/jetty/jaas/JNDILoginModule.java
JNDILoginModule.initialize
public void initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options) { super.initialize(subject, callbackHandler, sharedState, options); Properties props = loadProperties((String) options.get("file")); initWithProps(props); }
java
public void initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options) { super.initialize(subject, callbackHandler, sharedState, options); Properties props = loadProperties((String) options.get("file")); initWithProps(props); }
[ "public", "void", "initialize", "(", "Subject", "subject", ",", "CallbackHandler", "callbackHandler", ",", "Map", "sharedState", ",", "Map", "options", ")", "{", "super", ".", "initialize", "(", "subject", ",", "callbackHandler", ",", "sharedState", ",", "option...
Read contents of the configured property file. @param subject @param callbackHandler @param sharedState @param options @see javax.security.auth.spi.LoginModule#initialize(javax.security.auth.Subject, javax.security.auth.callback.CallbackHandler, java.util.Map, java.util.Map)
[ "Read", "contents", "of", "the", "configured", "property", "file", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/rundeckapp/src/main/groovy/com/dtolabs/rundeck/jetty/jaas/JNDILoginModule.java#L121-L126
15,813
rundeck/rundeck
rundeckapp/src/main/groovy/com/dtolabs/rundeck/jetty/jaas/JNDILoginModule.java
JNDILoginModule.getUserRoles
private Collection getUserRoles(String userName) throws NamingException { log.debug("Obtaining roles for userName: " + userName); // filter expression: all roles with uniqueMember matching user DN // (uniqueMember=cn=userName,dc=company,dc=com) String filter = "(" + roleMemberRDN + "=" ...
java
private Collection getUserRoles(String userName) throws NamingException { log.debug("Obtaining roles for userName: " + userName); // filter expression: all roles with uniqueMember matching user DN // (uniqueMember=cn=userName,dc=company,dc=com) String filter = "(" + roleMemberRDN + "=" ...
[ "private", "Collection", "getUserRoles", "(", "String", "userName", ")", "throws", "NamingException", "{", "log", ".", "debug", "(", "\"Obtaining roles for userName: \"", "+", "userName", ")", ";", "// filter expression: all roles with uniqueMember matching user DN", "// (uni...
Get the collection of role names for the user @param userName name of the user @return Collection of String @throws javax.naming.NamingException
[ "Get", "the", "collection", "of", "role", "names", "for", "the", "user" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/rundeckapp/src/main/groovy/com/dtolabs/rundeck/jetty/jaas/JNDILoginModule.java#L285-L312
15,814
rundeck/rundeck
rundeckapp/src/main/groovy/com/dtolabs/rundeck/jetty/jaas/JNDILoginModule.java
JNDILoginModule.getUsers
private Map getUsers() throws NamingException { String filter = "(" + roleNameRDN + "=*)"; HashMap users = new HashMap(); NamingEnumeration results = this.search(roleBase, filter, new String[]{roleMemberRDN}); while (results != null && results.hasMore()) { SearchResult ro...
java
private Map getUsers() throws NamingException { String filter = "(" + roleNameRDN + "=*)"; HashMap users = new HashMap(); NamingEnumeration results = this.search(roleBase, filter, new String[]{roleMemberRDN}); while (results != null && results.hasMore()) { SearchResult ro...
[ "private", "Map", "getUsers", "(", ")", "throws", "NamingException", "{", "String", "filter", "=", "\"(\"", "+", "roleNameRDN", "+", "\"=*)\"", ";", "HashMap", "users", "=", "new", "HashMap", "(", ")", ";", "NamingEnumeration", "results", "=", "this", ".", ...
Return a Map of usernames to role sets. @return Mapping of usernames (String) to set of roles (Set of String) @throws javax.naming.NamingException
[ "Return", "a", "Map", "of", "usernames", "to", "role", "sets", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/rundeckapp/src/main/groovy/com/dtolabs/rundeck/jetty/jaas/JNDILoginModule.java#L338-L384
15,815
rundeck/rundeck
rundeckapp/src/main/groovy/com/dtolabs/rundeck/jetty/jaas/JNDILoginModule.java
JNDILoginModule.search
private NamingEnumeration search(String base, String filter, String[] returnAttrs) throws NamingException { SearchControls constraints = new SearchControls(); constraints.setSearchScope(SearchControls.SUBTREE_SCOPE); constraints.setReturningAttribute...
java
private NamingEnumeration search(String base, String filter, String[] returnAttrs) throws NamingException { SearchControls constraints = new SearchControls(); constraints.setSearchScope(SearchControls.SUBTREE_SCOPE); constraints.setReturningAttribute...
[ "private", "NamingEnumeration", "search", "(", "String", "base", ",", "String", "filter", ",", "String", "[", "]", "returnAttrs", ")", "throws", "NamingException", "{", "SearchControls", "constraints", "=", "new", "SearchControls", "(", ")", ";", "constraints", ...
search using search base, filter, and declared return attributes
[ "search", "using", "search", "base", "filter", "and", "declared", "return", "attributes" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/rundeckapp/src/main/groovy/com/dtolabs/rundeck/jetty/jaas/JNDILoginModule.java#L388-L401
15,816
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/utils/PartialLineBuffer.java
PartialLineBuffer.read
public int read(final Reader reader) throws IOException { final int c = reader.read(cbuf); if (c > 0) { addData(cbuf, 0, c); } return c; }
java
public int read(final Reader reader) throws IOException { final int c = reader.read(cbuf); if (c > 0) { addData(cbuf, 0, c); } return c; }
[ "public", "int", "read", "(", "final", "Reader", "reader", ")", "throws", "IOException", "{", "final", "int", "c", "=", "reader", ".", "read", "(", "cbuf", ")", ";", "if", "(", "c", ">", "0", ")", "{", "addData", "(", "cbuf", ",", "0", ",", "c", ...
Read some chars from a reader, and return the number of characters read @param reader input reader @return characters read @throws IOException if thrown by underlying read action
[ "Read", "some", "chars", "from", "a", "reader", "and", "return", "the", "number", "of", "characters", "read" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/utils/PartialLineBuffer.java#L91-L97
15,817
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/utils/PartialLineBuffer.java
PartialLineBuffer.addData
public void addData(final char[] data, final int off, final int size) { if(size<1){ return; } final String str = new String(data, off, size); if (str.contains("\n")) { final String[] lines = str.split("\\r?\\n", -1); for (int i = 0 ; i < lines.length -...
java
public void addData(final char[] data, final int off, final int size) { if(size<1){ return; } final String str = new String(data, off, size); if (str.contains("\n")) { final String[] lines = str.split("\\r?\\n", -1); for (int i = 0 ; i < lines.length -...
[ "public", "void", "addData", "(", "final", "char", "[", "]", "data", ",", "final", "int", "off", ",", "final", "int", "size", ")", "{", "if", "(", "size", "<", "1", ")", "{", "return", ";", "}", "final", "String", "str", "=", "new", "String", "("...
Add character data to the buffer @param data data @param off offset @param size length
[ "Add", "character", "data", "to", "the", "buffer" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/utils/PartialLineBuffer.java#L105-L148
15,818
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/ScriptPluginProviderLoader.java
ScriptPluginProviderLoader.load
public synchronized <T> T load(final PluggableService<T> service, final String providerName) throws ProviderLoaderException { if (!(service instanceof ScriptPluginProviderLoadable)) { return null; } ScriptPluginProviderLoadable<T> loader =(ScriptPluginProviderLoadable<T>) ser...
java
public synchronized <T> T load(final PluggableService<T> service, final String providerName) throws ProviderLoaderException { if (!(service instanceof ScriptPluginProviderLoadable)) { return null; } ScriptPluginProviderLoadable<T> loader =(ScriptPluginProviderLoadable<T>) ser...
[ "public", "synchronized", "<", "T", ">", "T", "load", "(", "final", "PluggableService", "<", "T", ">", "service", ",", "final", "String", "providerName", ")", "throws", "ProviderLoaderException", "{", "if", "(", "!", "(", "service", "instanceof", "ScriptPlugin...
Load a provider instance for the service by name
[ "Load", "a", "provider", "instance", "for", "the", "service", "by", "name" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/ScriptPluginProviderLoader.java#L145-L196
15,819
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/ScriptPluginProviderLoader.java
ScriptPluginProviderLoader.getPluginMeta
private PluginMeta getPluginMeta() throws IOException { if (null != metadata) { return metadata; } metadata = loadMeta(file); metadata.setId(PluginUtils.generateShaIdFromName(metadata.getName())); dateLoaded = new Date(); return metadata; }
java
private PluginMeta getPluginMeta() throws IOException { if (null != metadata) { return metadata; } metadata = loadMeta(file); metadata.setId(PluginUtils.generateShaIdFromName(metadata.getName())); dateLoaded = new Date(); return metadata; }
[ "private", "PluginMeta", "getPluginMeta", "(", ")", "throws", "IOException", "{", "if", "(", "null", "!=", "metadata", ")", "{", "return", "metadata", ";", "}", "metadata", "=", "loadMeta", "(", "file", ")", ";", "metadata", ".", "setId", "(", "PluginUtils...
Get the plugin metadata, loading from the file if necessary @return loaded metadata or null if not found @throws IOException if an error occurs trying to load from the file
[ "Get", "the", "plugin", "metadata", "loading", "from", "the", "file", "if", "necessary" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/ScriptPluginProviderLoader.java#L218-L226
15,820
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/ScriptPluginProviderLoader.java
ScriptPluginProviderLoader.getPlugin
private ScriptPluginProvider getPlugin( final PluginMeta pluginMeta, final File file, final ProviderDef pluginDef, final ProviderIdent ident ) throws ProviderLoaderException, PluginException { if (null == fileExpandedDir) { final Fi...
java
private ScriptPluginProvider getPlugin( final PluginMeta pluginMeta, final File file, final ProviderDef pluginDef, final ProviderIdent ident ) throws ProviderLoaderException, PluginException { if (null == fileExpandedDir) { final Fi...
[ "private", "ScriptPluginProvider", "getPlugin", "(", "final", "PluginMeta", "pluginMeta", ",", "final", "File", "file", ",", "final", "ProviderDef", "pluginDef", ",", "final", "ProviderIdent", "ident", ")", "throws", "ProviderLoaderException", ",", "PluginException", ...
Get the ScriptPluginProvider definition from the file for the given provider def and ident
[ "Get", "the", "ScriptPluginProvider", "definition", "from", "the", "file", "for", "the", "given", "provider", "def", "and", "ident" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/ScriptPluginProviderLoader.java#L231-L268
15,821
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/ScriptPluginProviderLoader.java
ScriptPluginProviderLoader.matchesProvider
private boolean matchesProvider(final ProviderIdent ident, final ProviderDef pluginDef) { return ident.getService().equals(pluginDef.getService()) && ident.getProviderName().equals(pluginDef.getName()); }
java
private boolean matchesProvider(final ProviderIdent ident, final ProviderDef pluginDef) { return ident.getService().equals(pluginDef.getService()) && ident.getProviderName().equals(pluginDef.getName()); }
[ "private", "boolean", "matchesProvider", "(", "final", "ProviderIdent", "ident", ",", "final", "ProviderDef", "pluginDef", ")", "{", "return", "ident", ".", "getService", "(", ")", ".", "equals", "(", "pluginDef", ".", "getService", "(", ")", ")", "&&", "ide...
Return true if the ident matches the provider def metadata
[ "Return", "true", "if", "the", "ident", "matches", "the", "provider", "def", "metadata" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/ScriptPluginProviderLoader.java#L273-L275
15,822
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/ScriptPluginProviderLoader.java
ScriptPluginProviderLoader.isLoaderFor
public synchronized boolean isLoaderFor(final ProviderIdent ident) { final PluginMeta pluginMeta; try { pluginMeta = getPluginMeta(); } catch (IOException e) { log.warn("Unable to load file meta: " + e.getMessage()); return false; } if (null =...
java
public synchronized boolean isLoaderFor(final ProviderIdent ident) { final PluginMeta pluginMeta; try { pluginMeta = getPluginMeta(); } catch (IOException e) { log.warn("Unable to load file meta: " + e.getMessage()); return false; } if (null =...
[ "public", "synchronized", "boolean", "isLoaderFor", "(", "final", "ProviderIdent", "ident", ")", "{", "final", "PluginMeta", "pluginMeta", ";", "try", "{", "pluginMeta", "=", "getPluginMeta", "(", ")", ";", "}", "catch", "(", "IOException", "e", ")", "{", "l...
Return true if the plugin file can loade a provider for the ident
[ "Return", "true", "if", "the", "plugin", "file", "can", "loade", "a", "provider", "for", "the", "ident" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/ScriptPluginProviderLoader.java#L280-L298
15,823
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/ScriptPluginProviderLoader.java
ScriptPluginProviderLoader.loadMeta
static PluginMeta loadMeta(final File jar) throws IOException { FileInputStream fileInputStream = new FileInputStream(jar); try{ final ZipInputStream zipinput = new ZipInputStream(fileInputStream); final PluginMeta metadata = ScriptPluginProviderLoader.loadMeta(jar, zipinput); ...
java
static PluginMeta loadMeta(final File jar) throws IOException { FileInputStream fileInputStream = new FileInputStream(jar); try{ final ZipInputStream zipinput = new ZipInputStream(fileInputStream); final PluginMeta metadata = ScriptPluginProviderLoader.loadMeta(jar, zipinput); ...
[ "static", "PluginMeta", "loadMeta", "(", "final", "File", "jar", ")", "throws", "IOException", "{", "FileInputStream", "fileInputStream", "=", "new", "FileInputStream", "(", "jar", ")", ";", "try", "{", "final", "ZipInputStream", "zipinput", "=", "new", "ZipInpu...
Get plugin metadatat from a zip file
[ "Get", "plugin", "metadatat", "from", "a", "zip", "file" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/ScriptPluginProviderLoader.java#L321-L330
15,824
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/ScriptPluginProviderLoader.java
ScriptPluginProviderLoader.loadMeta
static PluginMeta loadMeta(final File jar, final ZipInputStream zipinput) throws IOException { final String basename = basename(jar); PluginMeta metadata = null; boolean topfound = false; boolean found = false; boolean dirfound = false; boolean resfound = false; Z...
java
static PluginMeta loadMeta(final File jar, final ZipInputStream zipinput) throws IOException { final String basename = basename(jar); PluginMeta metadata = null; boolean topfound = false; boolean found = false; boolean dirfound = false; boolean resfound = false; Z...
[ "static", "PluginMeta", "loadMeta", "(", "final", "File", "jar", ",", "final", "ZipInputStream", "zipinput", ")", "throws", "IOException", "{", "final", "String", "basename", "=", "basename", "(", "jar", ")", ";", "PluginMeta", "metadata", "=", "null", ";", ...
Load plugin metadata for a file and zip inputstream @param jar the file @param zipinput zip input stream @return loaded metadata, or null if it is invalid or not found
[ "Load", "plugin", "metadata", "for", "a", "file", "and", "zip", "inputstream" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/ScriptPluginProviderLoader.java#L338-L394
15,825
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/ScriptPluginProviderLoader.java
ScriptPluginProviderLoader.loadMetadataYaml
static PluginMeta loadMetadataYaml(final InputStream stream) { final Yaml yaml = new Yaml(); return yaml.loadAs(stream, PluginMeta.class); }
java
static PluginMeta loadMetadataYaml(final InputStream stream) { final Yaml yaml = new Yaml(); return yaml.loadAs(stream, PluginMeta.class); }
[ "static", "PluginMeta", "loadMetadataYaml", "(", "final", "InputStream", "stream", ")", "{", "final", "Yaml", "yaml", "=", "new", "Yaml", "(", ")", ";", "return", "yaml", ".", "loadAs", "(", "stream", ",", "PluginMeta", ".", "class", ")", ";", "}" ]
return loaded yaml plugin metadata from the stream
[ "return", "loaded", "yaml", "plugin", "metadata", "from", "the", "stream" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/ScriptPluginProviderLoader.java#L399-L403
15,826
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/ScriptPluginProviderLoader.java
ScriptPluginProviderLoader.validatePluginMeta
static PluginValidation validatePluginMeta(final PluginMeta pluginList, final File file) { PluginValidation.State state = PluginValidation.State.VALID; if (pluginList == null) { return PluginValidation.builder() .message("No metadata") ...
java
static PluginValidation validatePluginMeta(final PluginMeta pluginList, final File file) { PluginValidation.State state = PluginValidation.State.VALID; if (pluginList == null) { return PluginValidation.builder() .message("No metadata") ...
[ "static", "PluginValidation", "validatePluginMeta", "(", "final", "PluginMeta", "pluginList", ",", "final", "File", "file", ")", "{", "PluginValidation", ".", "State", "state", "=", "PluginValidation", ".", "State", ".", "VALID", ";", "if", "(", "pluginList", "=...
Return true if loaded metadata about the plugin file is valid.
[ "Return", "true", "if", "loaded", "metadata", "about", "the", "plugin", "file", "is", "valid", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/ScriptPluginProviderLoader.java#L408-L465
15,827
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/ScriptPluginProviderLoader.java
ScriptPluginProviderLoader.expandScriptPlugin
private File expandScriptPlugin(final File file) throws IOException { if (!cachedir.exists()) { if (!cachedir.mkdirs()) { log.warn("Unable to create cache dir: " + cachedir.getAbsolutePath()); } } final File jardir = getFileCacheDir(); if (!jardir....
java
private File expandScriptPlugin(final File file) throws IOException { if (!cachedir.exists()) { if (!cachedir.mkdirs()) { log.warn("Unable to create cache dir: " + cachedir.getAbsolutePath()); } } final File jardir = getFileCacheDir(); if (!jardir....
[ "private", "File", "expandScriptPlugin", "(", "final", "File", "file", ")", "throws", "IOException", "{", "if", "(", "!", "cachedir", ".", "exists", "(", ")", ")", "{", "if", "(", "!", "cachedir", ".", "mkdirs", "(", ")", ")", "{", "log", ".", "warn"...
Expand zip file into plugin cache dir @param file zip file @return cache dir for the contents of the plugin zip
[ "Expand", "zip", "file", "into", "plugin", "cache", "dir" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/ScriptPluginProviderLoader.java#L474-L492
15,828
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/ScriptPluginProviderLoader.java
ScriptPluginProviderLoader.removeScriptPluginCache
private synchronized boolean removeScriptPluginCache() { if (null != fileExpandedDir && fileExpandedDir.exists()) { debug("removeScriptPluginCache: " + fileExpandedDir); return FileUtils.deleteDir(fileExpandedDir); } return true; }
java
private synchronized boolean removeScriptPluginCache() { if (null != fileExpandedDir && fileExpandedDir.exists()) { debug("removeScriptPluginCache: " + fileExpandedDir); return FileUtils.deleteDir(fileExpandedDir); } return true; }
[ "private", "synchronized", "boolean", "removeScriptPluginCache", "(", ")", "{", "if", "(", "null", "!=", "fileExpandedDir", "&&", "fileExpandedDir", ".", "exists", "(", ")", ")", "{", "debug", "(", "\"removeScriptPluginCache: \"", "+", "fileExpandedDir", ")", ";",...
Remove any cache dir for the file
[ "Remove", "any", "cache", "dir", "for", "the", "file" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/ScriptPluginProviderLoader.java#L497-L503
15,829
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/ScriptPluginProviderLoader.java
ScriptPluginProviderLoader.basename
private static String basename(final File file) { final String name = file.getName(); if(name.contains(".")) { return name.substring(0, name.lastIndexOf(".")); } return name; }
java
private static String basename(final File file) { final String name = file.getName(); if(name.contains(".")) { return name.substring(0, name.lastIndexOf(".")); } return name; }
[ "private", "static", "String", "basename", "(", "final", "File", "file", ")", "{", "final", "String", "name", "=", "file", ".", "getName", "(", ")", ";", "if", "(", "name", ".", "contains", "(", "\".\"", ")", ")", "{", "return", "name", ".", "substri...
Get basename of a file
[ "Get", "basename", "of", "a", "file" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/ScriptPluginProviderLoader.java#L515-L521
15,830
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/ScriptPluginProviderLoader.java
ScriptPluginProviderLoader.validateProviderDef
private static void validateProviderDef(final ProviderDef pluginDef) throws PluginException { if (null == pluginDef.getPluginType() || "".equals(pluginDef.getPluginType())) { throw new PluginException("Script plugin missing plugin-type"); } if ("script".equals(pluginDef.getPluginTyp...
java
private static void validateProviderDef(final ProviderDef pluginDef) throws PluginException { if (null == pluginDef.getPluginType() || "".equals(pluginDef.getPluginType())) { throw new PluginException("Script plugin missing plugin-type"); } if ("script".equals(pluginDef.getPluginTyp...
[ "private", "static", "void", "validateProviderDef", "(", "final", "ProviderDef", "pluginDef", ")", "throws", "PluginException", "{", "if", "(", "null", "==", "pluginDef", ".", "getPluginType", "(", ")", "||", "\"\"", ".", "equals", "(", "pluginDef", ".", "getP...
Validate provider def
[ "Validate", "provider", "def" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/ScriptPluginProviderLoader.java#L534-L546
15,831
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/ScriptPluginProviderLoader.java
ScriptPluginProviderLoader.getVersionForFile
static String getVersionForFile(final File file) { try { final PluginMeta pluginMeta = loadMeta(file); return pluginMeta.getVersion(); } catch (IOException e) { e.printStackTrace(); } return null; }
java
static String getVersionForFile(final File file) { try { final PluginMeta pluginMeta = loadMeta(file); return pluginMeta.getVersion(); } catch (IOException e) { e.printStackTrace(); } return null; }
[ "static", "String", "getVersionForFile", "(", "final", "File", "file", ")", "{", "try", "{", "final", "PluginMeta", "pluginMeta", "=", "loadMeta", "(", "file", ")", ";", "return", "pluginMeta", ".", "getVersion", "(", ")", ";", "}", "catch", "(", "IOExcept...
Return the version string metadata value for the plugin file, or null if it is not available or could not loaded @param file file @return version string
[ "Return", "the", "version", "string", "metadata", "value", "for", "the", "plugin", "file", "or", "null", "if", "it", "is", "not", "available", "or", "could", "not", "loaded" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/ScriptPluginProviderLoader.java#L641-L649
15,832
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/utils/ExecToolCommandLogger.java
ExecToolCommandLogger.expandMessage
private String expandMessage(final BuildEvent event, final String message) { final HashMap<String,String> data=new HashMap<String, String>(); final String user = retrieveUserName(event); if(null!=user){ data.put("user", user); } final String node = retrieveNodeName(e...
java
private String expandMessage(final BuildEvent event, final String message) { final HashMap<String,String> data=new HashMap<String, String>(); final String user = retrieveUserName(event); if(null!=user){ data.put("user", user); } final String node = retrieveNodeName(e...
[ "private", "String", "expandMessage", "(", "final", "BuildEvent", "event", ",", "final", "String", "message", ")", "{", "final", "HashMap", "<", "String", ",", "String", ">", "data", "=", "new", "HashMap", "<", "String", ",", "String", ">", "(", ")", ";"...
Process string specified by the framework.log.dispatch.console.format property replacing any well known tokens with values from the event. @param event The BuildEvent @param message The concatenated message @return message string with tokens replaced by values.
[ "Process", "string", "specified", "by", "the", "framework", ".", "log", ".", "dispatch", ".", "console", ".", "format", "property", "replacing", "any", "well", "known", "tokens", "with", "values", "from", "the", "event", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/utils/ExecToolCommandLogger.java#L76-L94
15,833
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/utils/ExecToolCommandLogger.java
ExecToolCommandLogger.logLevelToString
public static String logLevelToString(final int level) { String logLevel; switch (level) { case Project.MSG_DEBUG: logLevel = "DEBUG"; break; case Project.MSG_VERBOSE: logLevel = "VERBOSE"; break; case Pr...
java
public static String logLevelToString(final int level) { String logLevel; switch (level) { case Project.MSG_DEBUG: logLevel = "DEBUG"; break; case Project.MSG_VERBOSE: logLevel = "VERBOSE"; break; case Pr...
[ "public", "static", "String", "logLevelToString", "(", "final", "int", "level", ")", "{", "String", "logLevel", ";", "switch", "(", "level", ")", "{", "case", "Project", ".", "MSG_DEBUG", ":", "logLevel", "=", "\"DEBUG\"", ";", "break", ";", "case", "Proje...
Returns a string representing the specified log level @param level Log level @return log level name in string form
[ "Returns", "a", "string", "representing", "the", "specified", "log", "level" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/utils/ExecToolCommandLogger.java#L138-L162
15,834
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/configuration/PluginAdapterUtility.java
PluginAdapterUtility.buildFieldProperties
public static void buildFieldProperties(final Class<?> aClass, final DescriptionBuilder builder) { for (final Field field : collectClassFields(aClass)) { final PluginProperty annotation = field.getAnnotation(PluginProperty.class); if (null == annotation) { continue; ...
java
public static void buildFieldProperties(final Class<?> aClass, final DescriptionBuilder builder) { for (final Field field : collectClassFields(aClass)) { final PluginProperty annotation = field.getAnnotation(PluginProperty.class); if (null == annotation) { continue; ...
[ "public", "static", "void", "buildFieldProperties", "(", "final", "Class", "<", "?", ">", "aClass", ",", "final", "DescriptionBuilder", "builder", ")", "{", "for", "(", "final", "Field", "field", ":", "collectClassFields", "(", "aClass", ")", ")", "{", "fina...
Add properties based on introspection of a class @param aClass class @param builder builder
[ "Add", "properties", "based", "on", "introspection", "of", "a", "class" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/configuration/PluginAdapterUtility.java#L151-L163
15,835
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/configuration/PluginAdapterUtility.java
PluginAdapterUtility.configureProperties
public static Map<String, Object> configureProperties(final PropertyResolver resolver, final Object object) { //use a default scope of InstanceOnly if the Property doesn't specify it return configureProperties(resolver, buildDescription(object, D...
java
public static Map<String, Object> configureProperties(final PropertyResolver resolver, final Object object) { //use a default scope of InstanceOnly if the Property doesn't specify it return configureProperties(resolver, buildDescription(object, D...
[ "public", "static", "Map", "<", "String", ",", "Object", ">", "configureProperties", "(", "final", "PropertyResolver", "resolver", ",", "final", "Object", "object", ")", "{", "//use a default scope of InstanceOnly if the Property doesn't specify it", "return", "configurePro...
Set field values on a plugin object by using annotated field values to create a Description, and setting field values to resolved property values. Any resolved properties that are not mapped to a field will be included in the return result. @param resolver property resolver @param object plugin object @return Map of ...
[ "Set", "field", "values", "on", "a", "plugin", "object", "by", "using", "annotated", "field", "values", "to", "create", "a", "Description", "and", "setting", "field", "values", "to", "resolved", "property", "values", ".", "Any", "resolved", "properties", "that...
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/configuration/PluginAdapterUtility.java#L337-L342
15,836
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/configuration/PluginAdapterUtility.java
PluginAdapterUtility.configureProperties
public static Map<String, Object> configureProperties(final PropertyResolver resolver, final Description description, final Object object, PropertyScope defaultScope) { Map<String, Object> inputConfig = mapDescribedProperties(resolver, description, defaultScope); if (object insta...
java
public static Map<String, Object> configureProperties(final PropertyResolver resolver, final Description description, final Object object, PropertyScope defaultScope) { Map<String, Object> inputConfig = mapDescribedProperties(resolver, description, defaultScope); if (object insta...
[ "public", "static", "Map", "<", "String", ",", "Object", ">", "configureProperties", "(", "final", "PropertyResolver", "resolver", ",", "final", "Description", "description", ",", "final", "Object", "object", ",", "PropertyScope", "defaultScope", ")", "{", "Map", ...
Set field values on a plugin object by using a Description, and setting field values to resolved property values. Any resolved properties that are not mapped to a field will be included in the return result. @param resolver the property resolver @param description the property descriptions @param object the target ob...
[ "Set", "field", "values", "on", "a", "plugin", "object", "by", "using", "a", "Description", "and", "setting", "field", "values", "to", "resolved", "property", "values", ".", "Any", "resolved", "properties", "that", "are", "not", "mapped", "to", "a", "field",...
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/configuration/PluginAdapterUtility.java#L355-L372
15,837
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/configuration/PluginAdapterUtility.java
PluginAdapterUtility.configureObjectFieldsWithProperties
public static Map<String, Object> configureObjectFieldsWithProperties( final Object object, final Map<String, Object> inputConfig ) { return configureObjectFieldsWithProperties(object, buildFieldProperties(object), inputConfig); }
java
public static Map<String, Object> configureObjectFieldsWithProperties( final Object object, final Map<String, Object> inputConfig ) { return configureObjectFieldsWithProperties(object, buildFieldProperties(object), inputConfig); }
[ "public", "static", "Map", "<", "String", ",", "Object", ">", "configureObjectFieldsWithProperties", "(", "final", "Object", "object", ",", "final", "Map", "<", "String", ",", "Object", ">", "inputConfig", ")", "{", "return", "configureObjectFieldsWithProperties", ...
Set field values on an object using introspection and input values for those properties @param object object @param inputConfig input @return Map of resolved properties that were not configured in the object's fields
[ "Set", "field", "values", "on", "an", "object", "using", "introspection", "and", "input", "values", "for", "those", "properties" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/configuration/PluginAdapterUtility.java#L380-L386
15,838
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/configuration/PluginAdapterUtility.java
PluginAdapterUtility.configureObjectFieldsWithProperties
public static Map<String, Object> configureObjectFieldsWithProperties( final Object object, final List<Property> properties, final Map<String, Object> inputConfig ) { HashMap<String, Object> modified = new HashMap<>(inputConfig); for (final Property property :...
java
public static Map<String, Object> configureObjectFieldsWithProperties( final Object object, final List<Property> properties, final Map<String, Object> inputConfig ) { HashMap<String, Object> modified = new HashMap<>(inputConfig); for (final Property property :...
[ "public", "static", "Map", "<", "String", ",", "Object", ">", "configureObjectFieldsWithProperties", "(", "final", "Object", "object", ",", "final", "List", "<", "Property", ">", "properties", ",", "final", "Map", "<", "String", ",", "Object", ">", "inputConfi...
Set field values on an object given a list of properties and input values for those properties @param object object @param properties properties @param inputConfig input @return Map of resolved properties that were not configured in the object's fields
[ "Set", "field", "values", "on", "an", "object", "given", "a", "list", "of", "properties", "and", "input", "values", "for", "those", "properties" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/configuration/PluginAdapterUtility.java#L395-L410
15,839
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/configuration/PluginAdapterUtility.java
PluginAdapterUtility.mapDescribedProperties
public static Map<String, Object> mapDescribedProperties(final PropertyResolver resolver, final Description description) { //use a default scope of InstanceOnly if the Property doesn't specify it //use property default value if otherwise not r...
java
public static Map<String, Object> mapDescribedProperties(final PropertyResolver resolver, final Description description) { //use a default scope of InstanceOnly if the Property doesn't specify it //use property default value if otherwise not r...
[ "public", "static", "Map", "<", "String", ",", "Object", ">", "mapDescribedProperties", "(", "final", "PropertyResolver", "resolver", ",", "final", "Description", "description", ")", "{", "//use a default scope of InstanceOnly if the Property doesn't specify it", "//use prope...
Retrieve the Description's Properties mapped to resolved values given the resolver, using InsanceOnly default scope. @param resolver property resolver @param description plugin description @return All mapped properties by name and value.
[ "Retrieve", "the", "Description", "s", "Properties", "mapped", "to", "resolved", "values", "given", "the", "resolver", "using", "InsanceOnly", "default", "scope", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/configuration/PluginAdapterUtility.java#L437-L442
15,840
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/utils/PropertyLookup.java
PropertyLookup.create
public static PropertyLookup create(final File propfile, final Map defaults, final IPropertyLookup defaultsLookup) { return new PropertyLookup(propfile, defaults, defaultsLookup); }
java
public static PropertyLookup create(final File propfile, final Map defaults, final IPropertyLookup defaultsLookup) { return new PropertyLookup(propfile, defaults, defaultsLookup); }
[ "public", "static", "PropertyLookup", "create", "(", "final", "File", "propfile", ",", "final", "Map", "defaults", ",", "final", "IPropertyLookup", "defaultsLookup", ")", "{", "return", "new", "PropertyLookup", "(", "propfile", ",", "defaults", ",", "defaultsLooku...
Calls base constructor feeding defaults from Map and IPropertyLookup params @param propfile File containing property data @param defaults Map of default properties @param defaultsLookup IPropertyLookup of default properties @return lookup
[ "Calls", "base", "constructor", "feeding", "defaults", "from", "Map", "and", "IPropertyLookup", "params" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/utils/PropertyLookup.java#L179-L181
15,841
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/utils/PropertyLookup.java
PropertyLookup.getProperty
public String getProperty(final String key) { if (hasProperty(key)) { return properties.getProperty(key); } else { throw new PropertyLookupException("property not found: " + key); } }
java
public String getProperty(final String key) { if (hasProperty(key)) { return properties.getProperty(key); } else { throw new PropertyLookupException("property not found: " + key); } }
[ "public", "String", "getProperty", "(", "final", "String", "key", ")", "{", "if", "(", "hasProperty", "(", "key", ")", ")", "{", "return", "properties", ".", "getProperty", "(", "key", ")", ";", "}", "else", "{", "throw", "new", "PropertyLookupException", ...
Get the property per specified key @param key name of the property @return Value of the property @throws PropertyLookupException thrown if lookup fails for specified key
[ "Get", "the", "property", "per", "specified", "key" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/utils/PropertyLookup.java#L190-L196
15,842
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/utils/PropertyLookup.java
PropertyLookup.fetchProperties
public static Properties fetchProperties(final File propFile) { final Properties properties = new Properties(); try { FileInputStream fis = new FileInputStream(propFile); try { properties.load(fis); } finally { if(null!=fis){ ...
java
public static Properties fetchProperties(final File propFile) { final Properties properties = new Properties(); try { FileInputStream fis = new FileInputStream(propFile); try { properties.load(fis); } finally { if(null!=fis){ ...
[ "public", "static", "Properties", "fetchProperties", "(", "final", "File", "propFile", ")", "{", "final", "Properties", "properties", "=", "new", "Properties", "(", ")", ";", "try", "{", "FileInputStream", "fis", "=", "new", "FileInputStream", "(", "propFile", ...
given a file reads in its properties @param propFile File to read @return a Properties object with data filled from propFile @throws PropertyLookupException thrown if error loading property file
[ "given", "a", "file", "reads", "in", "its", "properties" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/utils/PropertyLookup.java#L250-L265
15,843
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/utils/PropertyLookup.java
PropertyLookup.difference
protected Properties difference(final Map map) { final Properties difference = new Properties(); for (final Object o : map.entrySet()) { final Map.Entry entry = (Map.Entry) o; final String key = (String) entry.getKey(); final String val = (String) entry.getValue(); ...
java
protected Properties difference(final Map map) { final Properties difference = new Properties(); for (final Object o : map.entrySet()) { final Map.Entry entry = (Map.Entry) o; final String key = (String) entry.getKey(); final String val = (String) entry.getValue(); ...
[ "protected", "Properties", "difference", "(", "final", "Map", "map", ")", "{", "final", "Properties", "difference", "=", "new", "Properties", "(", ")", ";", "for", "(", "final", "Object", "o", ":", "map", ".", "entrySet", "(", ")", ")", "{", "final", "...
Reads map of input properties and returns a collection of those that are unique to that input set. @param map Map of key/value pairs @return Properties unique to map
[ "Reads", "map", "of", "input", "properties", "and", "returns", "a", "collection", "of", "those", "that", "are", "unique", "to", "that", "input", "set", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/utils/PropertyLookup.java#L303-L314
15,844
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/utils/PropertyLookup.java
PropertyLookup.hasProperty
public static boolean hasProperty(final String propKey, final File propFile) { if (null == propKey) throw new IllegalArgumentException("propKey param was null"); if (null == propFile) throw new IllegalArgumentException("propFile param was null"); if (propFile.exists()) { final Proper...
java
public static boolean hasProperty(final String propKey, final File propFile) { if (null == propKey) throw new IllegalArgumentException("propKey param was null"); if (null == propFile) throw new IllegalArgumentException("propFile param was null"); if (propFile.exists()) { final Proper...
[ "public", "static", "boolean", "hasProperty", "(", "final", "String", "propKey", ",", "final", "File", "propFile", ")", "{", "if", "(", "null", "==", "propKey", ")", "throw", "new", "IllegalArgumentException", "(", "\"propKey param was null\"", ")", ";", "if", ...
Reads propFile and then checks if specified key exists. @param propKey property name @param propFile property file @return file if a property with that name exists. If an exception occurs while reading the file, false is returned.
[ "Reads", "propFile", "and", "then", "checks", "if", "specified", "key", "exists", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/utils/PropertyLookup.java#L333-L354
15,845
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/utils/PropertyUtil.java
PropertyUtil.expand
public static Properties expand(final Map properties) { final Properties expandedProperties = new Properties(); for (final Object o : properties.entrySet()) { final Map.Entry entry = (Map.Entry) o; final String key = (String) entry.getKey(); final String keyValue = (S...
java
public static Properties expand(final Map properties) { final Properties expandedProperties = new Properties(); for (final Object o : properties.entrySet()) { final Map.Entry entry = (Map.Entry) o; final String key = (String) entry.getKey(); final String keyValue = (S...
[ "public", "static", "Properties", "expand", "(", "final", "Map", "properties", ")", "{", "final", "Properties", "expandedProperties", "=", "new", "Properties", "(", ")", ";", "for", "(", "final", "Object", "o", ":", "properties", ".", "entrySet", "(", ")", ...
expand a given Properties object and return a new one. This will process each key to a given Properties object, get its value and expand it. Each value may contain references to other keys within this given Properties object, and if so, all keys and their expanded keyValues will be resolved into a new Properties objec...
[ "expand", "a", "given", "Properties", "object", "and", "return", "a", "new", "one", ".", "This", "will", "process", "each", "key", "to", "a", "given", "Properties", "object", "get", "its", "value", "and", "expand", "it", ".", "Each", "value", "may", "con...
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/utils/PropertyUtil.java#L42-L53
15,846
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/utils/PropertyUtil.java
PropertyUtil.expand
public static String expand(String keyString, Properties properties) { return PropertyUtil.expand(keyString, (Map) properties); }
java
public static String expand(String keyString, Properties properties) { return PropertyUtil.expand(keyString, (Map) properties); }
[ "public", "static", "String", "expand", "(", "String", "keyString", ",", "Properties", "properties", ")", "{", "return", "PropertyUtil", ".", "expand", "(", "keyString", ",", "(", "Map", ")", "properties", ")", ";", "}" ]
expand a keyString that may contain references to properties located in provided Properties object @return expanded @param keyString string @param properties properties
[ "expand", "a", "keyString", "that", "may", "contain", "references", "to", "properties", "located", "in", "provided", "Properties", "object" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/utils/PropertyUtil.java#L62-L64
15,847
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/utils/PropertyUtil.java
PropertyUtil.expand
public static String expand(String keyString, Project project) { return expand(keyString, project.getProperties()); }
java
public static String expand(String keyString, Project project) { return expand(keyString, project.getProperties()); }
[ "public", "static", "String", "expand", "(", "String", "keyString", ",", "Project", "project", ")", "{", "return", "expand", "(", "keyString", ",", "project", ".", "getProperties", "(", ")", ")", ";", "}" ]
expand a keyString that may contain referecnes to other properties @param keyString string containing props @param project Ant project @return expanded string
[ "expand", "a", "keyString", "that", "may", "contain", "referecnes", "to", "other", "properties" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/utils/PropertyUtil.java#L89-L91
15,848
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/common/NodeEntryFactory.java
NodeEntryFactory.createFromMap
@SuppressWarnings ("unchecked") public static NodeEntryImpl createFromMap(final Map<String, Object> map) throws IllegalArgumentException { final NodeEntryImpl nodeEntry = new NodeEntryImpl(); final HashMap<String, Object> newmap = new HashMap<String, Object>(map); for (final String excludePr...
java
@SuppressWarnings ("unchecked") public static NodeEntryImpl createFromMap(final Map<String, Object> map) throws IllegalArgumentException { final NodeEntryImpl nodeEntry = new NodeEntryImpl(); final HashMap<String, Object> newmap = new HashMap<String, Object>(map); for (final String excludePr...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "NodeEntryImpl", "createFromMap", "(", "final", "Map", "<", "String", ",", "Object", ">", "map", ")", "throws", "IllegalArgumentException", "{", "final", "NodeEntryImpl", "nodeEntry", "=", "ne...
Create NodeEntryImpl from map data. It will convert "tags" of type String as a comma separated list of tags, or "tags" a collection of strings into a set. It will remove properties excluded from allowed import. @param map input map data @return new entry @throws IllegalArgumentException if name is not set
[ "Create", "NodeEntryImpl", "from", "map", "data", ".", "It", "will", "convert", "tags", "of", "type", "String", "as", "a", "comma", "separated", "list", "of", "tags", "or", "tags", "a", "collection", "of", "strings", "into", "a", "set", ".", "It", "will"...
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/common/NodeEntryFactory.java#L59-L117
15,849
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/utils/ThreadBoundLogOutputStream.java
ThreadBoundLogOutputStream.setCharset
public Charset setCharset(Charset charset) { Charset prev = this.charset.get(); this.charset.set(charset); return prev; }
java
public Charset setCharset(Charset charset) { Charset prev = this.charset.get(); this.charset.set(charset); return prev; }
[ "public", "Charset", "setCharset", "(", "Charset", "charset", ")", "{", "Charset", "prev", "=", "this", ".", "charset", ".", "get", "(", ")", ";", "this", ".", "charset", ".", "set", "(", "charset", ")", ";", "return", "prev", ";", "}" ]
Set the charset to use @param charset new charset @return previous charset
[ "Set", "the", "charset", "to", "use" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/utils/ThreadBoundLogOutputStream.java#L77-L81
15,850
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/utils/ThreadBoundLogOutputStream.java
ThreadBoundLogOutputStream.installManager
public LogBufferManager<D,T> installManager() { LogBufferManager<D,T> manager = factory.apply(charset.get()); this.manager.set(manager); return manager; }
java
public LogBufferManager<D,T> installManager() { LogBufferManager<D,T> manager = factory.apply(charset.get()); this.manager.set(manager); return manager; }
[ "public", "LogBufferManager", "<", "D", ",", "T", ">", "installManager", "(", ")", "{", "LogBufferManager", "<", "D", ",", "T", ">", "manager", "=", "factory", ".", "apply", "(", "charset", ".", "get", "(", ")", ")", ";", "this", ".", "manager", ".",...
Install a new inherited thread local buffer manager and return it @return manager
[ "Install", "a", "new", "inherited", "thread", "local", "buffer", "manager", "and", "return", "it" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/utils/ThreadBoundLogOutputStream.java#L87-L91
15,851
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/utils/ThreadBoundLogOutputStream.java
ThreadBoundLogOutputStream.getOrCreateManager
private LogBufferManager<D,T> getOrCreateManager() { if (null == manager.get()) { installManager(); } return manager.get(); }
java
private LogBufferManager<D,T> getOrCreateManager() { if (null == manager.get()) { installManager(); } return manager.get(); }
[ "private", "LogBufferManager", "<", "D", ",", "T", ">", "getOrCreateManager", "(", ")", "{", "if", "(", "null", "==", "manager", ".", "get", "(", ")", ")", "{", "installManager", "(", ")", ";", "}", "return", "manager", ".", "get", "(", ")", ";", "...
If no manager is set, install one, otherwise return the existing one @return
[ "If", "no", "manager", "is", "set", "install", "one", "otherwise", "return", "the", "existing", "one" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/utils/ThreadBoundLogOutputStream.java#L97-L102
15,852
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/utils/ThreadBoundLogOutputStream.java
ThreadBoundLogOutputStream.getOrReset
private Holder<T> getOrReset() { if (buffer.get() == null || buffer.get().getBuffer().isEmpty()) { resetEventBuffer(); } return buffer.get(); }
java
private Holder<T> getOrReset() { if (buffer.get() == null || buffer.get().getBuffer().isEmpty()) { resetEventBuffer(); } return buffer.get(); }
[ "private", "Holder", "<", "T", ">", "getOrReset", "(", ")", "{", "if", "(", "buffer", ".", "get", "(", ")", "==", "null", "||", "buffer", ".", "get", "(", ")", ".", "getBuffer", "(", ")", ".", "isEmpty", "(", ")", ")", "{", "resetEventBuffer", "(...
get the thread's event buffer, reset it if it is empty @return
[ "get", "the", "thread", "s", "event", "buffer", "reset", "it", "if", "it", "is", "empty" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/utils/ThreadBoundLogOutputStream.java#L128-L133
15,853
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/utils/ThreadBoundLogOutputStream.java
ThreadBoundLogOutputStream.resetEventBuffer
private void resetEventBuffer() { if (buffer.get() == null) { buffer.set(new Holder<>(getOrCreateManager().create(charset.get()))); } else { buffer.get().reset(); } }
java
private void resetEventBuffer() { if (buffer.get() == null) { buffer.set(new Holder<>(getOrCreateManager().create(charset.get()))); } else { buffer.get().reset(); } }
[ "private", "void", "resetEventBuffer", "(", ")", "{", "if", "(", "buffer", ".", "get", "(", ")", "==", "null", ")", "{", "buffer", ".", "set", "(", "new", "Holder", "<>", "(", "getOrCreateManager", "(", ")", ".", "create", "(", "charset", ".", "get",...
reset existing or create a new buffer with the current context
[ "reset", "existing", "or", "create", "a", "new", "buffer", "with", "the", "current", "context" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/utils/ThreadBoundLogOutputStream.java#L138-L144
15,854
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/utils/ThreadBoundLogOutputStream.java
ThreadBoundLogOutputStream.flushEventBuffer
private void flushEventBuffer() { Holder<T> holder = buffer.get(); logger.accept(holder.getBuffer().get()); holder.clear(); }
java
private void flushEventBuffer() { Holder<T> holder = buffer.get(); logger.accept(holder.getBuffer().get()); holder.clear(); }
[ "private", "void", "flushEventBuffer", "(", ")", "{", "Holder", "<", "T", ">", "holder", "=", "buffer", ".", "get", "(", ")", ";", "logger", ".", "accept", "(", "holder", ".", "getBuffer", "(", ")", ".", "get", "(", ")", ")", ";", "holder", ".", ...
emit a log event for the current contents of the buffer
[ "emit", "a", "log", "event", "for", "the", "current", "contents", "of", "the", "buffer" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/utils/ThreadBoundLogOutputStream.java#L149-L153
15,855
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/logging/OverridableStreamingLogWriter.java
OverridableStreamingLogWriter.removeOverride
public StreamingLogWriter removeOverride() { StreamingLogWriter previous = override.get().pop().orElse(null); return previous; }
java
public StreamingLogWriter removeOverride() { StreamingLogWriter previous = override.get().pop().orElse(null); return previous; }
[ "public", "StreamingLogWriter", "removeOverride", "(", ")", "{", "StreamingLogWriter", "previous", "=", "override", ".", "get", "(", ")", ".", "pop", "(", ")", ".", "orElse", "(", "null", ")", ";", "return", "previous", ";", "}" ]
Remove the overriding writer, if any @return overriding writer, or null
[ "Remove", "the", "overriding", "writer", "if", "any" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/logging/OverridableStreamingLogWriter.java#L106-L109
15,856
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/execution/workflow/state/StateUtils.java
StateUtils.parameterString
public static String parameterString(StepContextId contextId) { return null != contextId.getParams() ? "@" + parameterString(contextId.getParams()) : ""; }
java
public static String parameterString(StepContextId contextId) { return null != contextId.getParams() ? "@" + parameterString(contextId.getParams()) : ""; }
[ "public", "static", "String", "parameterString", "(", "StepContextId", "contextId", ")", "{", "return", "null", "!=", "contextId", ".", "getParams", "(", ")", "?", "\"@\"", "+", "parameterString", "(", "contextId", ".", "getParams", "(", ")", ")", ":", "\"\"...
Generate string for a context id's parameter section, if present @param contextId context id @return parameter string, or blank string
[ "Generate", "string", "for", "a", "context", "id", "s", "parameter", "section", "if", "present" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/execution/workflow/state/StateUtils.java#L139-L141
15,857
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/execution/workflow/state/StateUtils.java
StateUtils.setupNodeStates
private static void setupNodeStates(WorkflowState current, WorkflowStateImpl parent, StepIdentifier ident) { //create a new mutable map HashMap<String, WorkflowNodeState> nodeStates = new HashMap<>(); if (null != parent.getNodeStates()) { //include original states nodeSta...
java
private static void setupNodeStates(WorkflowState current, WorkflowStateImpl parent, StepIdentifier ident) { //create a new mutable map HashMap<String, WorkflowNodeState> nodeStates = new HashMap<>(); if (null != parent.getNodeStates()) { //include original states nodeSta...
[ "private", "static", "void", "setupNodeStates", "(", "WorkflowState", "current", ",", "WorkflowStateImpl", "parent", ",", "StepIdentifier", "ident", ")", "{", "//create a new mutable map", "HashMap", "<", "String", ",", "WorkflowNodeState", ">", "nodeStates", "=", "ne...
Configure the nodeStates map for the workflow, by visiting each step in the workflow, and connecting the step+node state for nodeSteps to the nodeStates map @param current workflow to visit @param parent root workflow impl @param ident parent workflow ident or null
[ "Configure", "the", "nodeStates", "map", "for", "the", "workflow", "by", "visiting", "each", "step", "in", "the", "workflow", "and", "connecting", "the", "step", "+", "node", "state", "for", "nodeSteps", "to", "the", "nodeStates", "map" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/execution/workflow/state/StateUtils.java#L414-L459
15,858
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/common/NodeEntryImpl.java
NodeEntryImpl.setAttribute
public String setAttribute(final String name, final String value) { if(null!=value){ return getAttributes().put(name, value); }else{ getAttributes().remove(name); return value; } }
java
public String setAttribute(final String name, final String value) { if(null!=value){ return getAttributes().put(name, value); }else{ getAttributes().remove(name); return value; } }
[ "public", "String", "setAttribute", "(", "final", "String", "name", ",", "final", "String", "value", ")", "{", "if", "(", "null", "!=", "value", ")", "{", "return", "getAttributes", "(", ")", ".", "put", "(", "name", ",", "value", ")", ";", "}", "els...
Set the value for a specific attribute @param name attribute name @param value attribute value @return value
[ "Set", "the", "value", "for", "a", "specific", "attribute" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/common/NodeEntryImpl.java#L411-L418
15,859
rundeck/rundeck
core/src/main/java/com/dtolabs/launcher/Setup.java
Setup.getTemplateFile
private File getTemplateFile(String filename) throws IOException { File templateFile=null; final String resource = TEMPLATE_RESOURCES_PATH + "/" + filename; InputStream is = Setup.class.getClassLoader().getResourceAsStream(resource); if (null == is) { throw new RuntimeExcepti...
java
private File getTemplateFile(String filename) throws IOException { File templateFile=null; final String resource = TEMPLATE_RESOURCES_PATH + "/" + filename; InputStream is = Setup.class.getClassLoader().getResourceAsStream(resource); if (null == is) { throw new RuntimeExcepti...
[ "private", "File", "getTemplateFile", "(", "String", "filename", ")", "throws", "IOException", "{", "File", "templateFile", "=", "null", ";", "final", "String", "resource", "=", "TEMPLATE_RESOURCES_PATH", "+", "\"/\"", "+", "filename", ";", "InputStream", "is", ...
Look for template in the jar resources, otherwise look for it on filepath @param filename template name @return file @throws java.io.IOException on io error
[ "Look", "for", "template", "in", "the", "jar", "resources", "otherwise", "look", "for", "it", "on", "filepath" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/launcher/Setup.java#L215-L229
15,860
rundeck/rundeck
core/src/main/java/com/dtolabs/launcher/Setup.java
Setup.validateInstall
private void validateInstall() throws SetupException { // check if rdeck.base is defined. if (null == parameters.getBaseDir() || parameters.getBaseDir().equals("")) { throw new SetupException("rdeck.base property not defined or is the empty string"); } if (!checkIfDir("rdeck....
java
private void validateInstall() throws SetupException { // check if rdeck.base is defined. if (null == parameters.getBaseDir() || parameters.getBaseDir().equals("")) { throw new SetupException("rdeck.base property not defined or is the empty string"); } if (!checkIfDir("rdeck....
[ "private", "void", "validateInstall", "(", ")", "throws", "SetupException", "{", "// check if rdeck.base is defined.", "if", "(", "null", "==", "parameters", ".", "getBaseDir", "(", ")", "||", "parameters", ".", "getBaseDir", "(", ")", ".", "equals", "(", "\"\""...
Checks the basic install assumptions
[ "Checks", "the", "basic", "install", "assumptions" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/launcher/Setup.java#L253-L261
15,861
rundeck/rundeck
core/src/main/java/com/dtolabs/launcher/Setup.java
Setup.checkIfDir
private boolean checkIfDir(final String propName, final String path) { if (null == path || path.equals("")) { throw new IllegalArgumentException(propName + "property had null or empty value"); } return new File(path).exists(); }
java
private boolean checkIfDir(final String propName, final String path) { if (null == path || path.equals("")) { throw new IllegalArgumentException(propName + "property had null or empty value"); } return new File(path).exists(); }
[ "private", "boolean", "checkIfDir", "(", "final", "String", "propName", ",", "final", "String", "path", ")", "{", "if", "(", "null", "==", "path", "||", "path", ".", "equals", "(", "\"\"", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "...
check if path exists as a directory
[ "check", "if", "path", "exists", "as", "a", "directory" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/launcher/Setup.java#L264-L269
15,862
rundeck/rundeck
core/src/main/java/com/dtolabs/launcher/Setup.java
Setup.generatePreferences
private void generatePreferences(final String args[], Properties input) throws SetupException { File frameworkPreferences = new File(Constants.getFrameworkPreferences(parameters.getBaseDir())); try { Preferences.generate(args, frameworkPreferences.getAbsolutePath(), input); } catch ...
java
private void generatePreferences(final String args[], Properties input) throws SetupException { File frameworkPreferences = new File(Constants.getFrameworkPreferences(parameters.getBaseDir())); try { Preferences.generate(args, frameworkPreferences.getAbsolutePath(), input); } catch ...
[ "private", "void", "generatePreferences", "(", "final", "String", "args", "[", "]", ",", "Properties", "input", ")", "throws", "SetupException", "{", "File", "frameworkPreferences", "=", "new", "File", "(", "Constants", ".", "getFrameworkPreferences", "(", "parame...
generate the preferences.properties file
[ "generate", "the", "preferences", ".", "properties", "file" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/launcher/Setup.java#L273-L288
15,863
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/rules/BaseRuleEngine.java
BaseRuleEngine.evaluateRules
@Override public StateObj evaluateRules(final StateObj state) { MutableStateObj dataState = States.mutable(); getRuleSet().stream() //filter rules that apply given the state .filter(i -> i.test(state)) //evaluate the applicable rules ...
java
@Override public StateObj evaluateRules(final StateObj state) { MutableStateObj dataState = States.mutable(); getRuleSet().stream() //filter rules that apply given the state .filter(i -> i.test(state)) //evaluate the applicable rules ...
[ "@", "Override", "public", "StateObj", "evaluateRules", "(", "final", "StateObj", "state", ")", "{", "MutableStateObj", "dataState", "=", "States", ".", "mutable", "(", ")", ";", "getRuleSet", "(", ")", ".", "stream", "(", ")", "//filter rules that apply given t...
Evaluate each rule, if it applies, accrue the new state changes @param state input state @return accrued state changes from matching rules
[ "Evaluate", "each", "rule", "if", "it", "applies", "accrue", "the", "new", "state", "changes" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/rules/BaseRuleEngine.java#L36-L49
15,864
rundeck/rundeck
rundeckapp/src/main/groovy/org/rundeck/jaas/pam/AbstractPamLoginModule.java
AbstractPamLoginModule.authenticate
protected boolean authenticate(String name, char[] password) throws LoginException { try { if ((name == null) || (password == null)) { debug("user or pass is null"); return false; } debug("PAM authentication trying (" + serviceName + ") for: " ...
java
protected boolean authenticate(String name, char[] password) throws LoginException { try { if ((name == null) || (password == null)) { debug("user or pass is null"); return false; } debug("PAM authentication trying (" + serviceName + ") for: " ...
[ "protected", "boolean", "authenticate", "(", "String", "name", ",", "char", "[", "]", "password", ")", "throws", "LoginException", "{", "try", "{", "if", "(", "(", "name", "==", "null", ")", "||", "(", "password", "==", "null", ")", ")", "{", "debug", ...
Authenticates using PAM @param name @param password @return @throws LoginException
[ "Authenticates", "using", "PAM" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/rundeckapp/src/main/groovy/org/rundeck/jaas/pam/AbstractPamLoginModule.java#L78-L97
15,865
rundeck/rundeck
rundeckapp/src/main/groovy/org/rundeck/jaas/pam/AbstractPamLoginModule.java
AbstractPamLoginModule.createRolePrincipals
protected List<Principal> createRolePrincipals(UnixUser username) { ArrayList<Principal> principals = new ArrayList<Principal>(); if (null != supplementalRoles) { for (String supplementalRole : supplementalRoles) { Principal rolePrincipal = createRolePrincipal(supplementalRol...
java
protected List<Principal> createRolePrincipals(UnixUser username) { ArrayList<Principal> principals = new ArrayList<Principal>(); if (null != supplementalRoles) { for (String supplementalRole : supplementalRoles) { Principal rolePrincipal = createRolePrincipal(supplementalRol...
[ "protected", "List", "<", "Principal", ">", "createRolePrincipals", "(", "UnixUser", "username", ")", "{", "ArrayList", "<", "Principal", ">", "principals", "=", "new", "ArrayList", "<", "Principal", ">", "(", ")", ";", "if", "(", "null", "!=", "supplemental...
Create Principals for any roles @param username @return
[ "Create", "Principals", "for", "any", "roles" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/rundeckapp/src/main/groovy/org/rundeck/jaas/pam/AbstractPamLoginModule.java#L144-L163
15,866
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/storage/AuthRundeckStorageTree.java
AuthRundeckStorageTree.authorizedPath
private boolean authorizedPath(AuthContext context, Path path, String action) { Decision evaluate = context.evaluate( resourceForPath(path), action, environmentForPath(path) ); return evaluate.isAuthorized(); }
java
private boolean authorizedPath(AuthContext context, Path path, String action) { Decision evaluate = context.evaluate( resourceForPath(path), action, environmentForPath(path) ); return evaluate.isAuthorized(); }
[ "private", "boolean", "authorizedPath", "(", "AuthContext", "context", ",", "Path", "path", ",", "String", "action", ")", "{", "Decision", "evaluate", "=", "context", ".", "evaluate", "(", "resourceForPath", "(", "path", ")", ",", "action", ",", "environmentFo...
Evaluate access based on path @param context auth context @param path path @param action action @return true if authorized
[ "Evaluate", "access", "based", "on", "path" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/storage/AuthRundeckStorageTree.java#L58-L65
15,867
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/storage/AuthRundeckStorageTree.java
AuthRundeckStorageTree.resourceForPath
private Map<String, String> resourceForPath(Path path) { return AuthorizationUtil.resource(STORAGE_PATH_AUTH_RES_TYPE, authResForPath(path)); }
java
private Map<String, String> resourceForPath(Path path) { return AuthorizationUtil.resource(STORAGE_PATH_AUTH_RES_TYPE, authResForPath(path)); }
[ "private", "Map", "<", "String", ",", "String", ">", "resourceForPath", "(", "Path", "path", ")", "{", "return", "AuthorizationUtil", ".", "resource", "(", "STORAGE_PATH_AUTH_RES_TYPE", ",", "authResForPath", "(", "path", ")", ")", ";", "}" ]
Return authorization resource map for a path @param path path @return map defining the authorization resource
[ "Return", "authorization", "resource", "map", "for", "a", "path" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/storage/AuthRundeckStorageTree.java#L74-L76
15,868
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/storage/AuthRundeckStorageTree.java
AuthRundeckStorageTree.authResForPath
private Map<String, String> authResForPath(Path path) { HashMap<String, String> authResource = new HashMap<String, String>(); authResource.put(PATH_RES_KEY, path.getPath()); authResource.put(NAME_RES_KEY, path.getName()); return authResource; }
java
private Map<String, String> authResForPath(Path path) { HashMap<String, String> authResource = new HashMap<String, String>(); authResource.put(PATH_RES_KEY, path.getPath()); authResource.put(NAME_RES_KEY, path.getName()); return authResource; }
[ "private", "Map", "<", "String", ",", "String", ">", "authResForPath", "(", "Path", "path", ")", "{", "HashMap", "<", "String", ",", "String", ">", "authResource", "=", "new", "HashMap", "<", "String", ",", "String", ">", "(", ")", ";", "authResource", ...
Map containing path and name given a path @param path path @return map
[ "Map", "containing", "path", "and", "name", "given", "a", "path" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/storage/AuthRundeckStorageTree.java#L85-L90
15,869
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/cli/acl/AclTool.java
AclTool.go
protected void go() throws CLIToolOptionsException { if (null == action) { throw new CLIToolOptionsException("Command expected. Choose one of: " + Arrays.asList(Actions.values())); } try { switch (action) { case list: listAction(); ...
java
protected void go() throws CLIToolOptionsException { if (null == action) { throw new CLIToolOptionsException("Command expected. Choose one of: " + Arrays.asList(Actions.values())); } try { switch (action) { case list: listAction(); ...
[ "protected", "void", "go", "(", ")", "throws", "CLIToolOptionsException", "{", "if", "(", "null", "==", "action", ")", "{", "throw", "new", "CLIToolOptionsException", "(", "\"Command expected. Choose one of: \"", "+", "Arrays", ".", "asList", "(", "Actions", ".", ...
Call the action @throws CLIToolOptionsException if an error occurs
[ "Call", "the", "action" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/cli/acl/AclTool.java#L578-L602
15,870
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/cli/acl/AclTool.java
AclTool.applyArgValidate
private boolean applyArgValidate() throws CLIToolOptionsException { if(argValidate) { Validation validation = validatePolicies(); if(argVerbose && !validation.isValid()) { reportValidation(validation); } if(!validation.isValid()){ l...
java
private boolean applyArgValidate() throws CLIToolOptionsException { if(argValidate) { Validation validation = validatePolicies(); if(argVerbose && !validation.isValid()) { reportValidation(validation); } if(!validation.isValid()){ l...
[ "private", "boolean", "applyArgValidate", "(", ")", "throws", "CLIToolOptionsException", "{", "if", "(", "argValidate", ")", "{", "Validation", "validation", "=", "validatePolicies", "(", ")", ";", "if", "(", "argVerbose", "&&", "!", "validation", ".", "isValid"...
If argValidate is specified, validate the input, exit 2 if invalid. Print validation report if argVerbose @return true if validation check failed @throws CLIToolOptionsException
[ "If", "argValidate", "is", "specified", "validate", "the", "input", "exit", "2", "if", "invalid", ".", "Print", "validation", "report", "if", "argVerbose" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/cli/acl/AclTool.java#L765-L778
15,871
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/common/NodesXMLParser.java
NodesXMLParser.parse
public void parse() throws NodeFileParserException { final ResourceXMLParser resourceXMLParser; if(null!=file){ resourceXMLParser=new ResourceXMLParser(file); }else{ resourceXMLParser = new ResourceXMLParser(input); } //parse both node and settings ...
java
public void parse() throws NodeFileParserException { final ResourceXMLParser resourceXMLParser; if(null!=file){ resourceXMLParser=new ResourceXMLParser(file); }else{ resourceXMLParser = new ResourceXMLParser(input); } //parse both node and settings ...
[ "public", "void", "parse", "(", ")", "throws", "NodeFileParserException", "{", "final", "ResourceXMLParser", "resourceXMLParser", ";", "if", "(", "null", "!=", "file", ")", "{", "resourceXMLParser", "=", "new", "ResourceXMLParser", "(", "file", ")", ";", "}", ...
Parse the project.xml formatted file and fill in the nodes found
[ "Parse", "the", "project", ".", "xml", "formatted", "file", "and", "fill", "in", "the", "nodes", "found" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/common/NodesXMLParser.java#L90-L108
15,872
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/common/NodesXMLParser.java
NodesXMLParser.fillNode
private void fillNode(final ResourceXMLParser.Entity entity, final NodeEntryImpl node) { node.setUsername(entity.getProperty(NODE_USERNAME)); node.setHostname(entity.getProperty(NODE_HOSTNAME)); node.setOsArch(entity.getProperty(NODE_OS_ARCH)); node.setOsFamily(entity.getProperty(NODE_OS...
java
private void fillNode(final ResourceXMLParser.Entity entity, final NodeEntryImpl node) { node.setUsername(entity.getProperty(NODE_USERNAME)); node.setHostname(entity.getProperty(NODE_HOSTNAME)); node.setOsArch(entity.getProperty(NODE_OS_ARCH)); node.setOsFamily(entity.getProperty(NODE_OS...
[ "private", "void", "fillNode", "(", "final", "ResourceXMLParser", ".", "Entity", "entity", ",", "final", "NodeEntryImpl", "node", ")", "{", "node", ".", "setUsername", "(", "entity", ".", "getProperty", "(", "NODE_USERNAME", ")", ")", ";", "node", ".", "setH...
Fill the NodeEntryImpl based on the Entity's parsed attributes @param entity entity @param node node
[ "Fill", "the", "NodeEntryImpl", "based", "on", "the", "Entity", "s", "parsed", "attributes" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/common/NodesXMLParser.java#L121-L153
15,873
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/ZipResourceLoader.java
ZipResourceLoader.getResourceNames
public String[] getResourceNames() { if (null != resourcesList) { return resourcesList.toArray(new String[resourcesList.size()]); } if (null != basedirListing) { return basedirListing.toArray(new String[basedirListing.size()]); } String[] list = listZipPat...
java
public String[] getResourceNames() { if (null != resourcesList) { return resourcesList.toArray(new String[resourcesList.size()]); } if (null != basedirListing) { return basedirListing.toArray(new String[basedirListing.size()]); } String[] list = listZipPat...
[ "public", "String", "[", "]", "getResourceNames", "(", ")", "{", "if", "(", "null", "!=", "resourcesList", ")", "{", "return", "resourcesList", ".", "toArray", "(", "new", "String", "[", "resourcesList", ".", "size", "(", ")", "]", ")", ";", "}", "if",...
Get the list of resources in the jar
[ "Get", "the", "list", "of", "resources", "in", "the", "jar" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/ZipResourceLoader.java#L59-L72
15,874
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/ZipResourceLoader.java
ZipResourceLoader.extractResources
public void extractResources() throws IOException { if (!cacheDir.isDirectory()) { if (!cacheDir.mkdirs()) { //debug("Failed to create cachedJar dir for dependent resources: " + cachedir); } } if (null != resourcesList) { //debug("jar manifest ...
java
public void extractResources() throws IOException { if (!cacheDir.isDirectory()) { if (!cacheDir.mkdirs()) { //debug("Failed to create cachedJar dir for dependent resources: " + cachedir); } } if (null != resourcesList) { //debug("jar manifest ...
[ "public", "void", "extractResources", "(", ")", "throws", "IOException", "{", "if", "(", "!", "cacheDir", ".", "isDirectory", "(", ")", ")", "{", "if", "(", "!", "cacheDir", ".", "mkdirs", "(", ")", ")", "{", "//debug(\"Failed to create cachedJar dir for depen...
Extract resources return the extracted files @return the collection of extracted files
[ "Extract", "resources", "return", "the", "extracted", "files" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/ZipResourceLoader.java#L123-L141
15,875
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/rules/WorkflowEngineOperationsProcessor.java
WorkflowEngineOperationsProcessor.continueProcessing
private void continueProcessing() { try { while (!Thread.currentThread().isInterrupted()) { HashMap<String, String> changes = new HashMap<>(); //load all changes already in the queue getAvailableChanges(changes); if (changes.isEmpty()...
java
private void continueProcessing() { try { while (!Thread.currentThread().isInterrupted()) { HashMap<String, String> changes = new HashMap<>(); //load all changes already in the queue getAvailableChanges(changes); if (changes.isEmpty()...
[ "private", "void", "continueProcessing", "(", ")", "{", "try", "{", "while", "(", "!", "Thread", ".", "currentThread", "(", ")", ".", "isInterrupted", "(", ")", ")", "{", "HashMap", "<", "String", ",", "String", ">", "changes", "=", "new", "HashMap", "...
Continue processing from current state
[ "Continue", "processing", "from", "current", "state" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/rules/WorkflowEngineOperationsProcessor.java#L89-L137
15,876
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/rules/WorkflowEngineOperationsProcessor.java
WorkflowEngineOperationsProcessor.getAvailableChanges
private void getAvailableChanges( final Map<String, String> changes) { WorkflowSystem.OperationCompleted<DAT> task = stateChangeQueue.poll(); while (task != null && task.getNewState() != null) { changes.putAll(task.getNewState().getState()); DAT result = task.getResult(); ...
java
private void getAvailableChanges( final Map<String, String> changes) { WorkflowSystem.OperationCompleted<DAT> task = stateChangeQueue.poll(); while (task != null && task.getNewState() != null) { changes.putAll(task.getNewState().getState()); DAT result = task.getResult(); ...
[ "private", "void", "getAvailableChanges", "(", "final", "Map", "<", "String", ",", "String", ">", "changes", ")", "{", "WorkflowSystem", ".", "OperationCompleted", "<", "DAT", ">", "task", "=", "stateChangeQueue", ".", "poll", "(", ")", ";", "while", "(", ...
Poll for changes from the queue, and process all changes that are immediately available without waiting @param changes changes map
[ "Poll", "for", "changes", "from", "the", "queue", "and", "process", "all", "changes", "that", "are", "immediately", "available", "without", "waiting" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/rules/WorkflowEngineOperationsProcessor.java#L143-L153
15,877
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/rules/WorkflowEngineOperationsProcessor.java
WorkflowEngineOperationsProcessor.processRunnableOperations
private void processRunnableOperations( final Consumer<WorkflowSystem.OperationResult<DAT, RES, OP>> resultConsumer, final List<OP> shouldrun, final List<OP> shouldskip, final DAT inputData ) { for (final OP operation : shouldrun) { if (shoulds...
java
private void processRunnableOperations( final Consumer<WorkflowSystem.OperationResult<DAT, RES, OP>> resultConsumer, final List<OP> shouldrun, final List<OP> shouldskip, final DAT inputData ) { for (final OP operation : shouldrun) { if (shoulds...
[ "private", "void", "processRunnableOperations", "(", "final", "Consumer", "<", "WorkflowSystem", ".", "OperationResult", "<", "DAT", ",", "RES", ",", "OP", ">", ">", "resultConsumer", ",", "final", "List", "<", "OP", ">", "shouldrun", ",", "final", "List", "...
Process the runnable operations @param shouldrun operations to run @param shouldskip operations to skip @param inputData input data for the currently runnable operations
[ "Process", "the", "runnable", "operations" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/rules/WorkflowEngineOperationsProcessor.java#L204-L261
15,878
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/rules/WorkflowEngineOperationsProcessor.java
WorkflowEngineOperationsProcessor.waitForChanges
private void waitForChanges(final Map<String, String> changes) throws InterruptedException { WorkflowSystem.OperationCompleted<DAT> take = stateChangeQueue.poll(sleeper.time(), sleeper.unit()); if (null == take || take.getNewState().getState().isEmpty()) { sleeper.backoff(); retu...
java
private void waitForChanges(final Map<String, String> changes) throws InterruptedException { WorkflowSystem.OperationCompleted<DAT> take = stateChangeQueue.poll(sleeper.time(), sleeper.unit()); if (null == take || take.getNewState().getState().isEmpty()) { sleeper.backoff(); retu...
[ "private", "void", "waitForChanges", "(", "final", "Map", "<", "String", ",", "String", ">", "changes", ")", "throws", "InterruptedException", "{", "WorkflowSystem", ".", "OperationCompleted", "<", "DAT", ">", "take", "=", "stateChangeQueue", ".", "poll", "(", ...
Sleep until changes are available on the queue, if any are found then consume remaining and return false, otherwise return true @param changes @return true if no changes found in the sleep time. @throws InterruptedException
[ "Sleep", "until", "changes", "are", "available", "on", "the", "queue", "if", "any", "are", "found", "then", "consume", "remaining", "and", "return", "false", "otherwise", "return", "true" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/rules/WorkflowEngineOperationsProcessor.java#L289-L305
15,879
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/rules/WorkflowEngineOperationsProcessor.java
WorkflowEngineOperationsProcessor.processStateChanges
private void processStateChanges(final Map<String, String> changes) { workflowEngine.event(WorkflowSystemEventType.WillProcessStateChange, String.format("saw state changes: %s", changes), changes ); workflowEngine.getState().updateState(changes); boolean up...
java
private void processStateChanges(final Map<String, String> changes) { workflowEngine.event(WorkflowSystemEventType.WillProcessStateChange, String.format("saw state changes: %s", changes), changes ); workflowEngine.getState().updateState(changes); boolean up...
[ "private", "void", "processStateChanges", "(", "final", "Map", "<", "String", ",", "String", ">", "changes", ")", "{", "workflowEngine", ".", "event", "(", "WorkflowSystemEventType", ".", "WillProcessStateChange", ",", "String", ".", "format", "(", "\"saw state ch...
Handle the state changes for the rule engine @param changes
[ "Handle", "the", "state", "changes", "for", "the", "rule", "engine" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/rules/WorkflowEngineOperationsProcessor.java#L312-L329
15,880
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/rules/WorkflowEngineOperationsProcessor.java
WorkflowEngineOperationsProcessor.processOperations
private void processOperations( final Consumer<WorkflowSystem.OperationResult<DAT, RES, OP>> resultConsumer ) { int origPendingCount = pending.size(); //operations which match runnable conditions List<OP> shouldrun = pending.stream() .filt...
java
private void processOperations( final Consumer<WorkflowSystem.OperationResult<DAT, RES, OP>> resultConsumer ) { int origPendingCount = pending.size(); //operations which match runnable conditions List<OP> shouldrun = pending.stream() .filt...
[ "private", "void", "processOperations", "(", "final", "Consumer", "<", "WorkflowSystem", ".", "OperationResult", "<", "DAT", ",", "RES", ",", "OP", ">", ">", "resultConsumer", ")", "{", "int", "origPendingCount", "=", "pending", ".", "size", "(", ")", ";", ...
Run and skip pending operations @param resultConsumer consumer for result of operations
[ "Run", "and", "skip", "pending", "operations" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/rules/WorkflowEngineOperationsProcessor.java#L336-L364
15,881
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/rules/WorkflowEngineOperationsProcessor.java
WorkflowEngineOperationsProcessor.processSkippedOperations
private void processSkippedOperations(final List<OP> shouldskip) { for (final OP operation : shouldskip) { workflowEngine.event( WorkflowSystemEventType.WillSkipOperation, String.format("Skip condition statisfied for operation: %s, skipping", operation), ...
java
private void processSkippedOperations(final List<OP> shouldskip) { for (final OP operation : shouldskip) { workflowEngine.event( WorkflowSystemEventType.WillSkipOperation, String.format("Skip condition statisfied for operation: %s, skipping", operation), ...
[ "private", "void", "processSkippedOperations", "(", "final", "List", "<", "OP", ">", "shouldskip", ")", "{", "for", "(", "final", "OP", "operation", ":", "shouldskip", ")", "{", "workflowEngine", ".", "event", "(", "WorkflowSystemEventType", ".", "WillSkipOperat...
Process skipped operations @param shouldskip list of operations to skip
[ "Process", "skipped", "operations" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/rules/WorkflowEngineOperationsProcessor.java#L371-L382
15,882
rundeck/rundeck
rundeckapp/src/main/groovy/com/dtolabs/rundeck/jetty/jaas/JettyCombinedLdapLoginModule.java
JettyCombinedLdapLoginModule.getUserRoles
@Override protected List getUserRoles(final DirContext dirContext, final String username) throws LoginException, NamingException { if (_ignoreRoles) { ArrayList<String> strings = new ArrayList<>(); addSupplementalRoles(strings); return strings; } e...
java
@Override protected List getUserRoles(final DirContext dirContext, final String username) throws LoginException, NamingException { if (_ignoreRoles) { ArrayList<String> strings = new ArrayList<>(); addSupplementalRoles(strings); return strings; } e...
[ "@", "Override", "protected", "List", "getUserRoles", "(", "final", "DirContext", "dirContext", ",", "final", "String", "username", ")", "throws", "LoginException", ",", "NamingException", "{", "if", "(", "_ignoreRoles", ")", "{", "ArrayList", "<", "String", ">"...
Override to perform behavior of "ignoreRoles" option @param dirContext context @param username username @return empty or supplemental roles list only if "ignoreRoles" is true, otherwise performs normal LDAP lookup @throws LoginException @throws NamingException
[ "Override", "to", "perform", "behavior", "of", "ignoreRoles", "option" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/rundeckapp/src/main/groovy/com/dtolabs/rundeck/jetty/jaas/JettyCombinedLdapLoginModule.java#L89-L100
15,883
rundeck/rundeck
rundeckapp/src/main/groovy/com/dtolabs/rundeck/jetty/jaas/JettyCombinedLdapLoginModule.java
JettyCombinedLdapLoginModule.login
@Override public boolean login() throws LoginException { if ((getShared().isUseFirstPass() || getShared().isTryFirstPass()) && getShared().isHasSharedAuth()) { debug( String.format( "JettyCombinedLdapLoginModule: login with shared auth, " + ...
java
@Override public boolean login() throws LoginException { if ((getShared().isUseFirstPass() || getShared().isTryFirstPass()) && getShared().isHasSharedAuth()) { debug( String.format( "JettyCombinedLdapLoginModule: login with shared auth, " + ...
[ "@", "Override", "public", "boolean", "login", "(", ")", "throws", "LoginException", "{", "if", "(", "(", "getShared", "(", ")", ".", "isUseFirstPass", "(", ")", "||", "getShared", "(", ")", ".", "isTryFirstPass", "(", ")", ")", "&&", "getShared", "(", ...
Override default login logic, to use shared login credentials if available @return true if authenticated @throws LoginException
[ "Override", "default", "login", "logic", "to", "use", "shared", "login", "credentials", "if", "available" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/rundeckapp/src/main/groovy/com/dtolabs/rundeck/jetty/jaas/JettyCombinedLdapLoginModule.java#L109-L168
15,884
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/utils/FileUtils.java
FileUtils.fileCopy
public static void fileCopy(final File src, final File dest, final boolean overwrite) throws IOException { if (!dest.exists() || (dest.exists() && overwrite)) { // Create parent directory structure if necessary FileUtils.mkParentDirs(dest); if (overwrite) { F...
java
public static void fileCopy(final File src, final File dest, final boolean overwrite) throws IOException { if (!dest.exists() || (dest.exists() && overwrite)) { // Create parent directory structure if necessary FileUtils.mkParentDirs(dest); if (overwrite) { F...
[ "public", "static", "void", "fileCopy", "(", "final", "File", "src", ",", "final", "File", "dest", ",", "final", "boolean", "overwrite", ")", "throws", "IOException", "{", "if", "(", "!", "dest", ".", "exists", "(", ")", "||", "(", "dest", ".", "exists...
Copies file src to dest using nio. @param src source file @param dest destination file @param overwrite true to overwrite if it already exists @throws IOException on io error
[ "Copies", "file", "src", "to", "dest", "using", "nio", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/utils/FileUtils.java#L43-L54
15,885
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/utils/FileUtils.java
FileUtils.deleteDirOnExit
public static void deleteDirOnExit(final File dir) { if (dir.isDirectory()) { final String[] children = dir.list(); for (int i = 0; i < children.length; i++) { deleteDirOnExit(new File(dir, children[i])); } } // The directory is now empty so d...
java
public static void deleteDirOnExit(final File dir) { if (dir.isDirectory()) { final String[] children = dir.list(); for (int i = 0; i < children.length; i++) { deleteDirOnExit(new File(dir, children[i])); } } // The directory is now empty so d...
[ "public", "static", "void", "deleteDirOnExit", "(", "final", "File", "dir", ")", "{", "if", "(", "dir", ".", "isDirectory", "(", ")", ")", "{", "final", "String", "[", "]", "children", "=", "dir", ".", "list", "(", ")", ";", "for", "(", "int", "i",...
Delete a directory recursively. This method will delete all files and subdirectories. @param dir Directory to delete @return If no error occurs, true is returned. false otherwise.
[ "Delete", "a", "directory", "recursively", ".", "This", "method", "will", "delete", "all", "files", "and", "subdirectories", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/utils/FileUtils.java#L100-L110
15,886
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/utils/FileUtils.java
FileUtils.fileRename
public static void fileRename(final File file, final String newPath, final Class clazz) { File newDestFile = new File(newPath); File lockFile = new File(newDestFile.getAbsolutePath() + ".lock"); try { synchronized (clazz) { FileChannel channel = new RandomAccessFile(l...
java
public static void fileRename(final File file, final String newPath, final Class clazz) { File newDestFile = new File(newPath); File lockFile = new File(newDestFile.getAbsolutePath() + ".lock"); try { synchronized (clazz) { FileChannel channel = new RandomAccessFile(l...
[ "public", "static", "void", "fileRename", "(", "final", "File", "file", ",", "final", "String", "newPath", ",", "final", "Class", "clazz", ")", "{", "File", "newDestFile", "=", "new", "File", "(", "newPath", ")", ";", "File", "lockFile", "=", "new", "Fil...
Rename a file. Uses Java's nio library to use a lock. @param file File to rename @param newPath Path for new file name @param clazz Class associated with lock @throws com.dtolabs.rundeck.core.CoreException A CoreException is raised if any underlying I/O operation fails.
[ "Rename", "a", "file", ".", "Uses", "Java", "s", "nio", "library", "to", "use", "a", "lock", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/utils/FileUtils.java#L121-L148
15,887
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/utils/FileUtils.java
FileUtils.mkParentDirs
public static void mkParentDirs(final File file) throws IOException { // Create parent directory structure if necessary File parentFile = file.getParentFile(); if (parentFile == null) { // File was created with a relative path parentFile = file.getAbsoluteFile().getParent...
java
public static void mkParentDirs(final File file) throws IOException { // Create parent directory structure if necessary File parentFile = file.getParentFile(); if (parentFile == null) { // File was created with a relative path parentFile = file.getAbsoluteFile().getParent...
[ "public", "static", "void", "mkParentDirs", "(", "final", "File", "file", ")", "throws", "IOException", "{", "// Create parent directory structure if necessary", "File", "parentFile", "=", "file", ".", "getParentFile", "(", ")", ";", "if", "(", "parentFile", "==", ...
Create parent directory structure of a given file, if it doesn't already exist. @param file File to create directories for @throws IOException if an I/O error occurs
[ "Create", "parent", "directory", "structure", "of", "a", "given", "file", "if", "it", "doesn", "t", "already", "exist", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/utils/FileUtils.java#L167-L180
15,888
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/utils/FileUtils.java
FileUtils.getBaseDir
public static File getBaseDir(final List<File> files) { String common = getCommonPrefix(files.stream().map(new Function<File, String>() { @Override public String apply(final File file) { return file.getAbsolutePath(); } }).collect(Collectors.toList()))...
java
public static File getBaseDir(final List<File> files) { String common = getCommonPrefix(files.stream().map(new Function<File, String>() { @Override public String apply(final File file) { return file.getAbsolutePath(); } }).collect(Collectors.toList()))...
[ "public", "static", "File", "getBaseDir", "(", "final", "List", "<", "File", ">", "files", ")", "{", "String", "common", "=", "getCommonPrefix", "(", "files", ".", "stream", "(", ")", ".", "map", "(", "new", "Function", "<", "File", ",", "String", ">",...
Return common base directory of the given files @param files @return common base directory
[ "Return", "common", "base", "directory", "of", "the", "given", "files" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/utils/FileUtils.java#L189-L200
15,889
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/utils/FileUtils.java
FileUtils.relativePath
public static String relativePath(File parent, File child) { Path superPath = parent.toPath(); Path subPath = child.toPath(); if (!subPath.startsWith(superPath)) { throw new IllegalArgumentException("Not a subpath: " + child); } return superPath.relativize(subPath).to...
java
public static String relativePath(File parent, File child) { Path superPath = parent.toPath(); Path subPath = child.toPath(); if (!subPath.startsWith(superPath)) { throw new IllegalArgumentException("Not a subpath: " + child); } return superPath.relativize(subPath).to...
[ "public", "static", "String", "relativePath", "(", "File", "parent", ",", "File", "child", ")", "{", "Path", "superPath", "=", "parent", ".", "toPath", "(", ")", ";", "Path", "subPath", "=", "child", ".", "toPath", "(", ")", ";", "if", "(", "!", "sub...
Return the relative path between a parent directory and some child path @param parent @param child @return the relative path for the child @throws IllegalArgumentException if child is not a subpath
[ "Return", "the", "relative", "path", "between", "a", "parent", "directory", "and", "some", "child", "path" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/utils/FileUtils.java#L212-L219
15,890
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/execution/workflow/NodeFirstWorkflowExecutor.java
NodeFirstWorkflowExecutor.executeWFSectionNodeDispatch
private WorkflowStatusDataResult executeWFSectionNodeDispatch( StepExecutionContext executionContext, int stepCount, List<StepExecutionResult> results, Map<String, Collection<StepExecutionResult>> failures, final Map<Integer, StepExecutionResult> stepFailures,...
java
private WorkflowStatusDataResult executeWFSectionNodeDispatch( StepExecutionContext executionContext, int stepCount, List<StepExecutionResult> results, Map<String, Collection<StepExecutionResult>> failures, final Map<Integer, StepExecutionResult> stepFailures,...
[ "private", "WorkflowStatusDataResult", "executeWFSectionNodeDispatch", "(", "StepExecutionContext", "executionContext", ",", "int", "stepCount", ",", "List", "<", "StepExecutionResult", ">", "results", ",", "Map", "<", "String", ",", "Collection", "<", "StepExecutionResul...
Execute a workflow section that should be dispatched across nodes @return true if the section was succesful
[ "Execute", "a", "workflow", "section", "that", "should", "be", "dispatched", "across", "nodes" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/execution/workflow/NodeFirstWorkflowExecutor.java#L214-L256
15,891
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/execution/workflow/NodeFirstWorkflowExecutor.java
NodeFirstWorkflowExecutor.splitWorkflowDispatchedSections
private List<IWorkflow> splitWorkflowDispatchedSections(IWorkflow workflow) throws ExecutionServiceException { ArrayList<StepExecutionItem> dispatchItems = new ArrayList<>(); ArrayList<IWorkflow> sections = new ArrayList<>(); for (final StepExecutionItem item : workflow.getCommands()) { ...
java
private List<IWorkflow> splitWorkflowDispatchedSections(IWorkflow workflow) throws ExecutionServiceException { ArrayList<StepExecutionItem> dispatchItems = new ArrayList<>(); ArrayList<IWorkflow> sections = new ArrayList<>(); for (final StepExecutionItem item : workflow.getCommands()) { ...
[ "private", "List", "<", "IWorkflow", ">", "splitWorkflowDispatchedSections", "(", "IWorkflow", "workflow", ")", "throws", "ExecutionServiceException", "{", "ArrayList", "<", "StepExecutionItem", ">", "dispatchItems", "=", "new", "ArrayList", "<>", "(", ")", ";", "Ar...
Splits a workflow into a sequence of sub-workflows, separated along boundaries of node-dispatch sets.
[ "Splits", "a", "workflow", "into", "a", "sequence", "of", "sub", "-", "workflows", "separated", "along", "boundaries", "of", "node", "-", "dispatch", "sets", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/execution/workflow/NodeFirstWorkflowExecutor.java#L507-L538
15,892
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/tasks/net/SSHTaskBuilder.java
SSHTaskBuilder.build
public static ExtSSHExec build(final INodeEntry nodeentry, final String[] args, final Project project, final Map<String, Map<String, String>> dataContext, final SSHConnectionInfo sshConnectionInfo, final int loglevel, final PluginLogger logger) throws BuilderException { ...
java
public static ExtSSHExec build(final INodeEntry nodeentry, final String[] args, final Project project, final Map<String, Map<String, String>> dataContext, final SSHConnectionInfo sshConnectionInfo, final int loglevel, final PluginLogger logger) throws BuilderException { ...
[ "public", "static", "ExtSSHExec", "build", "(", "final", "INodeEntry", "nodeentry", ",", "final", "String", "[", "]", "args", ",", "final", "Project", "project", ",", "final", "Map", "<", "String", ",", "Map", "<", "String", ",", "String", ">", ">", "dat...
Build a Task that performs SSH command @param loglevel level @param nodeentry target node @param args arguments @param project ant project @param dataContext data @param logger logger @param sshConnectionInfo connection info @return task @throws BuilderException on error
[ "Build", "a", "Task", "that", "performs", "SSH", "command" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/tasks/net/SSHTaskBuilder.java#L549-L563
15,893
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/FilePluginCache.java
FilePluginCache.remove
private void remove(final ProviderIdent ident) { final cacheItem cacheItem = cache.get(ident); if (null != cacheItem) { filecache.remove(cacheItem.getFirst()); } cache.remove(ident); }
java
private void remove(final ProviderIdent ident) { final cacheItem cacheItem = cache.get(ident); if (null != cacheItem) { filecache.remove(cacheItem.getFirst()); } cache.remove(ident); }
[ "private", "void", "remove", "(", "final", "ProviderIdent", "ident", ")", "{", "final", "cacheItem", "cacheItem", "=", "cache", ".", "get", "(", "ident", ")", ";", "if", "(", "null", "!=", "cacheItem", ")", "{", "filecache", ".", "remove", "(", "cacheIte...
Remove the association with ident, and remove any filecache association as well.
[ "Remove", "the", "association", "with", "ident", "and", "remove", "any", "filecache", "association", "as", "well", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/FilePluginCache.java#L91-L97
15,894
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/FilePluginCache.java
FilePluginCache.getLoaderForIdent
public synchronized ProviderLoader getLoaderForIdent(final ProviderIdent ident) throws ProviderLoaderException { final cacheItem cacheItem = cache.get(ident); if (null == cacheItem) { return rescanForItem(ident); } final File file = cacheItem.getFirst(); if (cacheIte...
java
public synchronized ProviderLoader getLoaderForIdent(final ProviderIdent ident) throws ProviderLoaderException { final cacheItem cacheItem = cache.get(ident); if (null == cacheItem) { return rescanForItem(ident); } final File file = cacheItem.getFirst(); if (cacheIte...
[ "public", "synchronized", "ProviderLoader", "getLoaderForIdent", "(", "final", "ProviderIdent", "ident", ")", "throws", "ProviderLoaderException", "{", "final", "cacheItem", "cacheItem", "=", "cache", ".", "get", "(", "ident", ")", ";", "if", "(", "null", "==", ...
Get the loader for the provider @param ident provider ident @return loader for the provider
[ "Get", "the", "loader", "for", "the", "provider" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/FilePluginCache.java#L106-L119
15,895
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/FilePluginCache.java
FilePluginCache.loadFileProvider
private ProviderLoader loadFileProvider(final cacheItem cached) { final File file = cached.getFirst(); final PluginScanner second = cached.getSecond(); return filecache.get(file, second); }
java
private ProviderLoader loadFileProvider(final cacheItem cached) { final File file = cached.getFirst(); final PluginScanner second = cached.getSecond(); return filecache.get(file, second); }
[ "private", "ProviderLoader", "loadFileProvider", "(", "final", "cacheItem", "cached", ")", "{", "final", "File", "file", "=", "cached", ".", "getFirst", "(", ")", ";", "final", "PluginScanner", "second", "=", "cached", ".", "getSecond", "(", ")", ";", "retur...
return the loader stored in filecache for the file and scanner
[ "return", "the", "loader", "stored", "in", "filecache", "for", "the", "file", "and", "scanner" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/FilePluginCache.java#L133-L137
15,896
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/FilePluginCache.java
FilePluginCache.rescanForItem
private synchronized ProviderLoader rescanForItem(final ProviderIdent ident) throws ProviderLoaderException { File candidate = null; PluginScanner cscanner = null; for (final PluginScanner scanner : getScanners()) { final File file = scanner.scanForFile(ident); if (null !...
java
private synchronized ProviderLoader rescanForItem(final ProviderIdent ident) throws ProviderLoaderException { File candidate = null; PluginScanner cscanner = null; for (final PluginScanner scanner : getScanners()) { final File file = scanner.scanForFile(ident); if (null !...
[ "private", "synchronized", "ProviderLoader", "rescanForItem", "(", "final", "ProviderIdent", "ident", ")", "throws", "ProviderLoaderException", "{", "File", "candidate", "=", "null", ";", "PluginScanner", "cscanner", "=", "null", ";", "for", "(", "final", "PluginSca...
Rescan for the ident and cache and return the loader
[ "Rescan", "for", "the", "ident", "and", "cache", "and", "return", "the", "loader" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/FilePluginCache.java#L142-L164
15,897
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/tasks/net/ExtSSHExec.java
ExtSSHExec.addEnv
public void addEnv(final Environment.Variable env){ if(null==envVars) { envVars = new ArrayList<Environment.Variable>(); } envVars.add(env); }
java
public void addEnv(final Environment.Variable env){ if(null==envVars) { envVars = new ArrayList<Environment.Variable>(); } envVars.add(env); }
[ "public", "void", "addEnv", "(", "final", "Environment", ".", "Variable", "env", ")", "{", "if", "(", "null", "==", "envVars", ")", "{", "envVars", "=", "new", "ArrayList", "<", "Environment", ".", "Variable", ">", "(", ")", ";", "}", "envVars", ".", ...
Add an Env element @param env element
[ "Add", "an", "Env", "element" ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/tasks/net/ExtSSHExec.java#L222-L227
15,898
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/tasks/net/ExtSSHExec.java
ExtSSHExec.execute
public void execute() throws BuildException { if (getHost() == null) { throw new BuildException("Host is required."); } if (getUserInfo().getName() == null) { throw new BuildException("Username is required."); } if (getUserInfo().getKeyfile() == null ...
java
public void execute() throws BuildException { if (getHost() == null) { throw new BuildException("Host is required."); } if (getUserInfo().getName() == null) { throw new BuildException("Username is required."); } if (getUserInfo().getKeyfile() == null ...
[ "public", "void", "execute", "(", ")", "throws", "BuildException", "{", "if", "(", "getHost", "(", ")", "==", "null", ")", "{", "throw", "new", "BuildException", "(", "\"Host is required.\"", ")", ";", "}", "if", "(", "getUserInfo", "(", ")", ".", "getNa...
Execute the command on the remote host. @exception BuildException Most likely a network error or bad parameter.
[ "Execute", "the", "command", "on", "the", "remote", "host", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/tasks/net/ExtSSHExec.java#L302-L385
15,899
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/tasks/net/ExtSSHExec.java
ExtSSHExec.writeToFile
private void writeToFile(String from, boolean append, File to) throws IOException { FileWriter out = null; try { out = new FileWriter(to.getAbsolutePath(), append); StringReader in = new StringReader(from); char[] buffer = new char[BUFFER_SIZE]; in...
java
private void writeToFile(String from, boolean append, File to) throws IOException { FileWriter out = null; try { out = new FileWriter(to.getAbsolutePath(), append); StringReader in = new StringReader(from); char[] buffer = new char[BUFFER_SIZE]; in...
[ "private", "void", "writeToFile", "(", "String", "from", ",", "boolean", "append", ",", "File", "to", ")", "throws", "IOException", "{", "FileWriter", "out", "=", "null", ";", "try", "{", "out", "=", "new", "FileWriter", "(", "to", ".", "getAbsolutePath", ...
Writes a string to a file. If destination file exists, it may be overwritten depending on the "append" value. @param from string to write @param to file to write to @param append if true, append to existing file, else overwrite @exception IOException on io error
[ "Writes", "a", "string", "to", "a", "file", ".", "If", "destination", "file", "exists", "it", "may", "be", "overwritten", "depending", "on", "the", "append", "value", "." ]
8070f774f55bffaa1118ff0c03aea319d40a9668
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/tasks/net/ExtSSHExec.java#L547-L568