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 Documents

    java.lang.Object
      com.compoze.domino.Documents

All Implemented Interfaces:
  java.io.Serializable

public class Documents
extends java.lang.Object
implements java.io.Serializable

This class contains the methods used for document manipulation.

See Also:
  Serialized Form

Method Summary
`void` | `serverAddAttachment(java.lang.String sID, java.lang.String sName, javax.activation.DataHandler handler)` Hits the server to add an attachment to a document.
`void` | `serverCopyTo(java.lang.String[] ids, java.lang.String sFolderID)` Hits the server to copy the documents to a folder.
`Appointment` | `serverCreateAppointment(PropertyValue[] values, java.util.Date startDate, java.util.Date endDate, AppointmentType type)` Hits the server to create an appointment.
`Contact` | `serverCreateContact(PropertyValue[] values)` Hits the server to create a contact.
`Memo` | `serverCreateMemo(PropertyValue[] values)` Hits the server to create a memo.
`Task` | `serverCreateTask(PropertyValue[] values)` Hits the server to create a task.
`void` | `serverDeleteAttachment(java.lang.String sID, int iIndex)` Hits the server to delete an attachment from the document.
`void` | `serverDeleteDocuments(java.lang.String[] documentIDs)` Hits the server to delete the specified documents.
`Appointment` | `serverGetAppointment(java.lang.String sAptID, PropertyKey[] keys)` Queries the server to get the appointment from the server.
`Appointment` | `serverGetAppointment(java.lang.String sAptID, PropertyKey[] keys, java.util.Date instanceDate)` Queries the server to get the appointment from the server.
`Appointment[]` | `serverGetAppointments(java.util.Date startDate, java.util.Date endDate, PropertyKey[] keys)` Queries the server to get appointments from the server within the specified range.
`Contact` | `serverGetContact(java.lang.String sContactID, PropertyKey[] keys)` Queries the server to get the contact from the server.
`int` | `serverGetContactCount()` Queries the server to get contact count.
`int` | `serverGetContactCount(ContactFilter filter)` Queries the server to get contact count.
`Contact[]` | `serverGetContacts(int iStartIndex, int iEndIndex, PropertyKey[] keys, SortProperty sortProp, ContactFilter filter)` Queries the server to get contacts from the server between the specified `iStartIndex` and `iEndIndex` starting at 0.
`AbstractDocument` | `serverGetDocument(java.lang.String sID, PropertyKey[] keys)` Queries the server to get the document from the server.
`Memo` | `serverGetMemo(java.lang.String sMemoID, PropertyKey[] keys)` Queries the server to get the contact from the server.
`int` | `serverGetMemoCount()` Queries the server to get memo count.
`int` | `serverGetMemoCount(MemoFilter filter)` Queries the server to get memo count.
`Memo[]` | `serverGetMemos(int iStartIndex, int iEndIndex, PropertyKey[] keys, SortProperty sortProp, MemoFilter filter)` Queries the server to get memos from the server between the specified `iStartIndex` and `iEndIndex` starting at 0 and matching the specified filter.
`Memo[]` | `serverGetMemos(java.lang.String sFolderID, int iStartIndex, int iEndIndex, PropertyKey[] keys, SortProperty sortProp)` Queries the server to get memos from the server between the specified `iStartIndex` and `iEndIndex` starting at 0.
`Task` | `serverGetTask(java.lang.String sTaskID, PropertyKey[] keys)` Queries the server to get the task from the server.
`Task` | `serverGetTask(java.lang.String sTaskID, PropertyKey[] keys, java.util.Date instanceDate)` Queries the server to get the task from the server.
`int` | `serverGetTaskCount()` Queries the server to get task count.
`int` | `serverGetTaskCount(TaskFilter filter)` Queries the server to get task count.
`Task[]` | `serverGetTasks(int iStartIndex, int iEndIndex, PropertyKey[] keys, SortProperty sortProp, TaskFilter filter)` Queries the server to get tasks from the server between the specified `iStartIndex` and `iEndIndex` starting at 0.
`void` | `serverMoveTo(java.lang.String[] ids, java.lang.String sSourceFolderID, java.lang.String sTargetFolderID)` Hits the server to move the documents to a folder.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### serverCreateMemo

    public Memo serverCreateMemo(PropertyValue[] values)
                          throws DominoException

  Hits the server to create a memo.

  Parameters:
    `values` - any initial property values to set
  Returns:
    the newly created memo
  Throws:
    `DominoException`

