Skip navigation links

Oracle® Fusion Middleware Remote Intradoc Client (RIDC) Java API Reference
11g Release 1 (11.1.1)

E17274-02


oracle.stellent.ridc.convenience.usersecurity.impl
Class UserSecurityGroupsCache

java.lang.Object
  extended by oracle.stellent.ridc.convenience.usersecurity.impl.UserSecurityGroupsCache

All Implemented Interfaces:
IUserSecurityCache
Direct Known Subclasses:
UserSGAccountsCache

public class UserSecurityGroupsCache
extends java.lang.Object
implements IUserSecurityCache

Implementation of Content Security will check Security Groups


Nested Class Summary

 

Nested classes/interfaces inherited from interface oracle.stellent.ridc.convenience.usersecurity.IUserSecurityCache
IUserSecurityCache.AdminType

 

Field Summary
protected  java.util.List<IAccessResolver> m_accessResolvers
           
protected  IdcClient m_idcClient
           
protected  ILog m_log
           
protected  IAccessResolver m_securityGroupsResolver
           
protected  long m_timeToLive
           
protected  java.util.Map<java.lang.String,CachedDataBinder> m_userCache
           

 

Constructor Summary
UserSecurityGroupsCache(IdcClient idcClient, int cacheMaxSize, long timeToLive)
          Create a security implementation that checks Security Groups
UserSecurityGroupsCache(IdcClient idcClient, int cacheMaxSize, long timeToLive, IServiceCallUtils serviceCallUtils)
          Create a security implementation that checks Security Groups overriding the default ServiceCallUtils

 

Method Summary
 void addAccessResolver(IAccessResolver accessResolver)
          Adds an access handler to the chain
 void clearCache()
          Clear the cache completely
 int getAccessLevelForDocument(CacheId id, DataObject docInfo)
          Deprecated. this method swallows IdcClientExceptions
 int getAccessLevelForDocument(CacheId id, DataObject docInfo, ITrace trace)
          Get the user's access level for a document.
 CacheId getCacheIdForUser(IdcContext userContext)
          Deprecated. this method swallows IdcClientExceptions
 CacheId getCacheIdForUser(IdcContext userContext, ITrace trace)
          Get the CacheId.
 IdcClient getIdcClient()
          Get the IdcClient used for this cache
 int getInUseCount()
          Get number of active entries in cache
 DataBinder getPermissions(CacheId id, ITrace trace)
          Get the permissions for a user
 IServiceCallUtils getServiceCallUtils()
           
 void initializeCache(int maxSize, long timeToLive)
          Initialize the cache with maximum size and length to live
 boolean isAdmin(CacheId id, DataObject docInfo, IUserSecurityCache.AdminType adminType)
          Deprecated. this method swallows IdcClientExceptions
 boolean isAdmin(CacheId id, DataObject docInfo, IUserSecurityCache.AdminType adminType, ITrace trace)
          Returns the Admin flag for the specific admin type.
protected  void putPermissions(CacheId id, CachedDataBinder permissions)
          Remember user's permissions
 DataBinder removeCacheId(CacheId id)
          Drop the permissions for this user from the cache
protected  CachedDataBinder removePermissions(CacheId id)
          Remove user's permissions
 void removeStaleEntries()
          Remove entries from cache that are too old
 void setIdcClient(IdcClient idcClient)
          For this Cache, set the communication information
 void setServiceCallUtils(IServiceCallUtils serviceCallUtils)
           

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

m_log

protected ILog m_log

m_securityGroupsResolver

protected IAccessResolver m_securityGroupsResolver

m_accessResolvers

protected java.util.List<IAccessResolver> m_accessResolvers

m_userCache

protected java.util.Map<java.lang.String,CachedDataBinder> m_userCache

m_idcClient

protected IdcClient m_idcClient

m_timeToLive

protected long m_timeToLive

Constructor Detail

UserSecurityGroupsCache

public UserSecurityGroupsCache(IdcClient idcClient,
                               int cacheMaxSize,
                               long timeToLive)
Create a security implementation that checks Security Groups
Parameters:
idcClient - RIDC connection information
cacheMaxSize - Number of entries (userids) to keep in LRU cache
timeToLive - Number of milliseconds before an entry is too old

UserSecurityGroupsCache

public UserSecurityGroupsCache(IdcClient idcClient,
                               int cacheMaxSize,
                               long timeToLive,
                               IServiceCallUtils serviceCallUtils)
Create a security implementation that checks Security Groups overriding the default ServiceCallUtils
Parameters:
idcClient - RIDC connection information
cacheMaxSize - Number of entries (userids) to keep in LRU cache
timeToLive - Number of milliseconds before an entry is too old
serviceCallUtils - util class perhaps a mock object for testing

Method Detail

initializeCache

public void initializeCache(int maxSize,
                            long timeToLive)
Initialize the cache with maximum size and length to live
Specified by:
initializeCache in interface IUserSecurityCache
Parameters:
maxSize - Assuming an LRU cache, the maximum number of entries
timeToLive - positive number of milliseconds for each entry to be valid

getServiceCallUtils

public IServiceCallUtils getServiceCallUtils()

setServiceCallUtils

public void setServiceCallUtils(IServiceCallUtils serviceCallUtils)

addAccessResolver

public void addAccessResolver(IAccessResolver accessResolver)
Adds an access handler to the chain
Specified by:
addAccessResolver in interface IUserSecurityCache
Parameters:
accessResolver -

clearCache

public void clearCache()
Clear the cache completely
Specified by:
clearCache in interface IUserSecurityCache

getCacheIdForUser

public CacheId getCacheIdForUser(IdcContext userContext)
Deprecated. this method swallows IdcClientExceptions
Get the CacheId. A call is made to the content server using the IdcContext.
Specified by:
getCacheIdForUser in interface IUserSecurityCache
Parameters:
userContext - the IdcContent
Returns:
a cacheId to be used in future fetches

getCacheIdForUser

public CacheId getCacheIdForUser(IdcContext userContext,
                                 ITrace trace)
                          throws IdcClientException
Get the CacheId. A call is made to the content server using the IdcContext.
Specified by:
getCacheIdForUser in interface IUserSecurityCache
Parameters:
userContext - the IdcContent
trace -
Returns:
a cacheId to be used in future fetches
Throws:
IdcClientException

removeCacheId

public DataBinder removeCacheId(CacheId id)
Drop the permissions for this user from the cache
Specified by:
removeCacheId in interface IUserSecurityCache
Parameters:
id - CacheID
Returns:
DataBinder permissions removed from cache or null

getAccessLevelForDocument

public int getAccessLevelForDocument(CacheId id,
                                     DataObject docInfo)
Deprecated. this method swallows IdcClientExceptions
Get the user's access level for a document. Note that Admin rights are undefined on the document and thus never returned. You can only read, write or delete the document.
Specified by:
getAccessLevelForDocument in interface IUserSecurityCache
Parameters:
id - CacheId
docInfo - document info either from LocalData or from DOC_INFO resultset
Returns:
access level in Content Server form (1=Read, 3=Write, 7=Delete)

getAccessLevelForDocument

public int getAccessLevelForDocument(CacheId id,
                                     DataObject docInfo,
                                     ITrace trace)
                              throws IdcClientException
Get the user's access level for a document. Note that Admin rights are undefined on the document and thus never returned. You can only read, write or delete the document.
Specified by:
getAccessLevelForDocument in interface IUserSecurityCache
Parameters:
id - CacheId
docInfo - document info either from LocalData or from DOC_INFO resultset
Returns:
access level in Content Server form (1=Read, 3=Write, 7=Delete)
Throws:
IdcClientException

isAdmin

public boolean isAdmin(CacheId id,
                       DataObject docInfo,
                       IUserSecurityCache.AdminType adminType)
Deprecated. this method swallows IdcClientExceptions
Returns the Admin flag for the specific admin type. Note that Admin rights are undefined on the document. You can only read, write or delete the document. Any admin rights returned here might or might not be used by the content server when performing the actual service call.
Specified by:
isAdmin in interface IUserSecurityCache
Parameters:
id - CacheId
docInfo - document info either from LocalData or from DOC_INFO resultset
adminType -
Returns:
true or false

isAdmin

public boolean isAdmin(CacheId id,
                       DataObject docInfo,
                       IUserSecurityCache.AdminType adminType,
                       ITrace trace)
                throws IdcClientException
Returns the Admin flag for the specific admin type. Note that Admin rights are undefined on the document. You can only read, write or delete the document. Any admin rights returned here might or might not be used by the content server when performing the actual service call.
Specified by:
isAdmin in interface IUserSecurityCache
Parameters:
id - CacheId
docInfo - document info either from LocalData or from DOC_INFO resultset
adminType -
trace -
Returns:
true or false
Throws:
IdcClientException

setIdcClient

public void setIdcClient(IdcClient idcClient)
For this Cache, set the communication information
Parameters:
idcClient - Information for the connection to refresh cache

getIdcClient

public IdcClient getIdcClient()
Get the IdcClient used for this cache
Returns:
IdcClient

getInUseCount

public int getInUseCount()
Get number of active entries in cache
Returns:
number of entries used in cache

removeStaleEntries

public void removeStaleEntries()
Remove entries from cache that are too old

getPermissions

public DataBinder getPermissions(CacheId id,
                                 ITrace trace)
                          throws IdcClientException
Get the permissions for a user
Parameters:
id - CacheId
trace -
Returns:
DataBinder containing user information as the result of the Service GET_USER_PERMISSIONS (or null)
Throws:
IdcClientException

putPermissions

protected void putPermissions(CacheId id,
                              CachedDataBinder permissions)
Remember user's permissions
Parameters:
id - CacheId
permissions - Databinder from the GET_USER_PERMISSIONS call

removePermissions

protected CachedDataBinder removePermissions(CacheId id)
Remove user's permissions
Parameters:
id - CacheId
Returns:

Skip navigation links

Oracle® Fusion Middleware Remote Intradoc Client (RIDC) Java API Reference
11g Release 1 (11.1.1)

E17274-02


Copyright © 2008, 2011, Oracle and/or its affiliates. All rights reserved.