|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.metamatrix.platform.service.controller.AbstractService
com.metamatrix.platform.security.authorization.service.AuthorizationServiceImpl
public class AuthorizationServiceImpl
The Authorization Service is responsible for handling requests to determine whether a Principal is entitled to perform a given action on a given resource or set of resources.
Administration of the Authorization policies; creating/destroying Policies, adding/deleting Principals and Permissions is available to Principals that have the proper administrative role.
Field Summary | |
---|---|
protected AuthorizationCache |
authorizationCache
|
protected MembershipServiceInterface |
membershipServiceProxy
|
Fields inherited from interface com.metamatrix.platform.security.api.service.AuthorizationServiceInterface |
---|
NAME |
Fields inherited from interface com.metamatrix.platform.service.api.ServiceInterface |
---|
WAIT_TO_DIE_TIME |
Constructor Summary | |
---|---|
AuthorizationServiceImpl()
|
Method Summary | |
---|---|
boolean |
checkAccess(SessionToken sessionToken,
java.lang.String contextName,
AuthorizationPermission request)
Return whether the specified account has authorization to access the specified resource. |
boolean |
checkAccess(SessionToken sessionToken,
java.lang.String contextName,
AuthorizationPermission request,
boolean fetchDependants)
Return whether the specified account has authorization to access the specified resource and all its dependant resources. |
protected void |
closeService()
Close the service to new work if applicable. |
boolean |
containsPolicy(SessionToken caller,
AuthorizationPolicyID policyID)
Return whether there is an existing policy with the specified ID. |
java.util.Set |
executeTransaction(SessionToken administrator,
java.util.List actions)
Execute as a single transaction with the specified actions, and return the set of IDs for the objects that were affected/modified by the action. |
PermissionDataNode |
fillPermissionNodeTree(PermissionDataNode root,
AuthorizationPolicyID policyID)
Takes a tree of PermissionDataNodeImpl s that have their Resource s
filled in and fills in all permissions on resources that are found in the given
AuthorizationPolicyID .If any permissions are found that have no corresponding data node, a AuthorizationMgmtException
is thrown noting the missing resource name(s). |
java.util.Collection |
findAllPolicyIDs(SessionToken caller)
Locate the IDs of all of the policies that are accessible by the caller. |
java.util.Collection |
findPolicyIDs(SessionToken caller,
java.util.Collection principals)
Locate the IDs of all of the policies that apply to the specified principals and that are accessible by the caller. |
java.util.List |
getElementEntitlements(AuthorizationRealm realm,
java.util.Collection elementNames)
Returns a List of entitlements to the given element pattern in the given realm. |
java.util.List |
getElementEntitlements(AuthorizationRealm realm,
java.lang.String elementNamePattern)
Returns a List of entitlements to the given element pattern in the given realm. |
java.util.List |
getGroupEntitlements(AuthorizationRealm realm,
java.util.Collection groupNames)
Returns a List of entitlements to the given fully qualified group name in the given realm. |
java.util.List |
getGroupEntitlements(AuthorizationRealm realm,
java.lang.String fullyQualifiedGroupName)
Returns a List of entitlements to the given fully qualified group name in the given realm. |
java.util.Collection |
getInaccessibleResources(SessionToken sessionToken,
java.lang.String contextName,
java.util.Collection requests)
Of those resources specified, return the subset for which the specified account does |
java.util.Collection |
getPolicIDsForResourceInRealm(SessionToken caller,
AuthorizationRealm realm,
java.lang.String resourceName)
Returns a Collection of AuthorizationPolicyID s
that have AuthorizationPermissionsImpl on the given resource that
exists in the given AuthorizationRealm . |
java.util.Collection |
getPolicies(SessionToken caller,
java.util.Collection policyIDs)
Locate the policies that have the specified IDs. |
java.util.Collection |
getPoliciesInRealm(SessionToken caller,
AuthorizationRealm realm)
Returns a Collection of AuthorizationPolicy s
that have AuthorizationPermissionsImpl in the given AuthorizationRealm .NOTE: It is the responsibility of the caller to determine which of the AuthorizationPolicy 's AuthorizationPermissionsImpl
are actually in the given AuthorizationRealm . |
AuthorizationPolicy |
getPolicy(SessionToken caller,
AuthorizationPolicyID policyID)
Locate the policy that has the specified ID. |
java.util.Collection |
getPolicyIDsInPartialRealm(SessionToken caller,
AuthorizationRealm realm)
Returns a Collection of AuthorizationPolicyID s
that have AuthorizationPermissionsImpl that exist in the given
AuthorizationRealm .The implementation is such that all AuthorizationPolicyID s
whose AuthorizationRealm AuthorizationRealm are returned. |
java.util.Collection |
getPolicyIDsInRealm(SessionToken caller,
AuthorizationRealm realm)
Returns a Collection of AuthorizationPolicyID s
in the given AuthorizationRealm . |
java.util.Collection |
getPolicyIDsWithPermissionsInRealm(SessionToken caller,
AuthorizationRealm realm)
Returns a Collection of AuthorizationPolicyID s
that have AuthorizationPermissionsImpl in the given AuthorizationRealm .NOTE: It is the responsibility of the caller to determine which of the AuthorizationPolicy 's AuthorizationPermissionsImpl
are actually in the given AuthorizationRealm . |
java.util.Collection |
getPrincipalsForRole(SessionToken caller,
java.lang.String roleName)
Returns a collection MetaMatrixPrincipalName objects containing the name
of the principal along with its type which belong to the given role. |
protected AuthorizationSourceTransaction |
getReadTransaction()
|
java.util.Collection |
getRealmNames(SessionToken caller)
Obtain the names of all of the realms known to the system. |
java.util.Map |
getRoleDescriptions(SessionToken caller)
Obtain the names of all of the roles and their descriptions known to the system. |
java.util.Collection |
getRoleNamesForPrincipal(SessionToken caller,
MetaMatrixPrincipalName principal)
Returns a Collection of String names of MetaMatrix roles to which the given principal is assigned. |
protected AuthorizationSourceTransaction |
getWriteTransaction()
|
boolean |
hasPolicy(SessionToken caller,
AuthorizationRealm realm,
java.lang.String policyName)
|
protected void |
initService(java.util.Properties env)
Perform initialization and commence processing. |
boolean |
isCallerInRole(SessionToken caller,
java.lang.String roleName)
Verify that caller is in the specified logical role. |
protected boolean |
isEntitled(java.lang.String principal)
|
protected void |
killService()
Terminate all processing and reclaim resources. |
void |
migratePolicies(SessionToken token,
EntitlementMigrationReport rpt,
java.lang.String targetVDBName,
java.lang.String targetVDBVersion,
java.util.Set targetNodes,
java.util.Collection sourcePolicies,
AdminOptions options)
|
boolean |
removePrincipalFromAllPolicies(SessionToken caller,
MetaMatrixPrincipalName principal)
Remove given Principal from AuthorizationPolicies to
which he belongs. |
java.lang.String |
toString()
Outputs a String representation of this service - the class name followed by either the instance name or some indication of the state the service is in. |
protected void |
waitForServiceToClear()
Wait until the service has completed all outstanding work. |
Methods inherited from class com.metamatrix.platform.service.controller.AbstractService |
---|
checkState, die, dieNow, getConnectionPoolStats, getCurrentState, getHostname, getID, getInitException, getInstanceName, getProcessName, getProperties, getQueueStatistics, getQueueStatistics, getResourceName, getServiceData, getServiceName, getServiceType, getStartTime, getStateChangeTime, init, isAlive, isClosed, isInitialized, isOpen, processEvent, registerForEvents, setInitException, unregisterForEvents, updateState |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.metamatrix.platform.service.api.ServiceInterface |
---|
checkState, die, dieNow, getConnectionPoolStats, getCurrentState, getHostname, getID, getInitException, getProcessName, getProperties, getQueueStatistics, getQueueStatistics, getServiceData, getServiceType, getStartTime, getStateChangeTime, init, isAlive, setInitException, updateState |
Field Detail |
---|
protected AuthorizationCache authorizationCache
protected MembershipServiceInterface membershipServiceProxy
Constructor Detail |
---|
public AuthorizationServiceImpl()
Method Detail |
---|
protected void initService(java.util.Properties env)
initService
in class AbstractService
protected AuthorizationSourceTransaction getReadTransaction() throws ManagedConnectionException
ManagedConnectionException
protected AuthorizationSourceTransaction getWriteTransaction() throws ManagedConnectionException
ManagedConnectionException
protected void closeService() throws java.lang.Exception
closeService
in class AbstractService
java.lang.Exception
protected void waitForServiceToClear() throws java.lang.Exception
waitForServiceToClear
in class AbstractService
java.lang.Exception
protected void killService()
killService
in class AbstractService
public boolean checkAccess(SessionToken sessionToken, java.lang.String contextName, AuthorizationPermission request) throws InvalidSessionException, AuthorizationMgmtException
checkAccess
in interface AuthorizationServiceInterface
sessionToken
- the session token of the principal whose access is being checkedcontextName
- the name of the context for the caller (@see AuditContext)request
- the permission that details the resource and the desired form of access
InvalidSessionException
- if the session token for this cache is not valid
AuthorizationMgmtException
- if this service is unable to locate resources required
for this operationpublic boolean checkAccess(SessionToken sessionToken, java.lang.String contextName, AuthorizationPermission request, boolean fetchDependants) throws InvalidSessionException, AuthorizationMgmtException
checkAccess
in interface AuthorizationServiceInterface
sessionToken
- the session token of the principal whose access is being checkedcontextName
- the name of the context for the caller (@see AuditContext)request
- the permission that details the resource and the desired form of accessfetchDependants
- If true
, search authorization store for all dependant
permisssions of the given request. Access is checked for all resources - the given
request and all dependants.
InvalidSessionException
- if the session token for this cache is not valid
AuthorizationMgmtException
- if this service is unable to locate resources required
for this operationpublic java.util.Collection getInaccessibleResources(SessionToken sessionToken, java.lang.String contextName, java.util.Collection requests) throws InvalidSessionException, AuthorizationMgmtException
getInaccessibleResources
in interface AuthorizationServiceInterface
sessionToken
- the session token of the principal that is calling this methodcontextName
- the name of the context for the caller (@see AuditContext)requests
- the permissions that detail the resources and the desired form of access
requests
that the account does not have access to
InvalidSessionException
- if the session token for this cache is not valid
AuthorizationMgmtException
- if this service is unable to locate resources required
for this operationpublic java.util.List getGroupEntitlements(AuthorizationRealm realm, java.util.Collection groupNames) throws AuthorizationMgmtException
List
of entitlements to the given fully qualified group name in the given realm.
The list contains objects of type UserEntitlementInfo
which will contain all user entitlement information for each group found. Each of these objects
will contain 1 or more objects of type GranteeEntitlementEntry
which contain the Grantee's name the entitlement Grantor or entity specifying the Grantee
is entitled and the Allowed Actions the Grantee is entitled to perform on the group.
String[]
of one or more of {CREATE, READ, UPDATE, DELETE})
getGroupEntitlements
in interface AuthorizationServiceInterface
realm
- The realm in which the element must live.groupNames
- the fully qualified group names - the resources - for which to look up permissions.
Collection of String
.
List
of entitlements to the given element in the
given realm - May be empty but never null.
AuthorizationMgmtException
- if this service is unable to locate resources required
for this operation.public java.util.List getGroupEntitlements(AuthorizationRealm realm, java.lang.String fullyQualifiedGroupName) throws AuthorizationMgmtException
List
of entitlements to the given fully qualified group name in the given realm.
The list contains objects of type UserEntitlementInfo
which will contain all user entitlement information for each group found. Each of these objects
will contain 1 or more objects of type GranteeEntitlementEntry
which contain the Grantee's name the entitlement Grantor or entity specifying the Grantee
is entitled and the Allowed Actions the Grantee is entitled to perform on the group.
String[]
of one or more of {CREATE, READ, UPDATE, DELETE})
getGroupEntitlements
in interface AuthorizationServiceInterface
realm
- The realm in which the element must live.fullyQualifiedGroupName
- The resource for which to look up permissions.
List
of entitlements to the given element in the
given realm - May be empty but never null.
AuthorizationMgmtException
- if this service is unable to locate resources required
for this operation.
ServiceStateException
- if the Authorization service is not taking requests.public java.util.List getElementEntitlements(AuthorizationRealm realm, java.util.Collection elementNames) throws AuthorizationMgmtException
List
of entitlements to the given element pattern in the given realm.
The list contains objects of type UserEntitlementInfo
which will contain all user entitlement information for each element found. Each of these objects
will contain 1 or more objects of type GranteeEntitlementEntry
which contain the Grantee's name the entitlement Grantor or entity specifying the Grantee
is entitled and the Allowed Actions the Grantee is entitled to perform on the element.
String[]
of one or more of {CREATE, READ, UPDATE, DELETE})
getElementEntitlements
in interface AuthorizationServiceInterface
realm
- The realm in which the element must live.elementNames
- The fully qualified element resource for which to look up permissions. Collection of String
.
List
of entitlements to the given element in the
given realm - May be empty but never null.
AuthorizationMgmtException
- if this service is unable to locate resources required
for this operation.
ServiceStateException
- if the Authorization service is not taking requests.public java.util.List getElementEntitlements(AuthorizationRealm realm, java.lang.String elementNamePattern) throws AuthorizationMgmtException
List
of entitlements to the given element pattern in the given realm.
The list contains objects of type UserEntitlementInfo
which will contain all user entitlement information for each element found. Each of these objects
will contain 1 or more objects of type GranteeEntitlementEntry
which contain the Grantee's name the entitlement Grantor or entity specifying the Grantee
is entitled and the Allowed Actions the Grantee is entitled to perform on the element.
String[]
of one or more of {CREATE, READ, UPDATE, DELETE})
getElementEntitlements
in interface AuthorizationServiceInterface
realm
- The realm in which the element must live.elementNamePattern
- The resource for which to look up permissions. SQL '%' pattern matching may be used.
List
of entitlements to the given element in the
given realm - May be empty but never null.
AuthorizationMgmtException
- if this service is unable to locate resources required
for this operation.
ServiceStateException
- if the Authorization service is not taking requests.public java.util.Collection getRealmNames(SessionToken caller) throws InvalidSessionException, AuthorizationException, AuthorizationMgmtException
getRealmNames
in interface AuthorizationServiceInterface
caller
- the session token of the principal that is attempting to access the policies.
InvalidSessionException
- if the SessionToken
is not valid or is expired
AuthorizationException
- if the caller is unable to perform this operation
AuthorizationMgmtException
- if this service has trouble connecting to services it uses.public boolean containsPolicy(SessionToken caller, AuthorizationPolicyID policyID) throws InvalidSessionException, AuthorizationException, AuthorizationMgmtException
containsPolicy
in interface AuthorizationServiceInterface
caller
- the session token of the principal that is attempting to access the policies.policyID
- the ID that is to be checked
InvalidSessionException
- if the SessionToken
is not valid or is expired
AuthorizationException
- if the caller is unable to perform this operation
AuthorizationMgmtException
- if this service has trouble connecting to services it uses.AuthorizationDomain.containsPolicy
public java.util.Collection findAllPolicyIDs(SessionToken caller) throws InvalidSessionException, AuthorizationException, AuthorizationMgmtException
findAllPolicyIDs
in interface AuthorizationServiceInterface
caller
- the session token of the principal that is attempting to access the policies.
InvalidSessionException
- if the SessionToken
is not valid or is expired
AuthorizationException
- if the caller is unable to perform this operation
AuthorizationMgmtException
- if this service has trouble connecting to services it uses.AuthorizationDomain.findAllPolicyIDs
public java.util.Collection findPolicyIDs(SessionToken caller, java.util.Collection principals) throws InvalidSessionException, AuthorizationException, AuthorizationMgmtException
findPolicyIDs
in interface AuthorizationServiceInterface
caller
- the session token of the principal that is attempting to access the policies.principals
- the Set of MetaMatrixPrincipalName
s to whom the
returned policies should apply (may not null, empty or invalid, all of which
would result in an empty result).
InvalidSessionException
- if the SessionToken
is not valid or is expired
AuthorizationException
- if the caller is unable to perform this operation
AuthorizationMgmtException
- if this service has trouble connecting to services it uses.AuthorizationModel.findAllPolicyIDs
public java.util.Collection getPolicies(SessionToken caller, java.util.Collection policyIDs) throws InvalidSessionException, AuthorizationException, AuthorizationMgmtException
getPolicies
in interface AuthorizationServiceInterface
caller
- the session token of the principal that is attempting to access the
specified policiespolicyIDs
- the policy IDs for which the policies are to be obtained
InvalidSessionException
- if the SessionToken
is not valid or is expired
AuthorizationException
- if the caller is unable to perform this operation
AuthorizationMgmtException
- if this service has trouble connecting to services it uses.AuthorizationDomain.getPolicies
public AuthorizationPolicy getPolicy(SessionToken caller, AuthorizationPolicyID policyID) throws InvalidSessionException, AuthorizationException, AuthorizationMgmtException
getPolicy
in interface AuthorizationServiceInterface
caller
- the session token of the principal that is attempting to access the
specified policiespolicyID
- the ID of the policy to be obtained
InvalidSessionException
- if the SessionToken
is not valid or has expired.
AuthorizationException
- if the caller is unable to perform this operation.
AuthorizationMgmtException
- if there were errors with the SPI.AuthorizationDomain.getPolicy
public boolean isCallerInRole(SessionToken caller, java.lang.String roleName) throws AuthorizationMgmtException
isCallerInRole
in interface AuthorizationServiceInterface
caller
- The session token of the MetaMatrix principle involking an administrative method.roleName
- The name of the role in question.
AuthorizationMgmtException
- if this service has trouble connecting to services it uses.public java.util.Map getRoleDescriptions(SessionToken caller) throws InvalidSessionException, AuthorizationException, AuthorizationMgmtException
getRoleDescriptions
in interface AuthorizationServiceInterface
caller
- the session token of the principal that is attempting to access the roles.
InvalidSessionException
- if the SessionToken
is not valid or is expired
AuthorizationException
- if the caller is unable to perform this operation
AuthorizationMgmtException
- if this service has trouble connecting to services it uses.public java.util.Collection getPrincipalsForRole(SessionToken caller, java.lang.String roleName) throws InvalidSessionException, AuthorizationException, AuthorizationMgmtException
MetaMatrixPrincipalName
objects containing the name
of the principal along with its type which belong to the given role.
MetaMatrixPrincipalName
getPrincipalsForRole
in interface AuthorizationServiceInterface
caller
- the session token of the principal that is attempting to access the roles.roleName
- String name of MetaMatrix role for which principals
are sought
MetaMatrixPrincipalName
s who are in the given role, possibly enpty, never null.
InvalidSessionException
- if the administrative session is invalid
AuthorizationException
- if admninistrator does not have the authority to see the requested information
AuthorizationMgmtException
public java.util.Collection getRoleNamesForPrincipal(SessionToken caller, MetaMatrixPrincipalName principal) throws AuthorizationMgmtException
getRoleNamesForPrincipal
in interface AuthorizationServiceInterface
caller
- The SessionToken
of the principal making the request.principal
- MetaMatrixPrincipalName
for which roles are soughtexplicitOnly
- If true, only return roles assigned directly to given principal.
If false, return all roles directly assigned and inherited.
InvalidSessionException
- if the administrative session is invalid
AuthorizationMgmtException
- if there is a problem internally with the MembershipService
AuthorizationException
- if admninistrator does not have the authority to see the requested informationprotected boolean isEntitled(java.lang.String principal)
public boolean removePrincipalFromAllPolicies(SessionToken caller, MetaMatrixPrincipalName principal) throws AuthorizationException, AuthorizationMgmtException
AuthorizationPolicies
to
which he belongs.
removePrincipalFromAllPolicies
in interface AuthorizationServiceInterface
caller
- the session token of the principal that is attempting to remove the Principal.principal
- MetaMatrixPrincipalName
which should be deleted.
AuthorizationException
- if admninistrator does not have the authority to preform the action.
AuthorizationMgmtException
- if an error occurs in the Authorization store.
ServiceStateException
- if the Authorization service is closed to client requests.
AuthorizationMgmtException
- if an error occurs in the Authorization store.public java.util.Collection getPolicyIDsWithPermissionsInRealm(SessionToken caller, AuthorizationRealm realm) throws AuthorizationException, AuthorizationMgmtException
Collection
of AuthorizationPolicyID
s
that have AuthorizationPermissionsImpl
in the given AuthorizationRealm
.AuthorizationPolicy
's AuthorizationPermissionsImpl
are actually in the given AuthorizationRealm
. The AuthorizationPolicy
may span AuthorizationRealm
s.
getPolicyIDsWithPermissionsInRealm
in interface AuthorizationServiceInterface
caller
- The session token of the principal that is attempting to retrieve the policies.realm
- The realm in which to search for AuthorizationPermission
s.
AuthorizationPolicyID
s that have permissions
in the given realm - possibly empty but never null.
AuthorizationException
- if admninistrator does not have the authority to preform the action.
AuthorizationMgmtException
- if an error occurs in the Authorization store.public java.util.Collection getPolicyIDsInRealm(SessionToken caller, AuthorizationRealm realm) throws AuthorizationException, AuthorizationMgmtException
Collection
of AuthorizationPolicyID
s
in the given AuthorizationRealm
.
AuthorizationPolicy
's AuthorizationPermissionsImpl
are actually in the given AuthorizationRealm
. The AuthorizationPolicy
may span AuthorizationRealm
s.
getPolicyIDsInRealm
in interface AuthorizationServiceInterface
caller
- The session token of the principal that is attempting to retrieve the policies.realm
- The realm in which to search for AuthorizationPermission
s.
AuthorizationPolicyID
s that have permissions
in the given realm - possibly empty but never null.
AuthorizationException
- if admninistrator does not have the authority to preform the action.
AuthorizationMgmtException
- if an error occurs in the Authorization store.public java.util.Collection getPoliciesInRealm(SessionToken caller, AuthorizationRealm realm) throws AuthorizationException, AuthorizationMgmtException
Collection
of AuthorizationPolicy
s
that have AuthorizationPermissionsImpl
in the given AuthorizationRealm
.AuthorizationPolicy
's AuthorizationPermissionsImpl
are actually in the given AuthorizationRealm
. The AuthorizationPolicy
may span AuthorizationRealm
s.
getPoliciesInRealm
in interface AuthorizationServiceInterface
caller
- The session token of the principal that is attempting to retrieve the policies.realm
- The realm in which to search for AuthorizationPermission
s.
AuthorizationPolicy
s that have permissions
in the given realm - possibly empty but never null.
AuthorizationException
- if admninistrator does not have the authority to preform the action.
AuthorizationMgmtException
- if an error occurs in the Authorization store.public java.util.Collection getPolicyIDsInPartialRealm(SessionToken caller, AuthorizationRealm realm) throws AuthorizationException, AuthorizationMgmtException
Collection
of AuthorizationPolicyID
s
that have AuthorizationPermissionsImpl
that exist in the given
AuthorizationRealm
.AuthorizationPolicyID
s
whose AuthorizationRealm
AuthorizationRealm
are returned.
getPolicyIDsInPartialRealm
in interface AuthorizationServiceInterface
caller
- The session token of the principal that is attempting to retrieve the policies.realm
- The AuthorizationPermission
s whose realm name AuthorizationPolicyID
s that have permissions
in the given partial realm - possibly empty but never null.
AuthorizationException
- if admninistrator does not have the authority to preform the action.
AuthorizationMgmtException
- if an error occurs in the Authorization store.public java.util.Collection getPolicIDsForResourceInRealm(SessionToken caller, AuthorizationRealm realm, java.lang.String resourceName) throws AuthorizationException, AuthorizationMgmtException
Collection
of AuthorizationPolicyID
s
that have AuthorizationPermissionsImpl
on the given resource that
exists in the given AuthorizationRealm
.
getPolicIDsForResourceInRealm
in interface AuthorizationServiceInterface
caller
- The session token of the principal that is attempting to retrieve the policies.realm
- The realm in which to search for AuthorizationPermission
s.resourceName
- The resource for which to search for AuthorizationPermission
s.
AuthorizationPolicyID
s that have permissions
on the given resource - possibly empty but never null.
AuthorizationException
- if admninistrator does not have the authority to preform the action.
AuthorizationMgmtException
- if an error occurs in the Authorization store.public PermissionDataNode fillPermissionNodeTree(PermissionDataNode root, AuthorizationPolicyID policyID) throws AuthorizationMgmtException
PermissionDataNodeImpl
s that have their Resource
s
filled in and fills in all permissions on resources that are found in the given
AuthorizationPolicyID
.AuthorizationMgmtException
is thrown noting the missing resource name(s).
fillPermissionNodeTree
in interface AuthorizationServiceInterface
root
- The node containing the resource (group or element full name)
for which to search for permission(s).root
- The root of the tree of PermissionDataNodes to fill in permissions for.
AuthorizationMgmtException
- if there is a connection or communication error with the data source,
signifying that the method should be retried with a different connection; if there is an
unspecified or unknown error with the data source; or one or more permissions were found but
a corresponding PermissionDataNodeImpl
could not be found.public java.util.Set executeTransaction(SessionToken administrator, java.util.List actions) throws InvalidSessionException, AuthorizationException, AuthorizationMgmtException
executeTransaction
in interface AuthorizationServiceInterface
administrator
- the session token of the principal that is attempting to access the policies.actions
- the ordered list of actions that are to be performed
on metamodel within the repository.
InvalidSessionException
- if the SessionToken
is not valid or has expired.
AuthorizationException
- if the administrator is unable to perform this operation.
AuthorizationMgmtException
- if there were errors with the SPI. Causes rollback.
java.lang.IllegalArgumentException
- if the action is null.public boolean hasPolicy(SessionToken caller, AuthorizationRealm realm, java.lang.String policyName) throws AuthorizationMgmtException, MembershipServiceException
hasPolicy
in interface AuthorizationServiceInterface
AuthorizationMgmtException
MembershipServiceException
public java.lang.String toString()
toString
in class java.lang.Object
public void migratePolicies(SessionToken token, EntitlementMigrationReport rpt, java.lang.String targetVDBName, java.lang.String targetVDBVersion, java.util.Set targetNodes, java.util.Collection sourcePolicies, AdminOptions options) throws MetaMatrixComponentException, InvalidSessionException, AuthorizationException, AuthorizationMgmtException
migratePolicies
in interface AuthorizationServiceInterface
MetaMatrixComponentException
InvalidSessionException
AuthorizationException
AuthorizationMgmtException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |