com.filenet.wcm.toolkit.server.util
Class SubscriptionExpressionUtil

java.lang.Object
  extended bycom.filenet.wcm.toolkit.server.util.SubscriptionExpressionUtil

public class SubscriptionExpressionUtil
extends java.lang.Object

Utility class to support creating subscription expression for the Workflow Subscription expression page.


Constructor Summary
SubscriptionExpressionUtil(org.w3c.dom.Document propDescXML, java.lang.String expression, java.util.Locale locale)
          Constructor to create a new utility.
 
Method Summary
 void add(java.lang.String symName, java.lang.String operator, java.lang.String value)
          Adds a new condition to the expression.
 void addExpressionOperator(java.lang.String operator)
          Adds a new logical operator (and, or and etc...) to the expression.
 org.w3c.dom.NodeList getEventExpressionOperatorNodeList(java.lang.String symName)
          Returns the list of supported event expression operators.
 java.util.ArrayList getExceptionsArray()
          Returns all exceptions encountered when loading the expression into the expression vector.
 java.lang.String getExpression()
          Returns the workflow or event expression.
 org.w3c.dom.NodeList getExpressionNodeList()
          Returns the expression as nodelist
 org.w3c.dom.Document getPropDescsXML()
          Gets the property descriptions XML to be used to build an expression
 org.w3c.dom.NodeList getWorkflowExpressionOperatorNodeList(java.lang.String symName)
          Returns the list of supported wofkflow expression operators.
 boolean hasUnsupportedOperator()
          Returns true if the expression has operators that are not currently supported by the expression.
 void insert(java.lang.String symName, java.lang.String operator, java.lang.String value, int index)
          Inserts a new condition to the expression.
 void insertExpressionOperator(java.lang.String operator, int index)
          Inserts a new logical operator (and, or and etc...) to the expression.
 void moveDown(java.lang.String[] items)
          Moves the selected items down in the expression.
 void moveUp(java.lang.String[] items)
          Moves the selected items up in the expression.
 void remove(int index)
          Removes the selected condition or operator using its index.
 void setPropDescsXML(org.w3c.dom.Document propDescsXML)
          Sets the property descriptions XML to be used to build an expression
 boolean validateExpression()
          Validates the expression created by the expression builder.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubscriptionExpressionUtil

public SubscriptionExpressionUtil(org.w3c.dom.Document propDescXML,
                                  java.lang.String expression,
                                  java.util.Locale locale)
                           throws java.lang.Exception
Constructor to create a new utility.

Parameters:
expression - String holding the workflow filtered expression or the event filtered expression.
locale - Locale holding the locale information.
Throws:
java.lang.Exception
Method Detail

add

public void add(java.lang.String symName,
                java.lang.String operator,
                java.lang.String value)
         throws java.lang.Exception
Adds a new condition to the expression.

Parameters:
symName - String holding the workflow filtered expression or the event filtered expression.
operator - String holding the condition operator (=, <>, like, in, <, >, >=, <=)
value - String holding the value of the expression condition.
Throws:
java.lang.Exception

insert

public void insert(java.lang.String symName,
                   java.lang.String operator,
                   java.lang.String value,
                   int index)
            throws java.lang.Exception
Inserts a new condition to the expression.

Parameters:
symName - String The workflow filtered expression or the event filtered expression.
operator - String The condition operator (=, <>, like, in, <, >, >=, <=)
value - String The value of the expression condition.
index - int The position where the new item will be inserted into the expression.
Throws:
java.lang.Exception

remove

public void remove(int index)
Removes the selected condition or operator using its index.

Parameters:
index - int The index of the selected item.

addExpressionOperator

public void addExpressionOperator(java.lang.String operator)
Adds a new logical operator (and, or and etc...) to the expression.

Parameters:
operator - String The selected logical operator.

insertExpressionOperator

public void insertExpressionOperator(java.lang.String operator,
                                     int index)
Inserts a new logical operator (and, or and etc...) to the expression.

Parameters:
operator - String The selected logical operator.
index - int The position where the new item will be inserted into the expression.

getExpressionNodeList

public org.w3c.dom.NodeList getExpressionNodeList()
Returns the expression as nodelist

Returns:
NodeList Object holding the expression.

moveUp

public void moveUp(java.lang.String[] items)
            throws java.lang.Exception
Moves the selected items up in the expression.

Parameters:
items - String[] The items to be moved up in the expression.
Throws:
java.lang.Exception

moveDown

public void moveDown(java.lang.String[] items)
              throws java.lang.Exception
Moves the selected items down in the expression.

Parameters:
items - String[] The items to be moved up in the expression.
Throws:
java.lang.Exception

getEventExpressionOperatorNodeList

public org.w3c.dom.NodeList getEventExpressionOperatorNodeList(java.lang.String symName)
                                                        throws java.lang.Exception
Returns the list of supported event expression operators.

Returns:
NodeList Collection holding the event expression operators.
Throws:
java.lang.Exception

getWorkflowExpressionOperatorNodeList

public org.w3c.dom.NodeList getWorkflowExpressionOperatorNodeList(java.lang.String symName)
                                                           throws java.lang.Exception
Returns the list of supported wofkflow expression operators.

Returns:
NodeList Collection holding the wofkflow expression operators.
Throws:
java.lang.Exception

hasUnsupportedOperator

public boolean hasUnsupportedOperator()
Returns true if the expression has operators that are not currently supported by the expression.

Returns:
boolean true if the expression has operators that are not currently supported by the expression.

getExpression

public java.lang.String getExpression()
                               throws java.lang.Exception
Returns the workflow or event expression.

Returns:
String The workflow or event expression.
Throws:
java.lang.Exception

validateExpression

public boolean validateExpression()
                           throws java.lang.Exception
Validates the expression created by the expression builder.

Returns:
boolean true if the expression is valid. Otherwise an exception will be thrown.
Throws:
java.lang.Exception

getExceptionsArray

public java.util.ArrayList getExceptionsArray()
Returns all exceptions encountered when loading the expression into the expression vector.

Returns:
ArrayList A collection of all loading errors

getPropDescsXML

public org.w3c.dom.Document getPropDescsXML()
Gets the property descriptions XML to be used to build an expression

Returns:
Document The property descriptions XML of the selected target class

setPropDescsXML

public void setPropDescsXML(org.w3c.dom.Document propDescsXML)
                     throws java.lang.Exception
Sets the property descriptions XML to be used to build an expression

Parameters:
propDescsXML - Document The property descriptions XML of the selected target class
Throws:
java.lang.Exception


© Copyright IBM Corp. 2002, 2007. All Rights Reserved.