|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.metamatrix.platform.admin.apiimpl.SubSystemAdminAPIImpl
com.metamatrix.platform.admin.apiimpl.AuthorizationAdminAPIImpl
public class AuthorizationAdminAPIImpl
| Method Summary | |
|---|---|
void |
addPrincipalsToRole(java.util.Set principals,
java.lang.String roleName)
Add the given set of principals to the given role. |
void |
addPrincipalToRoles(MetaMatrixPrincipalName principal,
java.util.Collection roleNames)
Add the given principal to the given roles. |
java.lang.Boolean |
containsPolicy(AuthorizationPolicyID policyID)
Return whether there is an existing policy with the specified ID. |
AuthorizationEditor |
createEditor()
Returns a AuthorizationObjectEditor to perform editing operations
on a entitlement type object. |
java.util.Set |
executeTransaction(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. |
java.util.Collection |
findAllPolicyIDs()
Get all policyIDs in the system except those that we want to filter from the console. |
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. |
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.lang.String fullyQualifiedGroupName)
Returns a List of entitlements to the given fully qualified group name in the given realm. |
static AuthorizationAdminAPI |
getInstance()
|
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 AuthorizationPolicyIDs
that have AuthorizationPermissions on the given resource that
exists in the given AuthorizationRealm. |
java.util.Collection |
getPolicyIDsInPartialRealm(AuthorizationRealm realm)
Returns a Collection of AuthorizationPolicyIDs
that have AuthorizationPermissions that exist in the given
AuthorizationRealm.The implementation is such that all AuthorizationPolicyIDs
whose AuthorizationRealm AuthorizationRealm are returned. |
java.util.Collection |
getPolicyIDsInRealm(AuthorizationRealm realm)
Returns a Collection of AuthorizationPolicyIDs
in the given AuthorizationRealm. |
java.util.Collection |
getPolicyIDsWithPermissionsInRealm(AuthorizationRealm realm)
Returns a Collection of AuthorizationPolicyIDs
that have AuthorizationPermissions in the given AuthorizationRealm.NOTE: It is the responsibility of the caller to determine which of the AuthorizationPolicy's AuthorizationPermissions
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(MetaMatrixPrincipalName principal)
Returns a Collection of String names of MetaMatrix roles to which the given principal is assigned. |
boolean |
isCallerInRole(SessionToken caller,
java.lang.String roleName)
Verify that caller is in the specified logical role. |
boolean |
isSuperUser(java.lang.String username)
Return true is given username is a super user |
void |
removePolicy(AuthorizationPolicyID policyID)
Remove the policy with the specified ID. |
java.lang.Boolean |
removePrincipalFromAllPolicies(MetaMatrixPrincipalName principal)
Remove given Principal from AuthorizationPolicies to
which he belongs. |
void |
removePrincipalsFromRole(java.util.Set principals,
java.lang.String roleName)
Remove the given set of principals from the given role. |
| Methods inherited from class com.metamatrix.platform.admin.apiimpl.SubSystemAdminAPIImpl |
|---|
getSessionID |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static AuthorizationAdminAPI getInstance()
public AuthorizationEditor createEditor()
throws InvalidSessionException,
AuthorizationException,
MetaMatrixComponentException
AuthorizationObjectEditor to perform editing operations
on a entitlement type object. The editing process will create actions for
each specific type of editing operation. Those actions are what need to be
submitted to the AuthorizationService for actual updates to occur.
createEditor in interface AuthorizationAdminAPIInvalidSessionException
AuthorizationException
MetaMatrixComponentException
public java.util.Collection getRealmNames()
throws InvalidSessionException,
AuthorizationException,
MetaMatrixComponentException
getRealmNames in interface AuthorizationAdminAPIInvalidSessionException - if the SessionToken is not valid or is expired
AuthorizationException - if the caller is unable to perform this operation
MetaMatrixComponentException - if this service has trouble communicating.
public java.util.Map getRoleDescriptions()
throws AuthorizationException,
InvalidSessionException,
MetaMatrixComponentException
AuthorizationAdminAPI
getRoleDescriptions in interface AuthorizationAdminAPIAuthorizationException - if the caller is unable to perform this operation
InvalidSessionException - if the SessionToken is not valid or is expired
MetaMatrixComponentException - if this service has trouble communicating.
public java.util.Collection getPrincipalsForRole(java.lang.String roleName)
throws AuthorizationException,
InvalidSessionException,
MetaMatrixComponentException
AuthorizationAdminAPIMetaMatrixPrincipalName objects containing the name
of the principal along with its type which belong to the given role.
com.metamatrix.security.api.MetaMatrixPrincipalName
getPrincipalsForRole in interface AuthorizationAdminAPIroleName - String name of MetaMatrix role for which principals
are sought
AuthorizationException - if admninistrator does not have the authority to perform the requested operation.
InvalidSessionException - if the administrative session is invalid
MetaMatrixComponentException - if this service has trouble communicating.
public java.util.Collection getRoleNamesForPrincipal(MetaMatrixPrincipalName principal)
throws AuthorizationException,
InvalidSessionException,
MetaMatrixComponentException
getRoleNamesForPrincipal in interface AuthorizationAdminAPIprincipal - MetaMatrixPrincipalName for which roles are sought
Collection of role names the principal is assigned.
InvalidSessionException - if the administrative session is invalid
AuthorizationException - if administrator does not have the authority to perform the requested operation.
MetaMatrixComponentException - if this service has trouble communicating.
public void addPrincipalsToRole(java.util.Set principals,
java.lang.String roleName)
throws AuthorizationException,
InvalidSessionException,
MetaMatrixComponentException
addPrincipalsToRole in interface AuthorizationAdminAPIprincipals - Set of MetaMatrixPrincipalNames to which to add.roleName - The name of the role to which to add the principals.
InvalidSessionException - if the administrative session is invalid
AuthorizationException - if admninistrator does not have the authority to perform the requested operation.
MetaMatrixComponentException - if this service has trouble communicating.
public void addPrincipalToRoles(MetaMatrixPrincipalName principal,
java.util.Collection roleNames)
throws AuthorizationException,
InvalidSessionException,
MetaMatrixComponentException
principal - The MetaMatrixPrincipalName to addroleNames - The Collection of String role names of which to add the principal.
InvalidSessionException - if the administrative session is invalid
AuthorizationException - if admninistrator does not have the authority to perform the requested operation.
MetaMatrixComponentException - if this service has trouble communicating.
public void removePrincipalsFromRole(java.util.Set principals,
java.lang.String roleName)
throws AuthorizationException,
InvalidSessionException,
MetaMatrixComponentException
removePrincipalsFromRole in interface AuthorizationAdminAPIprincipals - Set of MetaMatrixPrincipalNames to remove.roleName - The name of the role from which to remove the principals.
InvalidSessionException - if the administrative session is invalid
AuthorizationException - if admninistrator does not have the authority to perform the requested operation.
MetaMatrixComponentException - if this service has trouble communicating.
public void removePolicy(AuthorizationPolicyID policyID)
throws AuthorizationException,
InvalidSessionException,
MetaMatrixComponentException
removePolicy in interface AuthorizationAdminAPIpolicyID - the ID of the policy that is to be removed.
InvalidSessionException - if the sessionToken is not valid or is expired
AuthorizationException - if the caller is unable to perform this operation
MetaMatrixComponentException - if this service is unable to locate resources required
for this operation
public java.util.Collection findAllPolicyIDs()
throws AuthorizationException,
InvalidSessionException,
MetaMatrixComponentException
findAllPolicyIDs in interface AuthorizationAdminAPIAuthorizationException - if the caller is unable to perform this operation
AuthorizationMgmtException - if this service has trouble connecting to services it uses.
InvalidSessionException - if the SessionToken is not valid or is expired
MetaMatrixComponentException - if this service has trouble communicating.
public java.util.Collection findPolicyIDs(java.util.Collection principals)
throws AuthorizationException,
InvalidSessionException,
MetaMatrixComponentException
AuthorizationAdminAPI
findPolicyIDs in interface AuthorizationAdminAPIprincipals - 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)
AuthorizationException - if the caller is unable to perform this operation
InvalidSessionException - if the SessionToken is not valid or is expired
MetaMatrixComponentException - if this service has trouble communicating.
public java.util.Collection getPolicies(java.util.Collection policyIDs)
throws AuthorizationException,
InvalidSessionException,
MetaMatrixComponentException
AuthorizationAdminAPI
getPolicies in interface AuthorizationAdminAPIpolicyIDs - the policy IDs for which the policies are to be obtained
AuthorizationException - if the caller is unable to perform this operation
InvalidSessionException - if the SessionToken is not valid or is expired
MetaMatrixComponentException - if this service has trouble communicating.
public java.lang.Boolean containsPolicy(AuthorizationPolicyID policyID)
throws AuthorizationException,
InvalidSessionException,
MetaMatrixComponentException
AuthorizationAdminAPI
containsPolicy in interface AuthorizationAdminAPIAuthorizationException - if the caller is unable to perform this operation
InvalidSessionException - if the SessionToken is not valid or is expired
MetaMatrixComponentException - if this service has trouble communicating.
public AuthorizationPolicy getPolicy(AuthorizationPolicyID policyID)
throws AuthorizationException,
AuthorizationMgmtException,
InvalidSessionException,
MetaMatrixComponentException
AuthorizationAdminAPI
getPolicy in interface AuthorizationAdminAPIpolicyID - the ID of the policy to be obtained
AuthorizationException - if the caller is unable to perform this operation
InvalidSessionException - if the SessionToken is not valid or is expired
MetaMatrixComponentException - if this service has trouble communicating.
AuthorizationMgmtException
public java.util.Set executeTransaction(java.util.List actions)
throws AuthorizationException,
AuthorizationMgmtException,
InvalidSessionException,
MetaMatrixComponentException
AuthorizationAdminAPI
executeTransaction in interface AuthorizationAdminAPIactions - the ordered list of actions that are to be performed
on metamodel within the repository.
AuthorizationException - if the caller is unable to perform this operation.
InvalidSessionException - if the SessionToken is not valid or has expired.
MetaMatrixComponentException - if this service has trouble communicating.
AuthorizationMgmtException
public java.lang.Boolean removePrincipalFromAllPolicies(MetaMatrixPrincipalName principal)
throws AuthorizationException,
AuthorizationMgmtException,
InvalidSessionException,
MetaMatrixComponentException
AuthorizationAdminAPIAuthorizationPolicies to
which he belongs.
removePrincipalFromAllPolicies in interface AuthorizationAdminAPIprincipal - MetaMatrixPrincipalName which should be deleted.
AuthorizationException - if admninistrator does not have the authority to preform the action.
MetaMatrixComponentException - if this service has trouble communicating.
AuthorizationMgmtException
InvalidSessionException
public java.util.Collection getPolicyIDsWithPermissionsInRealm(AuthorizationRealm realm)
throws AuthorizationException,
AuthorizationMgmtException,
InvalidSessionException,
MetaMatrixComponentException
Collection of AuthorizationPolicyIDs
that have AuthorizationPermissions in the given AuthorizationRealm.AuthorizationPolicy's AuthorizationPermissions
are actually in the given AuthorizationRealm. The AuthorizationPolicy
may span AuthorizationRealms.
getPolicyIDsWithPermissionsInRealm in interface AuthorizationAdminAPIrealm - The realm in which to search for AuthorizationPermissions.
AuthorizationPolicyIDs 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.
MetaMatrixComponentException - if this service has trouble communicating.
InvalidSessionException
public java.util.Collection getPolicyIDsInRealm(AuthorizationRealm realm)
throws AuthorizationException,
AuthorizationMgmtException,
InvalidSessionException,
MetaMatrixComponentException
Collection of AuthorizationPolicyIDs
in the given AuthorizationRealm.
AuthorizationPolicy's AuthorizationPermissions
are actually in the given AuthorizationRealm. The AuthorizationPolicy
may span AuthorizationRealms.
getPolicyIDsInRealm in interface AuthorizationAdminAPIrealm - The realm in which to search for AuthorizationPermissions.
AuthorizationPolicyIDs 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.
MetaMatrixComponentException - if this service has trouble communicating.
InvalidSessionException
public java.util.Collection getPolicyIDsInPartialRealm(AuthorizationRealm realm)
throws AuthorizationException,
AuthorizationMgmtException,
InvalidSessionException,
MetaMatrixComponentException
Collection of AuthorizationPolicyIDs
that have AuthorizationPermissions that exist in the given
AuthorizationRealm.AuthorizationPolicyIDs
whose AuthorizationRealm AuthorizationRealm are returned.
getPolicyIDsInPartialRealm in interface AuthorizationAdminAPIrealm - The AuthorizationPermissions whose realm name AuthorizationPolicyIDs 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.
MetaMatrixComponentException - if this service has trouble communicating.
InvalidSessionException
public java.util.Collection getPolicyIDsForResourceInRealm(AuthorizationRealm realm,
java.lang.String resourceName)
throws AuthorizationException,
AuthorizationMgmtException,
InvalidSessionException,
MetaMatrixComponentException
Collection of AuthorizationPolicyIDs
that have AuthorizationPermissions on the given resource that
exists in the given AuthorizationRealm.
getPolicyIDsForResourceInRealm in interface AuthorizationAdminAPIrealm - The realm in which to search for AuthorizationPermissions.resourceName - The resource for which to search for AuthorizationPermissions.
AuthorizationPolicyIDs 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.
MetaMatrixComponentException - if this service has trouble communicating.
InvalidSessionException
public boolean isCallerInRole(SessionToken caller,
java.lang.String roleName)
throws AuthorizationException,
AuthorizationMgmtException,
InvalidSessionException,
MetaMatrixComponentException
isCallerInRole in interface AuthorizationAdminAPIcaller - The session token of the MetaMatrix principle involking an administrative method.
AuthorizationMgmtException - if this service has trouble connecting to services it uses.
AuthorizationException
InvalidSessionException
MetaMatrixComponentException
public boolean isSuperUser(java.lang.String username)
throws ServiceException,
MembershipServiceException,
MetaMatrixComponentException
isSuperUser in interface AuthorizationAdminAPIusername - - The user to verify as super user
ServiceException - for generic service errors
MembershipServiceException - If there are issues within the membership service
MetaMatrixComponentException - if this service has trouble communicating.AuthorizationAdminAPI.isSuperUser(java.lang.String)
public java.util.List getGroupEntitlements(AuthorizationRealm realm,
java.lang.String fullyQualifiedGroupName)
throws AuthorizationException,
AuthorizationMgmtException,
InvalidSessionException,
MetaMatrixComponentException
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 AuthorizationAdminAPIrealm - 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.
AuthorizationException - if admninistrator does not have the authority to preform the action.
AuthorizationMgmtException - if an error occurs in the Authorization store.
MetaMatrixComponentException - if this service has trouble communicating.
InvalidSessionException
public java.util.List getElementEntitlements(AuthorizationRealm realm,
java.lang.String elementNamePattern)
throws AuthorizationException,
AuthorizationMgmtException,
InvalidSessionException,
MetaMatrixComponentException
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 AuthorizationAdminAPIrealm - 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.
AuthorizationException
InvalidSessionException
MetaMatrixComponentException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||