|
|||||||||
| Home >> All >> org >> jeteam >> bean >> [ task overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.jeteam.bean.task
Class TaskServiceBean

java.lang.Objectorg.jeteam.bean.task.TaskServiceBean
- All Implemented Interfaces:
- javax.ejb.EnterpriseBean, java.io.Serializable, javax.ejb.SessionBean
- Direct Known Subclasses:
- TaskServiceBeanImpl
- public abstract class TaskServiceBean
- extends java.lang.Object
- implements javax.ejb.SessionBean
- extends java.lang.Object
This bean is a service to Task CRUD operations.
A task has only meaning in the context of a project. Please note that the task will always be associated to this project. There is no means of associating another project to this task after the task has been created. If the argument project does not exist or is invalid (deleted flag) an exception will be thrown.
A task typically is assigned by a user to a user, a user is allowed to assign a task to himself.
A task can have many notes attached to it giving some more extra information along the way.
A task also has a status and priority field associated with it, this way the user has a view on the importance of the task.
| Constructor Summary | |
TaskServiceBean()
|
|
| Method Summary | |
abstract void |
clearNotes(TaskDTO task)
Logically deletes the notes attached to this task, does not remove them from the relationship. |
abstract TaskDTO |
createTask(TaskDTO task,
org.jeteam.bean.project.ProjectDTO project,
org.jeteam.bean.user.UserDTO assignedByUser,
org.jeteam.bean.user.UserDTO[] assignedToUsers,
org.jeteam.bean.config.StatusDTO status,
org.jeteam.bean.config.PriorityDTO priority)
A task is created by a user for a collection of users and needs a specific status and priority field associated with it. |
void |
ejbCreate()
|
void |
ejbPostCreate()
|
abstract TaskDTO[] |
getAllTasks()
Returns all tasks in the data source, even the ones that have been logically deleted. |
abstract org.jeteam.bean.user.UserDTO |
getAssignedByUser(TaskDTO task)
The user who assigned to task, typically the one that created it. |
abstract org.jeteam.bean.user.UserDTO[] |
getAssignedToUsers(TaskDTO task)
Returns the users to whom this task has been assigned, the returned Collection contains all UserDTO instances. |
abstract NoteDTO[] |
getNotes(TaskDTO task)
Returns a collection of notes attached to the task, notes that have previously logically deleted are included in this collection. |
abstract org.jeteam.bean.config.PriorityDTO |
getPriority(TaskDTO task)
Gets this task's priority. |
abstract org.jeteam.bean.project.ProjectDTO |
getProject(TaskDTO task)
Returns the project context in which this task has a meaning. |
abstract org.jeteam.bean.config.StatusDTO |
getStatus(TaskDTO task)
Gets this task's status. |
abstract TaskDTO[] |
getTasks()
Getting the tasks will only return the ones that have not been logically deleted, use getAllTasks() in case you need to retrieve the complete list of tasks. |
abstract void |
removeTask(TaskDTO task)
Removing a task will result in setting its 'deleted' attribute to the current date (not null ) so it will be logically deleted. |
abstract void |
setAssignedToUsers(TaskDTO task,
org.jeteam.bean.user.UserDTO[] users)
Set the users to whom this task has been assigned, the argument Collection must contain all UserDTO instances. |
abstract void |
setPriority(TaskDTO task,
org.jeteam.bean.config.PriorityDTO priority)
Sets this task's priority. |
abstract void |
setStatus(TaskDTO task,
org.jeteam.bean.config.StatusDTO status)
Sets this task's status. |
abstract void |
updateTask(TaskDTO task)
Updates the properties of the task, this can be the name, description, due date or the progress indicator. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.ejb.SessionBean |
ejbActivate, ejbPassivate, ejbRemove, setSessionContext |
| Constructor Detail |
TaskServiceBean
public TaskServiceBean()
| Method Detail |
createTask
public abstract TaskDTO createTask(TaskDTO task, org.jeteam.bean.project.ProjectDTO project, org.jeteam.bean.user.UserDTO assignedByUser, org.jeteam.bean.user.UserDTO[] assignedToUsers, org.jeteam.bean.config.StatusDTO status, org.jeteam.bean.config.PriorityDTO priority) throws TaskException
A task is created by a user for a collection of users and needs a specific status and priority field associated with it. A task also is associated to a specific project.
The name of the task must be unique.
It is required that the assignees are all members of the same project, concretely this means that all UserDTO instances contained in the "assignedToUser" Collection must be a member of the argument project. Failing to do so will result in an exception being thrown.
This method will perform the following: (1) check if the argument project can be found and has not been marked as deleted, (2) the task has a non-null name that is not empty and does not already exist in the argument project, (3) the assigner must be a valid member of the argument project, (4) the list of argument assignees (users) may be empty but may not contain any users that are not an active member of the argument project, (5) the status must exist, (6) the priority must exist
removeTask
public abstract void removeTask(TaskDTO task) throws TaskException
Removing a task will result in setting its 'deleted' attribute to the current date (not null ) so it will be logically deleted.
getTasks
public abstract TaskDTO[] getTasks() throws TaskException
Getting the tasks will only return the ones that have not been logically deleted, use getAllTasks() in case you need to retrieve the complete list of tasks.
getAllTasks
public abstract TaskDTO[] getAllTasks() throws TaskException
Returns all tasks in the data source, even the ones that have been logically deleted. If you want only the active ones, use getTasks() instead.
getNotes
public abstract NoteDTO[] getNotes(TaskDTO task) throws TaskException
Returns a collection of notes attached to the task, notes that have previously logically deleted are included in this collection.
getAssignedToUsers
public abstract org.jeteam.bean.user.UserDTO[] getAssignedToUsers(TaskDTO task) throws TaskException
Returns the users to whom this task has been assigned, the returned Collection contains all UserDTO instances.
getAssignedByUser
public abstract org.jeteam.bean.user.UserDTO getAssignedByUser(TaskDTO task) throws TaskException
The user who assigned to task, typically the one that created it.
getProject
public abstract org.jeteam.bean.project.ProjectDTO getProject(TaskDTO task) throws TaskException
Returns the project context in which this task has a meaning.
clearNotes
public abstract void clearNotes(TaskDTO task) throws TaskException
Logically deletes the notes attached to this task, does not remove them from the relationship.
updateTask
public abstract void updateTask(TaskDTO task) throws TaskException
Updates the properties of the task, this can be the name, description, due date or the progress indicator. The name of the task may be changed but must remain unique.
getPriority
public abstract org.jeteam.bean.config.PriorityDTO getPriority(TaskDTO task) throws TaskException
Gets this task's priority.
getStatus
public abstract org.jeteam.bean.config.StatusDTO getStatus(TaskDTO task) throws TaskException
Gets this task's status.
setPriority
public abstract void setPriority(TaskDTO task, org.jeteam.bean.config.PriorityDTO priority) throws TaskException
Sets this task's priority.
setStatus
public abstract void setStatus(TaskDTO task, org.jeteam.bean.config.StatusDTO status) throws TaskException
Sets this task's status.
setAssignedToUsers
public abstract void setAssignedToUsers(TaskDTO task, org.jeteam.bean.user.UserDTO[] users) throws TaskException
Set the users to whom this task has been assigned, the argument Collection must contain all UserDTO instances.
It is required that the assignees are all members of the same project, concretely this means that all UserDTO instances contained in the "assignedToUser" Collection must be a member of the task's project. Failing to do so will result in an exception being thrown.
This method clears the current set of users and replaces it by the ones represented by the argument array.
ejbCreate
public void ejbCreate()
throws javax.ejb.CreateException
ejbPostCreate
public void ejbPostCreate()
throws javax.ejb.CreateException
|
|||||||||
| Home >> All >> org >> jeteam >> bean >> [ task overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.jeteam.bean.task.TaskServiceBean