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

## com.novell.nds.dirxml.driver.xds
Class XDSCommandDocument

    java.lang.Object
      com.novell.nds.dirxml.driver.xds.DocumentImpl
          com.novell.nds.dirxml.driver.xds.XDSCommandDocument

All Implemented Interfaces:
  ReadableDocument, StateDocument, StatusDocument, StatusStateDocument, WriteableDocument, XDSDocument

public class XDSCommandDocument
extends DocumentImpl
implements ReadableDocument, WriteableDocument, StatusStateDocument

The `XmlDocument` passed to method `execute(XmlDocument, XmlQueryProcessor)` of interface `XmlCommandProcessor`.

Interface `SubscriptionShim` implements this method. An `XmlCommandProcessor` object reference is passed to the `PublicationShim.start(XmlCommandProcessor)` method.

Constructor Summary
`XDSCommandDocument()` Constructs an empty, writeable command document.
`XDSCommandDocument(DTDVersion dtdVersion)` Constructs an empty, writeable command doucment.
`XDSCommandDocument(com.novell.nds.dirxml.driver.XmlDocument xdsXML)` Constructs a readable command document from an existing XDS-formatted, XML document.

Method Summary
`XDSAddElement` | `appendAddElement()` Appends an empty, child `<add>` element to this document's `<input>` element.
`XDSDeleteElement` | `appendDeleteElement()` Appends an empty, child `<delete>` element to this document's `<input>` element.
`XDSInitParamsElement` | `appendInitParamsElement()` Appends an empty, child `<init-params>` element to this document's `<input>` or `<output>` element.
`XDSModifyAssociationElement` | `appendModifyAssociationElement()` Appends an empty, child `<modify-association>` element to this document's `<input>` element.
`XDSModifyElement` | `appendModifyElement()` Appends an empty, child `<modify>` element to this document's `<input>` element.
`XDSModifyPasswordElement` | `appendModifyPasswordElement()` Appends an empty, child `<modify-password>` element to this document's `<input>` element.
`XDSMoveElement` | `appendMoveElement()` Appends an empty, child `<move>` element to this document's `<input>` element.
`XDSRenameElement` | `appendRenameElement()` Appends an empty, child `<rename>` element to this document's `<input>` element.
`XDSSourceElement` | `appendSourceElement()` Appends an empty, child `<source>` element to this document's `<nds>` element.
`XDSStatusElement` | `appendStatusElement()` Appends an empty, child `<status>` element to this document's `<input>` or `<output>` element.
`List` | `childElements()` Returns the child elements of this document's `<input>` element.
`boolean` | `containsIdentityQuery()` Does this document contain an identity query?
`void` | `empty()` Removes all child nodes from this document's `<input>` or `<output>` element.
`XDSSourceElement` | `extractSourceElement()` Returns this document's `<source>` element.
`DTDVersion` | `getDTDVersion()` Returns the `dtdversion` attribute value from this document's `<nds>` element.
`XDSStatusElement` | `heartBeatAppend()` Appends an empty, child `<status>` element to this document's `<input>` element.
`XDSQueryElement` | `identityQuery()` Returns a reference to the identity query contained in this document.
`com.novell.nds.dirxml.driver.XmlDocument` | `toXML()` Converts this document into an `XmlDocument`.
`void` | `validate()` Validates this document.

Methods inherited from class com.novell.nds.dirxml.driver.xds.DocumentImpl
`domDocument, domIOElement, domNDSElement, isEmpty`

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

Methods inherited from interface com.novell.nds.dirxml.driver.xds.XDSDocument
`domDocument, domIOElement, domNDSElement, isEmpty`

Constructor Detail

### XDSCommandDocument

    public XDSCommandDocument(com.novell.nds.dirxml.driver.XmlDocument xdsXML)
                       throws XDSParseException

  Constructs a readable command document from an existing XDS-formatted, XML document.

  This constructor should be used to parse documents passed to method `execute(XmlDocument, XmlQueryProcessor)` of interface `SubscriptionShim`.

Parameters:
  `xdsXML` - must not be `null`
Throws:
  `XDSParseException` - thrown if `xdsXML` is empty, malformed, or invalid
See Also:
  `SkeletonSubscriptionShim.execute(XmlDocument, com.novell.nds.dirxml.driver.XmlQueryProcessor)`

### XDSCommandDocument

    public XDSCommandDocument()

  Constructs an empty, writeable command document. By default, the current DTD version is used.

  This constructor should be used to build documents passed to method `XmlCommandProcessor` object passed to the `start(XmlCommandProcessor)` of interface `PublicationShim`

See Also:
  `SkeletonPublicationShim.start(com.novell.nds.dirxml.driver.XmlCommandProcessor)`

### XDSCommandDocument

    public XDSCommandDocument(DTDVersion dtdVersion)

  Constructs an empty, writeable command doucment. The DTD version used is configurable.

  This constructor should be used to build documents passed to the `XmlCommandProcessor` object passed to method `start(XmlCommandProcessor)` of interface `PublicationShim`

Parameters:
  `dtdVersion` - must not be `null`
See Also:
  `SkeletonPublicationShim.start(com.novell.nds.dirxml.driver.XmlCommandProcessor)`

Method Detail

### getDTDVersion

    public DTDVersion getDTDVersion()

  Description copied from interface: `ReadableDocument`
  Returns the `dtdversion` attribute value from this document's `<nds>` element.

  Invocation Context:
    READ

  Specified by:
    `getDTDVersion` in interface `ReadableDocument`
  Returns:
    will not return `null`; if absent, this method returns `DTDVersion.UNKNOWN`

