Groovy Documentation

org.grules.script.expressions
[Groovy] Class SubrulesSeq

java.lang.Object
  org.grules.script.expressions.SubrulesSeq
All Implemented Interfaces:
Term

class SubrulesSeq

A sequence of subrules.


Method Summary
SubrulesSeq add(Subrule subrule)

Adds the given subrule to the subrules sequence.

SubrulesSeq add(java.lang.Object expression)

Wraps the given rule expression into a subrule and adds it to the subrules sequence.

void addSkipFunction(java.lang.String functionName)

java.lang.Object apply(java.lang.Object originalValue)

Applies subrules in order.

boolean hasSkipFunction(Subrule functionSubrule)

java.lang.String toString()

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Method Detail

add

SubrulesSeq add(Subrule subrule)
Adds the given subrule to the subrules sequence.


add

SubrulesSeq add(java.lang.Object expression)
Wraps the given rule expression into a subrule and adds it to the subrules sequence.


addSkipFunction

void addSkipFunction(java.lang.String functionName)


apply

@Override
java.lang.Object apply(java.lang.Object originalValue)
Applies subrules in order. If validation error is thrown and the source subrule does not have an error action, it is taken from the first rule that comes after it and specifies non-empty error action, and if there is no such subrule an empty error action is assumed.


hasSkipFunction

boolean hasSkipFunction(Subrule functionSubrule)


toString

@Override
java.lang.String toString()


 

Groovy Documentation