Class ActionDef
- java.lang.Object
-
- com.avoka.fc.core.service.job.config.ActionDef
-
- All Implemented Interfaces:
IDefJsonSerializer
public class ActionDef extends Object implements IDefJsonSerializer
Provides an immutable Action configuration class.Action JSON Configuration
{ "name" : "Handle Submission", "type" : "Task Wait", "serviceName" : "Review And Approval Handle Submission", "serviceVersion" : "0.1.0", "preCondition" : "$formDatMap.type == 'Home Insurance'" }
- Since:
- 4.0.0
-
-
Constructor Summary
Constructors Constructor Description ActionDef(Map actionMap, String stepName, String jobJson, int sequence)
Create an Action configuration object from the given action configuration map (JSON).ActionDef(Map actionMap, String stepName, String jobJson, int sequence, boolean useJobJsonErrorChecking)
Create an Action configuration object from the given action configuration map (JSON).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getName()
String
getPreCondition()
Map<String,String>
getPropertyMap()
String
getPropertyValue(String propertyName)
int
getSequence()
String
getServiceName()
String
getServiceVersion()
String
getType()
Boolean
isPropertyTemplateEvaluation(String propertyName)
Return true if the property value should be evaluated with a Velocity template or false otherwiseboolean
isRedirectNext()
String
toString()
void
writeJson(StringBuilder builder)
Appends the JSON text representation of this object to the string builder.
-
-
-
Constructor Detail
-
ActionDef
public ActionDef(Map actionMap, String stepName, String jobJson, int sequence)
Create an Action configuration object from the given action configuration map (JSON). A validation exception is returned if the Action JSON (String):- action must contain an non empty name
- action must contain an valid type @see JobAction.TYPE_VALUES
- action must contain an non empty serviceName
- action can contain an expiryServiceName
- if specified the expiryServiceName if specified cannot be empty.
- Parameters:
actionMap
- the action configuration map JSON (required)stepName
- the name of the step (required)jobJson
- this job definition JSON source (required)sequence
- the job action sequence in the parent job step
-
ActionDef
public ActionDef(Map actionMap, String stepName, String jobJson, int sequence, boolean useJobJsonErrorChecking)
Create an Action configuration object from the given action configuration map (JSON). A validation exception is returned if the Action JSON (String):- action must contain an non empty name
- action must contain an valid type @see JobAction.TYPE_VALUES
- action must contain an non empty serviceName
- action can contain an expiryServiceName
- if specified the expiryServiceName if specified cannot be empty.
- Parameters:
actionMap
- the action configuration map JSON (required)stepName
- the name of the step (required)jobJson
- this job definition JSON source (required)sequence
- the job action sequence in the parent job stepuseJobJsonErrorChecking
- boolean if set to true will use the JobJson Error Checking.- Since:
- 4.3.4
-
-
Method Detail
-
getName
public String getName()
- Returns:
- the action name
-
getType
public String getType()
- Returns:
- the action type
-
getSequence
public int getSequence()
- Returns:
- the action sequence in the parent step
- Since:
- 4.3.0
-
getServiceName
public String getServiceName()
- Returns:
- the service name
-
getServiceVersion
public String getServiceVersion()
- Returns:
- the service version String
- Since:
- 5.1.0
-
getPreCondition
public String getPreCondition()
- Returns:
- the action creation pre-condition
-
isRedirectNext
public boolean isRedirectNext()
- Returns:
- true if the action should redirect the user to the next form
- Since:
- 4.3.0
-
getPropertyValue
public String getPropertyValue(String propertyName)
- Parameters:
propertyName
- the name of the property- Returns:
- the value(String) for the corresponding property name
-
isPropertyTemplateEvaluation
public Boolean isPropertyTemplateEvaluation(String propertyName)
Return true if the property value should be evaluated with a Velocity template or false otherwise- Parameters:
propertyName
- the name of the property- Returns:
- true if the property value should be evaluated with a Velocity template or false otherwise
- Since:
- 4.1.0
-
toString
public String toString()
-
writeJson
public void writeJson(StringBuilder builder)
Description copied from interface:IDefJsonSerializer
Appends the JSON text representation of this object to the string builder.- Specified by:
writeJson
in interfaceIDefJsonSerializer
- Parameters:
builder
- JSON string builder to write to- See Also:
IDefJsonSerializer.writeJson(StringBuilder)
-
-