|
Oracle | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.compoze.domino.AbstractItem
com.compoze.domino.AbstractDocument
public abstract class AbstractDocument
This class represents a Domino document. Documents are entities such as memos, appointments, tasks and contacts.
Field Summary |
---|
Fields inherited from class com.compoze.domino.AbstractItem |
---|
m_props, m_session |
Constructor Summary | |
---|---|
protected |
AbstractDocument(PropertyValue[] propValues)
Constructor. |
protected |
AbstractDocument(Session session,
PropertyValue[] propValues)
Constructor. |
Method Summary | |
---|---|
int |
getAttachmentCount()
Gets the attachment count for the document. |
AttachmentInfo |
getAttachmentInfo(int iIndex)
Gets the attachment info for the document. |
AttachmentInfo[] |
getAttachmentInfoArray()
Gets the attachment info for the document. |
java.util.Date |
getDateCreated()
Gets the date created for the document. |
java.lang.String |
getDateCreatedString(java.text.DateFormat dateFormat)
Gets the date created for the document formatted with the specified date format. |
java.util.Date |
getDateModified()
Gets the date modified for the document. |
java.lang.String |
getDateModifiedString(java.text.DateFormat dateFormat)
Gets the date modified for the document formatted with the specified date format. |
DocumentType |
getDocumentType()
Gets the type of the document. |
int |
getEmbeddedImageCount()
Gets the embedded image count for the document. |
EmbeddedImageInfo |
getEmbeddedImageInfo(java.lang.String sImageID)
Gets the embedded image info for the document. |
EmbeddedImageInfo[] |
getEmbeddedImageInfoArray()
Gets the embedded image info for the document. |
java.lang.String |
getID()
Gets the id of the document. |
java.lang.String |
getParentID()
Gets the parent id of the document. |
int |
getSize()
Gets the size of the document (in bytes). |
double |
getSizeInKilos()
Gets the size of the document (in kilobytes). |
boolean |
hasAttachment()
Checks if the document has an attachment. |
void |
serverAddAttachment(java.lang.String sName,
DataHandler handler)
Hits the server to add an attachment to a document. |
void |
serverCopyTo(java.lang.String sFolderID)
Hits the server to copy the document to a folder. |
void |
serverDeleteAttachment(int iIndex)
Hits the server to delete an attachment from the document. |
void |
serverMoveTo(java.lang.String sSourceFolderID,
java.lang.String sTargetFolderID)
Hits the server to move the document to a folder. |
void |
serverUpdate()
Hits the server to update any changed properties. |
Methods inherited from class com.compoze.domino.AbstractItem |
---|
get, getBoolean, getDate, getDateArray, getDouble, getInt, getPropertyKeys, getString, getStringArray, getUpdatedPropertyValues, set, setBoolean, setDate, setDouble, setInt, setString, setStringArray |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected AbstractDocument(Session session, PropertyValue[] propValues)
session
- the sessionpropValues
- the property values arrayprotected AbstractDocument(PropertyValue[] propValues)
propValues
- the property values arrayMethod Detail |
---|
public java.lang.String getID() throws DominoException
DominoException
PropertyKey.DOCUMENT_ID
public java.lang.String getParentID() throws DominoException
null
for no parent
DominoException
PropertyKey.PARENT_DOCUMENT_ID
public int getSize() throws DominoException
DominoException
PropertyKey.SIZE
,
getSizeInKilos()
public double getSizeInKilos() throws DominoException
DominoException
PropertyKey.SIZE
,
getSize()
public java.util.Date getDateCreated() throws DominoException
DominoException
PropertyKey.DATE_CREATED
public java.lang.String getDateCreatedString(java.text.DateFormat dateFormat) throws DominoException
dateFormat
- the date format (may not be null
)
null
DominoException
PropertyKey.DATE_CREATED
public java.util.Date getDateModified() throws DominoException
DominoException
PropertyKey.DATE_MODIFIED
public java.lang.String getDateModifiedString(java.text.DateFormat dateFormat) throws DominoException
dateFormat
- the date format (may not be null
)
null
DominoException
PropertyKey.DATE_MODIFIED
public DocumentType getDocumentType() throws DominoException
null
if not recognized
DominoException
PropertyKey.DOCUMENT_TYPE
,
PropertyKey.NOTICE_TYPE
public boolean hasAttachment() throws DominoException
true
if the document has an attachment; false
otherwise
DominoException
PropertyKey.HAS_ATTACHMENT
public int getAttachmentCount() throws DominoException
DominoException
PropertyKey.ATTACHMENT_COUNT
public AttachmentInfo[] getAttachmentInfoArray() throws DominoException
DominoException
PropertyKey.ATTACHMENT_INFO
public AttachmentInfo getAttachmentInfo(int iIndex) throws DominoException
iIndex
- the attachment index
null
if attachment index does not exist
DominoException
PropertyKey.ATTACHMENT_INFO
public int getEmbeddedImageCount() throws DominoException
DominoException
PropertyKey.EMBEDDED_IMAGE_COUNT
public EmbeddedImageInfo[] getEmbeddedImageInfoArray() throws DominoException
DominoException
PropertyKey.EMBEDDED_IMAGE_INFO
public EmbeddedImageInfo getEmbeddedImageInfo(java.lang.String sImageID) throws DominoException
sImageID
- the image id
null
if image info does not exist
DominoException
PropertyKey.EMBEDDED_IMAGE_INFO
public void serverAddAttachment(java.lang.String sName, DataHandler handler) throws DominoException
Note: the attachment is added to the document immediately.
There is no need to call serverUpdate()
.
sName
- the name of the attachmenthandler
- a handler that can supply the attachment data
DominoException
- an error occurs while connecting to the
Compoze Domino Service. An AttachmentSizeLimitException
is thrown if the attachment exceeds the
attachment setting limit in the Compoze Domino Service. Use instanceof
to determine if this exception is thrown.public void serverDeleteAttachment(int iIndex) throws DominoException
Note: the attachment is deleted from the document immediately.
There is no need to call serverUpdate()
.
iIndex
- the index of the attachment to delete
DominoException
public void serverCopyTo(java.lang.String sFolderID) throws DominoException
sFolderID
- the ID of the target folder
DominoException
public void serverMoveTo(java.lang.String sSourceFolderID, java.lang.String sTargetFolderID) throws DominoException
Note: The target folder must be able to hold memos. If
the specified target folder does not hold memos, this
method throw a DominoException
.
sSourceFolderID
- the ID of the source foldersTargetFolderID
- the ID of the target folder
DominoException
Folder.holdMemos()
public void serverUpdate() throws DominoException
serverUpdate
in class AbstractItem
DominoException
|
Oracle | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |