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:
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 ();
}
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 |
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.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 |
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
.
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
Copyright ©1999-2005 Compoze Software, Inc. All rights reserved.