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

## com.ibm.workplace.wcm.api
Interface Reference

    public interface Reference

An interface defining a reference from one entity in the repository to another.

Method Summary
`boolean` | `canClear()` Indicates if the reference from the referer `Document` to the referee `Document` can be cleared.
`boolean` | `canReplace()` Indicates if the reference from the referer `Document` to the referee `Document` can be replaced with another referee.
`void` | `clear()` Clear the reference from the referer `Document` to the referee `Document`.
`DocumentId` | `getRefereeDocumentId()` Returns the `DocumentId` of the `Document` object that is referred to by another `Document`.
`DocumentId` | `getRefererDocumentId()` Returns the `DocumentId` of the `Document` object that refers to another `Document`.
`void` | `replace(DocumentId replacementId)` Replace the referer's reference with the specified `Document`

Method Detail

### getRefererDocumentId

    DocumentId getRefererDocumentId()

  Returns the `DocumentId` of the `Document` object that refers to another `Document`.

  Returns:
    the `DocumentId` of the referer `Document`
  Throws:
    `java.lang.NullPointerException` - if the name of the referer `Document` has not been set.

### getRefereeDocumentId

    DocumentId getRefereeDocumentId()

  Returns the `DocumentId` of the `Document` object that is referred to by another `Document`.

  Returns:
    the `DocumentId` of the referee `Document`
  Throws:
    `java.lang.NullPointerException` - if the name of the referee `Document` has not been set.

### canClear

    boolean canClear()

  Indicates if the reference from the referer `Document` to the referee `Document` can be cleared.

  Returns:
    true if the reference can be cleared.

### canReplace

    boolean canReplace()

  Indicates if the reference from the referer `Document` to the referee `Document` can be replaced with another referee.

  Returns:
    true if the reference can be replaced.

### clear

    void clear()
               throws AuthorizationException,
                      OperationFailedException

  Clear the reference from the referer `Document` to the referee `Document`.

  Throws:
    `AuthorizationException` - if the user is not allowed to modify the reference
    `OperationFailedException` - if the reference is not clearable or if an item not found or repository exception is encountered.

### replace

    void replace(DocumentId replacementId)
                 throws AuthorizationException,
                        OperationFailedException,
                        IllegalTypeChangeException

  Replace the referer's reference with the specified `Document`

  Parameters:
    `replacementId` - the `DocumentID` of the `Document` that is to become the new referee.
  Throws:
    `AuthorizationException` - if the user is not allowed to modify the reference
    `OperationFailedException` - if the reference is not replacable or if an item not found or repository exception is encountered.
    `IllegalTypeChangeException` - if the `Document` specified by replacementId is not of a suitable type to be used as a replacement for the reference.

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