### extractSourceElement

    public XDSSourceElement extractSourceElement()

  Description copied from interface: `ReadableDocument`
  Returns this document's `<source>` element.

  Invocation Context:
    READ

  Specified by:
    `extractSourceElement` in interface `ReadableDocument`
  Returns:
    may return `null`

### childElements

    public List childElements()

  Returns the child elements of this document's `<input>` element.

  Usage Notes:
    The types of objects returned by this method may be extended in the future. Thus, callers should be able to handle object types other than those listed in the returns field below.
  Invocation Context:
    READ

  Specified by:
    `childElements` in interface `ReadableDocument`
  Returns:
    `Collections.EMPTY_LIST` or a list of `XDSAddElement`, `XDSModifyElement`, `XDSDeleteElement`, `XDSRenameElement`, `XDSMoveElement`, `XDSQuerylement`, `XDSQueryExElement`, `XDSModifyPasswordElement`, `XDSCheckObjectPasswordElement`, and `NonXDSElement` objects; will not return `null`

### appendAddElement

    public XDSAddElement appendAddElement()

  Appends an empty, child `<add>` element to this document's `<input>` element.

  Invocation Context:
    WRITE

  Returns:
    will not return `null`

### appendModifyElement

    public XDSModifyElement appendModifyElement()

  Appends an empty, child `<modify>` element to this document's `<input>` element.

  Invocation Context:
    WRITE

  Returns:
    will not return `null`

### appendRenameElement

    public XDSRenameElement appendRenameElement()

  Appends an empty, child `<rename>` element to this document's `<input>` element.

  Invocation Context:
    WRITE

  Returns:
    will not return `null`

### appendDeleteElement

    public XDSDeleteElement appendDeleteElement()

  Appends an empty, child `<delete>` element to this document's `<input>` element.

  Invocation Context:
    WRITE

  Returns:
    will not return `null`

### appendMoveElement

    public XDSMoveElement appendMoveElement()

  Appends an empty, child `<move>` element to this document's `<input>` element.

  Invocation Context:
    WRITE

  Returns:
    will not return `null`

### validate

    public void validate()
                  throws XDSParseException

  Description copied from interface: `WriteableDocument`
  Validates this document.

  Invocation Context:
    WRITE

  Specified by:
    `validate` in interface `WriteableDocument`
  Throws:
    `XDSParseException` - if this document is malformed or invalid

### toXML

    public com.novell.nds.dirxml.driver.XmlDocument toXML()

  Description copied from interface: `WriteableDocument`
  Converts this document into an `XmlDocument`.

  Invocation Context:
    WRITE

  Specified by:
    `toXML` in interface `WriteableDocument`
  Returns:
    this document as a `XmlDocument`

### appendModifyAssociationElement

    public XDSModifyAssociationElement appendModifyAssociationElement()

  Appends an empty, child `<modify-association>` element to this document's `<input>` element.

  Invocation Context:
    WRITE

  Returns:
    will not return `null`

### appendModifyPasswordElement

    public XDSModifyPasswordElement appendModifyPasswordElement()

  Appends an empty, child `<modify-password>` element to this document's `<input>` element.

  Invocation Context:
    WRITE

  Returns:
    will not return `null`
  Since:
    DTD 1.1

### heartBeatAppend

    public XDSStatusElement heartBeatAppend()

  Appends an empty, child `<status>` element to this document's `<input>` element.

  Invocation Context:
    WRITE

  Returns:
    will not return `null`
  Since:
    DTD 2.0

### appendSourceElement

    public XDSSourceElement appendSourceElement()

  Description copied from interface: `WriteableDocument`
  Appends an empty, child `<source>` element to this document's `<nds>` element. When called more than once, no action is taken and the same `<source>` element is returned.

  Invocation Context:
    WRITE

  Specified by:
    `appendSourceElement` in interface `WriteableDocument`
  Returns:
    will not return `null`

### appendStatusElement

    public XDSStatusElement appendStatusElement()

  Description copied from interface: `StatusDocument`
  Appends an empty, child `<status>` element to this document's `<input>` or `<output>` element.

  Invocation Context:
    WRITE

  Specified by:
    `appendStatusElement` in interface `StatusDocument`
  Returns:
    will not return `null`

### appendInitParamsElement

    public XDSInitParamsElement appendInitParamsElement()

  Description copied from interface: `StateDocument`
  Appends an empty, child `<init-params>` element to this document's `<input>` or `<output>` element. When called more than once, no action is taken and the same `<init-params>` element is returned.

  Invocation Context:
    WRITE

  Specified by:
    `appendInitParamsElement` in interface `StateDocument`
  Returns:
    will not return `null`

### empty

    public void empty()

  Description copied from interface: `WriteableDocument`
  Removes all child nodes from this document's `<input>` or `<output>` element.

  Invocation Context:
    WRITE

  Specified by:
    `empty` in interface `WriteableDocument`

### containsIdentityQuery

    public boolean containsIdentityQuery()

  Does this document contain an identity query?

  Returns:
    `true`:
      if this document contains an identity query
    `false`:
      if this document does not contain an identity query

### identityQuery

    public XDSQueryElement identityQuery()

  Returns a reference to the identity query contained in this document.

  Returns:
    may return `null`

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