|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AuthorizationSourceTransaction
Method Summary | |
---|---|
void |
addPermissionsWithResourcesToParent(java.lang.String parent,
java.util.Collection resources,
AuthorizationRealm realm)
Add the given resources as AuthorizationPermission s to existing
AuthorizationPolicies that have a permission with the given parent
as a resource. |
void |
close()
A method that is called before this transaction is closed, giving the transaction a chance to release any resources. |
boolean |
containsPolicy(AuthorizationPolicyID id)
Return whether there is an existing policy with the specified ID. |
java.util.Set |
executeActions(AuthorizationPolicyID target,
java.util.List actions,
java.lang.String grantor)
Execute the actions on given object. |
java.util.Collection |
findAllPolicyIDs()
Locate the IDs of all of the policies that are accessible by the caller. |
java.util.Collection |
findPolicyIDs(java.util.Collection principals)
Locate the IDs of all of the policies that apply to the specified principal and that are accessible by the caller in all known realms. |
java.util.Collection |
findPolicyIDs(java.util.Collection principals,
AuthorizationRealm realm)
Locate the IDs of all of the policies that apply to the specified principal and that are accessible by the caller in the given realm. |
java.util.Collection |
getDependantPermissions(AuthorizationPermission request)
Get the collection of permissions whose resources are dependant on the given permision. |
java.util.Map |
getElementEntitlements(AuthorizationRealm realm,
java.lang.String elementNamePattern)
Returns a compound List of entitlements to the given fully qualified
element in the given realm. |
java.util.Map |
getGroupEntitlements(AuthorizationRealm realm,
java.lang.String fullyQualifiedGroupName)
Returns a compound List of entitlements to the given fully qualified
group in the given realm. |
java.util.Set |
getPermissionsForPolicy(AuthorizationPolicyID policyID)
Find and create all AuthorizationPermissions known to a policy. |
java.util.Collection |
getPolicies(java.util.Collection policyIDs)
Locate the policies that have the specified IDs. |
AuthorizationPolicy |
getPolicy(AuthorizationPolicyID policyID)
Locate the policy that has the specified ID. |
java.util.Collection |
getPolicyIDsForResourceInRealm(AuthorizationRealm realm,
java.lang.String resourceName)
Returns a Collection of AuthorizationPolicyID s
that have AuthorizationPermissions on the given resource that
exists in the given AuthorizationRealm . |
java.util.Collection |
getPolicyIDsInPartialRealm(AuthorizationRealm realm)
Returns a Collection of AuthorizationPolicyID s
that have AuthorizationPermissions that exist in the given
AuthorizationRealm .The implementation is such that all AuthorizationPolicyID s
whose AuthorizationRealm AuthorizationRealm are returned. |
java.util.Collection |
getPolicyIDsInRealm(AuthorizationRealm realm)
Returns a Collection of AuthorizationPolicyID s
in the given AuthorizationRealm . |
java.util.Collection |
getPolicyIDsWithPermissionsInRealm(AuthorizationRealm realm)
Returns a Collection of AuthorizationPolicyID s
that have AuthorizationPermission s in the given AuthorizationRealm .NOTE: It is the responsibility of the caller to determine which of the AuthorizationPolicy 's AuthorizationPermission s
are actually in the given AuthorizationRealm . |
java.util.Collection |
getPrincipalsForRole(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. |
java.util.Collection |
getRealmNames()
Obtain the names of all of the realms known to the system. |
java.util.Map |
getRoleDescriptions()
Obtain the names of all of the roles and their descriptions known to the system. |
java.util.Collection |
getRoleNamesForPrincipal(java.util.Collection principals)
Returns a Collection of String names of MetaMatrix roles which the given principal belongs to |
void |
removePermissionsWithResources(java.util.Collection resources,
AuthorizationRealm realm)
Remove all permissions in the system that are on the given resources. |
boolean |
removePrincipalFromAllPolicies(MetaMatrixPrincipalName principal)
Remove given Principal from AuthorizationPolicies to
which he belongs. |
void |
removePrincipalsAndPoliciesForRealm(AuthorizationRealm realm)
Remove entries from AUTHREALM, AUTHPERMISSIONS, AUTHPOLICIES, AUTHPRINCIPALS for the specified realm |
Methods inherited from interface com.metamatrix.common.connection.TransactionInterface |
---|
commit, isClosed, isReadonly, rollback |
Method Detail |
---|
java.util.Map getGroupEntitlements(AuthorizationRealm realm, java.lang.String fullyQualifiedGroupName) throws AuthorizationSourceConnectionException, AuthorizationSourceException
List
of entitlements to the given fully qualified
group in the given realm.
The returned List
will be comprised of a List
s of 6 elements.
realm
- The realm in which the group must live.fullyQualifiedGroupName
- The resource for which to look up permissions.
List
of entitlements to the given group in the
given realm - May be empty but never null.
AuthorizationSourceConnectionException
- if there is an error communicating with the source.
AuthorizationSourceException
- if there is an unspecified error.java.util.Map getElementEntitlements(AuthorizationRealm realm, java.lang.String elementNamePattern) throws AuthorizationSourceConnectionException, AuthorizationSourceException
List
of entitlements to the given fully qualified
element in the given realm.
The returned List
will be comprised of a List
s of 7 elements.
realm
- The realm in which the element must live.elementNamePattern
- 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.
AuthorizationSourceConnectionException
- if there is an error communicating with the source.
AuthorizationSourceException
- if there is an unspecified error.java.util.Collection getRealmNames() throws AuthorizationSourceConnectionException, AuthorizationSourceException
AuthorizationSourceConnectionException
AuthorizationSourceException
boolean containsPolicy(AuthorizationPolicyID id) throws AuthorizationSourceConnectionException, AuthorizationSourceException
id
- the ID that is to be checked
AuthorizationSourceConnectionException
- if there is an connection
or communication error with the data source, signifying that
the method should be retried with a different connection.
AuthorizationSourceException
- if there is an unspecified or unknown
error with the data source.java.util.Collection findAllPolicyIDs() throws AuthorizationSourceConnectionException, AuthorizationSourceException
AuthorizationSourceConnectionException
- if there is an connection
or communication error with the data source, signifying that
the method should be retried with a different connection.
AuthorizationSourceException
- if there is an unspecified or unknown
error with the data source.java.util.Collection findPolicyIDs(java.util.Collection principals, AuthorizationRealm realm) throws AuthorizationSourceConnectionException, AuthorizationSourceException
principals
- the Set of UserGroupIDs and/or UserAccountIDs to whom
the returned policies should apply to (may not null, empty or invalid,
all of which would result in an empty result).realm
- The applicable realm in which to search for policies.
AuthorizationSourceConnectionException
- if there is an connection
or communication error with the data source, signifying that
the method should be retried with a different connection.
AuthorizationSourceException
- if there is an unspecified or unknown
error with the data source.java.util.Collection findPolicyIDs(java.util.Collection principals) throws AuthorizationSourceConnectionException, AuthorizationSourceException
principals
- the Set of UserGroupIDs and/or UserAccountIDs to whom
the returned policies should apply to (may not null, empty or invalid,
all of which would result in an empty result).
AuthorizationSourceConnectionException
- if there is an connection
or communication error with the data source, signifying that
the method should be retried with a different connection.
AuthorizationSourceException
- if there is an unspecified or unknown
error with the data source.java.util.Collection getPolicies(java.util.Collection policyIDs) throws AuthorizationSourceConnectionException, AuthorizationSourceException
policyIDs
- the policy IDs for which the policies are to be obtained
AuthorizationSourceConnectionException
- if there is an connection
or communication error with the data source, signifying that
the method should be retried with a different connection.
AuthorizationSourceException
- if there is an unspecified or unknown
error with the data source.AuthorizationPolicy getPolicy(AuthorizationPolicyID policyID) throws AuthorizationSourceConnectionException, AuthorizationSourceException
policyID
- the ID of the policy to be obtained
AuthorizationSourceConnectionException
- if there is an connection
or communication error with the data source, signifying that
the method should be retried with a different connection.
AuthorizationSourceException
- if there is an unspecified or unknown
error with the data source.void close()
close
in interface TransactionInterface
java.util.Set executeActions(AuthorizationPolicyID target, java.util.List actions, java.lang.String grantor) throws AuthorizationSourceConnectionException, AuthorizationSourceException, AuthorizationMgmtException
target
- The ID of the policy on which to execute the transactions.actions
- The list of actions to execute.grantor
- The principal name of the policy grantor.
AuthorizationSourceConnectionException
- if there is an connection
or communication error with the data source, signifying that
the method should be retried with a different connection.
AuthorizationSourceException
- if there is an unspecified or unknown
error with the data source.
AuthorizationMgmtException
java.util.Map getRoleDescriptions() throws AuthorizationSourceConnectionException, AuthorizationSourceException
AuthorizationSourceConnectionException
- if there is an connection
or communication error with the data source, signifying that
the method should be retried with a different connection.
AuthorizationSourceException
- if there is an unspecified or unknown
error with the data source.java.util.Collection getPrincipalsForRole(java.lang.String roleName) throws AuthorizationSourceConnectionException, AuthorizationSourceException
MetaMatrixPrincipalName
objects containing the name
of the principal along with its type which belong to the given role.
MetaMatrixPrincipalName
roleName
- String name of MetaMatrix role for which principals
are sought
MetaMatrixPrincipalName
s who are in the given role, possibly enpty, never null.
AuthorizationSourceConnectionException
- if there is an connection
or communication error with the data source, signifying that
the method should be retried with a different connection.
AuthorizationSourceException
- if there is an unspecified or unknown
error with the data source.java.util.Collection getRoleNamesForPrincipal(java.util.Collection principals) throws AuthorizationSourceConnectionException, AuthorizationSourceException
principals
- MetaMatrixPrincipalName
s of a principal and
any group memberships for which roles are sought
AuthorizationSourceConnectionException
- if there is an connection
or communication error with the data source, signifying that
the method should be retried with a different connection.
AuthorizationSourceException
- if there is an unspecified or unknown
error with the data source.boolean removePrincipalFromAllPolicies(MetaMatrixPrincipalName principal) throws AuthorizationSourceConnectionException, AuthorizationSourceException
AuthorizationPolicies
to
which he belongs.
principal
- MetaMatrixPrincipalName
which should be deleted.
AuthorizationSourceConnectionException
- if there is an connection
or communication error with the data source, signifying that
the method should be retried with a different connection.
AuthorizationSourceException
- if there is an unspecified or unknown
error with the data source.java.util.Collection getPolicyIDsWithPermissionsInRealm(AuthorizationRealm realm) throws AuthorizationSourceConnectionException, AuthorizationSourceException
Collection
of AuthorizationPolicyID
s
that have AuthorizationPermission
s in the given AuthorizationRealm
.AuthorizationPolicy
's AuthorizationPermission
s
are actually in the given AuthorizationRealm
. The AuthorizationPolicy
may span AuthorizationRealm
s.
realm
- The realm in which to search for AuthorizationPermission
s.
AuthorizationPolicyID
s that have permissions
in the given realm - possibly empty but never null.
AuthorizationSourceConnectionException
- if there is an connection
or communication error with the data source, signifying that
the method should be retried with a different connection.
AuthorizationSourceException
- if there is an unspecified or unknown
error with the data source.java.util.Collection getPolicyIDsInRealm(AuthorizationRealm realm) throws AuthorizationSourceConnectionException, AuthorizationSourceException
Collection
of AuthorizationPolicyID
s
in the given AuthorizationRealm
.
AuthorizationPolicy
's AuthorizationPermission
s
are actually in the given AuthorizationRealm
. The AuthorizationPolicy
may span AuthorizationRealm
s.
realm
- The realm in which to search for AuthorizationPermission
s.
AuthorizationPolicyID
s that have permissions
in the given realm - possibly empty but never null.
AuthorizationSourceConnectionException
- if there is an connection
or communication error with the data source, signifying that
the method should be retried with a different connection.
AuthorizationSourceException
- if there is an unspecified or unknown
error with the data source.java.util.Collection getPolicyIDsInPartialRealm(AuthorizationRealm realm) throws AuthorizationSourceConnectionException, AuthorizationSourceException
Collection
of AuthorizationPolicyID
s
that have AuthorizationPermissions
that exist in the given
AuthorizationRealm
.AuthorizationPolicyID
s
whose AuthorizationRealm
AuthorizationRealm
are returned.
realm
- The AuthorizationPermission
s whose realm name AuthorizationPolicyID
s that have permissions
in the given partial realm - possibly empty but never null.
AuthorizationSourceConnectionException
- if there is an connection
or communication error with the data source, signifying that
the method should be retried with a different connection.
AuthorizationSourceException
- if there is an unspecified or unknown
error with the data source.java.util.Collection getPolicyIDsForResourceInRealm(AuthorizationRealm realm, java.lang.String resourceName) throws AuthorizationSourceConnectionException, AuthorizationSourceException
Collection
of AuthorizationPolicyID
s
that have AuthorizationPermissions
on the given resource that
exists in the given AuthorizationRealm
.
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.
AuthorizationSourceConnectionException
- if there is an connection
or communication error with the data source, signifying that
the method should be retried with a different connection.
AuthorizationSourceException
- if there is an unspecified or unknown
error with the data source.java.util.Set getPermissionsForPolicy(AuthorizationPolicyID policyID) throws AuthorizationSourceConnectionException, AuthorizationSourceException
AuthorizationPermissions
known to a policy.
policyID
- The policy indentifier.
AuthorizationSourceConnectionException
AuthorizationSourceException
void addPermissionsWithResourcesToParent(java.lang.String parent, java.util.Collection resources, AuthorizationRealm realm) throws AuthorizationSourceConnectionException, AuthorizationSourceException
AuthorizationPermission
s to existing
AuthorizationPolicies
that have a permission with the given parent
as a resource. Use the parent's AuthorizationActions
to create
the permission for each resource.
parent
- The uuid of the resource that will be the parent of the given
resources.resources
- The uuids of the newly added resources.realm
- Confine the resources to this realm.
AuthorizationSourceConnectionException
AuthorizationSourceException
void removePrincipalsAndPoliciesForRealm(AuthorizationRealm realm) throws AuthorizationSourceConnectionException, AuthorizationSourceException
realm
-
AuthorizationSourceException
AuthorizationSourceConnectionException
void removePermissionsWithResources(java.util.Collection resources, AuthorizationRealm realm) throws AuthorizationSourceConnectionException, AuthorizationSourceException
resources
- The IDs of the resources to be removed.realm
- The AuthorizationRealm
in which the resources reside.
AuthorizationSourceConnectionException
AuthorizationSourceException
java.util.Collection getDependantPermissions(AuthorizationPermission request) throws AuthorizationSourceConnectionException, AuthorizationSourceException
AuthorizationRealm
of the given request.
request
- The permission for which to find dependants.
AuthorizationSourceConnectionException
AuthorizationSourceException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |