|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.metamatrix.platform.admin.apiimpl.AuthorizationAdminAPIImpl
@RolesAllowed(value="Admin.ReadOnlyAdmin") 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. |
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. |
static AuthorizationAdminAPI |
getInstance()
|
AuthorizationPolicy |
getPolicy(AuthorizationPolicyID policyID)
Locate the policy that has the specified ID. |
java.util.Collection |
getPolicyIDsInRealm(AuthorizationRealm realm)
Returns a Collection of AuthorizationPolicyID s
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.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 |
isSuperUser(java.lang.String username)
Return true is given username is a super user |
void |
removePrincipalsFromRole(java.util.Set principals,
java.lang.String roleName)
Remove the given set of principals from the given role. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static AuthorizationAdminAPI getInstance()
@RolesAllowed(value="Admin.SystemAdmin") 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 AuthorizationAdminAPI
InvalidSessionException
AuthorizationException
MetaMatrixComponentException
public java.util.Map getRoleDescriptions() throws AuthorizationException, InvalidSessionException, MetaMatrixComponentException
AuthorizationAdminAPI
getRoleDescriptions
in interface AuthorizationAdminAPI
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 getPrincipalsForRole(java.lang.String roleName) throws AuthorizationException, InvalidSessionException, MetaMatrixComponentException
AuthorizationAdminAPI
MetaMatrixPrincipalName
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 AuthorizationAdminAPI
roleName
- 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 AuthorizationAdminAPI
principal
- 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.@RolesAllowed(value="Admin.SystemAdmin") public void addPrincipalsToRole(java.util.Set principals, java.lang.String roleName) throws AuthorizationException, InvalidSessionException, MetaMatrixComponentException
addPrincipalsToRole
in interface AuthorizationAdminAPI
principals
- Set of MetaMatrixPrincipalName
s 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.@RolesAllowed(value="Admin.SystemAdmin") public void removePrincipalsFromRole(java.util.Set principals, java.lang.String roleName) throws AuthorizationException, InvalidSessionException, MetaMatrixComponentException
removePrincipalsFromRole
in interface AuthorizationAdminAPI
principals
- Set of MetaMatrixPrincipalName
s 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 java.util.Collection findAllPolicyIDs() throws AuthorizationException, InvalidSessionException, MetaMatrixComponentException
findAllPolicyIDs
in interface AuthorizationAdminAPI
AuthorizationException
- 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.lang.Boolean containsPolicy(AuthorizationPolicyID policyID) throws AuthorizationException, InvalidSessionException, MetaMatrixComponentException
AuthorizationAdminAPI
containsPolicy
in interface AuthorizationAdminAPI
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 AuthorizationPolicy getPolicy(AuthorizationPolicyID policyID) throws AuthorizationException, AuthorizationMgmtException, InvalidSessionException, MetaMatrixComponentException
AuthorizationAdminAPI
getPolicy
in interface AuthorizationAdminAPI
policyID
- 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
@RolesAllowed(value="Admin.SystemAdmin") public java.util.Set executeTransaction(java.util.List actions) throws AuthorizationException, AuthorizationMgmtException, InvalidSessionException, MetaMatrixComponentException
AuthorizationAdminAPI
executeTransaction
in interface AuthorizationAdminAPI
actions
- 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.util.Collection getPolicyIDsInRealm(AuthorizationRealm realm) throws AuthorizationException, AuthorizationMgmtException, InvalidSessionException, MetaMatrixComponentException
Collection
of AuthorizationPolicyID
s
in the given AuthorizationRealm
.
AuthorizationPolicy
's AuthorizationPermission
s
are actually in the given AuthorizationRealm
. The AuthorizationPolicy
may span AuthorizationRealm
s.
getPolicyIDsInRealm
in interface AuthorizationAdminAPI
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.
MetaMatrixComponentException
- if this service has trouble communicating.
InvalidSessionException
public boolean isSuperUser(java.lang.String username) throws ServiceException, MembershipServiceException, MetaMatrixComponentException
isSuperUser
in interface AuthorizationAdminAPI
username
- - 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)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |