Overview | Package | Class | Tree | Deprecated | Index | Help
| Compoze Software, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.compoze.domino
Class AbstractDocument

    java.lang.Object
      com.compoze.domino.AbstractItem
          com.compoze.domino.AbstractDocument

All Implemented Interfaces:
  java.io.Serializable

Direct Known Subclasses:
  AddressEntry, Memo, Resource

public abstract class AbstractDocument
extends AbstractItem
implements java.io.Serializable

This class represents a Domino document. Documents are entities such as memos, appointments, tasks and contacts.

See Also:
  Serialized Form

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, javax.activation.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

### AbstractDocument

    protected AbstractDocument(Session session,
                               PropertyValue[] propValues)

  Constructor.

Parameters:
  `session` - the session
  `propValues` - the property values array

### AbstractDocument

    protected AbstractDocument(PropertyValue[] propValues)

  Constructor.

Parameters:
  `propValues` - the property values array

Method Detail

### getID

    public java.lang.String getID()
                           throws DominoException

  Gets the id of the document.

  Returns:
    the id of the document
  Throws:
    `DominoException`
  See Also:
    `PropertyKey.DOCUMENT_ID`

### getParentID

    public java.lang.String getParentID()
                                 throws DominoException

  Gets the parent id of the document. This indicates the document is a response document (child) to another document (parent).

  Returns:
    the id of the parent document or `null` for no parent
  Throws:
    `DominoException`
  See Also:
    `PropertyKey.PARENT_DOCUMENT_ID`

### getSize

    public int getSize()
                throws DominoException

  Gets the size of the document (in bytes). This size includes attachments (if any).

  Returns:
    the size of the document (in bytes)
  Throws:
    `DominoException`
  See Also:
    `PropertyKey.SIZE`, `getSizeInKilos()`

### getSizeInKilos

    public double getSizeInKilos()
                          throws DominoException

  Gets the size of the document (in kilobytes). This size includes attachments (if any).

  Returns:
    the size of the document (in kilobytes)
  Throws:
    `DominoException`
  See Also:
    `PropertyKey.SIZE`, `getSize()`

### getDateCreated

    public java.util.Date getDateCreated()
                                  throws DominoException

  Gets the date created for the document.

  Returns:
    the date created for the document
  Throws:
    `DominoException`
  See Also:
    `PropertyKey.DATE_CREATED`

### getDateCreatedString

    public java.lang.String getDateCreatedString(java.text.DateFormat dateFormat)
                                          throws DominoException

  Gets the date created for the document formatted with the specified date format.

  Parameters:
    `dateFormat` - the date format (may not be `null`)
  Returns:
    the date created for the document or empty string if date created property is `null`
  Throws:
    `DominoException`
  See Also:
    `PropertyKey.DATE_CREATED`

### getDateModified

    public java.util.Date getDateModified()
                                   throws DominoException

  Gets the date modified for the document.

  Returns:
    the date modified for the document
  Throws:
    `DominoException`
  See Also:
    `PropertyKey.DATE_MODIFIED`

### getDateModifiedString

    public java.lang.String getDateModifiedString(java.text.DateFormat dateFormat)
                                           throws DominoException

  Gets the date modified for the document formatted with the specified date format.

  Parameters:
    `dateFormat` - the date format (may not be `null`)
  Returns:
    the date modified for the document or empty string if date modified property is `null`
  Throws:
    `DominoException`
  See Also:
    `PropertyKey.DATE_MODIFIED`

### getDocumentType

    public DocumentType getDocumentType()
                                 throws DominoException

  Gets the type of the document.

  Returns:
    type of the document or `null` if not recognized
  Throws:
    `DominoException`
  See Also:
    `PropertyKey.DOCUMENT_TYPE`, `PropertyKey.NOTICE_TYPE`

### hasAttachment

    public boolean hasAttachment()
                          throws DominoException

  Checks if the document has an attachment.

  Returns:
    `true` if the document has an attachment; `false` otherwise
  Throws:
    `DominoException`
  See Also:
    `PropertyKey.HAS_ATTACHMENT`