### serverCreateContact

    public Contact serverCreateContact(PropertyValue[] values)
                                throws DominoException

  Hits the server to create a contact.

  Parameters:
    `values` - any initial property values to set
  Returns:
    the newly created contact
  Throws:
    `DominoException`

### serverCreateTask

    public Task serverCreateTask(PropertyValue[] values)
                          throws DominoException

  Hits the server to create a task.

  Parameters:
    `values` - any initial property values to set
  Returns:
    the newly created task
  Throws:
    `DominoException`

### serverCreateAppointment

    public Appointment serverCreateAppointment(PropertyValue[] values,
                                               java.util.Date startDate,
                                               java.util.Date endDate,
                                               AppointmentType type)
                                        throws DominoException

  Hits the server to create an appointment.

  Note: The start date must be before the end date. If not, the dates are swapped.

  Start and end date times are used as follows:

  `AppointmentType.APPOINTMENT` | Start date and time are used as is. Only the time component of the end date time is used.
  `AppointmentType.ALL_DAY_EVENT` | The start time is set to 4:00 AM and the end time is set to 8:00 PM.
  `AppointmentType.ANNIVERSARY` | Start date is used as the anniversary date. The statrt time is set to 4:00 AM and the end time is set to 8:00 PM. The end date is ignored.
  `AppointmentType.REMINDER` | Start date and time is used as the reminder date and time.The end date is ignored.

  Parameters:
    `values` - any initial property values to set
    `startDate` - the start date time (may not be `null`)
    `endDate` - the end date time (may not be `null`)
    `type` - the appointment type (may not be `null`)
  Returns:
    the newly created task
  Throws:
    `DominoException`

### serverDeleteDocuments

    public void serverDeleteDocuments(java.lang.String[] documentIDs)
                               throws DominoException

  Hits the server to delete the specified documents.

  Note: do not use this method with document instances of tasks or appointments, use `serverDelete()` available on those objects. Those methods take into consideration repeating patterns, if applicable.

  Parameters:
    `documentIDs` - the IDs of the documents to delete
  Throws:
    `DominoException`
  See Also:
    `Appointment.serverDelete()`, `Task.serverDelete()`

### serverGetContacts

    public Contact[] serverGetContacts(int iStartIndex,
                                       int iEndIndex,
                                       PropertyKey[] keys,
                                       SortProperty sortProp,
                                       ContactFilter filter)
                                throws DominoException

  Queries the server to get contacts from the server between the specified `iStartIndex` and `iEndIndex` starting at 0.

  Parameters:
    `iStartIndex` - the start index endpoint (inclusive) or -1 for all
    `iEndIndex` - the end index highpoint (exclusive) or -1 for all
    `keys` - the properties to bring back from the contact
    `sortProp` - the property to sort by or `null` for default sorting
    `filter` - the filter or `null` for no filtering
  Returns:
    an array of contacts
  Throws:
    `DominoException`

### serverGetAppointments

    public Appointment[] serverGetAppointments(java.util.Date startDate,
                                               java.util.Date endDate,
                                               PropertyKey[] keys)
                                        throws DominoException

  Queries the server to get appointments from the server within the specified range. Note: you should always include the start date time and end date time in the list of property keys to bring back.

  Parameters:
    `startDate` - the start date (inclusive) or `null` for no start date
    `endDate` - the end date (exclusive) or `null` for no end date
    `keys` - the properties to bring back from the appointment
  Returns:
    an array of appointments
  Throws:
    `DominoException`
  See Also:
    `PropertyKey.START_DATE_TIME`, `PropertyKey.END_DATE_TIME`

