Overview | Package | Class | Tree | Deprecated | Index | Help
| The PDK Java API is part of the Portal Developer Kit on Portal Studio
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.portal.provider.v2.webservice
Class LiteralXML

    java.lang.Object
      |
      +--oracle.portal.provider.v2.webservice.LiteralXML

All Implemented Interfaces:
  InitializableXMLObject

public class LiteralXML
extends java.lang.Object
implements InitializableXMLObject

A `LiteralXML` is used to describe the structure and bindings of a literal XML request to a web service. It implements the `InitializableXMLObject` interface, and is designed to be loaded from an XML definition file by a `NodeHandler`.

Because the XML description of a `LiteralXML` can contain nested XML elements, it is important that the class's own node handler, `LiteralXML.Handler` is used to process its XML description. This can be ensured by using the `handler` attribute. For example:

     <literal class="oracle.portal.provider.v2.webservice.LiteralXML"
       handler="oracle.portal.provider.v2.webservice.LiteralXML$Handler">

Within the above style of XML description, the `<attribute>` element can be used to describe an XML attribute whose name is specified by its `name` attribute. An `<attribute>` element can optionally contain text, corresponding to a constant value for the attribute.

Similarly, the `<element>` element can be used to describe an XML element whose name is specified by its `name` attribute. An `<element>` can optionally contain text, corresponding to constant textual content of the element, `<attribute>` elements, corresponding to attributes set on the element and further child `<element>`s corresponding to nested elements.

Both `<element>`s and `<attribute>`s can be 'bound' to dynamic content described by a `bind` attribute. A `bind` attribute should consist of a type name and a parameter name separated by a '/' character. The allowed bind type names and their meanings are listed below:

- `request`: The element or attribute is bound to an attribute of the portlet render request, specified by the suffix of the bind attribute. This creates a `WebServiceRenderer.RequestParam`.
- `urlParams`: The element or attribute is bound to a parameter in the query string of the Portal page URL with a name specified by the suffix of the bind attribute. This creates a `WebServiceRenderer.URLParam`.
- `session`: The element or attribute is bound to the attribute of the `ProviderSession` with name specified by the suffix of the bind attribute. This creates a `WebServiceRenderer.SessionAttrib`.
- `editData`: The element or attribute is bound to the string value stored in a `NameValuePersonalizationObject` against the name specified by the suffix of the bind attribute. This creates a `WebServiceRenderer.EditData`.

When the `bind` attribute is set, the `default`, `mandatory` and `prompt` attributes can also be used to set the corresponding property on the `WebServiceRenderer.ParameterBinding` they describe.

Inner Class Summary
`static class` | `LiteralXML.Handler` `LiteralXML.Handler` is the `NodeHandler` that should be used to process XML descriptions of a `LiteralXML` object.

Constructor Summary
`LiteralXML()`

Method Summary
`org.w3c.dom.NodeList` | `generateElements(WebServiceRenderRequest wrr)` 'Instantiates' the XML description by translating `<element>`s into 'real' elements, `<attribute>`s into 'real' attributes, and expanding out bindings.
`org.w3c.dom.NodeList` | `getNodeList()` Gets the list of top level elements in the literal XML description.
`void` | `postInitialize()` Performs the extra steps required to initialize and validate a `LiteralXML` object once its properties have been set with the appropriate accessor methods.
`void` | `preInitialize(java.lang.Object parent)` Performs the steps required to initialize a `LiteralXML` object after it has been constructed.
`void` | `setNodeList(org.w3c.dom.NodeList nodeList)` Sets the list of top level elements in the literal XML description.

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

Constructor Detail

### LiteralXML

    public LiteralXML()

Method Detail

### preInitialize

    public void preInitialize(java.lang.Object parent)
                       throws NodeHandlerException

  Performs the steps required to initialize a `LiteralXML` object after it has been constructed.
  Specified by:
    `preInitialize` in interface `InitializableXMLObject`
  Parameters:
    `o` - the object that will become this object's parent
  Throws:
    `NodeHandlerException` - if an error occurs while initializing this object

### postInitialize

    public void postInitialize()
                        throws NodeHandlerException

  Performs the extra steps required to initialize and validate a `LiteralXML` object once its properties have been set with the appropriate accessor methods.
  Specified by:
    `postInitialize` in interface `InitializableXMLObject`
  Throws:
    `NodeHandlerException` - if not all properties have been set correctly

### setNodeList

    public final void setNodeList(org.w3c.dom.NodeList nodeList)

  Sets the list of top level elements in the literal XML description.
  Parameters:
    `nodeList` - list of top level elements in the literal XML description

### getNodeList

    public final org.w3c.dom.NodeList getNodeList()

  Gets the list of top level elements in the literal XML description.
  Returns:
    list of top level elements in the literal XML description

### generateElements

    public org.w3c.dom.NodeList generateElements(WebServiceRenderRequest wrr)
                                          throws PortletException

  'Instantiates' the XML description by translating `<element>`s into 'real' elements, `<attribute>`s into 'real' attributes, and expanding out bindings.

Overview | Package | Class | Tree | Deprecated | Index | Help
| The PDK Java API is part of the Portal Developer Kit on Portal Studio
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 2002, Oracle Corporation. All Rights Reserved.