com.atlassian.confluence.security.actions
Class EditPermissionsHelper
java.lang.Object
com.atlassian.confluence.security.actions.EditPermissionsHelper
public class EditPermissionsHelper
- extends java.lang.Object
|
Method Summary |
java.util.Collection |
buildGlobalPermissionsFromWebForm(java.util.Map formParameters,
java.lang.String parameterQualifier)
Given a map containing the web form parameters from a permissions edit, return the list of global permissions
that are represented by the form |
java.util.Collection |
buildSpacePermissionsFromWebForm(Space space,
java.util.Map formParameters,
java.lang.String parameterQualifier)
Given a map containing the web form parameters from a permissions edit, return the list of global permissions
that are represented by the form |
void |
splitPermissions(java.util.Collection existingPermissions,
java.util.Collection initialPermissions,
java.util.Collection requestedPermissions,
java.util.Set permissionsToAdd,
java.util.Set permissionsToRemove)
Determine which permissions need to be added or removed. |
void |
updatePermissions(java.util.Map parameters)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
public static final org.apache.log4j.Category log
PARAMETER_PREFIX
public static final java.lang.String PARAMETER_PREFIX
- See Also:
- Constant Field Values
EditPermissionsHelper
public EditPermissionsHelper()
updatePermissions
public void updatePermissions(java.util.Map parameters)
buildGlobalPermissionsFromWebForm
public java.util.Collection buildGlobalPermissionsFromWebForm(java.util.Map formParameters,
java.lang.String parameterQualifier)
- Given a map containing the web form parameters from a permissions edit, return the list of global permissions
that are represented by the form
- Parameters:
formParameters - the map of form parametersparameterQualifier - distinguishes the set of parameters from other sets of parameters used to represent
permissions in the same form.
- Returns:
- a list of the permissions in the form
buildSpacePermissionsFromWebForm
public java.util.Collection buildSpacePermissionsFromWebForm(Space space,
java.util.Map formParameters,
java.lang.String parameterQualifier)
- Given a map containing the web form parameters from a permissions edit, return the list of global permissions
that are represented by the form
- Parameters:
space - the space the permissions are applied toformParameters - the map of form parametersparameterQualifier - distinguishes the set of parameters from other sets of parameters used to represent
permissions of the same space in the same form.
- Returns:
- a list of the permissions in the form
splitPermissions
public void splitPermissions(java.util.Collection existingPermissions,
java.util.Collection initialPermissions,
java.util.Collection requestedPermissions,
java.util.Set permissionsToAdd,
java.util.Set permissionsToRemove)
- Determine which permissions need to be added or removed. Given a collection of how permissions are now
(existingPermissions) and how you wish the permissions to be (newPermissions), this will populate the
collections
permissionsToAdd and permissionsToRemove with those permissions that
you will need to add or remove to reach the desired state.
- Parameters:
existingPermissions - the currently existing permissionsinitialPermissions - the permissions the user was initially shownrequestedPermissions - the new state we want these permissions to be inpermissionsToAdd - collection into which permissions that need adding will be placedpermissionsToRemove - collection into which permissions that need removing will be placed
Copyright © 2003-2008 Atlassian Pty Ltd. All Rights Reserved.