Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.ifs.utils.action
Class ActionQueueCreator

    java.lang.Object
      oracle.ifs.utils.action.ActionQueueCreator

    public class ActionQueueCreator

extends java.lang.Object

Copyright (c) 2002, 2008, Oracle. All rights reserved. ActionQueueCreator creates an ActionQueue from an XML list of actions. To create an ActionQueue from an XML source, one of the variants of createActionQueue() should be called passing it the source.
The actions added to the ActionQueue will be of type Action. Clients can override createAction(), which is called to process each action tag, to create their own custom Actions.
The default element is defined as follows:
Actions can wrapped by multiple conditions. Only if all the conditions surrounding an action evaluate to true, the action is added to the ActionQueue. Conditions evaluate to true if (left op right) is successfule. Valid operations and their semantics for success are defined in the specific implementations of ActionConditions, which are identified by the type attribute. The element is defined as follows:
Finally, as a convenience, default properties can be assigned to each action in the XML file. The default properties can be specified using a elements. An action can override a specific defaulted property by listing the property in its body. The element is defined as follows:
The XML input should only contain a list of actions and conditions, and possibly a set of default properties to be applied to all actions:

Modified:
  bharb 1/18/2002 Created.

Field Summary
`static java.lang.String` | `ACTION_TAG` The "action" tag in the XML action list file.
`static java.lang.String` | `CLASS_TAG` The "class" tag in the XML action list file indicating the fully qualified class name that represents the action specified by the ACTION_TAG
`static java.lang.String` | `CONDITION_TAG` The "condition" tag in the XML action list file.
`static java.lang.String` | `CONDITION_TYPE` An attribute of the CONDITION_TAG.
`static java.lang.String` | `DEFAULTS_TAG` The "defaults" tag in the XML action list file.
`static java.lang.String` | `DESCRIPTION` The DESCRIPTION is an optional attribute of the ACTION_TAG.
`static java.lang.String` | `LABEL` The LABEL is an attribute of the ACTION_TAG.
`static java.lang.String` | `LEFT_OPERAND` An attribute of the CONDITION_TAG.
`protected Substitutor` | `m_Substitutor` The Substitutor used to substitute values extracted from the XML file.
`static java.lang.String` | `NAME` An attribute of the PROPERTY_TAG representing the name of the property the action expects.
`static java.lang.String` | `NO` Common false value for boolean attributes.
`static java.lang.String` | `OPERATION` An attribute of the CONDITION_TAG.
`static java.lang.String` | `PROPERTY_TAG` The "property" tag in the XML action list file.
`static java.lang.String` | `RIGHT_OPERAND` An attribute of the CONDITION_TAG.
`static java.lang.String` | `VALUE` An attribute of the PROPERTY_TAG representing the value of the property the action expects.
`static java.lang.String` | `YES` Common true value for boolean attributes.

Constructor Summary
`ActionQueueCreator()` Creates an instance of an ActionQueueCreator
`ActionQueueCreator(Substitutor substitutor)` Creates an instance of an ActionQueueCreator with a Substitutor.

Method Summary
`protected Action` | `createAction(oracle.xml.parser.v2.XMLElement actionElement)` Creates an Action from the XMLElement provided.
`ActionQueue` | `createActionQueue(org.xml.sax.InputSource xmlInput)` Creates an ActionQueue representing the XML list of actions provided.
`ActionQueue` | `createActionQueue(java.io.InputStream xmlInput)` Creates an ActionQueue representing the XML list of actions provided.
`ActionQueue` | `createActionQueue(java.io.Reader xmlInput)` Creates an ActionQueue representing the XML list of actions provided.
`ActionQueue` | `createActionQueue(java.lang.String xmlInput)` Creates an ActionQueue representing the XML list of actions provided.
`ActionQueue` | `createActionQueue(java.net.URL xmlInput)` Creates an ActionQueue representing the XML list of actions provided.
`protected java.lang.String` | `sub(java.lang.String value)` Passes the value through the Substitutor if one is provided.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### ACTION_TAG

    public static final java.lang.String ACTION_TAG

  Description copied from class: `ActionQueueCreator`
  The "action" tag in the XML action list file. An action should contain a LABEL attribute. It includes an associated CLASS_TAG and an optional set of PROPERTY_TAG's.

  See Also:
    Constant Field Values

### CLASS_TAG

    public static final java.lang.String CLASS_TAG

  Description copied from class: `ActionQueueCreator`
  The "class" tag in the XML action list file indicating the fully qualified class name that represents the action specified by the ACTION_TAG

  See Also:
    Constant Field Values

### PROPERTY_TAG

    public static final java.lang.String PROPERTY_TAG

  Description copied from class: `ActionQueueCreator`
  The "property" tag in the XML action list file. Properties are optional. If present, a PROPERTY_TAG should include NAME and VALUE attributes.

  See Also:
    Constant Field Values

