|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.arsdigita.domain.DomainObject
com.arsdigita.domain.ObservableDomainObject
com.arsdigita.kernel.ACSObject
com.arsdigita.auditing.AuditedACSObject
com.arsdigita.workflow.simple.Task
com.arsdigita.workflow.simple.UserTask
Aser task that is associated with an interface for performing some manual operation.
| Field Summary | |
static String |
BASE_DATA_OBJECT_TYPE
|
static int |
DEFAULT_DURATION
|
static String |
DISABLE_OP
|
static String |
ENABLE_OP
|
static String |
FINISH_OP
|
static String |
ROLLBACK_OP
|
static String |
versionId
|
| Fields inherited from class com.arsdigita.workflow.simple.Task |
DELETED, DISABLED, ENABLED, FINISHED, INACTIVE |
| Fields inherited from class com.arsdigita.kernel.ACSObject |
CONTAINER, DEFAULT_DOMAIN_CLASS, DISPLAY_NAME, ID, OBJECT_TYPE |
| Constructor Summary | |
|
UserTask()
Creates a new task definition and sets the properties label and description to null. |
|
UserTask(BigDecimal id)
Restores a task definition from an OID as BigDecimal. |
|
UserTask(DataObject userTaskObject)
Constructor for restoring a user task from a data object. |
protected |
UserTask(ObjectType type)
Constructor for a user task that is used for setting the object type. |
|
UserTask(OID oid)
Restores a user task definition from an OID. |
protected |
UserTask(String typeName)
Constructor for user task that is used for setting the object type by name. |
|
UserTask(String label,
String description)
Constructor for a user task without runtime information. |
|
UserTask(String label,
String description,
boolean is_active,
int duration_minutes)
Constructor for a user task with usage information. |
| Method Summary | |
void |
assignGroup(Group group)
Assigns a group of users to this task. |
void |
assignUser(User user)
Assigns a user to this task. |
Object |
clone()
Clones a user task. |
protected void |
copyAttributes(UserTask task)
Exports the attributes of this domain object. |
void |
delete()
Deletes this user task. |
protected void |
disableEvt()
Sends email that this task has been disabled. |
void |
enable()
Set the startDate to the current date, carrying the duration over from the current value. |
void |
enableEvt()
Enables an event action. |
void |
finish(User user)
Marks the task as finished. |
void |
finish(User user,
String comment)
Marks the task as finished with an additional comment. |
protected void |
finishEvt()
Sends email to assignees with information about who completed the task and when. |
protected Message |
generateMessage(String operation,
Party sender)
Generate the message to send if for the specified event |
static Party |
getAlertsSender()
|
protected DataAssociation |
getAssignedGroupAssociation()
Retrieve the assigned group data collection. |
GroupCollection |
getAssignedGroupCollection()
|
int |
getAssignedGroupCount()
Gets number of assigned groups. |
Iterator |
getAssignedGroups()
Returns the assigned groups. |
protected DataAssociation |
getAssignedUserAssociation()
Retrieve the assigned users datacollection. |
UserCollection |
getAssignedUserCollection()
|
int |
getAssignedUserCount()
Gets the number of assigned users. |
Iterator |
getAssignedUsers()
Returns all assigned users. |
Date |
getDueDate()
Retrieves the due date of this user task. |
Duration |
getDuration()
Returns the duration attribute for this user task. |
User |
getLockedUser()
Retrieves the user who locked the process. |
Party |
getNotificationSender()
Returns the notification sender. |
Date |
getStartDate()
Retrieves the start date of this user task. |
OID |
getUserTaskOID()
Returns the OID of this user task. |
boolean |
isAssigned()
Tests whether any user or group is assigned to this task. |
boolean |
isAssigned(Group group)
Tests whether a specific group is assigned to this task. |
boolean |
isAssigned(User user)
Tests whether a specificv user is assigned to this task. |
boolean |
isLocked()
Checks whether the task is locked by a user. |
boolean |
isOverdue()
Tests whether the task is overdue. |
void |
lock(User user)
Locks the task for finishing by a specified user. |
void |
removeAllGroupAssignees()
Removes all groups assigned to this task. |
void |
removeGroup(Group group)
Removes a group from assignment list. |
void |
removeUser(User user)
Removes a user from the assignment list. |
protected void |
rollbackEvt()
Sends email to subscribed events that this task was rolled back. |
protected boolean |
sendAlerts(String operation)
Whether or not to send alerts. |
protected void |
sendMessageToAssignees(Message msg)
Internal sends a message to all assignees of this task. |
void |
setDueDate(Date dueDate)
Sets the due date of the user task. |
void |
setDuration(Duration duration)
Sets the duration for this user task. |
Party |
setNotificationSender(Party party)
Specifies who is sending out the notification. |
void |
setStartDate(Date startDate)
Sets the start date for a user task. |
void |
unlock(User user)
Releases the lock on the task if it is currently locked. |
| Methods inherited from class com.arsdigita.auditing.AuditedACSObject |
getCreationDate, getCreationIP, getCreationUser, getLastModifiedDate, getLastModifiedIP, getLastModifiedUser |
| Methods inherited from class com.arsdigita.kernel.ACSObject |
assertPrivilege, beforeSave, checkPrivilege, doCreateCheck, doWriteCheck, getContainer, getDefaultDomainClass, getID, getSpecificObjectType, getSpecificOID, gimmeContainer, isContainerModified, setID, setID |
| Methods inherited from class com.arsdigita.domain.ObservableDomainObject |
addObserver, getObservers |
| Methods inherited from class com.arsdigita.domain.DomainObject |
add, add, addToAssociation, afterDelete, afterSave, beforeDelete, clear, disconnect, get, getObjectType, getOID, getSession, hashCode, isDeleted, isDisconnected, isModified, isNew, isPropertyModified, isValid, remove, remove, remove, removeFromAssociation, save, set, setAssociation, setAssociation, specializeDataObject, specializeDataObject |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final String versionId
public static final String BASE_DATA_OBJECT_TYPE
public static final int DEFAULT_DURATION
public static final String ENABLE_OP
public static final String DISABLE_OP
public static final String ROLLBACK_OP
public static final String FINISH_OP
| Constructor Detail |
public UserTask(String label,
String description,
boolean is_active,
int duration_minutes)
label - the task labeldescription - the task descriptionis_active - whether the task is in useduration_minutes - the projected duration of the task in minutes
public UserTask(String label,
String description)
label - the task definition labeldescription - the descriptionpublic UserTask()
label and description to null.
The properties of this
object are not made persistent until the save
method is called. If save() is called
without setting these properties, an IllegalArgumentException
will be thrown.
protected UserTask(ObjectType type)
type - the object typeprotected UserTask(String typeName)
typeName - the type namepublic UserTask(DataObject userTaskObject)
userTaskObject - the data object
public UserTask(OID oid)
throws DataObjectNotFoundException
oid - the user task OID
public UserTask(BigDecimal id)
throws DataObjectNotFoundException
id - the user task ID as BigDecimal| Method Detail |
public OID getUserTaskOID()
OIDpublic Date getStartDate()
public Date getDueDate()
public void setStartDate(Date startDate)
startDate - the date the task is supposed to startpublic void setDuration(Duration duration)
duration - the duration for this taskpublic Duration getDuration()
public void setDueDate(Date dueDate)
dueDate - the imposed due date of the user task
public void finish(User user)
throws TaskException
This operation is only valid if the task is enabled. Only the user who previously locked the task can call this method.
user - the user who checks off the task
TaskExceptionpublic void enable()
enable in class Taskpublic void enableEvt()
enableEvt in class Taskprotected void finishEvt()
finishEvt in class Taskprotected void rollbackEvt()
rollbackEvt in class Taskprotected void disableEvt()
disableEvt in class Task
protected Message generateMessage(String operation,
Party sender)
protected void sendMessageToAssignees(Message msg)
msg - the messageMessage
public void finish(User user,
String comment)
throws TaskException
user - the user checking off the task as finishedcomment - a comment
TaskExceptionpublic void lock(User user)
user - the user who is locking the taskpublic void unlock(User user)
user - the user who is unlocking the taskpublic boolean isLocked()
true if the task is locked
by a user; false otherwise.public User getLockedUser()
public void assignUser(User user)
save method to make it persistant.
assignUser in interface Assignableuser - an active user of the systempublic void assignGroup(Group group)
save method to make it persistent.
assignGroup in interface Assignablegroup - the group to assignpublic void removeUser(User user)
removeUser in interface Assignableuser - the user to be removedpublic void removeGroup(Group group)
removeGroup in interface Assignablegroup - the group to be removedpublic void removeAllGroupAssignees()
public boolean isAssigned()
isAssigned in interface Assignabletrue if a user or a group is assigned;
false otherwise.public boolean isAssigned(User user)
isAssigned in interface Assignableuser - a system user
true if the user is assigned to this task;
false otherwise.public boolean isAssigned(Group group)
isAssigned in interface Assignablegroup - a system group
true if the group is actually assigned
to this task; false otherwise.public int getAssignedUserCount()
public int getAssignedGroupCount()
public Iterator getAssignedUsers()
getAssignedUsers in interface Assignablepublic Iterator getAssignedGroups()
getAssignedGroups in interface Assignableprotected DataAssociation getAssignedUserAssociation()
public final UserCollection getAssignedUserCollection()
protected DataAssociation getAssignedGroupAssociation()
public final GroupCollection getAssignedGroupCollection()
public void delete()
delete in class Taskpublic boolean isOverdue()
true if the task is overdue;
false otherwise.public Party setNotificationSender(Party party)
party - the sender in email messages
public Party getNotificationSender()
public Object clone()
clone in class Taskprotected void copyAttributes(UserTask task)
task - the domain object to which this method copies the
attributes of this objectpublic static Party getAlertsSender()
protected boolean sendAlerts(String operation)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||