### getAttachmentCount

    public int getAttachmentCount()
                           throws DominoException

  Gets the attachment count for the document.

  Returns:
    the number of attachments
  Throws:
    `DominoException`
  See Also:
    `PropertyKey.ATTACHMENT_COUNT`

### getAttachmentInfoArray

    public AttachmentInfo[] getAttachmentInfoArray()
                                            throws DominoException

  Gets the attachment info for the document.

  Returns:
    an array of attachment info or an empty array if the document has no attachments
  Throws:
    `DominoException`
  See Also:
    `PropertyKey.ATTACHMENT_INFO`

### getAttachmentInfo

    public AttachmentInfo getAttachmentInfo(int iIndex)
                                     throws DominoException

  Gets the attachment info for the document.

  Parameters:
    `iIndex` - the attachment index
  Returns:
    the attachment info or `null` if attachment index does not exist
  Throws:
    `DominoException`
  See Also:
    `PropertyKey.ATTACHMENT_INFO`

### getEmbeddedImageCount

    public int getEmbeddedImageCount()
                              throws DominoException

  Gets the embedded image count for the document.

  Returns:
    the number of embedded images
  Throws:
    `DominoException`
  See Also:
    `PropertyKey.EMBEDDED_IMAGE_COUNT`

### getEmbeddedImageInfoArray

    public EmbeddedImageInfo[] getEmbeddedImageInfoArray()
                                                  throws DominoException

  Gets the embedded image info for the document.

  Returns:
    an array of embedded image info or an empty array if the document has no embedded images
  Throws:
    `DominoException`
  See Also:
    `PropertyKey.EMBEDDED_IMAGE_INFO`

### getEmbeddedImageInfo

    public EmbeddedImageInfo getEmbeddedImageInfo(java.lang.String sImageID)
                                           throws DominoException

  Gets the embedded image info for the document.

  Parameters:
    `sImageID` - the image id
  Returns:
    the image info or `null` if image info does not exist
  Throws:
    `DominoException`
  See Also:
    `PropertyKey.EMBEDDED_IMAGE_INFO`

### serverAddAttachment

    public void serverAddAttachment(java.lang.String sName,
                                    javax.activation.DataHandler handler)
                             throws DominoException

  Hits the server to add an attachment to a document.

  Note: the attachment is added to the document immediately. There is no need to call `serverUpdate()`.

  Parameters:
    `sName` - the name of the attachment
    `handler` - a handler that can supply the attachment data
  Throws:
    `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.

### serverDeleteAttachment

    public void serverDeleteAttachment(int iIndex)
                                throws DominoException

  Hits the server to delete an attachment from the document.

  Note: the attachment is deleted from the document immediately. There is no need to call `serverUpdate()`.

  Parameters:
    `iIndex` - the index of the attachment to delete
  Throws:
    `DominoException`

### serverCopyTo

    public void serverCopyTo(java.lang.String sFolderID)
                      throws DominoException

  Hits the server to copy the document to a folder.

  Parameters:
    `sFolderID` - the ID of the target folder
  Throws:
    `DominoException`

### serverMoveTo

    public void serverMoveTo(java.lang.String sSourceFolderID,
                             java.lang.String sTargetFolderID)
                      throws DominoException

  Hits the server to move the document to a folder.

  Note: The target folder must be able to hold memos. If the specified target folder does not hold memos, this method throw a `DominoException`.

  Parameters:
    `sSourceFolderID` - the ID of the source folder
    `sTargetFolderID` - the ID of the target folder
  Throws:
    `DominoException`
  See Also:
    `Folder.holdMemos()`

### serverUpdate

    public void serverUpdate()
                      throws DominoException

  Hits the server to update any changed properties.

  Specified by:
    `serverUpdate` in class `AbstractItem`
  Throws:
    `DominoException`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Compoze Software, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright ©1999-2003 Compoze Software, Inc. All rights reserved.