### NAME

    public static final java.lang.String NAME

  Description copied from class: `ActionQueueCreator`
  An attribute of the PROPERTY_TAG representing the name of the property the action expects.

  See Also:
    Constant Field Values

### VALUE

    public static final java.lang.String VALUE

  Description copied from class: `ActionQueueCreator`
  An attribute of the PROPERTY_TAG representing the value of the property the action expects.

  See Also:
    Constant Field Values

### LABEL

    public static final java.lang.String LABEL

  Description copied from class: `ActionQueueCreator`
  The LABEL is an attribute of the ACTION_TAG.

  See Also:
    Constant Field Values

### DESCRIPTION

    public static final java.lang.String DESCRIPTION

  Description copied from class: `ActionQueueCreator`
  The DESCRIPTION is an optional attribute of the ACTION_TAG.

  See Also:
    Constant Field Values

### CONDITION_TAG

    public static final java.lang.String CONDITION_TAG

  Description copied from class: `ActionQueueCreator`
  The "condition" tag in the XML action list file. A condition should contain CONDITION_TYPE, OPERATION, LEFT_OPERAND, and RIGHT_OPERAND attributes, which are all required.

  See Also:
    Constant Field Values

### CONDITION_TYPE

    public static final java.lang.String CONDITION_TYPE

  Description copied from class: `ActionQueueCreator`
  An attribute of the CONDITION_TAG. Identifies the specific type of ActionCondition used to evaluate the OPERATION on the LEFT_OPERNAD and RIGHT_OPERAND.

  See Also:
    Constant Field Values

### OPERATION

    public static final java.lang.String OPERATION

  Description copied from class: `ActionQueueCreator`
  An attribute of the CONDITION_TAG. Identifies the operation executed on the LEFT_OPERAND and RIGHT_OPERAND. Valid operations and their semantics are defined by the specific implemnetations of ActionCondition identified by the CONDITION_TYPE attribute.

  See Also:
    Constant Field Values

### LEFT_OPERAND

    public static final java.lang.String LEFT_OPERAND

  Description copied from class: `ActionQueueCreator`
  An attribute of the CONDITION_TAG. Identifies the left operand.

  See Also:
    Constant Field Values

### RIGHT_OPERAND

    public static final java.lang.String RIGHT_OPERAND

  Description copied from class: `ActionQueueCreator`
  An attribute of the CONDITION_TAG. Identifies the right operand.

  See Also:
    Constant Field Values

### DEFAULTS_TAG

    public static final java.lang.String DEFAULTS_TAG

  Description copied from class: `ActionQueueCreator`
  The "defaults" tag in the XML action list file. Contains default properties to be set on every action in the file. Optional.

  See Also:
    Constant Field Values

### YES

    public static final java.lang.String YES

  Description copied from class: `ActionQueueCreator`
  Common true value for boolean attributes. Equals "yes".

  See Also:
    Constant Field Values

### NO

    public static final java.lang.String NO

  Description copied from class: `ActionQueueCreator`
  Common false value for boolean attributes. Equals "no".

  See Also:
    Constant Field Values

### m_Substitutor

    protected Substitutor m_Substitutor

  Description copied from class: `ActionQueueCreator`
  The Substitutor used to substitute values extracted from the XML file.

Constructor Detail

### ActionQueueCreator

    public ActionQueueCreator()

  Creates an instance of an ActionQueueCreator

### ActionQueueCreator

    public ActionQueueCreator(Substitutor substitutor)

  Creates an instance of an ActionQueueCreator with a Substitutor. Tag and attribute values are passed through the substiute method of the Substitutor before being set on the Actions added to the ActionQueue.

Method Detail

### createActionQueue

    public final ActionQueue createActionQueue(org.xml.sax.InputSource xmlInput)
                                        throws ActionProcessingException,
                                               org.xml.sax.SAXException,
                                               java.io.IOException

  Description copied from class: `ActionQueueCreator`
  Creates an ActionQueue representing the XML list of actions provided.

  Parameters:
    `xmlInput` - InputSource containing an XML representation of the list of actions
  Returns:
    ActionQueue contiaing the list of actions. The queue will be empty if there are no actions specified.
  Throws:
    `ActionProcessingException` - If an error occurred while processing an action tag and creating the the corrosponding Action, possibly wrapping another exception.
    `org.xml.sax.SAXException` - If any SAX error or warning is encountered while processing the XML input, possibly wrapping another exception.
    `java.io.IOException` - If an IO error is encountered in the XML input.
  See Also:
    `ActionQueueCreator.createAction(XMLElement)`

