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 com.ibm.workplace.wcm.api.exceptions.AuthorizationException,
                  com.ibm.workplace.wcm.api.exceptions.OperationFailedException
Clear the reference from the referer Document to the referee Document.

Throws:
com.ibm.workplace.wcm.api.exceptions.AuthorizationException - if the user is not allowed to modify the reference
com.ibm.workplace.wcm.api.exceptions.OperationFailedException - if the reference is not clearable or if an item not found or repository exception is encountered.

replace

void replace(DocumentId replacementId)
             throws com.ibm.workplace.wcm.api.exceptions.AuthorizationException,
                    com.ibm.workplace.wcm.api.exceptions.OperationFailedException,
                    com.ibm.workplace.wcm.api.exceptions.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:
com.ibm.workplace.wcm.api.exceptions.AuthorizationException - if the user is not allowed to modify the reference
com.ibm.workplace.wcm.api.exceptions.OperationFailedException - if the reference is not replacable or if an item not found or repository exception is encountered.
com.ibm.workplace.wcm.api.exceptions.IllegalTypeChangeException - if the Document specified by replacementId is not of a suitable type to be used as a replacement for the reference.