Groovy Documentation
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z _

A

activateOptions() - Method in MaskDataPatternLayout
AntUtils - Class in org.linkedin.groovy.util.ant
Helper methods for ant
available() - Method in DataMaskingInputStream
available() - Method in EncryptedInputStream
awaitFor(def, def, def, null) - Method in GroovyConcurrentUtils
The closure is the condition to wait on: it should return false until the condition is met.

B


C

cat(def) - Method in GroovyIOUtils
Returns the content of the location as a String
chmod(def, def) - Method in FileSystem
chmod(def, def) - Method in FileSystemImpl
chroot(null) - Method in SerializableFileResource
clearError() - Method in StateMachine
clearError() - Method in StateMachineImpl
CliUtils - Class in org.linkedin.groovy.util.cli
Utilities methods for cli (cli builder)
collectionToJSON(null) - Method in JsonUtils
collectKey(null, null, null) - Method in GroovyCollectionsUtils
Iterate over every element in source map and store the result of closure(k,v) in the destination map under the same key.
compare(null, null) - Method in IgnoreTypeComparator
compareContent(null, null) - Method in GroovyCollectionsUtils
More generic call which compares the content of 2 collections: it will only compare the content
compareIgnoreType(null, null) - Method in GroovyCollectionsUtils
This method is being used for recursivity purposes
Config - Class in org.linkedin.groovy.util.config
@author ypujante@linkedin.com
connect() - Method in IvyURLConnection
convert(LoggingEvent) - Method in MaskDataPatternConverter
cp(def, def) - Method in FileSystem
Copy from to to...
cp(def, def) - Method in FileSystemImpl
Copy from to to...
createPatternParser(null) - Method in MaskDataPatternLayout
createRelative(null) - Method in SerializableFileResource
createSecretKey(null, null, null, null) - Method in EncryptionUtils
Create a file which stores random key which will be used for encrypt and decrypt
createTempDir(def) - Method in FileSystem
Create a temporary directory
createTempDir(def) - Method in FileSystemImpl
createTempFileSystem(null) - Method in FileSystemImpl
Convenient call mainly used for testing purposes...
createURLStreamHandler(null) - Method in SingletonURLStreamHandlerFactory

D

DataMaskingInputStream - Class in org.linkedin.groovy.util.io
@author mdubey@linkedin.com
DataMaskingInputStream(null) - Constructor in DataMaskingInputStream
decrypt(null, null) - Method in EncryptionUtils
decrypt a value using key in keyFile
decryptBuffer(null, null) - Method in EncryptionUtils
Given a buffer with embedded encrypted strings, decrypt it.
decryptFiles(null, null, null) - Method in EncryptionUtils
Takes an input directory (fromDir) and recursively finds and decrypt all files in it into new output directory (toDir)
deserializeFromFile(def) - Method in FileSystem
deserializeFromFile(def) - Method in FileSystemImpl
destroy() - Method in FileSystemImpl
disconnect() - Method in IvyURLConnection

E

eachChildRecurse(def, def) - Method in FileSystem
eachChildRecurse(def, def) - Method in FileSystemImpl
eachChildRecurse(Resource, null) - Method in GroovyIOUtils
The closure will be called for every child (recursively) of the provided resource
eachLine(null, null) - Method in GroovyIOUtils
Convenient call which calls {@link #eachLine(Reader, Closure).
encrypt(null, null, null) - Method in EncryptionUtils
encrypt a value using the key in keyFile
EncryptedInputStream - Class in org.linkedin.groovy.util.encryption
User: mdubey Date: Jul 20, 2010 Time: 1:46:36 PM
EncryptedInputStream(null, null) - Constructor in EncryptedInputStream
Constructor to process inputstream of encrypted data
encryptionKeyName(null) - Method in EncryptionUtils
EncryptionUtils - Class in org.linkedin.groovy.util.encryption
equals(def) - Method in SerializableFileResource
executeAction(def, def) - Method in StateMachine
Execute the action: sets the state machine in transition state, execute the closure and then move to the final state.
executeAction(def, def) - Method in StateMachineImpl
Execute the action: sets the state machine in transition state, execute the closure and then move to the final state.
exists() - Method in SerializableFileResource

F

fetchContent(def, null) - Method in GroovyIOUtils
Fetches the file pointed to by the location.
FileSystem - Interface in org.linkedin.groovy.util.io.fs
Abstraction to the filesystem
FileSystemImpl - Class in org.linkedin.groovy.util.io.fs
Represents methods available for the file system
FileSystemImpl(null, null) - Constructor in FileSystemImpl
finalizeConverter(char) - Method in MaskDataPatternParser
findAll(def, def) - Method in FileSystem
findAll(def, def) - Method in FileSystemImpl
findAll(Resource, null) - Method in GroovyIOUtils
Every child resource of this resource (recursively) is being passed to the closure.
findEndState(def) - Method in StateMachine
Returns the end state that the state machine would be if the action were to be executed.
findEndState(def) - Method in StateMachineImpl
Returns the end state that the state machine would be if the action were to be executed.
findPaths(def, def) - Method in StateMachine
Returns a list of paths to go from fromState to toState.
findPaths(def, def) - Method in StateMachineImpl
{@inheritdoc}
findShortestPath(def, def) - Method in StateMachine
Returns the shortest path (list of transitions) to go from fromState to toState
findShortestPath(def, def) - Method in StateMachineImpl
flatten(null, null) - Method in GroovyCollectionsUtils
Same as flatten(Map) but use destMap for the result
forceChangeState(def, def) - Method in StateMachine
This method is used to change the state and should be used carefully.
forceChangeState(def, def) - Method in StateMachineImpl
This method is used to change the state and should be used carefully.
fromJSON(null) - Method in JsonUtils
Given a json string, convert it to a value (maps / lists): equivalent to toValue(new JSONObject(json)) or toValue(new JSONArray(json) depending on if the json starts with [ or { (with proper null handling).
fromJSON(def) - Method in RestException
From a json representation (as built by {@link #toJSON(Throwable)) builds a rest exception

G

getAt(null) - Method in SerializableFileResource
getAvailableActions() - Method in StateMachine
Returns all available actions
getAvailableActions() - Method in StateMachineImpl
Returns all available actions
getAvailableStates() - Method in StateMachine
returns all available states
getAvailableStates() - Method in StateMachineImpl
returns all available states
getAvailableTransitions() - Method in StateMachine
getAvailableTransitions() - Method in StateMachineImpl
getCurrentState() - Method in StateMachine
getCurrentState() - Method in StateMachineImpl
getEndState(def) - Method in StateMachine
Returns the end state associated to a specific action in the state machine.
getEndState(def) - Method in StateMachineImpl
Returns the end state associated to a specific action in the state machine.
getError() - Method in StateMachine
getError() - Method in StateMachineImpl
getFile() - Method in SerializableFileResource
getFilename() - Method in SerializableFileResource
getFileResource() - Method in SerializableFileResource
getFiles() - Method in IvyURLConnection
getInfo() - Method in SerializableFileResource
getInputStream() - Method in IvyURLConnection
getInputStream() - Method in SerializableFileResource
getMaskingRegex() - Method in MaskDataPatternLayout
getOptionalBoolean(def, null, boolean) - Method in Config
getOptionalInt(def, null, int) - Method in Config
getOptionalString(def, null, null) - Method in Config
getParentResource() - Method in SerializableFileResource
getPath() - Method in SerializableFileResource
getRequiredString(def, null) - Method in Config
getRoot() - Method in FileSystem
the root of the file system.
getRoot() - Method in FileSystemImpl
the root of the file system.
getRootResource() - Method in SerializableFileResource
getSecretKey(null, null, null, null) - Method in EncryptionUtils
getSecretKeys(null, null, null) - Method in EncryptionUtils
getState() - Method in StateMachine
Return a coherent view of the state (like calling each individual methods, but guaranteed to be atomic).
getState() - Method in StateMachineImpl
getTmpRoot() - Method in FileSystem
the tmp root of the file system.
getTmpRoot() - Method in FileSystemImpl
getTransitionAction() - Method in StateMachine
getTransitionAction() - Method in StateMachineImpl
getTransitions() - Method in StateMachine
getTransitions() - Method in StateMachineImpl
getTransitionState() - Method in StateMachine
getTransitionState() - Method in StateMachineImpl
GroovyCollectionsUtils - Class in org.linkedin.groovy.util.collections
@author ypujante@linkedin.com
GroovyConcurrentUtils - Class in org.linkedin.groovy.util.concurrent
@author ypujante@linkedin.com
GroovyIOUtils - Class in org.linkedin.groovy.util.io
IO related utilities
GroovyIOUtils() - Constructor in GroovyIOUtils
GroovyMopUtils - Class in org.linkedin.groovy.util.mop
This class contains utility methods for meta programming
GroovyNetUtils - Class in org.linkedin.groovy.util.net
Contains utilities for net
guessFilename(null) - Method in GroovyNetUtils
Method which tries to infer the filename from the uri.

H

hashCode() - Method in SerializableFileResource

I

ignoresThrowable() - Method in MaskDataPatternLayout
IgnoreTypeComparator - Class in org.linkedin.groovy.util.collections
installBridge() - Method in JulToSLF4jBridge
The problem with SLF4JBridgeHandler.install() method is that it does not remove the other handlers and as a result logs still make it the 'old' way.
isChild(null, null) - Method in GroovyIOUtils
true if child is really a child of parent or in other words if child is located in a subpath of parent (handle canonical path properly)
isDirectory() - Method in SerializableFileResource
isEncrypted(null) - Method in EncryptionUtils
given a string see if it encrypted.
isModifiedSince(long) - Method in SerializableFileResource
IvyURLConnection - Class in org.linkedin.groovy.util.ivy
Handle ivy:/organisation/name/version style urls
IvyURLConnection(null, def, def) - Constructor in IvyURLConnection
IvyURLHandler - Class in org.linkedin.groovy.util.ivy
Handle ivy:/organisation/name/version style urls
IvyURLHandler(def) - Constructor in IvyURLHandler

J

JsonUtils - Class in org.linkedin.groovy.util.json
Contains utilities for json.
JulToSLF4jBridge - Class in org.linkedin.groovy.util.log
@author ypujante@linkedin.com

K


L

lastModified() - Method in SerializableFileResource
length() - Method in SerializableFileResource
list(ResourceFilter) - Method in SerializableFileResource
log - Field in StateMachineImpl
ls(null) - Method in FileSystem
Same as the other ls, but starts at root
ls(def) - Method in FileSystemImpl
ls(ResourceFilter) - Method in SerializableFileResource
shortcut to list.. returns a List

M

makeRelativeToParent(null, null) - Method in GroovyIOUtils
Ex: parent=/a/b/c child='/a/b/c/d/e'... would return d/e
mapToJSON(null) - Method in JsonUtils
markSupported() - Method in DataMaskingInputStream
markSupported() - Method in EncryptedInputStream
MaskDataPatternConverter - Class in org.linkedin.groovy.util.log
@author mdubey@linkedin.com
MaskDataPatternConverter(null, boolean) - Constructor in MaskDataPatternConverter
MaskDataPatternLayout - Class in org.linkedin.groovy.util.log
Add support for filtering log message based on regex.
MaskDataPatternParser - Class in org.linkedin.groovy.util.log
@author mdubey@linkedin.com
MaskDataPatternParser(null, null) - Constructor in MaskDataPatternParser
MissingConfigParameterException - Class in org.linkedin.groovy.util.config
@author ypujante@linkedin.com
MissingConfigParameterException(null) - Constructor in MissingConfigParameterException
missingMethodDelegate(def, def, def, def) - Method in GroovyMopUtils
This method should be called from a missingMethod handler.
mkdirs(null) - Method in AntUtils
Creates the directory and parents of the provided directory.
mkdirs(def) - Method in FileSystem
mkdirs(def) - Method in FileSystemImpl
mkdirs(null) - Method in GroovyIOUtils
Creates the directory and parents of the provided directory.
MODULE - Field in StateMachineImpl
mv(def, def) - Method in FileSystem
Move from to to...
mv(def, def) - Method in FileSystemImpl
Move from to to...

N

newFileSystem(def, def) - Method in FileSystem
Returns a new file system where the root is set to the provided file (effectively making it a sub file system of this one...)
newFileSystem(def, def) - Method in FileSystemImpl

O

onStateChange(def, def) - Method in StateChangeListener
On state change.
openConnection(null) - Method in IvyURLHandler
originalClassName - Field in RestException
originalMessage - Field in RestException

P

parseCliOptions(def) - Method in CliUtils
Parses the cli options and returns them as well as a ConfigObject where each key is the long option and value is the value of the option
parseURL(null, null, int, int) - Method in IvyURLHandler
prettyPrint(def, int) - Method in JsonUtils
Converts the value to a json object and displays it nicely indented
processBuffer(null, null, null) - Method in EncryptionUtils
Process a buffer with embedded encrypted strings, using the closure provided.
propertyMissing(null) - Method in SerializableFileResource
Define property missing to allow for r.foo.bar notation

Q


R

read(byte[], int, int) - Method in DataMaskingInputStream
read in len bytes of data into buffer starting at offset off
read(byte[], int, int) - Method in EncryptedInputStream
read in len bytes of data into buffer starting at offset off
readContent(def) - Method in FileSystem
reads the content from the file and return it as a String
readContent(def) - Method in FileSystemImpl
registerHandler(null, def) - Method in SingletonURLStreamHandlerFactory
Register a handler for the protocol
RestException - Class in org.linkedin.groovy.util.rest
Exception which will contain the original exception (which may not be available in this VM)...
RestException(null, null, StackTraceElement[]) - Constructor in RestException
rm(def) - Method in FileSystem
rm(def) - Method in FileSystemImpl
rmdirs(def) - Method in FileSystem
rmdirs(def) - Method in FileSystemImpl
rmEmptyDirs(def) - Method in FileSystem
Remove all empty directories (that are children (recurisvely) of the provided directory).
rmEmptyDirs(def) - Method in FileSystemImpl

S

safeOverwrite(def, null) - Method in FileSystem
This convenient call takes a file you want to (over)write to and a closure.
safeOverwrite(def, null) - Method in FileSystemImpl
safeOverwrite(null, null) - Method in GroovyIOUtils
This convenient call takes a file you want to (over)write to and a closure.
saveContent(def, null) - Method in FileSystem
creates a file and populate its content with the provided (String) content
saveContent(def, null) - Method in FileSystemImpl
saveSecretKey(null, null, null, null, null) - Method in EncryptionUtils
SerializableFileResource - Class in org.linkedin.groovy.util.io.fs
FileResource is not serializable
SerializableFileResource(FileResource) - Constructor in SerializableFileResource
serializeToFile(def, def) - Method in FileSystem
serializeToFile(def, def) - Method in FileSystemImpl
setCurrentState(def) - Method in StateMachineImpl
This method should be used to restore the state only
setError(def) - Method in StateMachineImpl
This method should be used to restore the state only
setMaskingRegex(null) - Method in MaskDataPatternLayout
setStateChangeListener(StateChangeListener) - Method in StateMachine
Sets a listener to know when the state changes
setStateChangeListener(StateChangeListener) - Method in StateMachineImpl
SingletonURLStreamHandlerFactory - Class in org.linkedin.groovy.util.net
The singleton of url stream handler (can register only 1 per VM).
size() - Method in SerializableFileResource
skip(long) - Method in DataMaskingInputStream
skip n bytes of data
skip(long) - Method in EncryptedInputStream
skip n bytes of data
StateChangeListener - Interface in org.linkedin.groovy.util.state
The callback for state changes.
StateMachine - Interface in org.linkedin.groovy.util.state
Represents the state machine (states, transitions and action to take on each)
StateMachineImpl - Class in org.linkedin.groovy.util.state
Represents the state machine (states, transitions and action to take on each)
StateMachineImpl(def) - Constructor in StateMachineImpl

T

tempFile(def) - Method in AntUtils
Creates a temp file:
tempFile() - Method in FileSystem
Creates a temp file with all default values
tempFile(def) - Method in FileSystemImpl
Creates a temp file:
toFile(def, null) - Method in GroovyIOUtils
returns a file... handles File, URI, URL, string, null
toFileWithTempStatus(def, null) - Method in GroovyIOUtils
handles File, URI, URL, string, null returns a map with file and tempStatus (boolean)
toFR(def) - Method in SerializableFileResource
toFRArray(Resource[]) - Method in SerializableFileResource
toJSON(def) - Method in JsonUtils
Reverse method which converts a value into a json value
toJSON(null) - Method in RestException
'Serializes' the throwable into a json representation in order to be able to rebuild it later.
toList(JSONArray) - Method in JsonUtils
Converts the json array into a list (recursive call).
toMap(JSONObject) - Method in JsonUtils
Converts a json object into a map (recursive call).
toMapKey(def, null) - Method in GroovyCollectionsUtils
Generates a map where the key is each element of the 'collection' c provided and the value is closure(value).
toMapValue(def, null) - Method in GroovyCollectionsUtils
Generates a map where the value is each element of the 'collection' c provided and the key is closure(value).
toResource(def) - Method in FileSystem
Returns a resource relative to this filesystem
toResource(def) - Method in FileSystemImpl
toString() - Method in SerializableFileResource
toString() - Method in StateMachineImpl
toURI(def) - Method in GroovyNetUtils
Converts the provided parameter into a URI... handle: File, strings, URI, URL, null
toURI() - Method in SerializableFileResource
toURL(def) - Method in GroovyNetUtils
Encapsulates the creation of a URL by first trying the normal way and if it fails, it falls back to the SingletonURLStreamHandlerFactory
toValue(def) - Method in JsonUtils
Converts the value into its non JSON counter part: if the value is a org.json.JSONObject or a org.json.JSONArray then it will call the appropriate method, otherwise simply return the value.

U


V


W

waitForCondition(def, def, def, null) - Method in GroovyConcurrentUtils
This call will wait until the condition as provided by the closure is true.
waitForShutdownMultiple(def, def, null) - Method in GroovyConcurrentUtils
Handle the logic when you need to wait for shutdown with a timeout on multiple shutdownable...
waitForState(def, def) - Method in StateMachine
Wait for the state machine to be in the provided state.
waitForState(def, def) - Method in StateMachineImpl
Wait for the state machine to be in the provided state.
waitMultiple(def, def, def) - Method in GroovyConcurrentUtils
When multiple waits need to happen with a timeout the logic is a little bit complicated because the timeout applies as a whole, not as individual waits.
withBuilder(null) - Method in AntUtils
Executes the closure with a builder and make sure to catch BuildException to propertly unwrap them
withFile(def, null) - Method in GroovyIOUtils
Will convert s into a File object (if possible) and call the closure with it.
withHttpEchoServer(int, null) - Method in GroovyNetUtils
Create a simple http server on localhost on the given port for the duration of the closure.
withInputStream(def, def) - Method in FileSystem
withInputStream(def, def) - Method in FileSystemImpl
withInputStream(null) - Method in SerializableFileResource
withObjectInputStream(def, def) - Method in FileSystem
withObjectInputStream(def, def) - Method in FileSystemImpl
withObjectOutputStream(def, def) - Method in FileSystem
withObjectOutputStream(def, def) - Method in FileSystemImpl
withOutputStream(def, def) - Method in FileSystem
withOutputStream(def, def) - Method in FileSystemImpl

X


Y


Z


_


Groovy Documentation