com.metamatrix.platform.security.api
Class AuthorizationObjectEditor

java.lang.Object
  extended by com.metamatrix.common.actions.AbstractObjectEditor
      extended by com.metamatrix.platform.security.api.AbstractAuthorizationObjectEditor
          extended by 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

Field Summary
static long serialVersionUID
           
 
Fields inherited from class com.metamatrix.common.actions.AbstractObjectEditor
ADD_LBL, FIRST_COMMAND, LAST_COMMAND, REMOVE_LBL, SET_LBL
 
Fields inherited from interface com.metamatrix.common.actions.ObjectEditor
ADD, REMOVE, SET
 
Constructor Summary
AuthorizationObjectEditor()
          Default ctor creates actions.
AuthorizationObjectEditor(boolean createActions)
          Create an instance of this editor, and specify whether actions are to be created during modifications.
 
Method Summary
 AuthorizationPolicy clonePolicyPermissions(AuthorizationPolicy sourcePolicy, AuthorizationPolicy targetPolicy, AuthorizationRealm targetRealm, java.util.Set allPaths, EntitlementMigrationReport rpt)
          Copy the AuthorizationPermissions from a source AuthorizationPolicy to a target AuthorizationPolicy given an AuthorizationRealm.
 java.util.Collection modifyPermissions(PermissionTreeView treeView, AuthorizationPolicy policy)
          Modifies permissions belonging to the given AuthorizationPolicy.
 
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
 
Methods inherited from interface com.metamatrix.platform.admin.api.AuthorizationEditor
addAllPrincipals, clonePolicyPrincipals, createAuthorizationPolicy, getDestination, remove, removePrincipals, setDescription
 

Field Detail

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

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.

Method Detail

clonePolicyPermissions

public AuthorizationPolicy clonePolicyPermissions(AuthorizationPolicy sourcePolicy,
                                                  AuthorizationPolicy targetPolicy,
                                                  AuthorizationRealm targetRealm,
                                                  java.util.Set allPaths,
                                                  EntitlementMigrationReport rpt)
Copy the AuthorizationPermissions 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 PermissionDataNodes.

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 PermissionDataNodes that were modified.


Copyright © 2009. All Rights Reserved.