com.cafesoft.cams.access
Interface PermissionFactory


public interface PermissionFactory

PermissionFactory defines the interface for a class that can create Permission instances based on:

The resources matching a Permission are either protected by an AccessControlRule or by another SecurityDomain to which access control is delegated. Thus, a PermissionFactory provides factory methods to create either flavor of Permission.

Since:
2/1/2002

Method Summary
 Permission createPermission(ResourceType type, String pattern, String[] actions, AccessControlRule acr)
          Create a Permission with an associated AccessControlRule.
 Permission createPermission(ResourceType type, String pattern, String[] actions, String securityDomainName)
          Create a Permission with an associated SecurityDomain delegate.
 void initialize(Properties prop)
          Initialize the PermissionFactory.
 

Method Detail

initialize

public void initialize(Properties prop)
                throws ConfigException
Initialize the PermissionFactory.

Parameters:
prop - configuration properties.
Throws:
ConfigException - if required configuration properties are missing or invalid.

createPermission

public Permission createPermission(ResourceType type,
                                   String pattern,
                                   String[] actions,
                                   AccessControlRule acr)
                            throws InvalidPermissionException
Create a Permission with an associated AccessControlRule.

Parameters:
type - the ResourceType corresponding to the type of Permission.
pattern - the permission resource pattern.
actions - an array of permission actions.
acr - the AccessControlRule that protects the resources matching the created Permission.
Returns:
a Permission corresponding to the specified type, resource pattern, actions, and AccessControlRule.
Throws:
InvalidPermissionException - if the type of Permission associated with the Permission is not known.

createPermission

public Permission createPermission(ResourceType type,
                                   String pattern,
                                   String[] actions,
                                   String securityDomainName)
                            throws InvalidPermissionException
Create a Permission with an associated SecurityDomain delegate.

Parameters:
type - the ResourceType corresponding to the type of Permission.
pattern - the permission resource pattern.
actions - an array of permission actions.
securityDomainName - the name of the SecurityDomain to which access control checks are to be delegated.
Returns:
a Permission corresponding to the specified type, resource pattern, actions, and delegated SecurityDomain.
Throws:
InvalidPermissionException - if the type of Permission associated with the Permission is not known.


Generated on 10:40:31 AM September 10, 2003, © 1996-2003 Cafésoft LLC. All rights reserved.