deegree 2.5 (2011/06/29 09:44 build-8-official)

org.deegree.security.drm
Class SecurityHelper

java.lang.Object
  extended by org.deegree.security.drm.SecurityHelper

public class SecurityHelper
extends java.lang.Object

Helper class that performs access checks.

Version:
$Revision: 28661 $, $Date: 2010-12-09 09:12:29 +0100 (Do, 09 Dez 2010) $
Author:
Markus Schneider, last edited by: $Author: apoth $

Constructor Summary
SecurityHelper()
           
 
Method Summary
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
 

Constructor Detail

SecurityHelper

public SecurityHelper()
Method Detail

findAdminForRole

public static Role findAdminForRole(SecurityAccess access,
                                    Role role)
                             throws GeneralSecurityException
Returns the administrator (the 'Administrator'- or a 'SUBADMIN:'-role) for the given role.

Parameters:
access -
role -
Returns:
the administrator (the 'Administrator'- or a 'SUBADMIN:'-role) for the given role.
Throws:
GeneralSecurityException

checkForAdminOrSubadminRole

public static Role checkForAdminOrSubadminRole(SecurityAccess access)
                                        throws ManagementException,
                                               GeneralSecurityException
Returns the associated 'Administrator'- or 'SUBADMIN:'-role of the token holder.

Parameters:
access -
Returns:
the associated 'Administrator'- or 'SUBADMIN:'-role of the token holder.

Throws:
ManagementException
GeneralSecurityException

checkForAdminRole

public static void checkForAdminRole(SecurityAccess access)
                              throws GeneralSecurityException
Tests if the given token is associated with the 'Administrator'-role.

Parameters:
access -
Throws:
GeneralSecurityException - this is an UnauthorizedException if the user does not have the 'Administrator'-role

checkSubadminRoleValidity

public static void checkSubadminRoleValidity(SecurityAccess access)
                                      throws ManagementException,
                                             GeneralSecurityException
Tests if the 'SUBADMIN:' and 'Administrator'-roles are all disjoint (so that there are no users that have more than 1 role).

Parameters:
access -
Throws:
ManagementException - if there is a user with more than one role
GeneralSecurityException

deegree 2.5 (2011/06/29 09:44 build-8-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org