com.softwareag.centrasite.appl.framework.validation.acl
Class CentraSiteAclContext

java.lang.Object
  extended by com.softwareag.centrasite.appl.framework.validation.acl.CentraSiteAclContext
All Implemented Interfaces:
AclContext, RoleAclProvider.RoleAclContext, UserAclProvider.UserAclContext, java.io.Serializable

public class CentraSiteAclContext
extends java.lang.Object
implements AclContext, RoleAclProvider.RoleAclContext, UserAclProvider.UserAclContext

Default implementation of the CentraSiteAclContext, which is built by reading a JAXR connections authentication details.

See Also:
Serialized Form

Constructor Summary
CentraSiteAclContext(java.lang.String pUser, java.lang.String[] pRoles, boolean pCaseSensitive)
          Creates a new instance, which is reading data from the given Connection.
 
Method Summary
 boolean hasRole(java.lang.String pId)
          Returns, whether the context specifies, that the user has the given role.
 boolean isUser(java.lang.String pId)
          Returns, whether the user specified by the context has the given login ID.
static CentraSiteAclContext newInstance(javax.xml.registry.Connection pConnection, boolean pCaseSensitive)
          Creates a new instance, which is reading the given connections user settings.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CentraSiteAclContext

public CentraSiteAclContext(java.lang.String pUser,
                            java.lang.String[] pRoles,
                            boolean pCaseSensitive)
Creates a new instance, which is reading data from the given Connection.

Method Detail

newInstance

public static CentraSiteAclContext newInstance(javax.xml.registry.Connection pConnection,
                                               boolean pCaseSensitive)
                                        throws javax.xml.registry.JAXRException
Creates a new instance, which is reading the given connections user settings.

Throws:
javax.xml.registry.JAXRException

hasRole

public boolean hasRole(java.lang.String pId)
                throws com.softwareag.centrasite.appl.framework.CSAppFrameworkException
Description copied from interface: RoleAclProvider.RoleAclContext
Returns, whether the context specifies, that the user has the given role.

Specified by:
hasRole in interface RoleAclProvider.RoleAclContext
Throws:
com.softwareag.centrasite.appl.framework.CSAppFrameworkException

isUser

public boolean isUser(java.lang.String pId)
               throws com.softwareag.centrasite.appl.framework.CSAppFrameworkException
Description copied from interface: UserAclProvider.UserAclContext
Returns, whether the user specified by the context has the given login ID.

Specified by:
isUser in interface UserAclProvider.UserAclContext
Throws:
com.softwareag.centrasite.appl.framework.CSAppFrameworkException