org.openwms.core.domain.system.usermanagement
Class SystemUser

java.lang.Object
  extended by org.openwms.core.domain.AbstractEntity
      extended by org.openwms.core.domain.system.usermanagement.User
          extended by org.openwms.core.domain.system.usermanagement.SystemUser
All Implemented Interfaces:
Serializable, DomainObject<Long>

public class SystemUser
extends User

A SystemUser is granted with all privileges and omits all defined security constraints. Whenever a SystemUser logs in, she is assigned to a virtual Role with the name ROLE_SYSTEM. Furthermore this kind of Role is immutable and it is not allowed for the SystemUser to change her UserDetails or UserPassword. Changing the UserPassword has to be done in the application configuration when the project is setup.

Since:
0.1
Version:
$Revision: 1595 $
Author:
Tina Russell
See Also:
User, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.openwms.core.domain.AbstractEntity
AbstractEntity.AbstractEntityListener
 
Field Summary
static String SYSTEM_ROLE_NAME
          The virtual Role of the SystemUser.
static String SYSTEM_USERNAME
          The defined fullname of the system user.
 
Fields inherited from class org.openwms.core.domain.system.usermanagement.User
NQ_FIND_ALL, NQ_FIND_ALL_ORDERED, NQ_FIND_BY_USERNAME, NQ_FIND_BY_USERNAME_PASSWORD, NUMBER_STORED_PASSWORDS
 
Fields inherited from class org.openwms.core.domain.AbstractEntity
FIND_ALL, FIND_BY_ID
 
Constructor Summary
SystemUser(String username, String password)
          Create a new SystemUser.
 
Method Summary
static boolean isSuperUser(User user)
          Check whether user is the system user.
 
Methods inherited from class org.openwms.core.domain.system.usermanagement.User
addRole, changePassword, equals, getExpirationDate, getFullname, getGrants, getId, getLastPasswordChange, getPassword, getPasswords, getPreferences, getRoles, getUserDetails, getUsername, getVersion, hashCode, hasPasswordChanged, isEnabled, isExternalUser, isLocked, isNew, isPasswordValid, onLoad, setEnabled, setExpirationDate, setExternalUser, setFullname, setLocked, setPassword, setPreferences, setRoles, setUserDetails, setUsername
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SYSTEM_USERNAME

public static final String SYSTEM_USERNAME
The defined fullname of the system user. Default "OPENWMS" .

See Also:
Constant Field Values

SYSTEM_ROLE_NAME

public static final String SYSTEM_ROLE_NAME
The virtual Role of the SystemUser.

See Also:
Constant Field Values
Constructor Detail

SystemUser

public SystemUser(String username,
                  String password)
Create a new SystemUser.

Parameters:
username - SystemUser's username
password - SystemUser's password
Method Detail

isSuperUser

public static final boolean isSuperUser(User user)
Check whether user is the system user.

Parameters:
user - The user to check
Returns:
true if user is the system user, otherwise false


Copyright © 2005-2011 openwms.org. All Rights Reserved.