com.metamatrix.platform.security.api
Class AuthorizationObjectEditor
java.lang.Object
com.metamatrix.common.actions.AbstractObjectEditor
com.metamatrix.platform.security.api.AbstractAuthorizationObjectEditor
com.metamatrix.platform.security.api.AuthorizationObjectEditor
- All Implemented Interfaces:
- ObjectEditor, AuthorizationEditor, java.io.Serializable
public class AuthorizationObjectEditor
- extends AbstractAuthorizationObjectEditor
- implements AuthorizationEditor
Editor allows automatic creation of individual com.metamatrix.common.actions.Actions
in an enforcable way when making modifications to Authorizations.
The actions can be submited to the Authorization Service to execute them in a transaction.
- See Also:
- Serialized Form
Methods inherited from class com.metamatrix.platform.security.api.AbstractAuthorizationObjectEditor |
addAllPermissions, addAllPrincipals, addPermission, addPrincipal, clonePermission, clonePolicyPrincipals, clonePolicyPrincipals, createAuthorizationPolicy, remove, removeAllPermissions, removeAllPrincipals, removePermission, removePermissions, removePermissions, removePrincipal, removePrincipals, setDescription, setDescription |
Methods inherited from class com.metamatrix.common.actions.AbstractObjectEditor |
createAddAction, createAddNamedAction, createCreationAction, createDestroyAction, createExchangeAction, createExchangeBoolean, createExchangeDouble, createExchangeFloat, createExchangeInt, createExchangeLong, createExchangeNamedAction, createExchangeShort, createRemoveAction, createRemoveNamedAction, doCreateActions, getDestination, getLabel, setCreateActions, setDestination, verifyCommand, verifyTargetClass |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
serialVersionUID
public static final long serialVersionUID
- See Also:
- Constant Field Values
AuthorizationObjectEditor
public AuthorizationObjectEditor(boolean createActions)
- Create an instance of this editor, and specify whether actions are to be created
during modifications. If actions are created, then each action is sent directly
to the destination at the time the action is created.
- Parameters:
createActions
- flag specifying whether modification actions should be created
for each invocation to modifyObject
AuthorizationObjectEditor
public AuthorizationObjectEditor()
- Default ctor creates actions.
clonePolicyPermissions
public AuthorizationPolicy clonePolicyPermissions(AuthorizationPolicy sourcePolicy,
AuthorizationPolicy targetPolicy,
AuthorizationRealm targetRealm,
java.util.Set allPaths,
EntitlementMigrationReport rpt)
- Copy the
AuthorizationPermission
s from a source AuthorizationPolicy
to a target AuthorizationPolicy
given an AuthorizationRealm
.
- Specified by:
clonePolicyPermissions
in interface AuthorizationEditor
- Parameters:
sourcePolicy
- The source policy for cloning.targetPolicy
- The source policy for cloning.targetRealm
- The destination realm in which to place the permissions (may not be null).allPaths
- Skip clone of any permission whose resource is not in this set. This set is
comprised of all allowable resources in the target realm.
- Returns:
- The cloned policy.
- Throws:
java.lang.IllegalArgumentException
- if either the target AuthorizationPolicy
the source AuthorizationPolicy
or the AuthorizationRealm
is null.
modifyPermissions
public java.util.Collection modifyPermissions(PermissionTreeView treeView,
AuthorizationPolicy policy)
- Modifies permissions belonging to the given
AuthorizationPolicy
. All are found in
the given tree view of PermissionDataNode
s.
Note that if showHidden
is set to false
in treeView
,
permissions WILL NOT be modified in those descendants.
- Specified by:
modifyPermissions
in interface AuthorizationEditor
- Specified by:
modifyPermissions
in class AbstractAuthorizationObjectEditor
- Parameters:
treeView
- The permission tree view containg the modified nodes.policy
- The AuthorizationPolicy
, possibly new, on which to apply the new permissions.
- Returns:
- The set of
PermissionDataNode
s that were modified.
Copyright © 2009. All Rights Reserved.