com.ibm.commerce.component.bod

Class Verb

  • java.lang.Object
    • com.ibm.commerce.component.bod.Verb
  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    CancelVerb, ConfirmVerb, PostVerb, SyncVerb, UpdateVerb


    public abstract class Verb
    extends java.lang.Object
    implements java.io.Serializable
    A Verb specifies an action to be performed on a noun. All verbs contain a default action and one or more expressions. An Expression specifies a VerbAction and VerbPath for a particular noun in the BusinessObjectDocument. A Verb is contained inside of a DataArea which is nested in a BusinessObjectDocument.
    See Also:
    Serialized Form
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM copyright notice field.
        See Also:
        Constant Field Values
      • CLASS_NAME

        public static final java.lang.String CLASS_NAME
        Name of this class
    • Constructor Detail

      • Verb

        public Verb()
        Constructs an empty verb.
    • Method Detail

      • isEmpty

        public boolean isEmpty()
        Returns:
        true if the verb has no expressions. False otherwise.
      • getExpressions

        public Expression[] getExpressions()
        Returns:
        all the expressions of this verb
      • getExpressionList

        public java.util.List getExpressionList()
        Returns:
        an unmodifiable list of all the expressions
      • addExpression

        public void addExpression(Expression expression)
        Adds an expression to the verb.
        Parameters:
        expression - the expression to be added.
      • addExpression

        public void addExpression(VerbAction action,
                                  VerbPath path)
        Adds an expression to the verb
        Parameters:
        action - the action of the new expression
        path - the VerbPath of the new expression
      • addExpression

        public void addExpression(VerbAction action,
                                  VerbPathStep[] steps)
        Adds an expression to the verb
        Parameters:
        action - the action of the new expression
        steps - the steps that represents the VerbPath of the new expression.
      • getDefaultAction

        public abstract VerbAction getDefaultAction()
        Returns:
        default action of the verb
      • isPathInExpression

        public boolean isPathInExpression(java.lang.String path)
        Checks if a path is contained in the expression
        Parameters:
        the - path that is to be checked
        Returns:
        true if the path is in the verb's expression list. False otherwise
      • getAction

        public VerbAction getAction(VerbPath path)
        Gets the action of an expression that contains the given path
        Parameters:
        path - the path that is associated with an action in expression list
        Returns:
        a legitimate action if the given path is in the verb. Null otherwise.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
        Returns:
        the String representation of this verb