### createActionQueue

    public final ActionQueue createActionQueue(java.io.InputStream xmlInput)
                                        throws ActionProcessingException,
                                               org.xml.sax.SAXException,
                                               java.io.IOException

  Description copied from class: `ActionQueueCreator`
  Creates an ActionQueue representing the XML list of actions provided.

  Parameters:
    `xmlInput` - InputStream containing an XML representation of the list of actions
  Returns:
    ActionQueue contiaing the list of actions. The queue will be empty if there are no actions specified.
  Throws:
    `ActionProcessingException` - If an error occurred while processing an action tag and creating the the corrosponding Action, possibly wrapping another exception.
    `org.xml.sax.SAXException` - If any SAX error or warning is encountered while processing the XML input, possibly wrapping another exception.
    `java.io.IOException` - If an IO error is encountered in the XML input.
  See Also:
    `ActionQueueCreator.createAction(XMLElement)`

### createActionQueue

    public final ActionQueue createActionQueue(java.io.Reader xmlInput)
                                        throws ActionProcessingException,
                                               org.xml.sax.SAXException,
                                               java.io.IOException

  Description copied from class: `ActionQueueCreator`
  Creates an ActionQueue representing the XML list of actions provided.

  Parameters:
    `xmlInput` - Reader containing an XML representation of the list of actions
  Returns:
    ActionQueue contiaing the list of actions. The queue will be empty if there are no actions specified.
  Throws:
    `ActionProcessingException` - If an error occurred while processing an action tag and creating the the corrosponding Action, possibly wrapping another exception.
    `org.xml.sax.SAXException` - If any SAX error or warning is encountered while processing the XML input, possibly wrapping another exception.
    `java.io.IOException` - If an IO error is encountered in the XML input.
  See Also:
    `ActionQueueCreator.createAction(XMLElement)`

### createActionQueue

    public final ActionQueue createActionQueue(java.net.URL xmlInput)
                                        throws ActionProcessingException,
                                               org.xml.sax.SAXException,
                                               java.io.IOException

  Description copied from class: `ActionQueueCreator`
  Creates an ActionQueue representing the XML list of actions provided.

  Parameters:
    `xmlInput` - URL pointing to an XML representation of the list of actions
  Returns:
    ActionQueue contiaing the list of actions. The queue will be empty if there are no actions specified.
  Throws:
    `ActionProcessingException` - If an error occurred while processing an action tag and creating the the corrosponding Action, possibly wrapping another exception.
    `org.xml.sax.SAXException` - If any SAX error or warning is encountered while processing the XML input, possibly wrapping another exception.
    `java.io.IOException` - If an IO error is encountered in the XML input.
  See Also:
    `ActionQueueCreator.createAction(XMLElement)`

### createActionQueue

    public final ActionQueue createActionQueue(java.lang.String xmlInput)
                                        throws ActionProcessingException,
                                               org.xml.sax.SAXException,
                                               java.io.IOException

  Description copied from class: `ActionQueueCreator`
  Creates an ActionQueue representing the XML list of actions provided.

  Parameters:
    `xmlInput` - String containing an XML representation of the list of actions
  Returns:
    ActionQueue contiaing the list of actions. The queue will be empty if there are no actions specified.
  Throws:
    `ActionProcessingException` - If an error occurred while processing an action tag and creating the the corrosponding Action, possibly wrapping another exception.
    `org.xml.sax.SAXException` - If any SAX error or warning is encountered while processing the XML input, possibly wrapping another exception.
    `java.io.IOException` - If an IO error is encountered in the XML input.
  See Also:
    `ActionQueueCreator.createAction(XMLElement)`

### createAction

    protected Action createAction(oracle.xml.parser.v2.XMLElement actionElement)
                           throws ActionProcessingException

  Description copied from class: `ActionQueueCreator`
  Creates an Action from the XMLElement provided. The XMLElement is an XML DOM Node representing one action in the XML input. This method is used by createActionQueue() to process each action tag in the XML input and produce corrosponding Actions that are added to the ActionQueue. The default implementation fills in the Action's name, and fills in the Action's description and property list if they exist. If a Substitutor is provided in the constructor, all values are passed through its substitute() method before being set on the Action. If null is returned by this method, the action tag provided is ignored.

  Parameters:
    `actionElement` - XML DOM Node representing an tag in the XML.
  Returns:
    Action An Action Object representing the tag provided. If null is returned, the ActionQueue will not be modified.
  Throws:
    `ActionProcessingException` - If an error occurred while processing the action tag and creating the Action, possibly wrapping another exception. The default implementation wraps one of the following:
    - ClassNotFoundException If the class found in the CLASS_TAG of the action is invalid or cannot be found.
    - InstantiationException If the class found in the CLASS_TAG represents an abstract class, an interface, an array class, a primitive type, or void; or if the instantiation fails for some other reason.
    - IllegalAccessException If the class specified in the CLASS_TAG is not accessible.
  See Also:
    `ActionQueueCreator.createActionQueue(String)`

### sub

    protected java.lang.String sub(java.lang.String value)

  Description copied from class: `ActionQueueCreator`
  Passes the value through the Substitutor if one is provided.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD