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

java.lang.Objectorg.jeteam.bean.project.ProjectServiceBean
org.jeteam.bean.project.ProjectServiceBeanImpl
- All Implemented Interfaces:
- javax.ejb.EnterpriseBean, java.io.Serializable, javax.ejb.SessionBean
- public class ProjectServiceBeanImpl
- extends ProjectServiceBean
- implements javax.ejb.SessionBean
- extends ProjectServiceBean
| Field Summary | |
private javax.ejb.SessionContext |
context
|
| Constructor Summary | |
ProjectServiceBeanImpl()
|
|
| Method Summary | |
void |
addRole(ProjectDTO project,
org.jeteam.bean.security.RoleDTO role)
Adds a new role this this project, this may allow other users to be assigned to this project. |
void |
addTask(ProjectDTO project,
org.jeteam.bean.task.TaskDTO task)
Assigns a new task to this project, if the task has already been assigned to this project nothing happens. |
void |
addUser(ProjectDTO project,
org.jeteam.bean.user.UserDTO user)
Assigns a new user to this project, if the user has already been assigned to this project nothing happens. |
void |
addUsers(ProjectDTO project,
org.jeteam.bean.user.UserDTO[] users)
Adds the list of users to the existing list associated with the argument project. |
void |
clearRoles(ProjectDTO project)
Removes all roles from the project. |
void |
clearTasks(ProjectDTO project)
Removes all the tasks that have been created for this project. |
void |
clearUsers(ProjectDTO project)
Removes all users from this project. |
ProjectDTO |
createProject(ProjectDTO project)
When creating a new project make sure the project name does not already exists. |
void |
ejbActivate()
|
void |
ejbPassivate()
|
void |
ejbRemove()
|
ProjectDTO[] |
getAllProjects()
Returns all projects that can be found. |
ProjectDTO[] |
getProjects()
Getting the projects will only return the ones that have not been logically deleted, use getAllProjects() in case you need to retrieve the complete list of projects. |
org.jeteam.bean.security.RoleDTO[] |
getRoles(ProjectDTO project)
Returns the collection of roles that users must have before being able to be assigned to this project. |
org.jeteam.bean.config.StatusDTO |
getStatus(ProjectDTO project)
Gets the status of this project. |
org.jeteam.bean.task.TaskDTO[] |
getTasks(ProjectDTO project)
Returns all the tasks that have been created for this project. |
org.jeteam.bean.user.UserDTO[] |
getUsers(ProjectDTO project)
Returns all the users associated with this project. |
void |
removeProject(ProjectDTO project)
Removing a project will result in setting its 'deleted' attribute to the current date (not null ) so it will be logically deleted. |
void |
removeRole(ProjectDTO project,
org.jeteam.bean.security.RoleDTO role)
Removes a role from the project. |
void |
removeTask(ProjectDTO project,
org.jeteam.bean.task.TaskDTO task)
Removes the specified task from the argument project. |
void |
removeUser(ProjectDTO project,
org.jeteam.bean.user.UserDTO user)
Removing a user from a project will result in removing the user from the relationship, it will not be deleted. |
void |
setSessionContext(javax.ejb.SessionContext ctx)
|
void |
setStatus(ProjectDTO project,
org.jeteam.bean.config.StatusDTO status)
Sets the status of this project. |
void |
updateProject(ProjectDTO project)
Updates this project's information, this can be either the name or the description. |
private ProjectLocal |
verifyProject(ProjectDTO project)
Checks if the argument project would be valid if persisted, meaning the name would not collide with another project (project names must always be unique). |
private java.lang.String |
verifyProjectName(ProjectDTO project)
Verifies whether the argument project has a valid name. |
| Methods inherited from class org.jeteam.bean.project.ProjectServiceBean |
ejbCreate, ejbPostCreate |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
context
private javax.ejb.SessionContext context
| Constructor Detail |
ProjectServiceBeanImpl
public ProjectServiceBeanImpl()
| Method Detail |
createProject
public ProjectDTO createProject(ProjectDTO project) throws ProjectException
- Description copied from class:
ProjectServiceBean When creating a new project make sure the project name does not already exists.
- Specified by:
createProjectin classProjectServiceBean
removeProject
public void removeProject(ProjectDTO project) throws ProjectException
- Description copied from class:
ProjectServiceBean Removing a project will result in setting its 'deleted' attribute to the current date (not null ) so it will be logically deleted.
- Specified by:
removeProjectin classProjectServiceBean
getProjects
public ProjectDTO[] getProjects() throws ProjectException
- Description copied from class:
ProjectServiceBean Getting the projects will only return the ones that have not been logically deleted, use getAllProjects() in case you need to retrieve the complete list of projects.
- Specified by:
getProjectsin classProjectServiceBean
getAllProjects
public ProjectDTO[] getAllProjects() throws ProjectException
- Description copied from class:
ProjectServiceBean Returns all projects that can be found.
- Specified by:
getAllProjectsin classProjectServiceBean
getUsers
public org.jeteam.bean.user.UserDTO[] getUsers(ProjectDTO project) throws ProjectException
- Description copied from class:
ProjectServiceBean Returns all the users associated with this project.
- Specified by:
getUsersin classProjectServiceBean
removeUser
public void removeUser(ProjectDTO project, org.jeteam.bean.user.UserDTO user) throws ProjectException
- Description copied from class:
ProjectServiceBean Removing a user from a project will result in removing the user from the relationship, it will not be deleted.
- Specified by:
removeUserin classProjectServiceBean
clearUsers
public void clearUsers(ProjectDTO project) throws ProjectException
- Description copied from class:
ProjectServiceBean Removes all users from this project.
- Specified by:
clearUsersin classProjectServiceBean
updateProject
public void updateProject(ProjectDTO project) throws ProjectException
- Description copied from class:
ProjectServiceBean Updates this project's information, this can be either the name or the description. The name can be changed but must remain unique.
- Specified by:
updateProjectin classProjectServiceBean
addUser
public void addUser(ProjectDTO project, org.jeteam.bean.user.UserDTO user) throws ProjectException
- Description copied from class:
ProjectServiceBean Assigns a new user to this project, if the user has already been assigned to this project nothing happens.
- Specified by:
addUserin classProjectServiceBean
addTask
public void addTask(ProjectDTO project, org.jeteam.bean.task.TaskDTO task) throws ProjectException
- Description copied from class:
ProjectServiceBean Assigns a new task to this project, if the task has already been assigned to this project nothing happens.
- Specified by:
addTaskin classProjectServiceBean
setStatus
public void setStatus(ProjectDTO project, org.jeteam.bean.config.StatusDTO status) throws ProjectException
- Description copied from class:
ProjectServiceBean Sets the status of this project.
- Specified by:
setStatusin classProjectServiceBean
getStatus
public org.jeteam.bean.config.StatusDTO getStatus(ProjectDTO project) throws ProjectException
- Description copied from class:
ProjectServiceBean Gets the status of this project.
- Specified by:
getStatusin classProjectServiceBean
getRoles
public org.jeteam.bean.security.RoleDTO[] getRoles(ProjectDTO project) throws ProjectException
- Description copied from class:
ProjectServiceBean Returns the collection of roles that users must have before being able to be assigned to this project. If a user has one of the roles associated to him/her, he can be assigned to the project.
- Specified by:
getRolesin classProjectServiceBean
addRole
public void addRole(ProjectDTO project, org.jeteam.bean.security.RoleDTO role) throws ProjectException
- Description copied from class:
ProjectServiceBean Adds a new role this this project, this may allow other users to be assigned to this project. If the role is already assinged to this project nothing happens.
- Specified by:
addRolein classProjectServiceBean
removeRole
public void removeRole(ProjectDTO project, org.jeteam.bean.security.RoleDTO role) throws ProjectException
- Description copied from class:
ProjectServiceBean Removes a role from the project.
This may cause for some confusion since all associated users that do not have roles anymore required by the project will be removed from the project.
- Specified by:
removeRolein classProjectServiceBean
clearRoles
public void clearRoles(ProjectDTO project) throws ProjectException
- Description copied from class:
ProjectServiceBean Removes all roles from the project.
This will remove all associated users from this project, so use it with care!
- Specified by:
clearRolesin classProjectServiceBean
addUsers
public void addUsers(ProjectDTO project, org.jeteam.bean.user.UserDTO[] users) throws ProjectException
- Description copied from class:
ProjectServiceBean Adds the list of users to the existing list associated with the argument project.
- Specified by:
addUsersin classProjectServiceBean
getTasks
public org.jeteam.bean.task.TaskDTO[] getTasks(ProjectDTO project) throws ProjectException
- Description copied from class:
ProjectServiceBean Returns all the tasks that have been created for this project.
- Specified by:
getTasksin classProjectServiceBean
clearTasks
public void clearTasks(ProjectDTO project) throws ProjectException
- Description copied from class:
ProjectServiceBean Removes all the tasks that have been created for this project.
- Specified by:
clearTasksin classProjectServiceBean
removeTask
public void removeTask(ProjectDTO project, org.jeteam.bean.task.TaskDTO task) throws ProjectException
- Description copied from class:
ProjectServiceBean Removes the specified task from the argument project. The task must exist, and must be associated with the project.
- Specified by:
removeTaskin classProjectServiceBean
verifyProject
private final ProjectLocal verifyProject(ProjectDTO project) throws ProjectException, java.lang.Exception
- Checks if the argument project would be valid if persisted, meaning the name would not collide with another
project (project names must always be unique).
There are two different scenarios: creation and updating.
Creation :
The argument does not have an Id (it isnull), in this case the argument's name is checked for uniqueness.Updating :
The argument has an Id (it is notnull), in this case the argument's name is checked for uniqueness only if the name of the project matches the name of the project with the same id, because this would mean the project already needs update of its name.
verifyProjectName
private java.lang.String verifyProjectName(ProjectDTO project) throws ProjectException
- Verifies whether the argument project has a valid name. It is checked if the name (or argument) is
nullor represents only whitespace or no characters at all.
setSessionContext
public void setSessionContext(javax.ejb.SessionContext ctx)
- Specified by:
setSessionContextin interfacejavax.ejb.SessionBean
ejbRemove
public void ejbRemove()
- Specified by:
ejbRemovein interfacejavax.ejb.SessionBean
ejbPassivate
public void ejbPassivate()
- Specified by:
ejbPassivatein interfacejavax.ejb.SessionBean
ejbActivate
public void ejbActivate()
- Specified by:
ejbActivatein interfacejavax.ejb.SessionBean
|
|||||||||
| Home >> All >> org >> jeteam >> bean >> [ project overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC