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
public class ToDoTask extends ToDoVersionedIdentifiable
The central class describing the ticket.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static intINDEXSTATE_ERRORstatic intINDEXSTATE_NONEIndex states:static intINDEXSTATE_OKstatic intPRIO_HIGHHigh priority (three stars, value=2).static intPRIO_LOWLow priority (one star, value=0).static intPRIO_MEDIUMMedium priority (two stars, value=1).static intPRIO_ULTRAHighest priority (five stars, value=4).static intPRIO_VERY_HIGHEven higher priority (four stars, value=3).static java.lang.StringPROPERTY_AUTOATTACHstatic java.lang.StringPROPERTY_EMAILREPLYTOProperty key used to store the reply to address of incoming emailsstatic java.lang.StringPROPERTY_EMAILSUBJECTProperty key used to store the subject string of incoming emailsstatic intSTATE_CLOSEDThe state if the task was successfully processed by the agent (value=3).static intSTATE_LOCKEDThe state if the task is accepted by one addressee (value=1).static intSTATE_OPENThe state if a task is created (value=0).static intSTATE_REJECTEDThe state if the task is rejected the agent, e.g. due to wrong addressing (value=2).static java.lang.StringTODO_REPLY_MAILBOX_IDstatic intTYPE_POLLThis is a poll (message) (value=1).static intTYPE_SIMPLEThis 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 voidaddAttachmentProxy(ToDoAttachmentProxy ap)This method adds an attachment to the task.voidaddProperty(java.lang.String key, java.lang.String value)This method adds a custom property to the task.voidanonymize()ToDoTaskcopyAsNew(ToDoUser owner)Certain kind of copy constructor.voidcreateInquiry(ToDoInquiry iq)Adds the inquiry to this taskvoidfinishWorking(boolean successfull)Set the task to stateSTATE_CLOSEDorSTATE_REJECTEDdepending on successfull.java.lang.StringgetAddresseAsString()ToDoUsergetAddressedUser()java.lang.LonggetAddressedUserId()ToDoWorkGroupgetAddressedWorkgroup()java.lang.LonggetAddressedWorkgroupId()ToDoAddresseegetAddressee()java.lang.StringgetAddresseeName()ToDoUsergetAssignedUser()java.lang.StringgetAssignedUserAsString()java.lang.LonggetAssignedUserId()java.lang.StringgetAssignedUserName()java.util.Set<ToDoAttachmentProxy>getAttachments()This method returns the attachments of the taskjava.lang.LonggetChainId()java.util.List<ToDoTask>getChildren()java.lang.StringgetCostcentre()returns the cost center of the taskjava.util.DategetCreationDate()java.lang.StringgetDescription()java.lang.StringgetDoneComment()This method returns the done comment of the task.java.lang.StringgetEmail()java.util.DategetEndDate()java.lang.LonggetFormerlyAddressedToUserId()java.lang.LonggetFormerlyAddressedToWorkGroupId()java.lang.LonggetFormerlyAssignedUserId()This method returns the id of formerly assigned user, if the task was modified by the ownerjava.lang.LonggetId()Method returning a canonical id of the object.java.lang.IntegergetIndexState()java.util.Set<ToDoInquiry>getInquiries()intgetKind()Returns the kind of task.ToDoTaskgetMaster()Returns the predecessor of the taskToDoFormFieldgetMetaAttributeByName(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.StringgetMetaContent()Returns the metaContent.java.util.List<ToDoForm>getMetaData()Returns the metaData.java.lang.StringgetMetaDataAsText()Returns the XML-Representation of the collection of metaData.ToDoFormgetMetaDataById(java.lang.Long id)This method searches a form (metaData) attached to this task by its idToDoFormgetMetaDataByName(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.ToDoUsergetOwner()java.lang.StringgetOwnerAsString()java.lang.LonggetOwnerId()java.lang.StringgetOwnerName()java.lang.StringgetPhone()intgetPrio()The priority of this task.java.lang.StringgetPrioAsString()java.lang.StringgetProperties()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.StringgetProperty(java.lang.String key)This method returns the value of a property associated to key.java.time.DurationgetRemainingTime()ToDoTaskSourcegetReplySource()ToDoRPCBackendgetRpcbackend()java.lang.LonggetRpcbackendId()java.util.DategetScheduledEndDate()ToDoSmsFetchergetSmsfetcher()java.lang.LonggetSmsfetcherId()java.lang.IntegergetSortState()ToDoTaskSourcegetSource()Source of this task, i.e. what instance created this task (an agent, incoming sms or email)ToDoMailboxgetSourcemailbox()java.lang.LonggetSourceMailboxId()ToDoUsergetSourceuser()java.lang.LonggetSourceUserId()java.util.DategetStartDate()intgetState()ComponentgetStateAsIcon()java.lang.StringgetStateAsString()java.lang.StringgetTitle()java.lang.IntegergetVersion()Method returning the version of the instancebooleanhasForms()booleanhasMaster()Sets the predecessor of the taskbooleanhasReplyMailbox()voidinitializeLazyCollections()java.lang.BooleanisActive()Method that returns whether the instance is active or not (means: logically deleted)booleanisArchived()The activation of this task.booleanisBillable()This method returns whether a task can be billed - or not.booleanisClientTransactionLock()This method returns whether a client transaction is in progress - or not.booleanisClosed()Is the task in stateSTATE_CLOSED?booleanisDone()Is the task in stateSTATE_REJECTEDorSTATE_CLOSED?booleanisLocked()Is the task in stateSTATE_LOCKED?booleanisMetadataInitialized()The task is a proxy concerning the forms (metadata).booleanisOpen()Is the task in stateSTATE_OPEN?booleanisRejected()Is the task in stateSTATE_REJECTED?voidlockClientTransaction()This method locks the task for a client transaction.voidrejectInquiry(ToDoInquiry iq)Rejects an inquiry.voidremoveAttachmentProxy(ToDoAttachmentProxy ap)This method removes an attachment from the task.voidremoveProperty(java.lang.String key)This method removes a custom property from the task.voidsetActive(java.lang.Boolean active)Method setting the active flag.voidsetAddressedUser(ToDoUser addressedUser)voidsetAddressedUserId(long addressedUserId)voidsetAddressedWorkgroup(ToDoWorkGroup addressedWorkgroup)voidsetAddressedWorkgroupId(long addressedWorkgroupId)voidsetAddressee(ToDoAddressee adressee)voidsetAdressee(java.lang.Object o)voidsetArchived(boolean archived)voidsetAssignedUser(ToDoUser assignedUser)voidsetAssignedUserId(long assignedUserId)voidsetAttachments(java.util.Set<ToDoAttachmentProxy> attachments)This method set the attachments of the task.voidsetBillable(boolean billable)This method marks the task as billablevoidsetClientTransactionLock(boolean clientTransactionLock)This method activates the client transaction lockvoidsetCostcentre(java.lang.String costcentre)Sets the cost center of the taskvoidsetCreationDate(java.util.Date creationDate)voidsetDescription(java.lang.String description)voidsetDoneComment(java.lang.String doneComment)This method sets the done comment of the task.voidsetEmail(java.lang.String email)voidsetEndDate(java.util.Date endDate)voidsetFormerlyAddressedToUserId(java.lang.Long formerlyAddressedToUserId)voidsetFormerlyAddressedToWorkGroupId(java.lang.Long formerlyAddressedToWorkGroupId)voidsetHighPrio()Sets the task to prioPRIO_HIGHvoidsetId(java.lang.Long id)Method setting the canonical id of the object.voidsetInactive()Method to delete an object logically.voidsetIndexState(java.lang.Integer indexState)voidsetInquiries(java.util.Set<ToDoInquiry> inquiries)voidsetLowPrio()Sets the task to prioPRIO_LOWvoidsetMaster(ToDoTask master)Sets the predecessor of the taskvoidsetMediumPrio()Sets the task to prioPRIO_MEDIUMvoidsetMetaContent(java.lang.String metaContent)Sets the metaContent.voidsetMetaData(java.util.List<ToDoForm> metaData)Sets the metaData.voidsetMetadataInitialized(boolean metadataInitialized)Marks the task as complete concerning the forms.voidsetOutgoingMails(java.util.Set<ToDoOutgoingMail> outgoingMails)Sets outgoing mails attached to this task.voidsetOwner(ToDoUser owner)voidsetOwnerId(long ownerId)voidsetPhone(java.lang.String phone)voidsetPrio(int prio)This method set the prio of the task.voidsetProperties(java.lang.String properties)voidsetReplyMailbox(ToDoMailbox box)Set the mailbox used to send a reply email from when the task is finished.voidsetReplyMailboxId(java.lang.Long id)Set the mailbox used to send a reply email from when the task is finished.voidsetReplySource(ToDoTaskSource replySource)voidsetRpcbackend(ToDoRPCBackend rpcbackend)voidsetRpcbackendId(java.lang.Long rpcbackendId)voidsetScheduledEndDate(java.util.Date scheduledEndDate)voidsetSmsfetcher(ToDoSmsFetcher smsfetcher)voidsetSmsfetcherId(java.lang.Long smsfetcherId)voidsetSource(ToDoTaskSource source)voidsetSourcemailbox(ToDoMailbox sourcemailbox)voidsetSourceMailboxId(java.lang.Long sourceMailboxId)voidsetSourceuser(ToDoUser sourceuser)voidsetSourceUserId(java.lang.Long sourceUserId)voidsetStartDate(java.util.Date startDate)voidsetState(int state)voidsetTitle(java.lang.String title)voidsetToActive()Method to undelete an object logically.voidsetToArchived()Set the task to archivedvoidsetToOpen()Set the task to stateSTATE_OPEN.voidsetTransient()Marks the task as transientvoidsetUltraPrio()Sets the task to prioPRIO_ULTRAvoidsetVersion(java.lang.Integer version)Method setting the version of the instance, Should under normal circumstances not be manually invoked.voidsetVeryHighPrio()Sets the task to prioPRIO_VERY_HIGHvoidstartWorking()Set the task to statecom.proxemo.todo.bom.ToDoTask#STATE_LOCKEDand the startDate to current timestamp.voidunlockClientTransaction()This method unlocks the task from a client transaction.voidupdateMetaContent()Updates the internal XML-representation ("metaContent") from the collection of metaData.voidupdateMetaData()Updates the collection of metaData from the internal XML-representation ("metaContent")-
Methods inherited from class com.proxemo.todo4.bom.ToDoVersionedIdentifiable
areEqual, 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
-
PROPERTY_AUTOATTACH
public static final java.lang.String PROPERTY_AUTOATTACH
- 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 256!)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 ToDoBomExceptionSet the task to statecom.proxemo.todo.bom.ToDoTask#STATE_LOCKEDand the startDate to current timestamp.- Throws:
ToDoBomException- if invoked on an archived task
-
finishWorking
public void finishWorking(boolean successfull) throws ToDoBomExceptionSet the task to stateSTATE_CLOSEDorSTATE_REJECTEDdepending 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 ToDoBomExceptionSet 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 ToDoBomExceptionSet 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_REJECTEDorSTATE_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_SIMPLEorTYPE_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_LOWtoPRIO_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
-
getFormerlyAssignedUserId
public java.lang.Long getFormerlyAssignedUserId()
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:
JsonProcessingExceptionJsonMappingException
-
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:
anonymizein classToDoVersionedIdentifiable
-
getReplySource
public ToDoTaskSource getReplySource()
-
setReplySource
public void setReplySource(ToDoTaskSource replySource)
-
setReplyMailboxId
public void setReplyMailboxId(java.lang.Long id) throws JsonMappingException, JsonProcessingExceptionSet the mailbox used to send a reply email from when the task is finished.- Parameters:
id- mailbox id- Throws:
JsonProcessingExceptionJsonMappingException
-
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:
JsonProcessingExceptionJsonMappingException
-
getId
public java.lang.Long getId()
Description copied from class:ToDoVersionedIdentifiableMethod returning a canonical id of the object. Transient objects return -1;- Specified by:
getIdin 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:ToDoVersionedIdentifiableMethod setting the canonical id of the object. Should under normal circumstances not be manually invoked.- Specified by:
setIdin classToDoVersionedIdentifiable- Parameters:
id- id of the object
-
getVersion
public java.lang.Integer getVersion()
Description copied from class:ToDoVersionedIdentifiableMethod returning the version of the instance- Specified by:
getVersionin classToDoVersionedIdentifiable- Returns:
- the version
-
setVersion
public void setVersion(java.lang.Integer version)
Description copied from class:ToDoVersionedIdentifiableMethod setting the version of the instance, Should under normal circumstances not be manually invoked.- Specified by:
setVersionin classToDoVersionedIdentifiable- Parameters:
version- of the object
-
isActive
public java.lang.Boolean isActive()
Description copied from class:ToDoVersionedIdentifiableMethod that returns whether the instance is active or not (means: logically deleted)- Specified by:
isActivein classToDoVersionedIdentifiable- Returns:
- boolean whether the object is active
-
setActive
public void setActive(java.lang.Boolean active)
Description copied from class:ToDoVersionedIdentifiableMethod setting the active flag. Invoking this method with false logically deletes the instance in the database.- Specified by:
setActivein classToDoVersionedIdentifiable- Parameters:
active- is the object active or not
-
setToActive
public void setToActive()
Description copied from class:ToDoVersionedIdentifiableMethod to undelete an object logically.- Specified by:
setToActivein classToDoVersionedIdentifiable
-
setInactive
public void setInactive()
Description copied from class:ToDoVersionedIdentifiableMethod to delete an object logically.- Specified by:
setInactivein 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()
-
getOwnerName
public java.lang.String getOwnerName()
-
getAssignedUserName
public java.lang.String getAssignedUserName()
-
getAddresseeName
public java.lang.String getAddresseeName()
-
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)
-
getStateAsIcon
public Component getStateAsIcon()
-
getAddresseAsString
public java.lang.String getAddresseAsString()
-
getOwnerAsString
public java.lang.String getOwnerAsString()
-
getAssignedUserAsString
public java.lang.String getAssignedUserAsString()
-
-