Package com.proxemo.todo4.bom
Class ToDoTask
- java.lang.Object
-
- com.proxemo.todo4.bom.ToDoVersionedIdentifiable
-
- com.proxemo.todo4.bom.ToDoTask
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
ToDoScheduledTask
public class ToDoTask extends ToDoVersionedIdentifiable
The central class describing the ticket.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
INDEXSTATE_ERROR
static int
INDEXSTATE_NONE
Index states:static int
INDEXSTATE_OK
static int
PRIO_HIGH
High priority (three stars, value=2).static int
PRIO_LOW
Low priority (one star, value=0).static int
PRIO_MEDIUM
Medium priority (two stars, value=1).static int
PRIO_ULTRA
Highest priority (five stars, value=4).static int
PRIO_VERY_HIGH
Even higher priority (four stars, value=3).static java.lang.String
PROPERTY_EMAILREPLYTO
Property key used to store the reply to address of incoming emailsstatic java.lang.String
PROPERTY_EMAILSUBJECT
Property key used to store the subject string of incoming emailsstatic int
STATE_CLOSED
The state if the task was successfully processed by the agent (value=3).static int
STATE_LOCKED
The state if the task is accepted by one addressee (value=1).static int
STATE_OPEN
The state if a task is created (value=0).static int
STATE_REJECTED
The state if the task is rejected the agent, e.g. due to wrong addressing (value=2).static java.lang.String
TODO_REPLY_MAILBOX_ID
static int
TYPE_POLL
This is a poll (message) (value=1).static int
TYPE_SIMPLE
This is a "normal" task (value=0).
-
Constructor Summary
Constructors Constructor Description ToDoTask()
Default constructor that creates a new task with stateSTATE_OPEN
(0) and prioPRIO_LOW
(0) and creation date now.ToDoTask(ToDoTask task)
The copy constructor of the task.ToDoTask(java.lang.String description, java.lang.String title, java.lang.String email, java.lang.String phone, ToDoUser owner, ToDoUser user)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAttachmentProxy(ToDoAttachmentProxy ap)
This method adds an attachment to the task.void
addProperty(java.lang.String key, java.lang.String value)
This method adds a custom property to the task.void
anonymize()
ToDoTask
copyAsNew(ToDoUser owner)
Certain kind of copy constructor.void
createInquiry(ToDoInquiry iq)
Adds the inquiry to this taskvoid
finishWorking(boolean successfull)
Set the task to stateSTATE_CLOSED
orSTATE_REJECTED
depending on successfull.ToDoUser
getAddressedUser()
java.lang.Long
getAddressedUserId()
ToDoWorkGroup
getAddressedWorkgroup()
java.lang.Long
getAddressedWorkgroupId()
ToDoAddressee
getAddressee()
ToDoUser
getAssignedUser()
java.lang.Long
getAssignedUserId()
java.util.Set<ToDoAttachmentProxy>
getAttachments()
This method returns the attachments of the taskjava.lang.Long
getChainId()
java.util.List<ToDoTask>
getChildren()
java.lang.String
getCostcentre()
returns the cost center of the taskjava.util.Date
getCreationDate()
java.lang.String
getDescription()
java.lang.String
getDoneComment()
This method returns the done comment of the task.java.lang.String
getEmail()
java.util.Date
getEndDate()
java.lang.Long
getFormerlyAddressedToUserId()
java.lang.Long
getFormerlyAddressedToWorkGroupId()
java.lang.Long
getFormerlyAssignedUser()
This method returns the id of formerly assigned user, if the task was modified by the ownerjava.lang.Long
getId()
Method returning a canonical id of the object.java.lang.Integer
getIndexState()
java.util.Set<ToDoInquiry>
getInquiries()
int
getKind()
Returns the kind of task.ToDoTask
getMaster()
Returns the predecessor of the taskToDoFormField
getMetaAttributeByName(java.lang.String formName, java.lang.String name)
This method searches a field in a form (metaData) attached to this task by its name and the name of the formjava.util.List<ToDoFormField>
getMetaAttributesByName(java.lang.Long formId, java.lang.String name)
This method searches a field in all forms (metaData) attached to this task by its name and the id of the formjava.lang.String
getMetaContent()
Returns the metaContent.java.util.List<ToDoForm>
getMetaData()
Returns the metaData.java.lang.String
getMetaDataAsText()
Returns the XML-Representation of the collection of metaData.ToDoForm
getMetaDataById(java.lang.Long id)
This method searches a form (metaData) attached to this task by its idToDoForm
getMetaDataByName(java.lang.String name)
This method searches a form (metaData) attached to this task by its namejava.util.List<ToDoForm>
getMetaDatasById(java.lang.Long id)
This method searches a form (metaData) attached to this task by its idjava.util.List<ToDoForm>
getMetaDatasByName(java.lang.String name)
This method searches a form (metaData) attached to this task by its namejava.util.Set<ToDoOutgoingMail>
getOutgoingMails()
Returns the outgoing mails attached to this task.ToDoUser
getOwner()
java.lang.Long
getOwnerId()
java.lang.String
getPhone()
int
getPrio()
The priority of this task.java.lang.String
getPrioAsString()
java.lang.String
getProperties()
java.util.HashMap<java.lang.String,java.lang.String>
getPropertiesMap()
This method returns the key value pairs of a task as a HashMap.java.lang.String
getProperty(java.lang.String key)
This method returns the value of a property associated to key.java.time.Duration
getRemainingTime()
ToDoTaskSource
getReplySource()
ToDoRPCBackend
getRpcbackend()
java.lang.Long
getRpcbackendId()
java.util.Date
getScheduledEndDate()
ToDoSmsFetcher
getSmsfetcher()
java.lang.Long
getSmsfetcherId()
java.lang.Integer
getSortState()
ToDoTaskSource
getSource()
Source of this task, i.e. what instance created this task (an agent, incoming sms or email)ToDoMailbox
getSourcemailbox()
java.lang.Long
getSourceMailboxId()
ToDoUser
getSourceuser()
java.lang.Long
getSourceUserId()
java.util.Date
getStartDate()
int
getState()
java.lang.String
getStateAsString()
java.lang.String
getTitle()
java.lang.Integer
getVersion()
Method returning the version of the instanceboolean
hasForms()
boolean
hasMaster()
Sets the predecessor of the taskboolean
hasReplyMailbox()
void
initializeLazyCollections()
java.lang.Boolean
isActive()
Method that returns whether the instance is active or not (means: logically deleted)boolean
isArchived()
The activation of this task.boolean
isBillable()
This method returns whether a task can be billed - or not.boolean
isClientTransactionLock()
This method returns whether a client transaction is in progress - or not.boolean
isClosed()
Is the task in stateSTATE_CLOSED
?boolean
isDone()
Is the task in stateSTATE_REJECTED
orSTATE_CLOSED
?boolean
isLocked()
Is the task in stateSTATE_LOCKED
?boolean
isMetadataInitialized()
The task is a proxy concerning the forms (metadata).boolean
isOpen()
Is the task in stateSTATE_OPEN
?boolean
isRejected()
Is the task in stateSTATE_REJECTED
?void
lockClientTransaction()
This method locks the task for a client transaction.void
rejectInquiry(ToDoInquiry iq)
Rejects an inquiry.void
removeAttachmentProxy(ToDoAttachmentProxy ap)
This method removes an attachment from the task.void
removeProperty(java.lang.String key)
This method removes a custom property from the task.void
setActive(java.lang.Boolean active)
Method setting the active flag.void
setAddressedUser(ToDoUser addressedUser)
void
setAddressedUserId(long addressedUserId)
void
setAddressedWorkgroup(ToDoWorkGroup addressedWorkgroup)
void
setAddressedWorkgroupId(long addressedWorkgroupId)
void
setAddressee(ToDoAddressee adressee)
void
setAdressee(java.lang.Object o)
void
setArchived(boolean archived)
void
setAssignedUser(ToDoUser assignedUser)
void
setAssignedUserId(long assignedUserId)
void
setAttachments(java.util.Set<ToDoAttachmentProxy> attachments)
This method set the attachments of the task.void
setBillable(boolean billable)
This method marks the task as billablevoid
setClientTransactionLock(boolean clientTransactionLock)
This method activates the client transaction lockvoid
setCostcentre(java.lang.String costcentre)
Sets the cost center of the taskvoid
setCreationDate(java.util.Date creationDate)
void
setDescription(java.lang.String description)
void
setDoneComment(java.lang.String doneComment)
This method sets the done comment of the task.void
setEmail(java.lang.String email)
void
setEndDate(java.util.Date endDate)
void
setFormerlyAddressedToUserId(java.lang.Long formerlyAddressedToUserId)
void
setFormerlyAddressedToWorkGroupId(java.lang.Long formerlyAddressedToWorkGroupId)
void
setHighPrio()
Sets the task to prioPRIO_HIGH
void
setId(java.lang.Long id)
Method setting the canonical id of the object.void
setInactive()
Method to delete an object logically.void
setIndexState(java.lang.Integer indexState)
void
setInquiries(java.util.Set<ToDoInquiry> inquiries)
void
setLowPrio()
Sets the task to prioPRIO_LOW
void
setMaster(ToDoTask master)
Sets the predecessor of the taskvoid
setMediumPrio()
Sets the task to prioPRIO_MEDIUM
void
setMetaContent(java.lang.String metaContent)
Sets the metaContent.void
setMetaData(java.util.List<ToDoForm> metaData)
Sets the metaData.void
setMetadataInitialized(boolean metadataInitialized)
Marks the task as complete concerning the forms.void
setOutgoingMails(java.util.Set<ToDoOutgoingMail> outgoingMails)
Sets outgoing mails attached to this task.void
setOwner(ToDoUser owner)
void
setOwnerId(long ownerId)
void
setPhone(java.lang.String phone)
void
setPrio(int prio)
This method set the prio of the task.void
setProperties(java.lang.String properties)
void
setReplyMailbox(ToDoMailbox box)
Set the mailbox used to send a reply email from when the task is finished.void
setReplyMailboxId(java.lang.Long id)
Set the mailbox used to send a reply email from when the task is finished.void
setReplySource(ToDoTaskSource replySource)
void
setRpcbackend(ToDoRPCBackend rpcbackend)
void
setRpcbackendId(java.lang.Long rpcbackendId)
void
setScheduledEndDate(java.util.Date scheduledEndDate)
void
setSmsfetcher(ToDoSmsFetcher smsfetcher)
void
setSmsfetcherId(java.lang.Long smsfetcherId)
void
setSource(ToDoTaskSource source)
void
setSourcemailbox(ToDoMailbox sourcemailbox)
void
setSourceMailboxId(java.lang.Long sourceMailboxId)
void
setSourceuser(ToDoUser sourceuser)
void
setSourceUserId(java.lang.Long sourceUserId)
void
setStartDate(java.util.Date startDate)
void
setState(int state)
void
setTitle(java.lang.String title)
void
setToActive()
Method to undelete an object logically.void
setToArchived()
Set the task to archivedvoid
setToOpen()
Set the task to stateSTATE_OPEN
.void
setTransient()
Marks the task as transientvoid
setUltraPrio()
Sets the task to prioPRIO_ULTRA
void
setVersion(java.lang.Integer version)
Method setting the version of the instance, Should under normal circumstances not be manually invoked.void
setVeryHighPrio()
Sets the task to prioPRIO_VERY_HIGH
void
startWorking()
Set the task to statecom.proxemo.todo.bom.ToDoTask#STATE_LOCKED
and the startDate to current timestamp.void
unlockClientTransaction()
This method unlocks the task from a client transaction.void
updateMetaContent()
Updates the internal XML-representation ("metaContent") from the collection of metaData.void
updateMetaData()
Updates the collection of metaData from the internal XML-representation ("metaContent")-
Methods inherited from class com.proxemo.todo4.bom.ToDoVersionedIdentifiable
getActiveAsIcon, getAnonymizeString, getCanonicalId, isTransient, setToTransient
-
-
-
-
Field Detail
-
TYPE_SIMPLE
public static final int TYPE_SIMPLE
This is a "normal" task (value=0).- See Also:
- Constant Field Values
-
TYPE_POLL
public static final int TYPE_POLL
This is a poll (message) (value=1).- See Also:
- Constant Field Values
-
STATE_OPEN
public static final int STATE_OPEN
The state if a task is created (value=0). In this state it is offered to all addressees.- See Also:
- Constant Field Values
-
STATE_LOCKED
public static final int STATE_LOCKED
The state if the task is accepted by one addressee (value=1). From now on it can only be seen by the owner and the agent.- See Also:
- Constant Field Values
-
STATE_REJECTED
public static final int STATE_REJECTED
The state if the task is rejected the agent, e.g. due to wrong addressing (value=2). The owner can reopen it.- See Also:
- Constant Field Values
-
STATE_CLOSED
public static final int STATE_CLOSED
The state if the task was successfully processed by the agent (value=3).- See Also:
- Constant Field Values
-
PRIO_LOW
public static final int PRIO_LOW
Low priority (one star, value=0).- See Also:
- Constant Field Values
-
PRIO_MEDIUM
public static final int PRIO_MEDIUM
Medium priority (two stars, value=1).- See Also:
- Constant Field Values
-
PRIO_HIGH
public static final int PRIO_HIGH
High priority (three stars, value=2).- See Also:
- Constant Field Values
-
PRIO_VERY_HIGH
public static final int PRIO_VERY_HIGH
Even higher priority (four stars, value=3).- See Also:
- Constant Field Values
-
PRIO_ULTRA
public static final int PRIO_ULTRA
Highest priority (five stars, value=4).- See Also:
- Constant Field Values
-
PROPERTY_EMAILSUBJECT
public static final java.lang.String PROPERTY_EMAILSUBJECT
Property key used to store the subject string of incoming emails- See Also:
- Constant Field Values
-
PROPERTY_EMAILREPLYTO
public static final java.lang.String PROPERTY_EMAILREPLYTO
Property key used to store the reply to address of incoming emails- See Also:
- Constant Field Values
-
TODO_REPLY_MAILBOX_ID
public static final java.lang.String TODO_REPLY_MAILBOX_ID
- See Also:
- Constant Field Values
-
INDEXSTATE_NONE
public static final int INDEXSTATE_NONE
Index states:- See Also:
- Constant Field Values
-
INDEXSTATE_OK
public static final int INDEXSTATE_OK
- See Also:
- Constant Field Values
-
INDEXSTATE_ERROR
public static final int INDEXSTATE_ERROR
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ToDoTask
public ToDoTask()
Default constructor that creates a new task with stateSTATE_OPEN
(0) and prioPRIO_LOW
(0) and creation date now.
-
ToDoTask
public ToDoTask(java.lang.String description, java.lang.String title, java.lang.String email, java.lang.String phone, ToDoUser owner, ToDoUser user)
- Parameters:
description
- the description of the task.title
- the title of the task (max length 128!)email
- the email of the task (max length 128!)phone
- the phone of the task (max length 32!)owner
- the owner of the taskuser
- the addressee of the task
-
ToDoTask
public ToDoTask(ToDoTask task)
The copy constructor of the task.- Parameters:
task
- the task to be copied
-
-
Method Detail
-
startWorking
public void startWorking() throws ToDoBomException
Set the task to statecom.proxemo.todo.bom.ToDoTask#STATE_LOCKED
and the startDate to current timestamp.- Throws:
ToDoBomException
- if invoked on an archived task
-
finishWorking
public void finishWorking(boolean successfull) throws ToDoBomException
Set the task to stateSTATE_CLOSED
orSTATE_REJECTED
depending on successfull. The endDate is set to the current timestamp.- Parameters:
successfull
- determines whether the state is set toSTATE_CLOSED
(true) orSTATE_REJECTED
(false)- Throws:
ToDoBomException
- if invoked on a locked task
-
setToOpen
public void setToOpen() throws ToDoBomException
Set the task to stateSTATE_OPEN
. The startDate is set to null.- Throws:
ToDoBomException
- if invoked on an open or closed task
-
setToArchived
public void setToArchived() throws ToDoBomException
Set the task to archived- Throws:
ToDoBomException
- if invoked on an locked task
-
isOpen
public boolean isOpen()
Is the task in stateSTATE_OPEN
?- Returns:
- whether the task is open
-
isLocked
public boolean isLocked()
Is the task in stateSTATE_LOCKED
?- Returns:
- whether the task is locked
-
isDone
public boolean isDone()
Is the task in stateSTATE_REJECTED
orSTATE_CLOSED
?- Returns:
- whether the task is closed or rejected
-
isRejected
public boolean isRejected()
Is the task in stateSTATE_REJECTED
?- Returns:
- whether the task is rejected
-
isClosed
public boolean isClosed()
Is the task in stateSTATE_CLOSED
?- Returns:
- whether the task is closed
-
getKind
public int getKind()
Returns the kind of task.- Returns:
- either
TYPE_SIMPLE
orTYPE_POLL
?
-
setUltraPrio
public void setUltraPrio()
Sets the task to prioPRIO_ULTRA
-
setVeryHighPrio
public void setVeryHighPrio()
Sets the task to prioPRIO_VERY_HIGH
-
setHighPrio
public void setHighPrio()
Sets the task to prioPRIO_HIGH
-
setMediumPrio
public void setMediumPrio()
Sets the task to prioPRIO_MEDIUM
-
setLowPrio
public void setLowPrio()
Sets the task to prioPRIO_LOW
-
getCreationDate
public java.util.Date getCreationDate()
- Returns:
- the date the task was created
-
setCreationDate
public void setCreationDate(java.util.Date creationDate)
- Parameters:
creationDate
- the creationDate to set
-
getDescription
public java.lang.String getDescription()
- Returns:
- Returns the description.
-
setDescription
public void setDescription(java.lang.String description)
- Parameters:
description
- the description to set.
-
getEmail
public java.lang.String getEmail()
- Returns:
- If this task was created from a received email this method returns the sender's address, else null.
-
setEmail
public void setEmail(java.lang.String email)
- Parameters:
email
- The email to set.
-
getEndDate
public java.util.Date getEndDate()
- Returns:
- Returns the endDate.
-
setEndDate
public void setEndDate(java.util.Date endDate)
- Parameters:
endDate
- The endDate to set.
-
getPhone
public java.lang.String getPhone()
- Returns:
- Returns the phone.
-
setPhone
public void setPhone(java.lang.String phone)
- Parameters:
phone
- The phone to set.
-
getScheduledEndDate
public java.util.Date getScheduledEndDate()
- Returns:
- Returns the scheduledEndDate.
-
setScheduledEndDate
public void setScheduledEndDate(java.util.Date scheduledEndDate)
- Parameters:
scheduledEndDate
- The scheduledEndDate to set.
-
getStartDate
public java.util.Date getStartDate()
- Returns:
- Returns the startDate.
-
setStartDate
public void setStartDate(java.util.Date startDate)
- Parameters:
startDate
- The startDate to set.
-
getState
public int getState()
- Returns:
- Returns the state.
-
setState
public void setState(int state)
- Parameters:
state
- The state to set.
-
getTitle
public java.lang.String getTitle()
- Returns:
- Returns the title.
-
setTitle
public void setTitle(java.lang.String title)
- Parameters:
title
- The title to set.
-
getAssignedUser
public ToDoUser getAssignedUser()
- Returns:
- Returns the assignedUser.
-
setAssignedUser
public void setAssignedUser(ToDoUser assignedUser)
- Parameters:
assignedUser
- the assignedUser to set.
-
getOwner
public ToDoUser getOwner()
- Returns:
- Returns the owner.
-
setOwner
public void setOwner(ToDoUser owner)
- Parameters:
owner
- The owner to set.
-
getSource
public ToDoTaskSource getSource()
Source of this task, i.e. what instance created this task (an agent, incoming sms or email)- Returns:
- Returns the source.
-
getPrio
public int getPrio()
The priority of this task. It can be low medium or high.- Returns:
- Returns the priority.
-
setSource
public void setSource(ToDoTaskSource source)
- Parameters:
source
- The source to set.
-
setAdressee
public void setAdressee(java.lang.Object o)
-
getAddressee
public ToDoAddressee getAddressee()
-
setAddressee
public void setAddressee(ToDoAddressee adressee)
-
isArchived
public boolean isArchived()
The activation of this task. It corresponds to a non physical delete.- Returns:
- Returns the priority.
-
setArchived
public void setArchived(boolean archived)
-
setPrio
public void setPrio(int prio)
This method set the prio of the task.- Parameters:
prio
- the priority fromPRIO_LOW
toPRIO_ULTRA
-
getAttachments
public java.util.Set<ToDoAttachmentProxy> getAttachments()
This method returns the attachments of the task- Returns:
- a set of
com.proxemo.todo.bom.ToDoAttachmentProxy
-
setAttachments
public void setAttachments(java.util.Set<ToDoAttachmentProxy> attachments)
This method set the attachments of the task.- Parameters:
attachments
- a set ofcom.proxemo.todo.bom.ToDoAttachmentProxy
-
addAttachmentProxy
public void addAttachmentProxy(ToDoAttachmentProxy ap)
This method adds an attachment to the task.- Parameters:
ap
-com.proxemo.todo.bom.ToDoAttachmentProxy
-
removeAttachmentProxy
public void removeAttachmentProxy(ToDoAttachmentProxy ap)
This method removes an attachment from the task.- Parameters:
ap
-com.proxemo.todo.bom.ToDoAttachmentProxy
-
getDoneComment
public java.lang.String getDoneComment()
This method returns the done comment of the task.- Returns:
- the done comment
-
setDoneComment
public void setDoneComment(java.lang.String doneComment)
This method sets the done comment of the task.- Parameters:
doneComment
- the done comment
-
lockClientTransaction
public void lockClientTransaction()
This method locks the task for a client transaction.
-
unlockClientTransaction
public void unlockClientTransaction()
This method unlocks the task from a client transaction.
-
isClientTransactionLock
public boolean isClientTransactionLock()
This method returns whether a client transaction is in progress - or not.- Returns:
- is client transaction active ?
-
setClientTransactionLock
public void setClientTransactionLock(boolean clientTransactionLock)
This method activates the client transaction lock- Parameters:
clientTransactionLock
- the boolean describing whether to lock or unlock the task in the client
-
isBillable
public boolean isBillable()
This method returns whether a task can be billed - or not.- Returns:
- can the task be billed ?
-
setBillable
public void setBillable(boolean billable)
This method marks the task as billable- Parameters:
billable
- boolean setting a task billable or not
-
getFormerlyAssignedUser
public java.lang.Long getFormerlyAssignedUser()
This method returns the id of formerly assigned user, if the task was modified by the owner- Returns:
- the id of the formerly assigned user
-
isMetadataInitialized
public boolean isMetadataInitialized()
The task is a proxy concerning the forms (metadata). This flag indicates on the client whether the metadata have to be fetched or not.- Returns:
- boolean whether or not the matadata where already lazily initialized
-
setMetadataInitialized
public void setMetadataInitialized(boolean metadataInitialized)
Marks the task as complete concerning the forms.
-
updateMetaContent
public void updateMetaContent()
Updates the internal XML-representation ("metaContent") from the collection of metaData.
-
updateMetaData
public void updateMetaData()
Updates the collection of metaData from the internal XML-representation ("metaContent")
-
getMetaDataAsText
public java.lang.String getMetaDataAsText()
Returns the XML-Representation of the collection of metaData.
-
getMetaContent
public java.lang.String getMetaContent()
Returns the metaContent.- Returns:
- metaContent the XML-representation of the collection of metaData (forms) attached to this task
-
setMetaContent
public void setMetaContent(java.lang.String metaContent)
Sets the metaContent. Be careful: metaData are not synchronized!
-
getMetaData
public java.util.List<ToDoForm> getMetaData()
Returns the metaData.- Returns:
- metaData the List of metaData attached to this task
-
setMetaData
public void setMetaData(java.util.List<ToDoForm> metaData)
Sets the metaData. Be careful: metaContent is not synchronized!
-
getOutgoingMails
public java.util.Set<ToDoOutgoingMail> getOutgoingMails()
Returns the outgoing mails attached to this task.- Returns:
- the set of outgoing mails attached to this task
-
setOutgoingMails
public void setOutgoingMails(java.util.Set<ToDoOutgoingMail> outgoingMails)
Sets outgoing mails attached to this task.- Parameters:
outgoingMails
- the set of outgoing mails to be attached to this task
-
getMaster
public ToDoTask getMaster()
Returns the predecessor of the task- Returns:
- the predecessor of the task. May be null if no predecessor exists.
-
setMaster
public void setMaster(ToDoTask master)
Sets the predecessor of the task- Parameters:
master
- the predecessor of the task
-
getCostcentre
public java.lang.String getCostcentre()
returns the cost center of the task- Returns:
- the cost center of the task
-
setCostcentre
public void setCostcentre(java.lang.String costcentre)
Sets the cost center of the task- Parameters:
costcentre
- - the cost center
-
hasMaster
public boolean hasMaster()
Sets the predecessor of the task- Returns:
- true or false if the task has a predecessor
-
setTransient
public void setTransient()
Marks the task as transient
-
copyAsNew
public ToDoTask copyAsNew(ToDoUser owner)
Certain kind of copy constructor. The predecessor is set to this task. So we create a follow up task of this task.- Returns:
- the new created task
-
getMetaDataByName
public ToDoForm getMetaDataByName(java.lang.String name)
This method searches a form (metaData) attached to this task by its name- Parameters:
name
- the name of the metaData searched- Returns:
- the found metaData or null if nothing found
-
getMetaDataById
public ToDoForm getMetaDataById(java.lang.Long id)
This method searches a form (metaData) attached to this task by its id- Parameters:
name
- the name of the metaData searched- Returns:
- the found metaData or null if nothing found
-
getMetaDatasByName
public java.util.List<ToDoForm> getMetaDatasByName(java.lang.String name)
This method searches a form (metaData) attached to this task by its name- Parameters:
name
- the name of the metaData searched- Returns:
- the found metaData or null if nothing found
-
getMetaDatasById
public java.util.List<ToDoForm> getMetaDatasById(java.lang.Long id)
This method searches a form (metaData) attached to this task by its id- Parameters:
name
- the name of the metaData searched- Returns:
- the found metaData or null if nothing found
-
getMetaAttributeByName
public ToDoFormField getMetaAttributeByName(java.lang.String formName, java.lang.String name)
This method searches a field in a form (metaData) attached to this task by its name and the name of the form- Parameters:
formName
- the name of the metaData which contains the attributename
- the name of the field to be searched- Returns:
- the field (attribute) or null if nothing found
-
getMetaAttributesByName
public java.util.List<ToDoFormField> getMetaAttributesByName(java.lang.Long formId, java.lang.String name)
This method searches a field in all forms (metaData) attached to this task by its name and the id of the form- Parameters:
formId
- the id of the metaDatas which contain the attributename
- the name of the field to be searched- Returns:
- the list of fields (attribute) or list with length 0 if nothing found
-
getChainId
public java.lang.Long getChainId()
-
addProperty
public void addProperty(java.lang.String key, java.lang.String value)
This method adds a custom property to the task.- Parameters:
key
- key of the propertyvalue
- of the property- Throws:
JsonProcessingException
JsonMappingException
-
removeProperty
public void removeProperty(java.lang.String key)
This method removes a custom property from the task.- Parameters:
key
- key of the property
-
getProperty
public java.lang.String getProperty(java.lang.String key)
This method returns the value of a property associated to key. If no property id found, null is returned.- Parameters:
key
- key of the propertyvalue
- of the property- Returns:
- the value of the property or null if the property is not found.
-
getPropertiesMap
public java.util.HashMap<java.lang.String,java.lang.String> getPropertiesMap()
This method returns the key value pairs of a task as a HashMap.- Returns:
- a HashMap with all properties of the task. Possibly empty.
-
getProperties
public java.lang.String getProperties()
-
setProperties
public void setProperties(java.lang.String properties)
-
anonymize
public void anonymize()
- Specified by:
anonymize
in classToDoVersionedIdentifiable
-
getReplySource
public ToDoTaskSource getReplySource()
-
setReplySource
public void setReplySource(ToDoTaskSource replySource)
-
setReplyMailboxId
public void setReplyMailboxId(java.lang.Long id) throws JsonMappingException, JsonProcessingException
Set the mailbox used to send a reply email from when the task is finished.- Parameters:
id
- mailbox id- Throws:
JsonProcessingException
JsonMappingException
-
setReplyMailbox
public void setReplyMailbox(ToDoMailbox box) throws JsonMappingException, JsonProcessingException
Set the mailbox used to send a reply email from when the task is finished.- Parameters:
box
- the mailbox- Throws:
JsonProcessingException
JsonMappingException
-
getId
public java.lang.Long getId()
Description copied from class:ToDoVersionedIdentifiable
Method returning a canonical id of the object. Transient objects return -1;- Specified by:
getId
in classToDoVersionedIdentifiable
- Returns:
- id the id of the object. Id is canonical for all instances of a class.
-
setId
public void setId(java.lang.Long id)
Description copied from class:ToDoVersionedIdentifiable
Method setting the canonical id of the object. Should under normal circumstances not be manually invoked.- Specified by:
setId
in classToDoVersionedIdentifiable
- Parameters:
id
- id of the object
-
getVersion
public java.lang.Integer getVersion()
Description copied from class:ToDoVersionedIdentifiable
Method returning the version of the instance- Specified by:
getVersion
in classToDoVersionedIdentifiable
- Returns:
- the version
-
setVersion
public void setVersion(java.lang.Integer version)
Description copied from class:ToDoVersionedIdentifiable
Method setting the version of the instance, Should under normal circumstances not be manually invoked.- Specified by:
setVersion
in classToDoVersionedIdentifiable
- Parameters:
version
- of the object
-
isActive
public java.lang.Boolean isActive()
Description copied from class:ToDoVersionedIdentifiable
Method that returns whether the instance is active or not (means: logically deleted)- Specified by:
isActive
in classToDoVersionedIdentifiable
- Returns:
- boolean whether the object is active
-
setActive
public void setActive(java.lang.Boolean active)
Description copied from class:ToDoVersionedIdentifiable
Method setting the active flag. Invoking this method with false logically deletes the instance in the database.- Specified by:
setActive
in classToDoVersionedIdentifiable
- Parameters:
active
- is the object active or not
-
setToActive
public void setToActive()
Description copied from class:ToDoVersionedIdentifiable
Method to undelete an object logically.- Specified by:
setToActive
in classToDoVersionedIdentifiable
-
setInactive
public void setInactive()
Description copied from class:ToDoVersionedIdentifiable
Method to delete an object logically.- Specified by:
setInactive
in classToDoVersionedIdentifiable
-
getSourceuser
public ToDoUser getSourceuser()
-
setSourceuser
public void setSourceuser(ToDoUser sourceuser)
-
getSourcemailbox
public ToDoMailbox getSourcemailbox()
-
setSourcemailbox
public void setSourcemailbox(ToDoMailbox sourcemailbox)
-
getSmsfetcher
public ToDoSmsFetcher getSmsfetcher()
-
setSmsfetcher
public void setSmsfetcher(ToDoSmsFetcher smsfetcher)
-
getRpcbackend
public ToDoRPCBackend getRpcbackend()
-
setRpcbackend
public void setRpcbackend(ToDoRPCBackend rpcbackend)
-
getAddressedUser
public ToDoUser getAddressedUser()
-
setAddressedUser
public void setAddressedUser(ToDoUser addressedUser)
-
getAddressedWorkgroup
public ToDoWorkGroup getAddressedWorkgroup()
-
setAddressedWorkgroup
public void setAddressedWorkgroup(ToDoWorkGroup addressedWorkgroup)
-
getInquiries
public java.util.Set<ToDoInquiry> getInquiries()
-
setInquiries
public void setInquiries(java.util.Set<ToDoInquiry> inquiries)
-
createInquiry
public void createInquiry(ToDoInquiry iq) throws ToDoBomException
Adds the inquiry to this task- Throws:
ToDoBomException
-
rejectInquiry
public void rejectInquiry(ToDoInquiry iq)
Rejects an inquiry.- Parameters:
iq
- the inquiry to be rejected
-
getAddressedWorkgroupId
public java.lang.Long getAddressedWorkgroupId()
-
setAddressedWorkgroupId
public void setAddressedWorkgroupId(long addressedWorkgroupId)
-
getOwnerId
public java.lang.Long getOwnerId()
-
setOwnerId
public void setOwnerId(long ownerId)
-
getAssignedUserId
public java.lang.Long getAssignedUserId()
-
setAssignedUserId
public void setAssignedUserId(long assignedUserId)
-
getSourceUserId
public java.lang.Long getSourceUserId()
-
setSourceUserId
public void setSourceUserId(java.lang.Long sourceUserId)
-
getSourceMailboxId
public java.lang.Long getSourceMailboxId()
-
setSourceMailboxId
public void setSourceMailboxId(java.lang.Long sourceMailboxId)
-
getSmsfetcherId
public java.lang.Long getSmsfetcherId()
-
setSmsfetcherId
public void setSmsfetcherId(java.lang.Long smsfetcherId)
-
getRpcbackendId
public java.lang.Long getRpcbackendId()
-
setRpcbackendId
public void setRpcbackendId(java.lang.Long rpcbackendId)
-
getAddressedUserId
public java.lang.Long getAddressedUserId()
-
setAddressedUserId
public void setAddressedUserId(long addressedUserId)
-
getStateAsString
public java.lang.String getStateAsString()
-
getPrioAsString
public java.lang.String getPrioAsString()
-
initializeLazyCollections
public void initializeLazyCollections()
-
getChildren
public java.util.List<ToDoTask> getChildren()
-
getIndexState
public java.lang.Integer getIndexState()
-
getRemainingTime
public java.time.Duration getRemainingTime()
-
getSortState
public java.lang.Integer getSortState()
-
hasForms
public boolean hasForms()
-
getFormerlyAddressedToWorkGroupId
public java.lang.Long getFormerlyAddressedToWorkGroupId()
-
setFormerlyAddressedToWorkGroupId
public void setFormerlyAddressedToWorkGroupId(java.lang.Long formerlyAddressedToWorkGroupId)
-
getFormerlyAddressedToUserId
public java.lang.Long getFormerlyAddressedToUserId()
-
setFormerlyAddressedToUserId
public void setFormerlyAddressedToUserId(java.lang.Long formerlyAddressedToUserId)
-
hasReplyMailbox
public boolean hasReplyMailbox()
-
setIndexState
public void setIndexState(java.lang.Integer indexState)
-
-