com.atlassian.confluence.security.actions
Class EditPermissionsHelper
java.lang.Object
com.atlassian.confluence.security.actions.EditPermissionsHelper
- public class EditPermissionsHelper
- extends Object
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 String PARAMETER_PREFIX
- See Also:
- Constant Field Values
EditPermissionsHelper
public EditPermissionsHelper()
updatePermissions
public void updatePermissions(Map parameters)
buildGlobalPermissionsFromWebForm
public Collection buildGlobalPermissionsFromWebForm(Map formParameters)
- 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 parameters
- Returns:
- a list of the permissions in the form
buildSpacePermissionsFromWebForm
public Collection buildSpacePermissionsFromWebForm(Space space,
Map formParameters)
- 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 parameters
- Returns:
- a list of the permissions in the form
splitPermissions
public void splitPermissions(Collection existingPermissions,
Collection newPermissions,
Set permissionsToAdd,
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 permissionsnewPermissions
- 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