|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.confluence.security.AbstractSpacePermissionManager
com.atlassian.confluence.security.DefaultSpacePermissionManager
com.atlassian.confluence.security.CachingSpacePermissionManager
public class CachingSpacePermissionManager
Implementation of SpacePermissionManager that implements caching before a SpacePermission is requested, saved or removed from the SpacePermissionDao. This is designed to increase performance and reduce the amount of hits on the database.
| Field Summary | |
|---|---|
static java.lang.String |
CACHE_KEY
|
| Fields inherited from class com.atlassian.confluence.security.AbstractSpacePermissionManager |
|---|
spacePermissionDao |
| Constructor Summary | |
|---|---|
CachingSpacePermissionManager()
|
|
| Method Summary | |
|---|---|
protected boolean |
canUseConfluence(com.atlassian.user.User remoteUser,
java.lang.String permissionCheck)
|
void |
flushCaches()
|
boolean |
hasPermission(java.lang.String permissionType,
Space space,
com.atlassian.user.User remoteUser)
Determines if remoteUser has the given permission in space |
boolean |
isLookAheadEnabled()
|
boolean |
permissionExists(SpacePermission permission)
Looks up permission in the cache instance. |
void |
removeAllPermissions(Space space)
Removes all permissions belonging to space |
protected void |
removePermissionFromDao(SpacePermission realPermission)
Removes realPermission from the DAO. |
protected void |
savePermissionToDao(SpacePermission permission)
Saves permission to the DAO. |
void |
setCacheFactory(com.atlassian.cache.CacheFactory cacheFactory)
|
void |
setLookAheadEnabled(boolean lookAheadEnabled)
|
| Methods inherited from class com.atlassian.confluence.security.AbstractSpacePermissionManager |
|---|
fixPermissions, getUserAccessor, hasPermissionForSpace, setSpacePermissionDao, setUserAccessor |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String CACHE_KEY
| Constructor Detail |
|---|
public CachingSpacePermissionManager()
| Method Detail |
|---|
public boolean permissionExists(SpacePermission permission)
permissionExists in interface SpacePermissionManagerpermissionExists in class DefaultSpacePermissionManagerpermission - the SpacePermission to look up
protected void savePermissionToDao(SpacePermission permission)
savePermissionToDao in class DefaultSpacePermissionManagerpermission - the SpacePermission to saveprotected void removePermissionFromDao(SpacePermission realPermission)
removePermissionFromDao in class DefaultSpacePermissionManagerrealPermission - the SpacePermission to removepublic void removeAllPermissions(Space space)
SpacePermissionManager
removeAllPermissions in interface SpacePermissionManagerremoveAllPermissions in class DefaultSpacePermissionManagerspace - The space to remove the permissions forpublic void setCacheFactory(com.atlassian.cache.CacheFactory cacheFactory)
public void flushCaches()
flushCaches in interface SpacePermissionManagerflushCaches in class DefaultSpacePermissionManagerpublic boolean isLookAheadEnabled()
public void setLookAheadEnabled(boolean lookAheadEnabled)
public boolean hasPermission(java.lang.String permissionType,
Space space,
com.atlassian.user.User remoteUser)
SpacePermissionManager
hasPermission in interface SpacePermissionManagerhasPermission in class DefaultSpacePermissionManagerpermissionType - The permission type to look upspace - The space the permission applies to (can be null for global permissions)remoteUser - The user to look up (can be null for the anonymous user)
protected boolean canUseConfluence(com.atlassian.user.User remoteUser,
java.lang.String permissionCheck)
canUseConfluence in class DefaultSpacePermissionManager
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||