com.ibm.notes.java.api.data
Class NotesDocumentKeyData

java.lang.Object
  extended by com.ibm.notes.java.api.data.NotesData
      extended by com.ibm.notes.java.api.data.NotesDocumentKeyData

public class NotesDocumentKeyData
extends NotesData

Class that contains data that would be associated with a Notes document that has a key.


Field Summary
 
Fields inherited from class com.ibm.notes.java.api.data.NotesData
baseUrl, ENCODE_ERR, NOTES_COMMAND_SEPARATOR, NOTES_PARAMETER_SEPARATOR, NOTES_PATH_SEPARATOR, NOTES_PROTOCOL, NULL_ERR
 
Constructor Summary
NotesDocumentKeyData(Document document)
          Constructs a NotesDocumentKeyData object from a lotus.domino.Document object.
NotesDocumentKeyData(NotesViewData view, String documentKey)
          Constructs a NotesDocumentKeyData object from a NotesViewData object and a document key.
NotesDocumentKeyData(String url)
          Constructs a NotesDocumentKeyData object from an encoded Notes URL.
 
Method Summary
 boolean equals(Object obj)
          Determines whether two NotesDocumentKeyData objects are equals to each other.
 String getDocumentKey()
          Gets the document key.
 String getOpenUrl()
          Gets the encoded Notes URL to open the NotesData object.
 NotesViewData getViewData()
           
 Document open(Session session)
          Gets the lotus.domino.Document using a given session.
protected  void setBaseUrl()
          Constructs the Notes URL of the data object from the given information.
 
Methods inherited from class com.ibm.notes.java.api.data.NotesData
encode, getBaseUrl, getParser, removeCommandAndParams
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NotesDocumentKeyData

public NotesDocumentKeyData(String url)
                     throws NotesException 
Constructs a NotesDocumentKeyData object from an encoded Notes URL. The URL should be UTF-8 encoded, and not be null.

Parameters:
url - the encoded Notes URL
Throws:
NotesException - thrown when the NotesDocumentKeyData object cannot be constructed from the give parameters
Since:
1.5.1

NotesDocumentKeyData

public NotesDocumentKeyData(NotesViewData view,
                            String documentKey)
                     throws NotesException 
Constructs a NotesDocumentKeyData object from a NotesViewData object and a document key. The document key should not be encoded.

Parameters:
view - the view containing the document key
documentKey - the document key of a document in the view
Throws:
NotesException - thrown when the NotesDocumentKeyData object cannot be constructed from the give parameters
Since:
1.5.1

NotesDocumentKeyData

public NotesDocumentKeyData(Document document)
                     throws NotesException 
Constructs a NotesDocumentKeyData object from a lotus.domino.Document object.

Parameters:
document - the lotus.domino.Document object to use
Throws:
NotesException - thrown when the NotesDocumentKeyData object cannot be constructed from the give parameters
Since:
1.5.1
Method Detail

setBaseUrl

protected void setBaseUrl()
                   throws UnsupportedEncodingException
Description copied from class: NotesData
Constructs the Notes URL of the data object from the given information. The URL constructed should only contain the parameters passed in, no commands, or parameters should be added to the URL in this method.

Specified by:
setBaseUrl in class NotesData
Throws:
UnsupportedEncodingException - thrown when the URL cannot be encoded

getDocumentKey

public String getDocumentKey()
Gets the document key. The returned string is not encoded.

Returns:
the document key
Since:
1.5.1

getOpenUrl

public String getOpenUrl()
Description copied from class: NotesData
Gets the encoded Notes URL to open the NotesData object. The URL is UTF-8 encoded.

Specified by:
getOpenUrl in class NotesData
Returns:
the encoded Notes URL to open the NotesData object

equals

public boolean equals(Object obj)
Determines whether two NotesDocumentKeyData objects are equals to each other.

Overrides:
equals in class Object
Parameters:
obj - object to test for equality
Returns:
true if the two objects are equal, false otherwise
Since:
1.5.1

open

public Document  open(Session session)
                           throws NotesException 
Gets the lotus.domino.Document using a given session.

Parameters:
session - the session to use to get the document
Returns:
the lotus.domino.Document retrieved using the data in this object
Throws:
NotesException - throw when the Document could not be gotten using the session
Since:
1.5.1

getViewData

public NotesViewData getViewData()