org.equanda.test.dm.server
Class EquandaUserBean

java.lang.Object
  extended by org.equanda.test.dm.server.EquandaUserBean
All Implemented Interfaces:
Serializable, EquandaEJB<Uoid>, ExceptionCodes, HasId<Uoid>, EquandaUserBase, EquandaUserEJB, EquandaUserEJBLocal

public class EquandaUserBean
extends Object
implements EquandaUserEJB, EquandaUserEJBLocal, ExceptionCodes, Serializable

EquandaUser Definition of a user for a GUI application.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.equanda.persistence.ExceptionCodes
CME_DATA_HAS_BEEN_ALREADY_CHANGED, ECV_CANNOT_ADD_NULL_TO_MULTIPLE_FIELD, ECV_COMPARE_CONSTRAINT_NOT_SATISFIED, ECV_COMPARE_TYPE_CONSTRAINT_NOT_SATISFIED, ECV_CONSTRAINT_VIOLATION, ECV_COULD_NOT_TEST_CHOICES_USING_CLASS, ECV_DOWNCAST_CREATE_ERROR, ECV_DOWNCAST_FAILED_CANNOT_DOWNCAST_ROOT, ECV_DOWNCAST_SELECTOR_ERROR, ECV_FAILED_TO_CREATE_INCLUDED_VALUE, ECV_FAILED_TO_UPDATE_VALUE, ECV_FIELD_IS_REQUIRED, ECV_FIELD_IS_UNIQUE, ECV_IMMUTABLE_IF_OTHER_FIELD_IS_SET, ECV_INCLUDE_VALUE_HAS_WRONG_TYPE, ECV_INTERNAL_ERROR_ON_CREATE_INCLUDED_VALUE, ECV_INVALID_TABLE_TYPE, ECV_OTHERSIDE_EMBEDDED_FIELD_IMMUTABLE_ONCE_SET, ECV_VALUE_IS_NOT_ONE_OF_THE_CHOICES, UONA_OPERATION_NOT_ALLOWED, UPE_AUTO_FIELD_PROBLEM, UPE_CANNOT_CREATE_LAZYCOLLECTION, UPE_CANNOT_CREATE_SESSION_FACADE, UPE_CANNOT_INIT_BEAN, UPE_CASCADE_KEEP, UPE_FAILED_PROXY_REMOVE, UPE_FAILED_TO_UPDATE_VALUE, UPE_NULL_UOID_INVALID, UPE_OBJECT_NOT_FOUND, UPE_PERSISTENCE_EXCEPTION, UPE_TRYING_TO_UPDATE_OBJECT_WITH_UOID_NULL, UPE_UOID_NOT_FOUND
 
Constructor Summary
EquandaUserBean()
           
 
Method Summary
 void addEquandaLinkRole(Uoid el)
          Grouping of security rights for this user
 void addRole(EquandaRoleEJB el)
          Grouping of security rights for this user
 void ejbActivate()
           
 void ejbPassivate()
           
 String getAuthAndConfig()
          Authorization and configuration details for this user.
 EquandaUser getEquanda()
           
 Collection<Uoid> getEquandaLinkRoles()
          Grouping of security rights for this user
 Timestamp getEquandaModificationDate()
           
 String getEquandaName()
           
 String getEquandaStatus()
           
 String getEquandaType()
           
 long getEquandaVersion()
           
 String getFirstName()
           
 Uoid getId()
           
 String getLanguage()
           
 String getName()
           
 String getPassword()
           
 Collection<EquandaRoleEJB> getRoles()
          Grouping of security rights for this user
 String getStartPage()
          Starting page in GUI
 String getUserName()
           
 boolean hasEquandaLinkRole(Uoid el)
          Grouping of security rights for this user
 boolean hasRole(EquandaRoleEJB el)
          Grouping of security rights for this user
 void init()
           
 void init(String type)
           
 void init(Uoid id)
           
 void initEntity(EquandaEntity entity)
           
 boolean isEquandaType(String type)
           
 void login()
          Action which should be called automatically when logging in.
 void logout()
          Action which should be called automatically when logging out.
