atg.security
Class GenericSecuredResourceService

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.security.GenericSecuredResourceService
All Implemented Interfaces:
NameContextBindingListener, NameContextElement, NameResolver, AdminableService, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, SecuredResource, java.io.Serializable, java.util.EventListener
Direct Known Subclasses:
SecuredPathAccessController

public class GenericSecuredResourceService
extends GenericService
implements SecuredResource, java.io.Serializable

A generic implementation of the SecuredResource interface as a service.

See Also:
Serialized Form

Field Summary
static java.lang.String CLASS_VERSION
           
 
Fields inherited from class atg.nucleus.GenericService
SERVICE_INFO_KEY
 
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging
DEFAULT_LOG_TRACE_STATUS
 
Fields inherited from interface atg.nucleus.logging.ApplicationLogging
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
 
Constructor Summary
GenericSecuredResourceService()
           
GenericSecuredResourceService(java.lang.String pName)
           
GenericSecuredResourceService(java.lang.String pName, SecuredResource[] pChildren)
           
 
Method Summary
 void addAccessControlEntry(AccessControlEntry pNewAce)
          Adds a new access control entry to this resource.
 void addChild(SecuredResource pNewChild)
           
 AccessControlEntry[] getAccessControlList()
          Returns the access control list associated with this resource.
 SecuredResource getChild(java.lang.String pName)
          Returns the child resource with the given name.
 java.util.Enumeration getChildren()
          Returns an enumeration of the resource's children, or null if there are no children.
 java.lang.String getName()
          Returns the name of the resource.
 boolean hasAccess(User pUser, AccessRight pDesiredAccess)
          Returns true if the indicated user has the desired access to this resource.
 void removeAccessControlEntry(AccessControlEntry pOldAce)
          Removes an access control entry from this resource.
 void removeChild(SecuredResource pOldChild)
           
 void removeChild(java.lang.String pChildName)
           
 void setAccessControlList(AccessControlEntry[] pNewAcl)
          Changes access control list associated with this resource.
 void setName(java.lang.String pNewName)
           
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getLoggingForVlogging, getLogListenerCount, getLogListeners, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Constructor Detail

GenericSecuredResourceService

public GenericSecuredResourceService()

GenericSecuredResourceService

public GenericSecuredResourceService(java.lang.String pName)

GenericSecuredResourceService

public GenericSecuredResourceService(java.lang.String pName,
                                     SecuredResource[] pChildren)
Method Detail

addChild

public void addChild(SecuredResource pNewChild)

removeChild

public void removeChild(SecuredResource pOldChild)

removeChild

public void removeChild(java.lang.String pChildName)

setName

public void setName(java.lang.String pNewName)

getName

public java.lang.String getName()
Returns the name of the resource.

Specified by:
getName in interface NameContextElement
Specified by:
getName in interface SecuredResource
Overrides:
getName in class GenericService

getChild

public SecuredResource getChild(java.lang.String pName)
                         throws PermissionDeniedException
Returns the child resource with the given name.

Throws:
PermissionDeniedException

getChildren

public java.util.Enumeration getChildren()
                                  throws PermissionDeniedException
Returns an enumeration of the resource's children, or null if there are no children.

Throws:
PermissionDeniedException

getAccessControlList

public AccessControlEntry[] getAccessControlList()
Returns the access control list associated with this resource.

Specified by:
getAccessControlList in interface SecuredResource

setAccessControlList

public void setAccessControlList(AccessControlEntry[] pNewAcl)
                          throws PermissionDeniedException
Changes access control list associated with this resource.

Specified by:
setAccessControlList in interface SecuredResource
Throws:
PermissionDeniedException

addAccessControlEntry

public void addAccessControlEntry(AccessControlEntry pNewAce)
                           throws PermissionDeniedException
Adds a new access control entry to this resource.

Specified by:
addAccessControlEntry in interface SecuredResource
Throws:
PermissionDeniedException

removeAccessControlEntry

public void removeAccessControlEntry(AccessControlEntry pOldAce)
                              throws PermissionDeniedException
Removes an access control entry from this resource.

Specified by:
removeAccessControlEntry in interface SecuredResource
Throws:
PermissionDeniedException

hasAccess

public boolean hasAccess(User pUser,
                         AccessRight pDesiredAccess)
Returns true if the indicated user has the desired access to this resource.

Specified by:
hasAccess in interface SecuredResource