|
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.Object org.deegree.portal.standard.security.control.ClientHelper
public class ClientHelper
Helper class that performs common security access tasks and checks used in the
Listener
classes.
Field Summary | |
---|---|
static java.lang.String |
KEY_PASSWORD
|
static java.lang.String |
KEY_USERNAME
|
static java.lang.String |
TYPE_FEATURETYPE
|
static java.lang.String |
TYPE_LAYER
|
static java.lang.String |
TYPE_METADATASCHEMA
|
Constructor Summary | |
---|---|
ClientHelper()
|
Method Summary | |
---|---|
static SecurityAccess |
acquireAccess(AbstractListener listener)
Tries to acquire a SecurityAccess for the credentials (username, password)
stored in the associated HttpSesssion of the given
AbstractListener . |
static SecurityTransaction |
acquireTransaction(AbstractListener listener)
Tries to acquire a SecurityTransaction for the credentials (username,
password) stored in the associated HttpSesssion . |
static Role |
checkForAdminOrSubadminRole(SecurityAccess access)
Returns the associated 'Administrator'- or 'SUBADMIN:'-role of the token holder. |
static void |
checkForAdminRole(SecurityAccess access)
Tests if the given token is associated with the 'Administrator'-role. |
static void |
checkSubadminRoleValidity(SecurityAccess access)
Tests if the 'SUBADMIN:' and 'Administrator'-roles are all disjoint (so that there are no users that have more than 1 role). |
static Role |
findAdminForRole(SecurityAccess access,
Role role)
Returns the administrator (the 'Administrator'- or a 'SUBADMIN:'-role) for the given role. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String KEY_USERNAME
public static final java.lang.String KEY_PASSWORD
public static final java.lang.String TYPE_LAYER
public static final java.lang.String TYPE_FEATURETYPE
public static final java.lang.String TYPE_METADATASCHEMA
Constructor Detail |
---|
public ClientHelper()
Method Detail |
---|
public static SecurityAccess acquireAccess(AbstractListener listener) throws GeneralSecurityException
SecurityAccess
for the credentials (username, password)
stored in the associated HttpSesssion
of the given
AbstractListener
.
listener
-
GeneralSecurityException
public static SecurityTransaction acquireTransaction(AbstractListener listener) throws GeneralSecurityException
SecurityTransaction
for the credentials (username,
password) stored in the associated HttpSesssion
.
listener
-
GeneralSecurityException
public static Role findAdminForRole(SecurityAccess access, Role role) throws GeneralSecurityException
access
- role
-
GeneralSecurityException
public static Role checkForAdminOrSubadminRole(SecurityAccess access) throws GeneralSecurityException
access
-
GeneralSecurityException
public static void checkForAdminRole(SecurityAccess access) throws GeneralSecurityException
access
-
GeneralSecurityException,
- this is an UnauthorizedException if the user does not have the
'Administrator'-role
GeneralSecurityException
public static void checkSubadminRoleValidity(SecurityAccess access) throws GeneralSecurityException
access
-
GeneralSecurityException
- if there is a user with more than one role
|
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