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

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

public class NotesPageData
extends NotesData

Class that contains data that would be associated with a Notes page.


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
NotesPageData(NotesDatabaseData database, String page)
          Constructs a NotesPageData object from a NotesDatabaseData object and a page.
NotesPageData(String url)
          Constructs a NotesPageData object from a Notes URL.
 
Method Summary
 boolean equals(Object obj)
          Determines whether two NotesPageData objects are equals to each other.
 NotesDatabaseData getDatabaseData()
           
 String getName()
          Gets the page name.
 String getOpenUrl()
          Gets the encoded Notes URL to open the NotesData object.
 String getUnid()
          Gets the page unid.
 Document open(Session session)
          Opens the lotus.domino.Document that represents this page using the 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

NotesPageData

public NotesPageData(String url)
              throws NotesException 
Constructs a NotesPageData object from a Notes URL. This URL must be encoded in the UTF-8 format and contain a page.

Parameters:
url - the Notes URL to construct the object from
Throws:
NotesException - thrown when the NotesPageData object cannot be constructed from the parameters
Since:
1.5.1

NotesPageData

public NotesPageData(NotesDatabaseData database,
                     String page)
              throws NotesException 
Constructs a NotesPageData object from a NotesDatabaseData object and a page. The page should not be encoded.

Parameters:
database - the database containing the page
page - the page inside the database
Throws:
NotesException - thrown when the NotesPageData object cannot be constructed from the parameters
Since:
1.5.1
Method Detail

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

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

getName

public String getName()
Gets the page name. The returned String will not be encoded.

Returns:
the page name
Since:
1.5.1

getUnid

public String getUnid()
Gets the page unid. The returned String will not be encoded.

Returns:
the page unid
Since:
1.5.1

equals

public boolean equals(Object obj)
Determines whether two NotesPageData 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 
Opens the lotus.domino.Document that represents this page using the given session. This method works best when the page has an unid. If there is no unid it tries to resolve the open URL for this page.

Parameters:
session - the session to use to get the document
Returns:
the lotus.domino.Document that represents this page
Throws:
NotesException - thrown when the document cannot be returned
Since:
1.5.1

getDatabaseData

public NotesDatabaseData getDatabaseData()