|
||||||||||
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.membership.service.MembershipServiceImpl
public class MembershipServiceImpl
This class serves as the primary implementation of the Membership Service, and logically consists of a set of one or more MembershipDomainInterface instances. The Service is responsible for creating and intializing the set of domains, receiving requests from clients, and determining which domain or domains are to handle those requests.
Field Summary |
---|
Fields inherited from interface com.metamatrix.platform.security.api.service.MembershipServiceInterface |
---|
ADMIN_PASSWORD, ADMIN_USERNAME, DEFAULT_ADMIN_USERNAME, DEFAULT_WSDL_USERNAME, DOMAIN_ACTIVE, DOMAIN_NAME, DOMAIN_ORDER, DOMAIN_PROPERTIES, NAME, SECURITY_ENABLED |
Fields inherited from interface com.metamatrix.platform.service.api.ServiceInterface |
---|
WAIT_TO_DIE_TIME |
Constructor Summary | |
---|---|
MembershipServiceImpl()
|
Method Summary | |
---|---|
AuthenticationToken |
authenticateUser(java.lang.String username,
Credentials credential,
java.io.Serializable trustedPayload,
java.lang.String applicationName)
Authenticate a user with the specified username and credential for use with the specified application. |
protected void |
closeService()
Close the service to new work if applicable. |
java.util.List |
getDomainNames()
|
protected java.util.List |
getDomains()
|
java.util.Set |
getGroupNames()
Obtain the collection of group names. |
java.util.Set |
getGroupsForDomain(java.lang.String domainName)
|
java.util.Set |
getGroupsForUser(java.lang.String userName)
Obtain the set of groups to which this user belongs to. |
MetaMatrixPrincipal |
getPrincipal(MetaMatrixPrincipalName principal)
Obtain the principal object that is representative of the principal |
protected void |
initService(java.util.Properties env)
Perform initialization and commence processing. |
boolean |
isSecurityEnabled()
|
boolean |
isSuperUser(java.lang.String username)
|
boolean |
isWsdlUser(java.lang.String username)
|
protected void |
killService()
Terminate all processing and reclaim resources. |
static java.util.Properties |
loadFile(java.lang.String fileName,
java.lang.Class clazz)
Loads the given file by searching multiple loading mechanisms |
java.lang.String |
toString()
Display contents of this membership service by outputting all its domains. |
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, getCurrentState, getDeployedComponentID, getHostname, getID, getInitException, getInstanceName, getProcessName, getProperties, getQueueStatistics, getQueueStatistics, getResourceName, 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, getCurrentState, getHostname, getID, getInitException, getProcessName, getProperties, getQueueStatistics, getQueueStatistics, getServiceType, getStartTime, getStateChangeTime, init, isAlive, setInitException, updateState |
Constructor Detail |
---|
public MembershipServiceImpl()
Method Detail |
---|
protected void initService(java.util.Properties env)
Note: In order to perform the chaining of membership domains, this method assumes
there exists a property in the given environment properties named
DOMAIN_ORDER
that has an ordered value in the form of "A, X, ..., D"
initService
in class AbstractService
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 AuthenticationToken authenticateUser(java.lang.String username, Credentials credential, java.io.Serializable trustedPayload, java.lang.String applicationName)
This method iterates through the domains and, on each domain, attempts to authenticate the principal with the specified credentials. Authentication is successful upon the first domain encountered that authenticates the principals.
authenticateUser
in interface MembershipServiceInterface
username
- credential
- trustedPayload
- applicationName
-
MetaMatrixSecurityException
MembershipServiceException
public MetaMatrixPrincipal getPrincipal(MetaMatrixPrincipalName principal) throws MembershipServiceException, InvalidPrincipalException
getPrincipal
in interface MembershipServiceInterface
principalName
- type
-
MetaMatrixSecurityException
InvalidPrincipalException
MembershipServiceException
public java.util.Set getGroupsForUser(java.lang.String userName) throws MembershipServiceException, InvalidPrincipalException
getGroupsForUser
in interface MembershipServiceInterface
MembershipServiceException
InvalidPrincipalException
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.Set getGroupNames() throws MembershipServiceException
MembershipServiceInterface
getGroupNames
in interface MembershipServiceInterface
MembershipServiceException
MembershipServiceInterface.getGroupNames()
protected java.util.List getDomains()
public java.util.List getDomainNames()
getDomainNames
in interface MembershipServiceInterface
public java.util.Set getGroupsForDomain(java.lang.String domainName) throws MembershipServiceException
getGroupsForDomain
in interface MembershipServiceInterface
MembershipServiceException
public boolean isSuperUser(java.lang.String username)
isSuperUser
in interface MembershipServiceInterface
public boolean isWsdlUser(java.lang.String username)
public boolean isSecurityEnabled() throws MembershipServiceException
isSecurityEnabled
in interface MembershipServiceInterface
MembershipServiceException
MembershipServiceInterface.isSecurityEnabled()
public static java.util.Properties loadFile(java.lang.String fileName, java.lang.Class clazz) throws ServiceStateException
fileName
- clazz
-
ServiceStateException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |