atg.svc.repository.service
Class AccessRightCache

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.svc.repository.service.AccessRightCache
All Implemented Interfaces:
atg.naming.AbsoluteNameable, atg.naming.NameContextBindingListener, atg.naming.NameContextElement, atg.naming.NameContextParentable, atg.naming.NameResolver, atg.nucleus.AdminableService, atg.nucleus.Configured, atg.nucleus.logging.ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, atg.nucleus.logging.VariableArgumentApplicationLogging, atg.nucleus.naming.ComponentNameResolver, atg.nucleus.Service, atg.nucleus.ServiceListener, java.util.EventListener

public class AccessRightCache
extends atg.nucleus.GenericService

This component optimizes lookup of access rights for the current user. This component should be session scoped. It cannot be global scope because it caches information per user that is only valid for the duration of the session.


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
AccessRightCache()
           
 
Method Summary
 java.util.Set<atg.security.AccessRight> getCachedAccessRights()
          Returns a cached set of access rights for the current user.
 boolean isSuperAdmin()
          Caches whether the current user is a super admin.
 java.lang.Boolean isSuperAdminInitialized()
          Indicates if the super admin boolean is populated yet.
 void setSuperAdmin(boolean pIsSuperAdmin)
          Caches whether the user current user is a super admin.
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, 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, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, 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 final java.lang.String CLASS_VERSION
See Also:
Constant Field Values
Constructor Detail

AccessRightCache

public AccessRightCache()
Method Detail

getCachedAccessRights

public java.util.Set<atg.security.AccessRight> getCachedAccessRights()
Returns a cached set of access rights for the current user. You can append to the cached set by retrieving the cached set and adding rights to the set.

Returns:

isSuperAdmin

public boolean isSuperAdmin()
Caches whether the current user is a super admin. Should be populated the first time the test is performed. Check isSuperAdminInitialized to determine if this flag has been populated.

Returns:
Returns true if is super admin, false if not super admin or not initialized yet.

setSuperAdmin

public void setSuperAdmin(boolean pIsSuperAdmin)
Caches whether the user current user is a super admin.


isSuperAdminInitialized

public java.lang.Boolean isSuperAdminInitialized()
Indicates if the super admin boolean is populated yet. Set to true the first time setSuperAdmin is invoked