|
||||||||||
| 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
@Internal 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 String |
CACHE_KEY
|
| Fields inherited from class com.atlassian.confluence.security.AbstractSpacePermissionManager |
|---|
spacePermissionDao |
| Constructor Summary | |
|---|---|
CachingSpacePermissionManager(SpacePermissionDao spacePermissionDao,
PermissionCheckExemptions permissionCheckExemptions,
SpacePermissionDefaultsStoreFactory spacePermissionDefaultsStoreFactory,
com.atlassian.cache.CacheFactory cacheFactory)
|
|
| Method Summary | |
|---|---|
protected boolean |
canUseConfluence(com.atlassian.user.User remoteUser,
String permissionCheck)
|
void |
flushCaches()
|
protected Set<String> |
getGroupNamesWithPermission(Space targetSpace,
String permissionType)
|
boolean |
hasPermission(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 |
void |
removeAllPermissionsForGroup(String group)
|
void |
removePermission(SpacePermission spacePermission)
Removes the specified permission. |
protected void |
removePermissionFromDao(SpacePermission spacePermission)
Removes realPermission from the DAO. |
protected void |
savePermissionToDao(SpacePermission spacePermission)
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 String CACHE_KEY
| Constructor Detail |
|---|
public CachingSpacePermissionManager(SpacePermissionDao spacePermissionDao,
PermissionCheckExemptions permissionCheckExemptions,
SpacePermissionDefaultsStoreFactory spacePermissionDefaultsStoreFactory,
com.atlassian.cache.CacheFactory cacheFactory)
| Method Detail |
|---|
public boolean permissionExists(SpacePermission permission)
permissionExists in interface SpacePermissionManagerpermissionExists in class DefaultSpacePermissionManagerpermission - the SpacePermission to look up
protected void savePermissionToDao(SpacePermission spacePermission)
savePermissionToDao in class DefaultSpacePermissionManagerspacePermission - the SpacePermission to saveprotected void removePermissionFromDao(SpacePermission spacePermission)
removePermissionFromDao in class DefaultSpacePermissionManagerspacePermission - the SpacePermission to removepublic void removeAllPermissions(Space space)
SpacePermissionManager
removeAllPermissions in interface SpacePermissionManagerremoveAllPermissions in class DefaultSpacePermissionManagerspace - The space to remove the permissions forpublic void flushCaches()
flushCaches in interface SpacePermissionManagerflushCaches in class DefaultSpacePermissionManagerpublic boolean isLookAheadEnabled()
public void setLookAheadEnabled(boolean lookAheadEnabled)
public boolean hasPermission(String permissionType,
Space space,
com.atlassian.user.User remoteUser)
SpacePermissionManagerPermissionManager instead.
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,
String permissionCheck)
canUseConfluence in class DefaultSpacePermissionManager
protected Set<String> getGroupNamesWithPermission(Space targetSpace,
String permissionType)
getGroupNamesWithPermission in class DefaultSpacePermissionManagerpublic void removePermission(SpacePermission spacePermission)
DefaultSpacePermissionManager
removePermission in interface SpacePermissionManagerremovePermission in class DefaultSpacePermissionManagerpublic void removeAllPermissionsForGroup(String group)
removeAllPermissionsForGroup in interface SpacePermissionManagerremoveAllPermissionsForGroup in class DefaultSpacePermissionManager
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||