@Entity
public class Todo
extends com.whitestein.lsps.common.AbstractEntity
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
COUNT_PERSONAL_TODOS_WITH_NULL_PRIORITY
Query name.
|
static java.lang.String |
COUNT_PERSONAL_TODOS_WITH_PRIORITY
Query name.
|
static java.lang.String |
FIND_BY_TASK
Query name.
|
static java.lang.String |
FIND_OPEN_ALLOCATED_TODO_IDS
Query name.
|
static java.lang.String |
FIND_PERSONAL_TODOS_WITH_NULL_PRIORITY
Query name.
|
static java.lang.String |
FIND_PERSONAL_TODOS_WITH_PRIORITY
Query name.
|
static java.lang.String |
GET_STATUS_COUNTS
Query name.
|
| Modifier | Constructor and Description |
|---|---|
protected |
Todo()
Default constructor.
|
|
Todo(java.lang.Long modelInstanceId,
java.lang.Long elementId,
java.lang.Long taskId,
java.lang.String title,
java.lang.String type,
java.util.Date issuedDate,
java.lang.String taskNamespace,
java.lang.String taskName,
byte[] content,
java.util.Date escalationDate,
java.lang.String implementationType)
Creates new instance of
Todo. |
| Modifier and Type | Method and Description |
|---|---|
void |
accomplish(java.util.Date submittedDate)
Sets status to
TodoStatus.ACCOMPLISHED. |
void |
addPerformer(TodoPerformer performer)
Adds a todo performer.
|
void |
addPerformers(java.util.Collection<TodoPerformer> performers)
Adds a collection of todo performers.
|
void |
addRejection(TodoRejection rejection)
Adds a rejection.
|
java.lang.String |
getAllocatedTo()
Returns the id of the user for which todo is allocated.
|
TodoAuthorization |
getAuthorization(Person person)
Returns the reason why the person can see the to-do in his to-do list.
|
byte[] |
getContent()
Returns the todo content.
|
int |
getCurrentDelegationLevel()
Gets current delegation level of the todo.
|
java.lang.String |
getDelegatedBy()
Returns the person who delegated the todo (the current delegation) or null if the todo is not
delegated.
|
java.lang.Long |
getElementId()
Returns the element id.
|
java.util.Date |
getEscalationDate()
Returns the escalation date.
|
java.lang.String |
getImplementationType()
Returns implementation type.
|
java.lang.String |
getInterruptionReason()
Returns reason for which the todo was interrupted.
|
java.util.Date |
getIssuedDate()
Returns the date when the todo was issued.
|
java.lang.Long |
getModelInstanceId()
Returns the model instance id.
|
java.lang.String |
getNotes()
Returns notes attached to the todo.
|
java.util.Collection<TodoPerformer> |
getPerformers()
Returns a collection of performers for this todo.
|
java.lang.Integer |
getPriority()
Returns priority of todo in personal todo list.
|
java.util.Collection<java.lang.String> |
getRejectingPersons()
Returns a collection of rejecting persons.
|
TodoRejection |
getRejectionBy(Person person)
Returns a todo rejection for the specified person.
|
java.util.Collection<TodoRejection> |
getRejections()
Returns a collection of rejections.
|
TodoStatus |
getStatus()
Returns status of the todo.
|
java.util.Date |
getSubmittedDate()
Returns the date when the todo was submitted.
|
java.lang.Long |
getTaskId()
Returns the task id.
|
java.lang.String |
getTaskName()
Returns the name of the task which generated the todo.
|
java.lang.String |
getTaskNamespace()
Returns the name of the namespace of the context for the task which generated the todo.
|
java.lang.String |
getTitle()
Returns title for todo.
|
java.lang.String |
getType()
Returns type of the todo.
|
boolean |
hasInitialPerformer(Person person)
Checks if given
person is one of the todo's performers. |
void |
interrupt(java.util.Date submittedDate,
java.lang.String interruptionReason)
Sets status to
TodoStatus.INTERRUPTED. |
boolean |
isAlive()
|
boolean |
isAllocated()
Returns true if the todo is allocated.
|
boolean |
isAllocatedTo(Person person)
Returns true if this todo is assigned to given person.
|
boolean |
isDelegated()
Returns true if the todo is delegated.
|
boolean |
isDelegatedTo(Person person)
Checks if the todo is delegated to
person. |
boolean |
isOrphaned()
Return true if the todo is orphaned.
|
boolean |
isPersonPermitted(Person person)
Returns true if the given person is permitted to see this todo.
|
boolean |
isPersonPermitted(Person person,
boolean checkSubstitution,
boolean checkAllocation)
Returns true if the given person is permitted to see this todo.
|
boolean |
isRejectedBy(Person person)
Checks if the todo is rejected by
person |
boolean |
isVisibleTo(Person person)
Returns true if
isPersonPermitted(person) is true and the person has not rejected the
todo. |
void |
removePerformer(TodoPerformer performer)
Removes a performer.
|
void |
removeRejection(TodoRejection rejection)
Removes a rejection.
|
void |
resume()
Sets status to
TodoStatus.SUSPENDED. |
void |
setContent(byte[] content)
Sets the todo content..
|
void |
setNotes(java.lang.String notes)
Sets notes attached to the todo.
|
void |
setOrphaned(boolean orphaned)
Sets todo orphaned property.
|
void |
setPriority(java.lang.Integer priority)
Sets priority of the todo in personal todo list.
|
void |
suspend()
Sets status to
TodoStatus.SUSPENDED. |
public static final java.lang.String FIND_OPEN_ALLOCATED_TODO_IDS
public static final java.lang.String FIND_PERSONAL_TODOS_WITH_PRIORITY
public static final java.lang.String FIND_PERSONAL_TODOS_WITH_NULL_PRIORITY
public static final java.lang.String COUNT_PERSONAL_TODOS_WITH_PRIORITY
public static final java.lang.String COUNT_PERSONAL_TODOS_WITH_NULL_PRIORITY
public static final java.lang.String GET_STATUS_COUNTS
public static final java.lang.String FIND_BY_TASK
protected Todo()
public Todo(java.lang.Long modelInstanceId,
java.lang.Long elementId,
java.lang.Long taskId,
java.lang.String title,
java.lang.String type,
java.util.Date issuedDate,
java.lang.String taskNamespace,
java.lang.String taskName,
byte[] content,
java.util.Date escalationDate,
java.lang.String implementationType)
Todo.modelInstanceId - elementId - taskId - title - type - issuedDate - taskNamespace - taskName - content - escalationDate - implementationType - java.lang.NullPointerException - if one of title, type, issuedDate, taskNamespace,
taskName is nullpublic java.lang.Long getModelInstanceId()
public java.lang.Long getElementId()
public java.lang.String getTitle()
public java.lang.String getType()
public TodoStatus getStatus()
public void suspend()
TodoStatus.SUSPENDED.public void resume()
TodoStatus.SUSPENDED.public void accomplish(java.util.Date submittedDate)
TodoStatus.ACCOMPLISHED.submittedDate - java.lang.NullPointerException - if submittedDate is nullpublic void interrupt(java.util.Date submittedDate,
java.lang.String interruptionReason)
TodoStatus.INTERRUPTED.submittedDate - interruptionReason - java.lang.NullPointerException - if submittedDate is nullpublic boolean isAlive()
true if the todo is alive, otherwise returns falsepublic java.util.Date getIssuedDate()
public java.util.Date getSubmittedDate()
public java.lang.String getAllocatedTo()
public java.util.Collection<TodoPerformer> getPerformers()
public void addPerformer(TodoPerformer performer)
performer - java.lang.NullPointerException - if performer is nullpublic void addPerformers(java.util.Collection<TodoPerformer> performers)
performers - java.lang.NullPointerException - if performers is null or any element of performers is nullpublic void removePerformer(TodoPerformer performer)
performer - public java.lang.String getTaskNamespace()
public java.lang.String getTaskName()
public java.lang.Long getTaskId()
public byte[] getContent()
public void setContent(byte[] content)
content - public java.lang.String getInterruptionReason()
public boolean isPersonPermitted(Person person)
person - java.lang.NullPointerException - if person is nullpublic boolean isVisibleTo(Person person)
isPersonPermitted(person) is true and the person has not rejected the
todo.person - java.lang.NullPointerException - if person is nullpublic boolean isPersonPermitted(Person person, boolean checkSubstitution, boolean checkAllocation)
person - checkSubstitution - checkAllocation - java.lang.NullPointerException - if person is nullpublic boolean hasInitialPerformer(Person person)
person is one of the todo's performers. That may happen if the person
is directly assigned in todo, or if the person is in role assigned in todo.person - public boolean isAllocatedTo(Person person)
person - java.lang.NullPointerException - if person is nullpublic int getCurrentDelegationLevel()
public boolean isAllocated()
public boolean isDelegated()
public boolean isDelegatedTo(Person person)
person.person - person being checkedpublic java.lang.String getDelegatedBy()
public java.util.Collection<TodoRejection> getRejections()
public java.util.Collection<java.lang.String> getRejectingPersons()
public void addRejection(TodoRejection rejection)
rejection - java.lang.NullPointerException - if rejection is nullpublic void removeRejection(TodoRejection rejection)
rejection - java.lang.NullPointerException - if rejection is nullpublic boolean isRejectedBy(Person person)
personperson - person being checkedperson rejects the todo.public TodoRejection getRejectionBy(Person person)
person - public java.lang.Integer getPriority()
public void setPriority(java.lang.Integer priority)
priority - todo prioritypublic java.lang.String getNotes()
public void setNotes(java.lang.String notes)
notes - notes for the todopublic java.util.Date getEscalationDate()
public TodoAuthorization getAuthorization(Person person)
person - public boolean isOrphaned()
public void setOrphaned(boolean orphaned)
orphaned - public java.lang.String getImplementationType()
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.