Class ActionStepProperties
- java.lang.Object
-
- com.avoka.fc.core.service.job.impl.ActionStepProperties
-
public class ActionStepProperties extends Object
Provides a class to resolve action step properties.Resolution Order
Action step properties are resolved in the following order:- lookup in the action properties of the Job Definition
- lookup in the action service definition service parameters
- lookup in the step properties of the current step in the
- lookup in the job controller service definition parameters
- lookup in the job properties of the Job Definition
- Since:
- 4.0.0
-
-
Constructor Summary
Constructors Constructor Description ActionStepProperties(ActionContext actionContext)
Create a ActionStepProperties object with the given action context.ActionStepProperties(ActionContext actionContext, IJobActionService jobActionService)
Create a ActionStepProperties object with the given action context and action service.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<Map.Entry<String,Object>>
entrySet()
Return the property entry set.Boolean
getBooleanProperty(String name)
Return the date property value for the given name.Boolean
getBooleanProperty(String name, Map<String,String> formDataMap)
Return the date property value for the given name.Date
getDateProperty(String name)
Return the date property value for the given name, date format (yyyy-[m]m-[d]d).Date
getDateProperty(String name, Map<String,String> formDataMap)
Return the date property value for the given name, date format (yyyy-[m]m-[d]d).Double
getDoubleProperty(String name)
Return the double property value for the given name.Double
getDoubleProperty(String name, Map<String,String> formDataMap)
Return the double property value for the given name.Integer
getIntegerProperty(String name)
Return the integer property value for the given name.Integer
getIntegerProperty(String name, Map<String,String> formDataMap)
Return the integer property value for the given name.JobDef
getJobDef()
Return the Job Definition associated with these action step properties.Set<String>
getKeySet()
Return the set resolved of available property keys (names).String
getProperty(String name)
Return the property value for the given name.String
getProperty(String name, Map<String,String> formDataMap)
Return the property value for the given name.Object
getPropertyObject(String name, Map<String,String> formDataMap)
Return the property value for the given name.Object
getPropertyObject(String name, Map<String,String> formDataMap, Map<String,Object> model)
Return the property value for the given name.String
getRawPropertyValue(String name)
Return the raw property value before property function or StringTemplate conversion is run.boolean
isValidRoute(String routeName)
return true if the routeName is validvoid
setUsePropertyFunctions(boolean usePropertyFunctions)
Specify whether to use property functions, can be switched off to enable property validation.
-
-
-
Constructor Detail
-
ActionStepProperties
public ActionStepProperties(ActionContext actionContext, IJobActionService jobActionService)
Create a ActionStepProperties object with the given action context and action service.- Parameters:
actionContext
- the job action context (required)jobActionService
- the job action service (optional)
-
ActionStepProperties
public ActionStepProperties(ActionContext actionContext)
Create a ActionStepProperties object with the given action context. Note by using this constructor ActionService Properties cannot be resolved for the Job Action.- Parameters:
actionContext
- the job action context (required)- Since:
- 4.3.0
-
-
Method Detail
-
getBooleanProperty
public Boolean getBooleanProperty(String name)
Return the date property value for the given name.- Parameters:
name
- the name of the action step custom property or the service definition parameter name- Returns:
- the resolved boolean property value
-
getBooleanProperty
public Boolean getBooleanProperty(String name, Map<String,String> formDataMap)
Return the date property value for the given name.- Parameters:
name
- the name of the action step custom property or the service definition parameter nameformDataMap
- the form data map (optional)- Returns:
- the resolved boolean property value
-
getDateProperty
public Date getDateProperty(String name)
Return the date property value for the given name, date format (yyyy-[m]m-[d]d).- Parameters:
name
- the name of the action step custom property or the service definition parameter name- Returns:
- the resolved date property value
-
getDateProperty
public Date getDateProperty(String name, Map<String,String> formDataMap)
Return the date property value for the given name, date format (yyyy-[m]m-[d]d).- Parameters:
name
- the name of the action step custom property or the service definition parameter nameformDataMap
- the form data map (optional)- Returns:
- the resolved date property value
-
getDoubleProperty
public Double getDoubleProperty(String name)
Return the double property value for the given name.- Parameters:
name
- the name of the action step custom property or the service definition parameter name- Returns:
- the resolved double property value
-
getDoubleProperty
public Double getDoubleProperty(String name, Map<String,String> formDataMap)
Return the double property value for the given name.- Parameters:
name
- the name of the action step custom property or the service definition parameter nameformDataMap
- the form data map (optional)- Returns:
- the resolved double property value
-
getIntegerProperty
public Integer getIntegerProperty(String name)
Return the integer property value for the given name.- Parameters:
name
- the name of the action step custom property or the service definition parameter name- Returns:
- the resolved integer property value
-
getIntegerProperty
public Integer getIntegerProperty(String name, Map<String,String> formDataMap)
Return the integer property value for the given name.- Parameters:
name
- the name of the action step custom property or the service definition parameter nameformDataMap
- the form data map (optional)- Returns:
- the resolved integer property value
-
getProperty
public String getProperty(String name)
Return the property value for the given name.- Parameters:
name
- the name of the action step custom property or the service definition parameter name- Returns:
- the resolved property value
-
getProperty
public String getProperty(String name, Map<String,String> formDataMap)
Return the property value for the given name.- Parameters:
name
- the name of the action step custom property or the service definition parameter nameformDataMap
- the form data map (optional)- Returns:
- the resolved property value
-
getPropertyObject
public Object getPropertyObject(String name, Map<String,String> formDataMap)
Return the property value for the given name.- Parameters:
name
- the name of the action step custom property or the service definition parameter nameformDataMap
- the form data map (optional)- Returns:
- the resolved property value
-
getPropertyObject
public Object getPropertyObject(String name, Map<String,String> formDataMap, Map<String,Object> model)
Return the property value for the given name.- Parameters:
name
- the name of the action step custom property or the service definition parameter nameformDataMap
- the form data map (optional)model
- template model Map (required)- Returns:
- the resolved property value
-
getRawPropertyValue
public String getRawPropertyValue(String name)
Return the raw property value before property function or StringTemplate conversion is run.- Parameters:
name
- the name of the action step custom property or the service definition parameter name- Returns:
- the raw property value String before property function or StringTemplate conversion
-
getKeySet
public Set<String> getKeySet()
Return the set resolved of available property keys (names).- Returns:
- the set resolved of available property keys (names)
-
entrySet
public Set<Map.Entry<String,Object>> entrySet()
Return the property entry set.- Returns:
- the entry set.
- Since:
- 18.5.0
-
getJobDef
public JobDef getJobDef()
Return the Job Definition associated with these action step properties.- Returns:
- the Job Definition associated with these action step properties
-
setUsePropertyFunctions
public void setUsePropertyFunctions(boolean usePropertyFunctions)
Specify whether to use property functions, can be switched off to enable property validation.- Parameters:
usePropertyFunctions
- specify whether to execute property functions
-
isValidRoute
public boolean isValidRoute(String routeName)
return true if the routeName is valid- Parameters:
routeName
- the selected route name String from the form submission- Returns:
- true if the routeName is contained in the stepDef
-
-