com.metamatrix.platform.admin.apiimpl
Class AdminAPIHelper
java.lang.Object
com.metamatrix.platform.admin.apiimpl.AdminAPIHelper
public class AdminAPIHelper
- extends java.lang.Object
Static implementation of the AdminHelper.
This class is used by all AdminAPIImpl to do general tasks such as
session validation and authorization role checking.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AdminAPIHelper
public AdminAPIHelper()
checkForRequiredRole
public static void checkForRequiredRole(SessionToken adminToken,
java.lang.String roleName,
java.lang.String methodSignature)
throws AuthorizationException,
ComponentNotFoundException
- Checks that user is in the necessary role, throws an exception if
not. Methods of this administrative API may require that a caller be
in one or more security roles.
- Parameters:
adminToken
- a valid SessionToken object representing the session
of the caller attempting an administrative operationroleName
- String name of role to be checked for caller membershipmethodSignature
- the signature with arguments of the method this admin is attempting to call.
- Throws:
AuthorizationException
- if caller is not in the role, and
therefore not authorized to make the operation
ComponentNotFoundException
- if the authorization service could
not be communicated with due to a bad service instance or proxy
validateSession
public static SessionToken validateSession(MetaMatrixSessionID sessionID)
throws InvalidSessionException,
ComponentNotFoundException
- Get the
SessionToken
and validate that the session is active
for the specified MetaMatrixSessionID
.
- Parameters:
sessionID
- the MetaMatrixSessionID
for the session in
question.
- Returns:
- The
SessionToken
for the session in question.
- Throws:
InvalidSessionException
- If session has expired or doesn't exist
ComponentNotFoundException
- If couldn't find needed service component
Copyright © 2009. All Rights Reserved.