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
Class XdsQueryProcessor

    java.lang.Object
      com.novell.nds.dirxml.driver.XdsQueryProcessor

    public class XdsQueryProcessor

extends Object

A query processor designed primarily for use within XSLT stylesheets used as rules, or by functions called from an XSLT stylesheet used as a rule.

The DirXML engine passed two stylesheet parameters to an XSLT stylesheet rule. Both parameters are of type `XdsQueryProcessor`. One is named srcQueryProcessor and will query the source of the current transaction (NDS for subscriber-channel transactions and the app shim for publisher-channel transactions) and the other is named destQueryProcessor and will query the destiniation of the current transaction (the app shim for subscriber-channel transactions and NDS for publisher channel transactions).

Constructor Summary
`XdsQueryProcessor(com.novell.nds.dirxml.engine.XdsQueryProcessor processor, com.novell.nds.dirxml.engine.VRDExceptionListener listener)` Create an `XdsQueryProcessor`.

Method Summary
`String` | `getNamedPassword(String passwordName)` Issue a <get-named-password> command.
`Document` | `query(Document queryDoc)` Perform an XDS query contained in the passed document.
`Document` | `query(ExpressionValue queryValue)` Perform an XDS query contained in the passed ExpressionValue.
`Document` | `query(NodeSet querySet)` Perform an XDS query contained in the passed XPath nodeset.
`Document` | `query(ResultTreeFragment queryFragment)` Perform an XDS query contained in the passed XSLT result tree fragment.
`Element` | `readObject(String association, String destDN, String className, String attrs)` Perform an XDS entry scoped query based on association value, dest-dn, and list of attributes.
`NodeSet` | `search(String scope, String association, String destDN, String className, String searchAttr, String searchValue, String attrs)` Perform an XDS query based on association value, dest-dn, scope, object-class, one non-structure attribute value, and list of attributes.

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

Constructor Detail

### XdsQueryProcessor

    public XdsQueryProcessor(com.novell.nds.dirxml.engine.XdsQueryProcessor processor,
                             com.novell.nds.dirxml.engine.VRDExceptionListener listener)

  Create an `XdsQueryProcessor`. Since the engine version of `XdsQueryProcessor` can only be created by the engine, this effectively limits instance creation of the query processor to the engine.

  Parameters:
    `processor` - The engine query processor that will actually perform the query
    `listener` - The object to notify in case of an exception

Method Detail

### query

    public Document query(Document queryDoc)
                   throws com.novell.nds.dirxml.engine.VRDException

  Perform an XDS query contained in the passed document.

  Parameters:
    `queryDoc` - The XDS document containing the query to perform.
  Returns:
    An XDS document with the query results.
  Throws:
    `com.novell.nds.dirxml.engine.VRDException`

### query

    public Document query(ResultTreeFragment queryFragment)
                   throws com.novell.nds.dirxml.engine.VRDException

  Perform an XDS query contained in the passed XSLT result tree fragment.

  Parameters:
    `queryFragment` - The XSLT result tree fragment containing the query to perform. This must be a well-formed XDS document from the fragment root down.
  Returns:
    An XDS document with the query results.
  Throws:
    `com.novell.nds.dirxml.engine.VRDException`

### query

    public Document query(NodeSet querySet)
                   throws com.novell.nds.dirxml.engine.VRDException

  Perform an XDS query contained in the passed XPath nodeset.

  Parameters:
    `querySet` - The XPath nodeset the query to perform. This must be a well-formed XDS document from the fragment root down.
  Returns:
    An XDS document with the query results.
  Throws:
    `com.novell.nds.dirxml.engine.VRDException`

### query

    public Document query(ExpressionValue queryValue)
                   throws com.novell.nds.dirxml.engine.VRDException,
                          XPathConversionException

  Perform an XDS query contained in the passed ExpressionValue.

  Parameters:
    `queryValue` - The NodeSet or ResultTree fragment containing XdsQuery
  Returns:
    An XDS document with the query results.
  Throws:
    `com.novell.nds.dirxml.engine.VRDException`
    `XPathConversionException`

### readObject

    public Element readObject(String association,
                              String destDN,
                              String className,
                              String attrs)
                       throws com.novell.nds.dirxml.engine.VRDException

  Perform an XDS entry scoped query based on association value, dest-dn, and list of attributes.

  Note: `association` or `destDN` can be `null` or empty, depending on what queried application needs

  Parameters:
    `association` - association value to use for query
    `destDN` - dest-dn value to use for query
    `className` - object class name (to be used for schema mapping purposes)
    `attrs` - comma separated list of attributes to read, empty to read no attributes, * to read all attributes
  Returns:
    An instance element or `null` if object not found.
  Throws:
    `com.novell.nds.dirxml.engine.VRDException`

### search

    public NodeSet search(String scope,
                          String association,
                          String destDN,
                          String className,
                          String searchAttr,
                          String searchValue,
                          String attrs)
                   throws com.novell.nds.dirxml.engine.VRDException

  Perform an XDS query based on association value, dest-dn, scope, object-class, one non-structure attribute value, and list of attributes.

  Note: `association` or `destDN` can be the empty string, depending on what queried application needs

  Parameters:
    `scope` - `"subtree"` or `"subordinates"`
    `association` - association value to use for query
    `destDN` - dest-dn value to use for query
    `className` - object class name (empty string to search all classes)
    `searchAttr` - attribute to search on (empty string to not limit by attribute value)
    `searchValue` - string value to search on for search attr
    `attrs` - comma separated list of attributes to read, empty to read no attributes, * to read all attributes
  Returns:
    A NodeSet containing all the found instances.
  Throws:
    `com.novell.nds.dirxml.engine.VRDException`

### getNamedPassword

    public String getNamedPassword(String passwordName)
                            throws com.novell.nds.dirxml.engine.VRDException

  Issue a <get-named-password> command.

  It is not possible to distinguish between an empty password and an error result using this method. If this is required build the XDS document, use the `query()` method, and parse the result document.

  Parameters:
    `passwordName` - name or key of password to retrieve.
  Returns:
    password value - may be empty, never `null`.
  Throws:
    `com.novell.nds.dirxml.engine.VRDException`

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