atg.security
Interface SecurityDomain

All Known Implementing Classes:
GenericSecurityDomain, PathSecurityDomain

public interface SecurityDomain

A security domain manages the authorization policy for some part of an application. The application asks the security domain if it's ok for a particular user to perform a particular act using a particular resource, and the security domain determines whether or not this is allowed.

Each security domain has a related user authority that determines which personae it is allowed to manage. Any personae that are not related to that user authority are simply ignored.

See Also:
UserAuthority, Persona

Field Summary
static java.lang.String CLASS_VERSION
           
 
Method Summary
 void addAccessAllowedListener(DataListener listener)
          Adds a listener for access allowed events.
 void addAccessDeniedListener(DataListener listener)
          Adds a listener for access denied events.
 SecuredResource createResource(java.lang.Object object, java.lang.Object resourceKey, AccessControlEntry[] initialAcl)
          Creates a new SecuredResource object, with the specified key, for the specified object using the specified resource key.
 SecuredResource createResourceAsUser(User pUser, java.lang.Object pObject, java.lang.Object pResourceKey, AccessControlEntry[] pInitialAcl)
          Creates a new SecuredResource object, with the specified key, for the specified object using the specified resource key, using the specified user ID.
 AccessRight[] getAccessRights()
          Returns a list of all possible access rights in this domain.
 SecuredResource getResource(java.lang.Object resourceKey)
          Returns the resource with the given key, or null if it's not a known resource.
 java.lang.String getSecurityDomainDescription()
          Returns the description of the security domain.
 java.lang.String getSecurityDomainName()
          Returns the name of the security domain.
 UserAuthority getUserAuthority()
          Returns the user authority for this domain.
 boolean hasAccess(AccessRight desiredAccess, java.lang.Object resourceKey)
          Returns true if the current user has the indicated access right for the indicated resource.
 boolean hasAccess(User user, AccessRight desiredAccess, java.lang.Object resourceKey)
          Checks the access permissions on a resource for the indicated user.
 boolean hasAccessRight(User pUser, AccessRight pAccessRight)
          Determines if the given user has the given access right
 boolean hasAccessRight(User pUser, AccessRight pAccessRight, DirectoryPrincipal pTargetPrincipal)
          Determines if the given user has the given access right within the given organization
 void removeAccessAllowedListener(DataListener listener)
          Removes a listener for access allowed events.
 void removeAccessDeniedListener(DataListener listener)
          Removes a listener for access denied events.
 

Field Detail

CLASS_VERSION

static final java.lang.String CLASS_VERSION
See Also:
Constant Field Values
Method Detail

getSecurityDomainName

java.lang.String getSecurityDomainName()
Returns the name of the security domain.


getSecurityDomainDescription

java.lang.String getSecurityDomainDescription()
Returns the description of the security domain.


getUserAuthority

UserAuthority getUserAuthority()
Returns the user authority for this domain.


getAccessRights

AccessRight[] getAccessRights()
Returns a list of all possible access rights in this domain.


createResource

SecuredResource createResource(java.lang.Object object,
                               java.lang.Object resourceKey,
                               AccessControlEntry[] initialAcl)
                               throws InvalidResourceException,
                                      InvalidAccessControlEntryException,
                                      PermissionDeniedException
Creates a new SecuredResource object, with the specified key, for the specified object using the specified resource key. An optional access control list may be specified.

Throws:
InvalidResourceException
InvalidAccessControlEntryException
PermissionDeniedException

createResourceAsUser

SecuredResource createResourceAsUser(User pUser,
                                     java.lang.Object pObject,
                                     java.lang.Object pResourceKey,
                                     AccessControlEntry[] pInitialAcl)
                                     throws InvalidResourceException,
                                            InvalidAccessControlEntryException,
                                            PermissionDeniedException
Creates a new SecuredResource object, with the specified key, for the specified object using the specified resource key, using the specified user ID. An optional access control list may be specified.

Throws:
InvalidResourceException
InvalidAccessControlEntryException
PermissionDeniedException

getResource

SecuredResource getResource(java.lang.Object resourceKey)
                            throws InvalidResourceException,
                                   PermissionDeniedException
Returns the resource with the given key, or null if it's not a known resource.

Throws:
InvalidResourceException
PermissionDeniedException

hasAccess

boolean hasAccess(User user,
                  AccessRight desiredAccess,
                  java.lang.Object resourceKey)
                  throws InvalidResourceException,
                         InvalidAccessRightException
Checks the access permissions on a resource for the indicated user.

Throws:
InvalidResourceException
InvalidAccessRightException

hasAccess

boolean hasAccess(AccessRight desiredAccess,
                  java.lang.Object resourceKey)
                  throws InvalidResourceException,
                         InvalidAccessRightException
Returns true if the current user has the indicated access right for the indicated resource.

Throws:
InvalidResourceException
InvalidAccessRightException
See Also:
ThreadSecurityManager

hasAccessRight

boolean hasAccessRight(User pUser,
                       AccessRight pAccessRight)
Determines if the given user has the given access right


hasAccessRight

boolean hasAccessRight(User pUser,
                       AccessRight pAccessRight,
                       DirectoryPrincipal pTargetPrincipal)
Determines if the given user has the given access right within the given organization


addAccessAllowedListener

void addAccessAllowedListener(DataListener listener)
Adds a listener for access allowed events.


removeAccessAllowedListener

void removeAccessAllowedListener(DataListener listener)
Removes a listener for access allowed events.


addAccessDeniedListener

void addAccessDeniedListener(DataListener listener)
Adds a listener for access denied events.


removeAccessDeniedListener

void removeAccessDeniedListener(DataListener listener)
Removes a listener for access denied events.