Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Business Rules Java API Reference 10g Release 3 (10.1.3) B19040-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.rules.sdk.store
Interface DocumentID

public interface DocumentID

A `DocumentID` identifies rule document(s) in a repository store accessed with a `RepositoryConnection`. Rule documents are stored and retreived using the following information (all of type `String`):

- the dictionary name,
- the document name,
- the document type, and
- a marker.

Each of above must be a Unicode identifier as defined by the `isUnicodeIdentifierStart` and `isUnicodeIdentifierPart` methods in `java.lang.Character`.

If the underlying repository supports revision control, the `DocumentID` may also contain a revision or a tag (also referred to as a label). Since a tag is associated with a specific document revision, only one of the revision and tag components may be set. If neither the revision nor the tag are specified, then the `DocumentID` should refer to the current revision of the document. Revision and tag values for a document may be retrieved with the getDocumentMetadata method.

When used with listDocuments, a DocumentID may contain a simplified form of wildcards. Each DocumentID component may be replaced by the single character '*' which indicates that all values of that component should be matched.

Instances of this class are constructed by invoking the `createDocumentID` methods in the `RepositoryConnection` interface. The fields of the `DocumentID` can be set at construction time and/or with the verious setter methods. Once the fields have been set, the `DocumentID` must be validated prior to use (or invocation of any getter method) by invoking the validation method appropriate for the intended use.

Field Summary
`static java.lang.String` | `WILDCARD` The wildcard string for fields of a `DocumentID`.

Method Summary
`boolean` | `containsWildcard()` Returns true if there is a wildcard in any portion of this document ID.
`java.lang.String` | `getDictionaryName()` Returns the name of the dictionary in this document ID
`java.lang.String` | `getDocumentName()` Returns the document name in this document ID
`java.lang.String` | `getDocumentType()` Returns the document type in this document ID
`java.lang.String` | `getMarker()` Returns the marker in this document ID.
`java.lang.String` | `getRevision()` Returns the optional revision in this document ID.
`java.lang.String` | `getTag()` Returns the optional tag in this document ID.
`boolean` | `isValidForDocumentAccess()` Returns `true` if this ID is valid for document read access.
`boolean` | `isValidForListDocuments()` Returns `true` if this ID is valid use with `listDocuments`.
`boolean` | `isWildcard(java.lang.String idComponent)` Returns true if the specified `String` is a wildcard.
`void` | `setDictionaryName(java.lang.String name)` Sets the name of the dictionary for this document ID
`void` | `setDocumentName(java.lang.String name)` Sets the document name in this document ID
`void` | `setDocumentType(java.lang.String type)` Sets the document type in this document ID
`void` | `setMarker(java.lang.String marker)` Sets the marker in this document ID.
`void` | `setRevision(java.lang.String revision)` Sets the optional revision in this document ID.
`void` | `setTag(java.lang.String tag)` Sets the optional tag in this document ID.
`void` | `validateForConnection(RepositoryConnection connection)` Validates that the `DocumentID` is valid to be used with the specified `RepositoryConnection`.
`void` | `validateForDocumentAccess()` Validates the document ID for for document read access.
`void` | `validateForListDocuments()` Validates the document ID for use with `listDocuments`.

Field Detail

### WILDCARD

    public static final java.lang.String WILDCARD

  The wildcard string for fields of a `DocumentID`.
  See Also:
    Constant Field Values

Method Detail

### isValidForDocumentAccess

    public boolean isValidForDocumentAccess()

  Returns `true` if this ID is valid for document read access.
  Returns:
    `true` if this ID is valid for document read access.

### isValidForListDocuments

    public boolean isValidForListDocuments()

  Returns `true` if this ID is valid use with `listDocuments`.
  Returns:
    `true` if this ID is valid use with `listDocuments`.

### validateForDocumentAccess

    public void validateForDocumentAccess()
                                   throws DocumentIDException

  Validates the document ID for for document read access. The valid usage indicators are updated.
  Throws:
    `DocumentIDException` - if there is an error detected in the ID.
  See Also:
    `isValidForListDocuments()`, `isValidForDocumentAccess()`

### validateForListDocuments

    public void validateForListDocuments()
                                  throws DocumentIDException

  Validates the document ID for use with `listDocuments`. The valid usage indicators are updated.
  Throws:
    `DocumentIDException` - if there is an error detected in the ID.
  See Also:
    `isValidForListDocuments()`, `isValidForDocumentAccess()`

### validateForConnection

    public void validateForConnection(RepositoryConnection connection)
                               throws DocumentIDException

  Validates that the `DocumentID` is valid to be used with the specified `RepositoryConnection`. This method should be invoked on each `DocumentID` passed to a `RepositoryConnection` implementation.
  Throws:
    `DocumentIDException` - if the ID can not be used with the specified `RepositoryConnection`.

### getDictionaryName

    public java.lang.String getDictionaryName()
                                       throws DocumentIDException

  Returns the name of the dictionary in this document ID
  Returns:
    the dictionary name
  Throws:
    `DocumentIDException` - if this DocumentID object has not been validated.

### setDictionaryName

    public void setDictionaryName(java.lang.String name)

  Sets the name of the dictionary for this document ID
  Parameters:
    `name` - the dictionary name

### getDocumentType

    public java.lang.String getDocumentType()
                                     throws DocumentIDException

  Returns the document type in this document ID
  Returns:
    the document type
  Throws:
    `DocumentIDException` - if this DocumentID object has not been validated.

### setDocumentType

    public void setDocumentType(java.lang.String type)

  Sets the document type in this document ID
  Parameters:
    `type` - the document type

### getDocumentName

    public java.lang.String getDocumentName()
                                     throws DocumentIDException

  Returns the document name in this document ID
  Returns:
    the document name
  Throws:
    `DocumentIDException` - if this DocumentID object has not been validated.

### setDocumentName

    public void setDocumentName(java.lang.String name)

  Sets the document name in this document ID
  Parameters:
    `name` - the document name
  Throws:
    `DocumentIDException` - if this DocumentID object has not been validated.

### getMarker

    public java.lang.String getMarker()
                               throws DocumentIDException

  Returns the marker in this document ID.
  Returns:
    the marker
  Throws:
    `DocumentIDException` - if this DocumentID object has not been validated.

### setMarker

    public void setMarker(java.lang.String marker)

  Sets the marker in this document ID.
  Parameters:
    `marker` - the marker

### getTag

    public java.lang.String getTag()
                            throws DocumentIDException

  Returns the optional tag in this document ID. May be `null` if a tag was not specified.
  Returns:
    the tag
  Throws:
    `DocumentIDException` - if this DocumentID object has not been validated.

### setTag

    public void setTag(java.lang.String tag)

  Sets the optional tag in this document ID. A value of `null` indicates that no tag is present.
  Parameters:
    `tag` - the tag

### getRevision

    public java.lang.String getRevision()
                                 throws DocumentIDException

  Returns the optional revision in this document ID. May be `null` if a revision was not specified.
  Returns:
    the revision
  Throws:
    `DocumentIDException` - if this DocumentID object has not been validated.

### setRevision

    public void setRevision(java.lang.String revision)

  Sets the optional revision in this document ID. A value of `null` indicates that no revision is present.
  Parameters:
    `revision` - the revision

### containsWildcard

    public boolean containsWildcard()
                             throws DocumentIDException

  Returns true if there is a wildcard in any portion of this document ID.
  Returns:
    true if there is a wildcard in any portion of this document ID.
  Throws:
    `DocumentIDException` - if this DocumentID object has not been validated.

### isWildcard

    public boolean isWildcard(java.lang.String idComponent)

  Returns true if the specified `String` is a wildcard.
  Parameters:
    `idComponent` - the `String to test for a wildcard.`
  `Returns:`
    `true if the specified` String is a wildcard.

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Business Rules Java API Reference 10g Release 3 (10.1.3) B19040-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006, Oracle. All rights reserved.