Package org.jbpm.process.instance.impl
Class ReturnValueConstraintEvaluator
- java.lang.Object
-
- org.jbpm.process.instance.impl.ReturnValueConstraintEvaluator
-
- All Implemented Interfaces:
Externalizable,Serializable,org.drools.core.spi.Wireable,ConstraintEvaluator,Constraint
public class ReturnValueConstraintEvaluator extends Object implements Constraint, ConstraintEvaluator, org.drools.core.spi.Wireable, Externalizable
Default implementation of a constraint.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ReturnValueConstraintEvaluator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanevaluate(NodeInstance instance, org.kie.api.definition.process.Connection connection, Constraint constraint)StringgetConstraint()Typically this method returns the constraint as a StringStringgetDialect()Returns the dialect of the constraint, e.g.ObjectgetMetaData(String name)StringgetName()Returns the name of the constraintintgetPriority()Returns the priority of the constraintReturnValueEvaluatorgetReturnValueEvaluator()StringgetType()Returns the type of the constraint, e.g.booleanisDefault()voidreadExternal(ObjectInput in)voidsetConstraint(String constraint)Method for setting the constraintvoidsetDefault(boolean isDefault)voidsetDialect(String dialect)Method for setting the dialect of the constraint, e.g.voidsetEvaluator(ReturnValueEvaluator evaluator)voidsetMetaData(String name, Object value)voidsetName(String name)Sets the name of the constraintvoidsetPriority(int priority)Method for setting the priority of the constraintvoidsetType(String type)Method for setting the type of the constraint, e.g.StringtoString()voidwire(Object object)voidwriteExternal(ObjectOutput out)
-
-
-
Method Detail
-
getConstraint
public String getConstraint()
Description copied from interface:ConstraintTypically this method returns the constraint as a String- Specified by:
getConstraintin interfaceConstraint- Returns:
- the constraint
-
setConstraint
public void setConstraint(String constraint)
Description copied from interface:ConstraintMethod for setting the constraint- Specified by:
setConstraintin interfaceConstraint- Parameters:
constraint- the constraint
-
getName
public String getName()
Description copied from interface:ConstraintReturns the name of the constraint- Specified by:
getNamein interfaceConstraint- Returns:
- the name of the constraint
-
setName
public void setName(String name)
Description copied from interface:ConstraintSets the name of the constraint- Specified by:
setNamein interfaceConstraint- Parameters:
name- the name of the constraint
-
getPriority
public int getPriority()
Description copied from interface:ConstraintReturns the priority of the constraint- Specified by:
getPriorityin interfaceConstraint- Returns:
- the priority of the constraint
-
setPriority
public void setPriority(int priority)
Description copied from interface:ConstraintMethod for setting the priority of the constraint- Specified by:
setPriorityin interfaceConstraint- Parameters:
priority- the priority of the constraint
-
getDialect
public String getDialect()
Description copied from interface:ConstraintReturns the dialect of the constraint, e.g. "mvel" or "java"- Specified by:
getDialectin interfaceConstraint- Returns:
- the dialect of the constraint
-
setDialect
public void setDialect(String dialect)
Description copied from interface:ConstraintMethod for setting the dialect of the constraint, e.g. "mvel" or "java"- Specified by:
setDialectin interfaceConstraint- Parameters:
dialect- the dialect of the constraint
-
getType
public String getType()
Description copied from interface:ConstraintReturns the type of the constraint, e.g. "code" or "rule"- Specified by:
getTypein interfaceConstraint- Returns:
- the type of the constraint
-
setType
public void setType(String type)
Description copied from interface:ConstraintMethod for setting the type of the constraint, e.g. "code" or "rule"- Specified by:
setTypein interfaceConstraint- Parameters:
type- the type of the constraint
-
isDefault
public boolean isDefault()
- Specified by:
isDefaultin interfaceConstraint
-
setDefault
public void setDefault(boolean isDefault)
- Specified by:
setDefaultin interfaceConstraint
-
wire
public void wire(Object object)
- Specified by:
wirein interfaceorg.drools.core.spi.Wireable
-
setEvaluator
public void setEvaluator(ReturnValueEvaluator evaluator)
-
getReturnValueEvaluator
public ReturnValueEvaluator getReturnValueEvaluator()
-
evaluate
public boolean evaluate(NodeInstance instance, org.kie.api.definition.process.Connection connection, Constraint constraint)
- Specified by:
evaluatein interfaceConstraintEvaluator
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
setMetaData
public void setMetaData(String name, Object value)
- Specified by:
setMetaDatain interfaceConstraint
-
getMetaData
public Object getMetaData(String name)
- Specified by:
getMetaDatain interfaceConstraint
-
-