Class PermissionCacheFactory
- java.lang.Object
-
- com.sun.enterprise.security.jacc.cache.PermissionCacheFactory
-
public class PermissionCacheFactory extends Object
This class is the factory for creating and managing PermissionCache.- Author:
- Shing Wai Chan
-
-
Constructor Summary
Constructors Constructor Description PermissionCacheFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static PermissionCache
createPermissionCache(String pcID, CodeSource codesource, Class clazz, String name)
Create a PermissionCache object.static PermissionCache
createPermissionCache(String pcID, CodeSource codesource, Permission[] perms, String name)
Create a PermissionCache object.static PermissionCache
removePermissionCache(PermissionCache cache)
static void
resetCaches()
This resets all caches inside the factory.
-
-
-
Method Detail
-
createPermissionCache
public static PermissionCache createPermissionCache(String pcID, CodeSource codesource, Permission[] perms, String name)
Create a PermissionCache object. If the corresponding object exists, then it will overwrite the previous one.- Parameters:
pcID
- - a string identifying the policy context and which must be set when getPermissions is called (internally). This value may be null, in which case the permisions of the default policy context will be cached.codesource
- - the codesource argument to be used in the call to getPermissions. This value may be null.perms
- - an array of Permission objects identifying the permission types that will be managed by the cache. This value may be null, in which case all permissions obtained by the getPermissions call will be cached.name
- - a string corresponding to a value returned by Permission.getName() only permissions whose getName() value matches the name parameter will be included in the cache. This value may be null, in which case permission name dos not factor into the permission caching.
-
createPermissionCache
public static PermissionCache createPermissionCache(String pcID, CodeSource codesource, Class clazz, String name)
Create a PermissionCache object. If the corresponding object exists, then it will overwrite the previous one.- Parameters:
pcID
- - a string identifying the policy context and which must be set when getPermissions is called (internally). This value may be null, in which case the permisions of the default policy context will be cached.codesource
- - the codesource argument to be used in the call to getPermissions. This value may be null.clazz
- - a class object identifying the permission type that will be managed by the cache. This value may be null, in which case all permissions obtained by the getPermissions call will be cached.name
- - a string corresponding to a value returned by Permission.getName() only permissions whose getName() value matches the name parameter will be included in the cache. This value may be null, in which case permission name dos not factor into the permission caching.
-
removePermissionCache
public static PermissionCache removePermissionCache(PermissionCache cache)
-
resetCaches
public static void resetCaches()
This resets all caches inside the factory.
-
-