|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.deegree.security.drm.model.SecurableObject
org.deegree.security.drm.model.User
public class User
Implementation of user-objects. User s can be members of Groups and
can be associated with Roles.
A user is always in one of two states:
SecurityManager will not issue SecurityAccess
instances for this user
authenticate() and submitting the correct
password, afterwards SecurityAccess instances for the user can be issued
| Field Summary | |
|---|---|
static int |
ID_SEC_ADMIN
|
| Fields inherited from class org.deegree.security.drm.model.SecurableObject |
|---|
id, name, registry, title, type |
| Constructor Summary | |
|---|---|
User(int id,
java.lang.String name,
java.lang.String password,
java.lang.String firstName,
java.lang.String lastName,
java.lang.String emailAddress,
SecurityRegistry registry)
Creates a new User -instance. |
|
| Method Summary | |
|---|---|
void |
authenticate(java.lang.String password)
Checks if the submitted password is equal to the one of this user instance and sets the state to "authenticated" in case it is correct. |
java.lang.String |
getEmailAddress()
|
java.lang.String |
getFirstName()
|
Group[] |
getGroups(SecurityAccess securityAccess)
Returns the groups that this user belongs to. |
java.lang.String |
getLastName()
|
java.lang.String |
getPassword()
|
Privilege[] |
getPrivileges(SecurityAccess securityAccess)
Returns the Privileges that the User has (directly and via
group memberships). |
RightSet |
getRights(SecurityAccess securityAccess,
SecurableObject object)
Returns the rights that this User has on the given
SecurableObject (directly and via group memberships). |
Role[] |
getRoles(SecurityAccess securityAccess)
Returns the roles that this is user is associated with (directly and via group memberships). |
boolean |
hasPrivilege(SecurityAccess securityAccess,
Privilege privilege)
Returns whether the User has a certain Privilege (either
directly or via group memberships). |
boolean |
hasPrivilege(SecurityAccess securityAccess,
java.lang.String s)
Returns whether the User has a certain privilege (either directly or via group
memberships). |
boolean |
hasRight(SecurityAccess securityAccess,
RightType type,
Feature accessParams,
SecurableObject object)
Returns whether the User has a certain Right on this
SecurableObject (directly or via group memberships). |
boolean |
hasRight(SecurityAccess securityAccess,
RightType type,
SecurableObject object)
Returns whether the User has a certain Right on this
SecurableObject (directly or via group memberships). |
boolean |
hasRight(SecurityAccess securityAccess,
java.lang.String s,
SecurableObject object)
Returns whether the User has a certain right on this
SecurableObject (directly or via group memberships). |
boolean |
isAuthenticated()
Returns whether the User has already been authenticated by a call to
authenticate() with the correct password (or if the user's
password is null). |
java.lang.String |
toString(SecurityAccess securityAccess)
Returns a String representation of this object. |
| Methods inherited from class org.deegree.security.drm.model.SecurableObject |
|---|
equals, getID, getName, getTitle, getType, hashCode, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int ID_SEC_ADMIN
| Constructor Detail |
|---|
public User(int id,
java.lang.String name,
java.lang.String password,
java.lang.String firstName,
java.lang.String lastName,
java.lang.String emailAddress,
SecurityRegistry registry)
User -instance.
id - name - password - null means that password checking is disabledfirstName - lastName - emailAddress - registry - | Method Detail |
|---|
public java.lang.String getFirstName()
public java.lang.String getLastName()
public java.lang.String getEmailAddress()
public java.lang.String getPassword()
public Group[] getGroups(SecurityAccess securityAccess)
throws GeneralSecurityException
securityAccess -
GeneralSecurityException
public Role[] getRoles(SecurityAccess securityAccess)
throws GeneralSecurityException
securityAccess -
GeneralSecurityException
public Privilege[] getPrivileges(SecurityAccess securityAccess)
throws GeneralSecurityException
Privileges that the User has (directly and via
group memberships).
securityAccess -
GeneralSecurityException
public boolean hasPrivilege(SecurityAccess securityAccess,
Privilege privilege)
throws GeneralSecurityException
User has a certain Privilege (either
directly or via group memberships).
securityAccess - privilege -
GeneralSecurityException
public boolean hasPrivilege(SecurityAccess securityAccess,
java.lang.String s)
throws GeneralSecurityException
User has a certain privilege (either directly or via group
memberships).
securityAccess - s -
GeneralSecurityException
public RightSet getRights(SecurityAccess securityAccess,
SecurableObject object)
throws GeneralSecurityException
User has on the given
SecurableObject (directly and via group memberships).
securityAccess - object -
GeneralSecurityException
public boolean hasRight(SecurityAccess securityAccess,
RightType type,
Feature accessParams,
SecurableObject object)
throws GeneralSecurityException
User has a certain Right on this
SecurableObject (directly or via group memberships).
securityAccess - type - accessParams - object -
GeneralSecurityException
public boolean hasRight(SecurityAccess securityAccess,
RightType type,
SecurableObject object)
throws GeneralSecurityException
User has a certain Right on this
SecurableObject (directly or via group memberships).
securityAccess - type - object -
GeneralSecurityException
public boolean hasRight(SecurityAccess securityAccess,
java.lang.String s,
SecurableObject object)
throws GeneralSecurityException
User has a certain right on this
SecurableObject (directly or via group memberships).
securityAccess - s - object -
GeneralSecurityExceptionpublic boolean isAuthenticated()
User has already been authenticated by a call to
authenticate() with the correct password (or if the user's
password is null).
public java.lang.String toString(SecurityAccess securityAccess)
String representation of this object.
securityAccess -
public void authenticate(java.lang.String password)
throws WrongCredentialsException
password -
WrongCredentialsException
|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org