public class OperationBuilder extends Object
Operation
objects. Operation
s are a way to 'assign', 'operate', 'set a new value', ... on something.
See OperatorType
for the different types of operation.OperatorType
,
Operation
Constructor and Description |
---|
OperationBuilder() |
Modifier and Type | Method and Description |
---|---|
Operation |
attachBusinessDataSetAttributeOperation(String businessDataName,
Expression expressionReturningBusinessData)
Creates a new operation of type
OperatorType.ASSIGNMENT that associates an existing Business Data to the current process. |
Operation |
createBusinessDataSetAttributeOperation(String businessDataName,
String methodName,
String methodParamType,
Expression expression)
Creates a new operation of type
LeftOperand.TYPE_BUSINESS_DATA that allows to update a Business Data by calling a Java setter on one of
its attributes. |
Operation |
createJavaMethodOperation(String objectName,
String methodName,
String methodParamType,
Expression methodParams)
create an operation that update a data that contains a java object
|
OperationBuilder |
createNewInstance()
Initiate the building of a new
Operation . |
Operation |
createSetDataOperation(String dataName,
Expression expression) |
Operation |
createSetDocument(String docName,
Expression expression)
create an operation that update a document
|
Operation |
createSetDocumentList(String docName,
Expression expression)
create an operation that update a document list
|
Operation |
createSetStringIndexOperation(int index,
Expression setValue)
Creates a new operation that sets a new value to a String search index.
|
Operation |
createXPathOperation(String xmlName,
String xPath,
Expression setValue)
create an operation that update an xml data using a xpath expression
|
Operation |
deleteBusinessDataOperation(String businessDataName)
Creates a new operation of type
OperatorType.ASSIGNMENT that remove the named Business Data of the current process. |
Operation |
done() |
OperationBuilder |
setLeftOperand(LeftOperand leftOperand)
Sets the
LeftOperand of this operation. |
OperationBuilder |
setLeftOperand(String name,
boolean external)
Deprecated.
use setLeftOperand(String,String)
Sets the
LeftOperand of this operation. It is built for you with its name and external properties. |
OperationBuilder |
setLeftOperand(String name,
LeftOperandType type,
boolean external)
Deprecated.
use setLeftOperand(String,String)
Sets the
LeftOperand of this operation. It is built for you with its name and external properties. |
OperationBuilder |
setLeftOperand(String name,
String type)
Sets the
LeftOperand of this operation. |
OperationBuilder |
setOperator(String operator) |
OperationBuilder |
setOperatorInputType(String operatorInputType) |
OperationBuilder |
setRightOperand(Expression rightOperand) |
OperationBuilder |
setType(OperatorType operatorType) |
public OperationBuilder createNewInstance()
Operation
. The Operation
building will be complete when calling the done()
method.public OperationBuilder setLeftOperand(LeftOperand leftOperand)
LeftOperand
of this operation. A LeftOperand
can be obtained by using LeftOperandBuilder
.leftOperand
- the LeftOperand
to set.LeftOperandBuilder
@Deprecated public OperationBuilder setLeftOperand(String name, boolean external)
LeftOperand
of this operation. It is built for you with its name and external properties.name
- the name of the left operandexternal
- is the data managed externally and thus should not be tried to be updated?@Deprecated public OperationBuilder setLeftOperand(String name, LeftOperandType type, boolean external)
LeftOperand
of this operation. It is built for you with its name and external properties.name
- the name of the left operandtype
- external
- public OperationBuilder setLeftOperand(String name, String type)
LeftOperand
of this operation. It is built for you with its name and external properties.name
- the name of the left operandtype
- public OperationBuilder setType(OperatorType operatorType)
operatorType
- public OperationBuilder setOperator(String operator)
operator
- public OperationBuilder setOperatorInputType(String operatorInputType)
operatorInputType
- public OperationBuilder setRightOperand(Expression rightOperand)
rightOperand
- public Operation createSetDataOperation(String dataName, Expression expression)
dataName
- expression
- Operation
.public Operation createBusinessDataSetAttributeOperation(String businessDataName, String methodName, String methodParamType, Expression expression)
LeftOperand.TYPE_BUSINESS_DATA
that allows to update a Business Data by calling a Java setter on one of
its attributes.businessDataName
- the name of the business data to update.methodName
- the Java setter method to call.methodParamType
- the type of the Java setter method parameter (to be able to differentiate 2 methods with the same name but with different parameter types)expression
- the Expression to evaluate that represents the new value to set.Operation
.public Operation attachBusinessDataSetAttributeOperation(String businessDataName, Expression expressionReturningBusinessData)
OperatorType.ASSIGNMENT
that associates an existing Business Data to the current process.businessDataName
- the name of the reference in the process.expressionReturningBusinessData
- the expression returning an existing business data.Operation
.LeftOperand.TYPE_BUSINESS_DATA
public Operation deleteBusinessDataOperation(String businessDataName)
OperatorType.ASSIGNMENT
that remove the named Business Data of the current process.businessDataName
- the name of the reference in the process.Operation
.OperatorType.DELETION
public Operation createSetDocument(String docName, Expression expression)
docName
- the name of the documentexpression
- the expression that returns a DocumentValue
Operation
.public Operation createSetDocumentList(String docName, Expression expression)
docName
- the name of the document listexpression
- the expression that returns a list of DocumentValue
Operation
.public Operation createXPathOperation(String xmlName, String xPath, Expression setValue)
xmlName
- name of the dataxPath
- the xpath expressionsetValue
- the value to set the node in the data withOperation
.public Operation createJavaMethodOperation(String objectName, String methodName, String methodParamType, Expression methodParams)
objectName
- the name of the datamethodName
- the method to call on this data to update itmethodParamType
- the type of the parameter of the methodmethodParams
- the value to call the method withOperation
.public Operation createSetStringIndexOperation(int index, Expression setValue)
index
- the search index to setsetValue
- the Expression to set the search index to.Operation
.public Operation done()
Operation
.Copyright © 2016 Bonitasoft S.A.. All rights reserved.