Compoze Software, Inc.

com.compoze.collab.domino
Interface IDominoTask

All Superinterfaces:
IAttachmentSupport, IGroupwareItem, IItem, IMessagingItem, ITask, java.io.Serializable

public interface IDominoTask
extends ITask, IAttachmentSupport

This interface is used for Domino specific address entries. There are several mappings of groupware keys to Domino concepts which are worth noting:
Collab Key Domino Concept
Start Date (ITask.START_DATE) Start Date Time (DominoKey.START_DATE_TIME, DominoKey.START_DATE)
Due Date (ITask.DUE_DATE) Due Date Time (DominoKey.DUE_DATE_TIME, DominoKey.DUE_DATE)
Is Recurring (ITask.IS_RECURRING) Is Repeating (DominoKey.REPEATS)
Task Status (ITask.STATUS) Task Due State (DominoKey.DUE_STATE)

An example of creating a Domino contact follows

Sample code:

/**
 * The <code>createTask</code> method demonstrates how to create a
 * task with the Domino provider.
 *
 * @throws  CollaborationException  if the session factory could not instantiate
 *          a session with the given parameters, or if there was an error
 *          retrieving folders, setting properties, or sending a message.
 */
public  void    createTask
(
)
throws  CollaborationException
    {
    HashMap props = new HashMap ();

    props.put (ISession.PROP_PROVIDER, IDominoSession.INTERNAL_NAME);
    props.put (IDominoSession.PROP_SERVICE_URL, "server");
    props.put (IDominoSession.PROP_USER_USERNAME, "username");
    props.put (IDominoSession.PROP_USER_PASSWORD, "password");

    IDominoSession session = (IDominoSession) SessionFactory.createSession (
        props);

    session.login ();

    // get default container
    ITasksContainer tasks = (ITasksContainer) session.getDefaultContainer (
        DefaultContainerClassEnum.TASKS);

    IItem item = tasks.add ();

    IDominoTask task = (IDominoTask) item;

    // ITask
    Calendar cal = Calendar.getInstance (session.getTimeZone());
    cal.set (Calendar.MONTH, 4);
    cal.set (Calendar.DAY_OF_MONTH, 5);
    cal.set (Calendar.HOUR_OF_DAY, 0);
    cal.set (Calendar.MINUTE, 0);
    cal.set (Calendar.SECOND, 0);
    cal.set (Calendar.MILLISECOND, 0);
    Date startDate = cal.getTime();

    cal.set (Calendar.DAY_OF_MONTH, 6);
    Date dueDate = cal.getTime();

    task.setImportance (ImportanceEnum.HIGH);
    task.setSubject ("new task subject");
    task.setStartDate (startDate);
    task.setDueDate (dueDate);
    task.setStatus (TaskDueStateEnum.NOT_STARTED);

    task.commit ();

    task.addAttachment (new FileAttachmentSource ("c:\\file.txt"));

    session.close ();
    }

Field Summary
static ItemClass CLASS
          The item class of IExchangeAddressEntry.
static Key INSTANCE_TYPE
          Key that represents the instance type.
static int KEYID_INSTANCE_TYPE
          The int ID for the INSTANCE_TYPE key.
 
Fields inherited from interface com.compoze.collab.groupware.ITask
DATE_COMPLETED, DUE_DATE, IS_RECURRING, KEYID_DATE_COMPLETED, KEYID_DUE_DATE, KEYID_IS_RECURRING, KEYID_START_DATE, KEYID_STATUS, START_DATE, STATUS
 
Fields inherited from interface com.compoze.collab.groupware.IGroupwareItem
CATEGORIES, DATE_CREATED, DATE_LAST_MODIFIED, IMPORTANCE, KEYID_CATEGORIES, KEYID_DATE_CREATED, KEYID_DATE_LAST_MODIFIED, KEYID_IMPORTANCE, KEYID_SIZE, KEYID_SUBJECT, SIZE, SUBJECT
 
Fields inherited from interface com.compoze.collab.messaging.IMessagingItem
BODY, BODY_HTML, KEYID_BODY, KEYID_BODY_HTML
 
Fields inherited from interface com.compoze.collab.IItem
ID, ITEM_CLASS, KEYID_ID, KEYID_ITEM_CLASS, KEYID_PARENT_ID, MINIMUM_ITEM_KEYS, PARENT_ID
 
Fields inherited from interface com.compoze.collab.IAttachmentSupport
ATTACHMENTS, HAS_ATTACHMENT, KEYID_ATTACHMENTS, KEYID_HAS_ATTACHMENT
 
Method Summary
 void delete(int iUpdateRule)
          Hits the server to delete the task.
 InstanceType getInstanceType()
          Gets the instance type for this task.
 
Methods inherited from interface com.compoze.collab.groupware.ITask
getDateCompleted, getDueDate, getStartDate, getStatus, isRecurring, markComplete, setDateCompleted, setDueDate, setDueDate, setStartDate, setStartDate, setStatus
 
Methods inherited from interface com.compoze.collab.groupware.IGroupwareItem
getBodyHtml, getBodyHtml, getCategories, getDateCreated, getDateLastModified, getImportance, getNormalizedSubject, getSize, getSubject, getSubject, getSubjectPrefix, setBodyHtml, setCategories, setImportance, setSubject
 
Methods inherited from interface com.compoze.collab.messaging.IMessagingItem
getBody, setBody
 
Methods inherited from interface com.compoze.collab.IItem
commit, containsKey, containsKey, copyProperties, copyTo, delete, fetchProperties, getAttribute, getEnum, getID, getInputStream, getItemClass, getOutputStream, getParent, getParent, getParentID, getProperties, getProperties, getProperties, getProperty, getProperty, getProperty, getReader, getRootContainer, getSession, getWriter, isMissing, moveTo, removeAttribute, removeProperty, setAttribute, setProperties, setProperty, setProperty, setProperty
 
Methods inherited from interface com.compoze.collab.IAttachmentSupport
addAttachment, getAttachment, getAttachmentCount, getAttachments, hasAttachment
 

Field Detail

KEYID_INSTANCE_TYPE

public static final int KEYID_INSTANCE_TYPE
The int ID for the INSTANCE_TYPE key.

INSTANCE_TYPE

public static final Key INSTANCE_TYPE
Key that represents the instance type.

CLASS

public static final ItemClass CLASS
The item class of IExchangeAddressEntry.
Method Detail

getInstanceType

public InstanceType getInstanceType()
                             throws CollaborationException
Gets the instance type for this task.
Returns:
the instance type
See Also:
DominoKey.INSTANCE_TYPE

delete

public void delete(int iUpdateRule)
            throws CollaborationException
Hits the server to delete the task.
Parameters:
iUpdateRule - the update rule ( see RepeatPattern.UPDATE_ constants)
See Also:
ITask.IS_RECURRING, ITask.START_DATE, ITask.DUE_DATE

Compoze Software, Inc.

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