|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.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 |
Constructor Summary | |
---|---|
MembershipServiceImpl(java.net.URL dqpURL,
java.net.InetAddress hostAddress)
|
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. |
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 |
void |
initialize(java.util.Properties env)
Perform initialization and commence processing. |
boolean |
isSecurityEnabled()
|
boolean |
isSuperUser(java.lang.String username)
|
boolean |
isWsdlUser(java.lang.String username)
|
void |
start(ApplicationEnvironment environment)
Start the service with the specified environment. |
void |
stop()
Stop the service. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MembershipServiceImpl(java.net.URL dqpURL, java.net.InetAddress hostAddress)
Method Detail |
---|
public void initialize(java.util.Properties env) throws ApplicationInitializationException
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"
initialize
in interface ApplicationService
env
- Initialialization properties
ApplicationInitializationException
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<java.lang.String> 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 void start(ApplicationEnvironment environment) throws ApplicationLifecycleException
ApplicationService
start
in interface ApplicationService
environment
- Environment
ApplicationLifecycleException
- If an error occurs while startingpublic void stop() throws ApplicationLifecycleException
ApplicationService
stop
in interface ApplicationService
ApplicationLifecycleException
- If an error occurs while starting
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |