|
deegree 2.1 (2007/11/08 09:57 build-328-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 Role
s.
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,
String name,
String password,
String firstName,
String lastName,
String emailAddress,
SecurityRegistry registry)
Creates a new User -instance. |
Method Summary | |
---|---|
void |
authenticate(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. |
String |
getEmailAddress()
|
String |
getFirstName()
|
Group[] |
getGroups(SecurityAccess securityAccess)
Returns the groups that this user belongs to. |
String |
getLastName()
|
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,
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,
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). |
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, String name, String password, String firstName, String lastName, String emailAddress, SecurityRegistry registry)
User
-instance.
id
- name
- password
- null means that password checking is disabledfirstName
- lastName
- registry
- Method Detail |
---|
public String getFirstName()
public String getLastName()
public String getEmailAddress()
public 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).
GeneralSecurityException
public boolean hasPrivilege(SecurityAccess securityAccess, Privilege privilege) throws GeneralSecurityException
User
has a certain Privilege
(either
directly or via group memberships).
privilege
-
GeneralSecurityException
public boolean hasPrivilege(SecurityAccess securityAccess, String s) throws GeneralSecurityException
User
has a certain privilege (either directly or via group
memberships).
s
-
GeneralSecurityException
public RightSet getRights(SecurityAccess securityAccess, SecurableObject object) throws GeneralSecurityException
User
has on the given
SecurableObject
(directly and via group memberships).
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).
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).
GeneralSecurityException
public boolean hasRight(SecurityAccess securityAccess, String s, SecurableObject object) throws GeneralSecurityException
User
has a certain right on this
SecurableObject
(directly or via group memberships).
GeneralSecurityException
public 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 String toString(SecurityAccess securityAccess)
String
representation of this object.
public void authenticate(String password) throws WrongCredentialsException
password
-
WrongCredentialsException
|
deegree 2.1 (2007/11/08 09:57 build-328-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://deegree.sourceforge.net