|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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 | |
---|---|
protected |
CachingSpacePermissionManager(SpacePermissionDao spacePermissionDao,
PermissionCheckExemptions permissionCheckExemptions,
SpacePermissionDefaultsStoreFactory spacePermissionDefaultsStoreFactory,
com.atlassian.cache.CacheFactory cacheFactory)
|
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 Unless you're writing code that is part of the permission checking implementation, or you're changing space permissions, you should be using PermissionManager instead. |
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 |
setLookAheadEnabled(boolean lookAheadEnabled)
|
Methods inherited from class com.atlassian.confluence.security.AbstractSpacePermissionManager |
---|
getDefaultGlobalPermissions, getUserAccessor, hasPermissionForSpace |
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 |
---|
protected CachingSpacePermissionManager(SpacePermissionDao spacePermissionDao, PermissionCheckExemptions permissionCheckExemptions, SpacePermissionDefaultsStoreFactory spacePermissionDefaultsStoreFactory, com.atlassian.cache.CacheFactory cacheFactory)
Method Detail |
---|
public boolean permissionExists(SpacePermission permission)
permissionExists
in interface SpacePermissionManager
permissionExists
in class DefaultSpacePermissionManager
permission
- the SpacePermission to look up
protected void savePermissionToDao(SpacePermission permission)
savePermissionToDao
in class DefaultSpacePermissionManager
permission
- the SpacePermission to saveprotected void removePermissionFromDao(SpacePermission realPermission)
removePermissionFromDao
in class DefaultSpacePermissionManager
realPermission
- the SpacePermission to removepublic void removeAllPermissions(Space space)
SpacePermissionManager
removeAllPermissions
in interface SpacePermissionManager
removeAllPermissions
in class DefaultSpacePermissionManager
space
- The space to remove the permissions forpublic void flushCaches()
flushCaches
in interface SpacePermissionManager
flushCaches
in class DefaultSpacePermissionManager
public boolean isLookAheadEnabled()
public void setLookAheadEnabled(boolean lookAheadEnabled)
public boolean hasPermission(java.lang.String permissionType, Space space, com.atlassian.user.User remoteUser)
SpacePermissionManager
PermissionManager
instead.
hasPermission
in interface SpacePermissionManager
hasPermission
in class DefaultSpacePermissionManager
permissionType
- 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 |