### serverGetTasks

    public Task[] serverGetTasks(int iStartIndex,
                                 int iEndIndex,
                                 PropertyKey[] keys,
                                 SortProperty sortProp,
                                 TaskFilter filter)
                          throws DominoException

  Queries the server to get tasks from the server between the specified `iStartIndex` and `iEndIndex` starting at 0.

  Parameters:
    `iStartIndex` - the start index endpoint (inclusive) or -1 for all
    `iEndIndex` - the end index highpoint (exclusive) or -1 for all
    `keys` - the properties to bring back from the task
    `sortProp` - the property to sort by or `null` for default sorting
    `filter` - the filter or `null` for no filtering
  Returns:
    an array of tasks
  Throws:
    `DominoException`

### serverGetMemos

    public Memo[] serverGetMemos(java.lang.String sFolderID,
                                 int iStartIndex,
                                 int iEndIndex,
                                 PropertyKey[] keys,
                                 SortProperty sortProp)
                          throws DominoException

  Queries the server to get memos from the server between the specified `iStartIndex` and `iEndIndex` starting at 0.

  Parameters:
    `sFolderID` - the folder id
    `iStartIndex` - the start index endpoint (inclusive) or -1 for all
    `iEndIndex` - the end index highpoint (exclusive) or -1 for all
    `keys` - the properties to bring back from the memo
    `sortProp` - the property to sort by or `null` for default sorting
  Returns:
    an array of memos
  Throws:
    `DominoException`

### serverGetMemos

    public Memo[] serverGetMemos(int iStartIndex,
                                 int iEndIndex,
                                 PropertyKey[] keys,
                                 SortProperty sortProp,
                                 MemoFilter filter)
                          throws DominoException

  Queries the server to get memos from the server between the specified `iStartIndex` and `iEndIndex` starting at 0 and matching the specified filter.

  Parameters:
    `iStartIndex` - the start index endpoint (inclusive) or -1 for all
    `iEndIndex` - the end index highpoint (exclusive) or -1 for all
    `keys` - the properties to bring back from the memo
    `filter` - the filter (may not be `null`)
  Returns:
    an array of memos
  Throws:
    `DominoException`

### serverGetMemoCount

    public int serverGetMemoCount()
                           throws DominoException

  Queries the server to get memo count.

  Returns:
    the memo count or -1 if not available
  Throws:
    `DominoException`

### serverGetMemoCount

    public int serverGetMemoCount(MemoFilter filter)
                           throws DominoException

  Queries the server to get memo count.

  Parameters:
    `filter` - the filter (may not be `null`)
  Returns:
    the memo count or -1 if not available
  Throws:
    `DominoException`

### serverGetContactCount

    public int serverGetContactCount()
                              throws DominoException

  Queries the server to get contact count.

  Returns:
    the contact count or -1 if not available
  Throws:
    `DominoException`

### serverGetContactCount

    public int serverGetContactCount(ContactFilter filter)
                              throws DominoException

  Queries the server to get contact count.

  Parameters:
    `filter` - the filter or `null` for no filtering
  Returns:
    the contact count or -1 if not available
  Throws:
    `DominoException`

### serverGetTaskCount

    public int serverGetTaskCount()
                           throws DominoException

  Queries the server to get task count.

  Returns:
    the task count or -1 if not available
  Throws:
    `DominoException`

### serverGetTaskCount

    public int serverGetTaskCount(TaskFilter filter)
                           throws DominoException

  Queries the server to get task count.

  Parameters:
    `filter` - the filter or `null` for no filtering
  Returns:
    the task count or -1 if not available
  Throws:
    `DominoException`

### serverGetContact

    public Contact serverGetContact(java.lang.String sContactID,
                                    PropertyKey[] keys)
                             throws DominoException

  Queries the server to get the contact from the server.

  Parameters:
    `sContactID` - the contact id
    `keys` - the properties to bring back from the document
  Returns:
    the contact or `null` if not found
  Throws:
    `DominoException`

### serverGetTask

    public Task serverGetTask(java.lang.String sTaskID,
                              PropertyKey[] keys)
                       throws DominoException

  Queries the server to get the task from the server.

  Parameters:
    `sTaskID` - the task id
    `keys` - the properties to bring back from the document
  Returns:
    the task or `null` if not found
  Throws:
    `DominoException`

### serverGetTask

    public Task serverGetTask(java.lang.String sTaskID,
                              PropertyKey[] keys,
                              java.util.Date instanceDate)
                       throws DominoException

  Queries the server to get the task from the server. Note: you should always include the start date time and due date time in the list of property keys to bring back.

  Parameters:
    `sTaskID` - the task id
    `keys` - the properties to bring back from the document
    `instanceDate` - the instance date for the task (if repeating). If task is repeating and instanceDate `null`, the first instance date in the repeating pattern is returned
  Returns:
    the task or `null` if not found
  Throws:
    `DominoException`
  See Also:
    `PropertyKey.START_DATE_TIME`, `PropertyKey.DUE_DATE_TIME`

### serverGetAppointment

    public Appointment serverGetAppointment(java.lang.String sAptID,
                                            PropertyKey[] keys)
                                     throws DominoException

  Queries the server to get the appointment from the server.

  Parameters:
    `sAptID` - the appointment id
    `keys` - the properties to bring back from the document
  Returns:
    the appointment or `null` if not found
  Throws:
    `DominoException`

### serverGetAppointment

    public Appointment serverGetAppointment(java.lang.String sAptID,
                                            PropertyKey[] keys,
                                            java.util.Date instanceDate)
                                     throws DominoException

  Queries the server to get the appointment from the server.

  Note: you should always include the start date time and end date time in the list of property keys to bring back.

  Note: `InstanceNotFoundException` is thrown if the specified instance date is not found for the specified appointment.

  Parameters:
    `sAptID` - the appointment id
    `keys` - the properties to bring back from the document
    `instanceDate` - the instance date for the appointment (if repeating). If appointment is repeating and instanceDate `null`, the first instance date in the repeating pattern is returned
  Returns:
    the appointment or `null` if not found
  Throws:
    `DominoException`
  See Also:
    `PropertyKey.START_DATE_TIME`, `PropertyKey.END_DATE_TIME`

### serverGetMemo

    public Memo serverGetMemo(java.lang.String sMemoID,
                              PropertyKey[] keys)
                       throws DominoException

  Queries the server to get the contact from the server.

  Parameters:
    `sMemoID` - the memo id
    `keys` - the properties to bring back from the document
  Returns:
    the contact or `null` if not found
  Throws:
    `DominoException`

### serverGetDocument

    public AbstractDocument serverGetDocument(java.lang.String sID,
                                              PropertyKey[] keys)
                                       throws DominoException

  Queries the server to get the document from the server.

  Parameters:
    `sID` - the document id
    `keys` - the properties to bring back from the document
  Returns:
    the document or `null` if not found
  Throws:
    `DominoException`

### serverAddAttachment

    public void serverAddAttachment(java.lang.String sID,
                                    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:
    `sID` - the id of the document
    `sName` - the name of the attachment
    `handler` - a handler that can supply the attachment data
  Throws:
    `DominoException`

### serverDeleteAttachment

    public void serverDeleteAttachment(java.lang.String sID,
                                       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:
    `sID` - the id of the document
    `iIndex` - the index of the attachment to delete
  Throws:
    `DominoException`

### serverCopyTo

    public void serverCopyTo(java.lang.String[] ids,
                             java.lang.String sFolderID)
                      throws DominoException

  Hits the server to copy the documents to a folder.

  Parameters:
    `ids` - the ids of the documents to copy
    `sFolderID` - the ID of the target folder
  Throws:
    `DominoException`

### serverMoveTo

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

  Hits the server to move the documents 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:
    `ids` - the ids of the documents to move
    `sSourceFolderID` - the ID of the source folder or `null` for all
    `sTargetFolderID` - the ID of the target folder
  Throws:
    `DominoException`
  See Also:
    `Folder.holdMemos()`

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.