protected  boolean objectEquals(Object obj1, Object obj2)
          utility routine to test equality of objects without relying on one of them being not null.
 void remove()
           
 void removeEntityBean()
           
 void removeEquandaLinkRole(Uoid el)
          Grouping of security rights for this user
 void removeRole(EquandaRoleEJB el)
          Grouping of security rights for this user
 void setAuthAndConfig(String authAndConfig)
           
 void setEquandaStatus(String status)
           
 void setFirstName(String firstName)
           
 void setLanguage(String language)
           
 void setName(String name)
           
 void setPassword(String password)
           
 void setStartPage(String startPage)
           
 void setUserName(String userName)
           
 void updateEquanda(EquandaUser proxy)
          Internal routine to update based on a proxy object, update indicates whether all fields need setting
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EquandaUserBean

public EquandaUserBean()
Method Detail

init

public void init(Uoid id)
          throws EquandaPersistenceException
Specified by:
init in interface EquandaEJB<Uoid>
Throws:
EquandaPersistenceException

initEntity

public void initEntity(EquandaEntity entity)
                throws EquandaPersistenceException
Specified by:
initEntity in interface EquandaEJB<Uoid>
Throws:
EquandaPersistenceException

init

public void init(String type)
          throws EquandaPersistenceException
Specified by:
init in interface EquandaUserBase
Throws:
EquandaPersistenceException

init

public void init()
          throws EquandaPersistenceException
Specified by:
init in interface EquandaUserBase
Throws:
EquandaPersistenceException

getId

@RolesAllowed(value={"LocalUser","LocalAdmin"})
public Uoid getId()
Specified by:
getId in interface HasId<Uoid>

getEquandaModificationDate

@PermitAll
public Timestamp getEquandaModificationDate()
Specified by:
getEquandaModificationDate in interface EquandaEJB<Uoid>

getEquandaVersion

@PermitAll
public long getEquandaVersion()

getEquandaStatus

@RolesAllowed(value={"LocalUser","LocalAdmin"})
public String getEquandaStatus()
Specified by:
getEquandaStatus in interface EquandaEJB<Uoid>

setEquandaStatus

@RolesAllowed(value={"LocalUser","LocalAdmin"})
public void setEquandaStatus(String status)
Specified by:
setEquandaStatus in interface EquandaEJB<Uoid>

getEquandaType

@RolesAllowed(value={"LocalUser","LocalAdmin"})
public String getEquandaType()
Specified by:
getEquandaType in interface EquandaEJB<Uoid>

isEquandaType

@RolesAllowed(value={"LocalUser","LocalAdmin"})
public boolean isEquandaType(String type)
Specified by:
isEquandaType in interface EquandaEJB<Uoid>

getEquandaName

@RolesAllowed(value={"LocalUser","LocalAdmin"})
public String getEquandaName()
Specified by:
getEquandaName in interface EquandaEJB<Uoid>

getEquanda

@PermitAll
public EquandaUser getEquanda()
Specified by:
getEquanda in interface EquandaUserBase

updateEquanda

@RolesAllowed(value={"LocalUser","LocalAdmin"})
public void updateEquanda(EquandaUser proxy)
                   throws EquandaPersistenceException
Internal routine to update based on a proxy object, update indicates whether all fields need setting

Specified by:
updateEquanda in interface EquandaUserBase
Throws:
EquandaPersistenceException

getUserName

@RolesAllowed(value={"LocalUser","LocalAdmin"})
public String getUserName()
Specified by:
getUserName in interface EquandaUserBase

setUserName

public void setUserName(String userName)
                 throws EquandaPersistenceException
Specified by:
setUserName in interface EquandaUserBase
Throws:
EquandaPersistenceException

getFirstName

@RolesAllowed(value={"LocalUser","LocalAdmin"})
public String getFirstName()
Specified by:
getFirstName in interface EquandaUserBase

setFirstName

public void setFirstName(String firstName)
                  throws EquandaPersistenceException
Specified by:
setFirstName in interface EquandaUserBase
Throws:
EquandaPersistenceException

getName

@RolesAllowed(value={"LocalUser","LocalAdmin"})
public String getName()
Specified by:
getName in interface EquandaUserBase

setName

public void setName(String name)
             throws EquandaPersistenceException
Specified by:
setName in interface EquandaUserBase
Throws:
EquandaPersistenceException

getPassword

@RolesAllowed(value={"LocalUser","LocalAdmin"})
public String getPassword()
Specified by:
getPassword in interface EquandaUserBase

setPassword

public void setPassword(String password)
                 throws EquandaPersistenceException
Specified by:
setPassword in interface EquandaUserBase
Throws:
EquandaPersistenceException

getRoles

