org.apache.oozie.service
Class ELService
java.lang.Object
org.apache.oozie.service.ELService
- All Implemented Interfaces:
- Service
public class ELService
- extends Object
- implements Service
The ELService creates ELEvaluator
instances preconfigured with constants and functions defined in the
configuration.
The following configuration parameters control the EL service: CONF_CONSTANTS
list
of constant definitions to be available for EL evaluations. CONF_FUNCTIONS
list of function definitions
to be available for EL evalations. Definitions must be separated by a comma, definitions are trimmed. The
syntax for a constant definition is PREFIX:NAME=CLASS_NAME#CONSTANT_NAME
. The syntax for a constant
definition is PREFIX:NAME=CLASS_NAME#METHOD_NAME
.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CONF_PREFIX
public static final String CONF_PREFIX
- See Also:
- Constant Field Values
CONF_CONSTANTS
public static final String CONF_CONSTANTS
- See Also:
- Constant Field Values
CONF_EXT_CONSTANTS
public static final String CONF_EXT_CONSTANTS
- See Also:
- Constant Field Values
CONF_FUNCTIONS
public static final String CONF_FUNCTIONS
- See Also:
- Constant Field Values
CONF_EXT_FUNCTIONS
public static final String CONF_EXT_FUNCTIONS
- See Also:
- Constant Field Values
CONF_GROUPS
public static final String CONF_GROUPS
- See Also:
- Constant Field Values
ELService
public ELService()
init
public void init(Services services)
throws ServiceException
- Initialize the EL service.
- Specified by:
init
in interface Service
- Parameters:
services
- services instance.
- Throws:
ServiceException
- thrown if the EL service could not be initialized.
destroy
public void destroy()
- Destroy the EL service.
- Specified by:
destroy
in interface Service
getInterface
public Class<? extends Service> getInterface()
- Return the public interface for EL service.
- Specified by:
getInterface
in interface Service
- Returns:
ELService
.
createEvaluator
public ELEvaluator createEvaluator(String group)
- Return an
ELEvaluator
pre-configured with the constants and functions for the specific group of
EL-functions and variables defined in the configuration. If the group name doesn't exist,
IllegalArgumentException is thrown
- Parameters:
group:
- Name of the group of required EL Evaluator.
- Returns:
- a preconfigured
ELEvaluator
.
findMethod
public static Method findMethod(String className,
String methodName)
throws ServiceException
- Throws:
ServiceException
findConstant
public static Object findConstant(String className,
String constantName)
throws ServiceException
- Throws:
ServiceException
Copyright © 2013 Apache Software Foundation. All Rights Reserved.