|
||||||||||
| 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_HOSTS, ADMIN_PASSWORD, ADMIN_USERNAME, AT, 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<java.lang.String> |
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, getConnectionPoolStats, getCurrentState, getHostname, getID, getInitException, getInstanceName, getProcessName, getProperties, getQueueStatistics, getQueueStatistics, getResourceName, getServiceData, 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, getConnectionPoolStats, getCurrentState, getHostname, getID, getInitException, getProcessName, getProperties, getQueueStatistics, getQueueStatistics, getServiceData, 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 AbstractServicejava.lang.Exception
protected void waitForServiceToClear()
throws java.lang.Exception
waitForServiceToClear in class AbstractServicejava.lang.Exceptionprotected 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 MembershipServiceInterfaceusername - credential - trustedPayload - applicationName -
MetaMatrixSecurityException
MembershipServiceException
public MetaMatrixPrincipal getPrincipal(MetaMatrixPrincipalName principal)
throws MembershipServiceException,
InvalidPrincipalException
getPrincipal in interface MembershipServiceInterfaceprincipalName - type -
MetaMatrixSecurityException
InvalidPrincipalException
MembershipServiceException
public java.util.Set getGroupsForUser(java.lang.String userName)
throws MembershipServiceException,
InvalidPrincipalException
getGroupsForUser in interface MembershipServiceInterfaceMembershipServiceException
InvalidPrincipalExceptionpublic java.lang.String toString()
toString in class java.lang.Object
public java.util.Set getGroupNames()
throws MembershipServiceException
MembershipServiceInterface
getGroupNames in interface MembershipServiceInterfaceMembershipServiceExceptionMembershipServiceInterface.getGroupNames()protected java.util.List getDomains()
public java.util.List getDomainNames()
getDomainNames in interface MembershipServiceInterface
public java.util.Set<java.lang.String> getGroupsForDomain(java.lang.String domainName)
throws MembershipServiceException
getGroupsForDomain in interface MembershipServiceInterfaceMembershipServiceExceptionpublic boolean isSuperUser(java.lang.String username)
isSuperUser in interface MembershipServiceInterfacepublic boolean isWsdlUser(java.lang.String username)
public boolean isSecurityEnabled()
throws MembershipServiceException
isSecurityEnabled in interface MembershipServiceInterfaceMembershipServiceExceptionMembershipServiceInterface.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 | |||||||||