public Collection<EquandaRoleEJB> getRoles()
Grouping of security rights for this user

Specified by:
getRoles in interface EquandaUserBase

addRole

public void addRole(EquandaRoleEJB el)
             throws EquandaPersistenceException
Grouping of security rights for this user

Specified by:
addRole in interface EquandaUserBase
Throws:
EquandaPersistenceException

removeRole

public void removeRole(EquandaRoleEJB el)
                throws EquandaPersistenceException
Grouping of security rights for this user

Specified by:
removeRole in interface EquandaUserBase
Throws:
EquandaPersistenceException

hasRole

@RolesAllowed(value={"LocalUser","LocalAdmin"})
public boolean hasRole(EquandaRoleEJB el)
Grouping of security rights for this user

Specified by:
hasRole in interface EquandaUserBase

getEquandaLinkRoles

@RolesAllowed(value={"LocalUser","LocalAdmin"})
public Collection<Uoid> getEquandaLinkRoles()
Grouping of security rights for this user

Specified by:
getEquandaLinkRoles in interface EquandaUserBase

addEquandaLinkRole

public void addEquandaLinkRole(Uoid el)
                        throws EquandaPersistenceException
Grouping of security rights for this user

Specified by:
addEquandaLinkRole in interface EquandaUserBase
Throws:
EquandaPersistenceException

removeEquandaLinkRole

public void removeEquandaLinkRole(Uoid el)
                           throws EquandaPersistenceException
Grouping of security rights for this user

Specified by:
removeEquandaLinkRole in interface EquandaUserBase
Throws:
EquandaPersistenceException

hasEquandaLinkRole

@RolesAllowed(value={"LocalUser","LocalAdmin"})
public boolean hasEquandaLinkRole(Uoid el)
Grouping of security rights for this user

Specified by:
hasEquandaLinkRole in interface EquandaUserBase

getLanguage

@RolesAllowed(value={"LocalUser","LocalAdmin"})
public String getLanguage()
Specified by:
getLanguage in interface EquandaUserBase

setLanguage

public void setLanguage(String language)
                 throws EquandaPersistenceException
Specified by:
setLanguage in interface EquandaUserBase
Throws:
EquandaPersistenceException

getAuthAndConfig

@RolesAllowed(value={"LocalUser","LocalAdmin"})
public String getAuthAndConfig()
Authorization and configuration details for this user.

Specified by:
getAuthAndConfig in interface EquandaUserBase

setAuthAndConfig

public void setAuthAndConfig(String authAndConfig)
                      throws EquandaPersistenceException
Specified by:
setAuthAndConfig in interface EquandaUserBase
Throws:
EquandaPersistenceException

getStartPage

@RolesAllowed(value={"LocalUser","LocalAdmin"})
public String getStartPage()
Starting page in GUI

Specified by:
getStartPage in interface EquandaUserBase

setStartPage

public void setStartPage(String startPage)
                  throws EquandaPersistenceException
Specified by:
setStartPage in interface EquandaUserBase
Throws:
EquandaPersistenceException

login

@RolesAllowed(value={"LocalUser","LocalAdmin"})
public void login()
           throws EquandaPersistenceException
Action which should be called automatically when logging in.

Specified by:
login in interface EquandaUserBase
Throws:
EquandaPersistenceException

logout

@RolesAllowed(value={"LocalUser","LocalAdmin"})
public void logout()
            throws EquandaPersistenceException
Action which should be called automatically when logging out. It is not guaranteed that this is called, specifically it will not be called when the session times out. It may also not be called in other cases.

Specified by:
logout in interface EquandaUserBase
Throws:
EquandaPersistenceException

ejbActivate

public void ejbActivate()

ejbPassivate

public void ejbPassivate()

remove

@PermitAll
public void remove()
Specified by:
remove in interface EquandaEJB<Uoid>

removeEntityBean

@RolesAllowed(value={"LocalUser","LocalAdmin"})
public void removeEntityBean()
                      throws EquandaPersistenceException
Specified by:
removeEntityBean in interface EquandaUserBase
Throws:
EquandaPersistenceException

objectEquals

protected boolean objectEquals(Object obj1,
                               Object obj2)
utility routine to test equality of objects without relying on one of them being not null.

Parameters:
obj1 - one of the objects to compare
obj2 - other object to compare
Returns:
true when bot objects are equal


Copyright © 2007-2008. All Rights Reserved.