public final class GroovyMethods extends Proxy
JmsMethods
,
CoreMethods
,
CsvMethods
,
HttpClientMethods
,
JabberMethods
,
JmsMethods
,
LoggerMethods
,
MarshallerMethods
,
MonitorMethods
,
ProxyRequestMethods
,
RestMethods
,
RssMethods
,
SolrMethods
,
SqlMethods
,
TrackerMethods
,
UtilMethods
,
VelocityMethods
,
VfsMethods
,
WebSocketMethods
,
WidgetPageMethods
,
DefaultGroovyMethods
,
DateGroovyMethods
,
EncodingGroovyMethods
,
IOGroovyMethods
,
NioGroovyMethods
,
ProcessGroovyMethods
,
ResourceGroovyMethods
,
SocketGroovyMethods
,
SqlGroovyMethods
,
StringGroovyMethods
,
SwingGroovyMethods
,
XmlGroovyMethods
,
ArrayUtils
,
BooleanUtils
,
DateFormatUtils
,
DateUtils
,
DigestUtils
,
NumberUtils
,
RandomStringUtils
,
StringEscapeUtils
,
StringMethods
Modifier and Type | Class and Description |
---|---|
static class |
GroovyMethods.MartiniPackageSetter
An internal class used for setting the
MartiniPackage of the ThreadLocal |
Modifier and Type | Method and Description |
---|---|
Object |
getAdaptee() |
static String |
getApplicationProperty(String key)
Get a Martini Runtime property
|
static String |
getApplicationProperty(String key,
String defaultValue)
Get a Martini Runtime property
|
static MartiniPackage |
getPackage()
Gets a MartiniPackage from the context
|
static String |
getPackageProperty(String key)
Get a Martini package property
|
static String |
getPackageProperty(String key,
String defaultValue)
Get a Martini package property
|
static String[] |
getPackagePropertyArray(String key)
Get a Martini package property as Array.
|
static String[] |
getPackagePropertyArray(String key,
String[] defaultValue)
Get a Martini package property as Array.
|
static String |
getPackagePropertyComment(String key)
Used to get comment from an existing property.
|
static String |
getTOROProperty(String key)
Deprecated.
As of 3.0, this method has been renamed. Please prefer
getPackageProperty(String) . |
static String |
getTOROProperty(String key,
String defaultValue)
Deprecated.
As of 3.0, this method has been renamed. Please prefer
getPackageProperty(String, String) . |
static String[] |
getTOROPropertyArray(String key)
Deprecated.
As of 3.0, this method has been renamed. Please prefer
getPackagePropertyArray(String) . |
static String[] |
getTOROPropertyArray(String key,
String[] defaultValue)
Deprecated.
As of 3.0, this method has been renamed. Please prefer
getPackagePropertyArray(String, String[]) . |
static String |
getTOROPropertyComment(String key)
Deprecated.
As of 3.0, this method has been renamed. Please prefer
getPackagePropertyComment(String) . |
Object |
invokeMethod(String name,
Object args) |
Iterator |
iterator() |
static String |
removePackageProperty(String key)
Delete a Martini package property
|
static String |
removeTOROProperty(String key)
Deprecated.
As of 3.0, this method has been renamed. Please prefer
removePackageProperty(String) . |
static String |
savePackageProperty(String key,
String value)
Used to save a property.
|
static void |
savePackagePropertyComment(String key,
String comment)
Used to save a comment to an existing property.
|
static String |
saveTOROProperty(String key,
String value)
Deprecated.
As of 3.0, this method has been renamed. Please prefer
savePackageProperty(String, String) . |
static void |
saveTOROPropertyComment(String key,
String comment)
Deprecated.
As of 3.0, this method has been renamed. Please prefer
savePackagePropertyComment(String, String) . |
void |
setAdaptee(Object adaptee) |
static <V> V |
withPackageEndpoints(GroovyObject obj,
Closure<V> closure)
Allows a
GroovyObject to execute a closure against the available
Endpoint s installed on the package associated to the
current thread. |
Proxy |
wrap(Object adaptee) |
getMetaClass, getProperty, setMetaClass, setProperty
public static MartiniPackage getPackage()
public static <V> V withPackageEndpoints(GroovyObject obj, Closure<V> closure)
GroovyObject
to execute a closure against the available
Endpoint
s installed on the package associated to the
current thread.V
- the expected typeobj
- the object that requires the endpointsclosure
- the closure to invokeCollection<Endpoint>
ToroRuntimeException
- if there's no package associated in the current thread@Deprecated public static String saveTOROProperty(String key, String value) throws Exception
savePackageProperty(String, String)
.Used to save a property. Useful for saving and loading configuration data. The config data is stored in a standard Java Properties file at
<esb-home>/packages/<package-name>/conf/package.properties
Example usage:
'alias'.saveTOROProperty('sampleAlias')
key
- The property key/namevalue
- The property valueException
@Deprecated public static void saveTOROPropertyComment(String key, String comment) throws Exception
savePackagePropertyComment(String, String)
.Used to save a comment to an existing property. Useful to add description on the property
<esb-home>/packages/<package-name>/conf/package.properties
Example usage:
'alias'.saveTOROPropertyComment('This is a comment')
key
- The property key/namecomment
- the comment to the keyException
@Deprecated public static String getTOROPropertyComment(String key) throws Exception
getPackagePropertyComment(String)
.Used to get comment from an existing property. Useful to read description on the property
<esb-home>/packages/<package-name>/conf/package.properties
Example usage:
'alias'.getTOROPropertyComment()
key
- The property key/nameException
@Deprecated public static String[] getTOROPropertyArray(String key, String[] defaultValue) throws ToroException
getPackagePropertyArray(String, String[])
.Get a Martini Runtime property as Array. This will automatically create an array on comma separated value
Example usage:
'alias'.getTOROPropertyArray()
key
- The property name/keydefaultValue
- The value to return if the property doesn't existToroException
@Deprecated public static String[] getTOROPropertyArray(String key) throws ToroException
getPackagePropertyArray(String)
.Get a Martini Runtime property as Array. This will automatically create an array on comma separated value
Example usage:
'alias'.getTOROPropertyArray()
key
- The property name/keyToroException
@Deprecated public static String getTOROProperty(String key) throws ToroException
getPackageProperty(String)
.Get a Martini Runtime property
Example usage:
'alias'.getTOROProperty()
key
- The property name/keyToroException
@Deprecated public static String getTOROProperty(String key, String defaultValue) throws ToroException
getPackageProperty(String, String)
.Get a Martini Runtime property
Example usage:
'alias'.getTOROProperty('sampleAlias')
key
- The property name/keydefaultValue
- The value to return if the property doesn't existToroException
@Deprecated public static String removeTOROProperty(String key) throws ToroException
removePackageProperty(String)
.Delete a Martini Runtime property
Example usage:
'alias'.removeTOROProperty('sampleAlias')
key
- The name of the propertyToroException
public static String savePackageProperty(String key, String value) throws Exception
Used to save a property. Useful for saving and loading configuration data. The config data is stored in a standard Java Properties file at
<esb-home>/packages/<package-name>/conf/package.properties
Example usage:
'alias'.savePackageProperty('sampleAlias')
key
- The property key/namevalue
- The property valueException
public static void savePackagePropertyComment(String key, String comment) throws Exception
Used to save a comment to an existing property. Useful to add description on the property
<esb-home>/packages/<package-name>/conf/package.properties
Example usage:
'alias'.savePackagePropertyComment('This is a comment')
key
- The property key/namecomment
- the comment to the keyException
public static String getPackagePropertyComment(String key) throws Exception
Used to get comment from an existing property. Useful to read description on the property
<esb-home>/packages/<package-name>/conf/package.properties
Example usage:
'alias'.getPackagePropertyComment()
key
- The property key/nameException
public static String[] getPackagePropertyArray(String key, String[] defaultValue) throws ToroException
Get a Martini package property as Array. Automatically creates an array on comma separated value
Example usage:
'alias'.getPackagePropertyArray()
key
- The property name/keydefaultValue
- The value to return if the property doesn't existToroException
public static String[] getPackagePropertyArray(String key) throws ToroException
Get a Martini package property as Array. Automatically creates an array on comma separated value
Example usage:
'alias'.getPackagePropertyArray()
key
- The property name/keyToroException
public static String getPackageProperty(String key) throws ToroException
Get a Martini package property
Example usage:
'alias'.getPackageProperty()
key
- The property name/keyToroException
public static String getPackageProperty(String key, String defaultValue) throws ToroException
Get a Martini package property
Example usage:
'alias'.getPackageProperty('sampleAlias')
key
- The property name/keydefaultValue
- The value to return if the property doesn't existToroException
public static String getApplicationProperty(String key)
Get a Martini Runtime property
Example usage:
'alias'.getApplicationProperty('sampleAlias')
key
- The property name/keypublic static String getApplicationProperty(String key, String defaultValue)
Get a Martini Runtime property
Example usage:
'alias'.getApplicationProperty('sampleAlias')
key
- The property name/keydefaultValue
- The value to return if the property doesn't existpublic static String removePackageProperty(String key) throws ToroException
Delete a Martini package property
Example usage:
'alias'.removeTOROProperty('sampleAlias')
key
- The name of the propertyToroException
public Object getAdaptee()
getAdaptee
in class Proxy
public void setAdaptee(Object adaptee)
setAdaptee
in class Proxy
public Object invokeMethod(String name, Object args)
invokeMethod
in interface GroovyObject
invokeMethod
in class Proxy
Copyright © 2019. All rights reserved.