Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.jeteam.bean.security
Class RoleServiceBeanImpl  view RoleServiceBeanImpl download RoleServiceBeanImpl.java

java.lang.Object
  extended byorg.jeteam.bean.security.RoleServiceBean
      extended byorg.jeteam.bean.security.RoleServiceBeanImpl
All Implemented Interfaces:
javax.ejb.EnterpriseBean, java.io.Serializable, javax.ejb.SessionBean

public class RoleServiceBeanImpl
extends RoleServiceBean
implements javax.ejb.SessionBean


Field Summary
private  javax.ejb.SessionContext context
           
 
Constructor Summary
RoleServiceBeanImpl()
           
 
Method Summary
 void addPrivilege(RoleDTO role, PrivilegeDTO privilege)
           Associates a privilege to the role.
 void clearPrivileges(RoleDTO role)
           Removes all privileges associated to this role, only the relationships will be removed; the privileges will not be touched.
 RoleDTO createRole(RoleDTO role)
           Creates a new role.
 void ejbActivate()
           
 void ejbPassivate()
           
 void ejbRemove()
           
 PrivilegeDTO[] getPrivileges(RoleDTO role)
           Returns a collection of all privileges associated to this role.
 RoleDTO[] getRoles()
           Returns all roles in the data source.
 org.jeteam.bean.user.UserDTO[] getUsers(RoleDTO role)
           Returns all the users implementing the role.
 void removePrivilege(RoleDTO role, PrivilegeDTO privilege)
           Removing a privilege from a role will result in removing the privilege from the relationship, it will not be deleted.
 void removeRole(RoleDTO role)
           Removes a role from the data source.
 void setPrivileges(RoleDTO role, PrivilegeDTO[] privileges)
           Sets the privileges associated to the argument role, the previous set of privileges will be cleared.
 void setSessionContext(javax.ejb.SessionContext ctx)
           
 void updateRole(RoleDTO role)
           Updates the properties of the role.
 
Methods inherited from class org.jeteam.bean.security.RoleServiceBean
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

RoleServiceBeanImpl

public RoleServiceBeanImpl()
Method Detail

createRole

public RoleDTO createRole(RoleDTO role)
                   throws RoleException
Description copied from class: RoleServiceBean

Creates a new role. The name must be unique.

Specified by:
createRole in class RoleServiceBean

removeRole

public void removeRole(RoleDTO role)
                throws RoleException
Description copied from class: RoleServiceBean

Removes a role from the data source.

Specified by:
removeRole in class RoleServiceBean

getRoles

public RoleDTO[] getRoles()
                   throws RoleException
Description copied from class: RoleServiceBean

Returns all roles in the data source.

Specified by:
getRoles in class RoleServiceBean

addPrivilege

public void addPrivilege(RoleDTO role,
                         PrivilegeDTO privilege)
                  throws RoleException
Description copied from class: RoleServiceBean

Associates a privilege to the role.

Specified by:
addPrivilege in class RoleServiceBean

removePrivilege

public void removePrivilege(RoleDTO role,
                            PrivilegeDTO privilege)
                     throws RoleException
Description copied from class: RoleServiceBean

Removing a privilege from a role will result in removing the privilege from the relationship, it will not be deleted.

Specified by:
removePrivilege in class RoleServiceBean

getPrivileges

public PrivilegeDTO[] getPrivileges(RoleDTO role)
                             throws RoleException
Description copied from class: RoleServiceBean

Returns a collection of all privileges associated to this role.

Specified by:
getPrivileges in class RoleServiceBean

clearPrivileges

public void clearPrivileges(RoleDTO role)
                     throws RoleException
Description copied from class: RoleServiceBean

Removes all privileges associated to this role, only the relationships will be removed; the privileges will not be touched.

Specified by:
clearPrivileges in class RoleServiceBean

getUsers

public org.jeteam.bean.user.UserDTO[] getUsers(RoleDTO role)
                                        throws RoleException
Description copied from class: RoleServiceBean

Returns all the users implementing the role.

Specified by:
getUsers in class RoleServiceBean

updateRole

public void updateRole(RoleDTO role)
                throws RoleException
Description copied from class: RoleServiceBean

Updates the properties of the role. The name can be changed but must remain unique in the set of all roles.

Specified by:
updateRole in class RoleServiceBean

setPrivileges

public void setPrivileges(RoleDTO role,
                          PrivilegeDTO[] privileges)
                   throws RoleException
Description copied from class: RoleServiceBean

Sets the privileges associated to the argument role, the previous set of privileges will be cleared.

Specified by:
setPrivileges in class RoleServiceBean

setSessionContext

public void setSessionContext(javax.ejb.SessionContext ctx)
Specified by:
setSessionContext in interface javax.ejb.SessionBean

ejbRemove

public void ejbRemove()
Specified by:
ejbRemove in interface javax.ejb.SessionBean

ejbPassivate

public void ejbPassivate()
Specified by:
ejbPassivate in interface javax.ejb.SessionBean

ejbActivate

public void ejbActivate()
Specified by:
ejbActivate in interface javax.ejb.SessionBean