com.atlassian.confluence.security.administrators
Class DefaultPermissionsAdministrator

java.lang.Object
  extended by com.atlassian.confluence.security.administrators.DefaultPermissionsAdministrator
All Implemented Interfaces:
PermissionsAdministrator
Direct Known Subclasses:
AbstractEditPermissionsAdministrator

public class DefaultPermissionsAdministrator
extends java.lang.Object
implements PermissionsAdministrator

The view administrator used jointly by global and space permissions actions


Nested Class Summary
static class DefaultPermissionsAdministrator.AnonymousPermissionRow
           
static class DefaultPermissionsAdministrator.GroupPermissionRow
           
static class DefaultPermissionsAdministrator.UserPermissionRow
           
 
Field Summary
protected  java.util.List<SpacePermission> permissions
           
protected  SpacePermissionManager spacePermissionManager
           
 
Constructor Summary
protected DefaultPermissionsAdministrator(SpacePermissionManager spacePermissionManager, PermissionResolver permissionResolver)
           
 
Method Summary
 PermissionRow buildAnonymousPermissionRow()
          Retrieves the AnonymousPermissionRow for printing in a UI.
 java.util.Collection<PermissionRow> buildGroupPermissionTable(UserAccessor userAccessor)
          Builds a map of permissions for each permitted group, for printing in the UI The key is the groupname and the values is a row of permissions.
 java.util.Collection<PermissionRow> buildUserPermissionTable(UserAccessor userAccessor)
          Builds a map of permissions for each permitted user, for printing in the UI The key is the username and the values is a row of permissions.
 java.util.List<SpacePermission> getPermissions()
          Returns the current permissions set for the entity
 void resetPermissions()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

spacePermissionManager

protected final SpacePermissionManager spacePermissionManager

permissions

protected java.util.List<SpacePermission> permissions
Constructor Detail

DefaultPermissionsAdministrator

protected DefaultPermissionsAdministrator(SpacePermissionManager spacePermissionManager,
                                          PermissionResolver permissionResolver)
Method Detail

buildUserPermissionTable

public java.util.Collection<PermissionRow> buildUserPermissionTable(UserAccessor userAccessor)
Builds a map of permissions for each permitted user, for printing in the UI The key is the username and the values is a row of permissions.

Specified by:
buildUserPermissionTable in interface PermissionsAdministrator
Parameters:
userAccessor - - used to find and verify the usernames.
Returns:
a map of permissions for each permitted user.

buildGroupPermissionTable

public java.util.Collection<PermissionRow> buildGroupPermissionTable(UserAccessor userAccessor)
Builds a map of permissions for each permitted group, for printing in the UI The key is the groupname and the values is a row of permissions.

Specified by:
buildGroupPermissionTable in interface PermissionsAdministrator
Parameters:
userAccessor - - used to find and verify the groupnames.
Returns:
a map of permissions for each permitted group.

buildAnonymousPermissionRow

public PermissionRow buildAnonymousPermissionRow()
Retrieves the AnonymousPermissionRow for printing in a UI.

Specified by:
buildAnonymousPermissionRow in interface PermissionsAdministrator
Returns:
the anonymous permissions.

getPermissions

public java.util.List<SpacePermission> getPermissions()
Description copied from interface: PermissionsAdministrator
Returns the current permissions set for the entity

Specified by:
getPermissions in interface PermissionsAdministrator
Returns:
the current permissions set for the entity

resetPermissions

public void resetPermissions()


Copyright © 2003-2014 Atlassian. All Rights Reserved.