com.metamatrix.dqp.embedded.admin
Class DQPSecurityAdminImpl

java.lang.Object
  extended by com.metamatrix.dqp.embedded.admin.DQPSecurityAdminImpl
All Implemented Interfaces:
SecurityAdmin

public class DQPSecurityAdminImpl
extends java.lang.Object
implements SecurityAdmin

Since:
4.3

Constructor Summary
DQPSecurityAdminImpl(EmbeddedConnectionFactoryImpl manager)
           
 
Method Summary
protected  AdminException accumulateProcessingException(AdminException parent, java.lang.Exception e)
           
protected  AdminException accumulateSystemException(AdminException parent, java.lang.Exception e)
           
 void assignRoleToGroup(java.lang.String roleIdentifier, java.lang.String groupIdentifier)
          Assign to the given Group the given Administrative Role.
 boolean authenticateUser(java.lang.String username, char[] credentials, java.io.Serializable trustePayload, java.lang.String applicationName)
          Authenticate a user with the specified user name and credentials for use with the specified application.
protected  void changeVDBStatus(java.lang.String name, java.lang.String version, int status)
           
protected  java.util.Collection convertPropertyDefinitions(ComponentType ctype, java.util.Properties properties)
          Convert a ComponentType and a set of properties into a Collection of com.metamatrix.admin.api.objects.PropertyDefinition objects
protected  java.util.Collection convertPropertyDefinitions(java.util.Properties properties)
          Convert a set of properties into a Collection of com.metamatrix.admin.api.objects.PropertyDefinition objects
protected  java.lang.Object convertToAdminObjects(java.lang.Object src)
           
protected  java.lang.Object convertToAdminObjects(java.lang.Object src, java.lang.Object parent)
           
 char[] exportDataRoles(java.lang.String vdbName, java.lang.String vdbVersion)
          Export the data roles defined for the given vdb from the current system
 java.util.List<java.lang.String> getDomainNames()
          Returns the active authorization provider domain names, in authentication order.
 java.util.Collection<Group> getGroups(java.lang.String groupIdentifier)
          Get the group denoted by the given groupIdentifier.
 java.util.Collection<Group> getGroupsForDomain(java.lang.String domainName)
          Return the Groups for a given domain.
 java.util.Collection<Group> getGroupsForUser(java.lang.String userIdentifier)
          Get the group memberships for the given user.
 EmbeddedConnectionFactoryImpl getManager()
           
 java.util.Collection getRolesForGroup(java.lang.String groupIdentifier)
          Get the Collection of administrative role names possessed by the given group, if any.
 java.lang.String importDataRoles(java.lang.String vdbName, java.lang.String vdbVersion, char[] xmlContents, AdminOptions options)
          Import the data Roles for given vdb and version into the connected server
protected  java.lang.String prettyPrintBindingNames(java.util.List bindings)
           
 void removeRoleFromGroup(java.lang.String roleIdentifier, java.lang.String groupIdentifier)
          Remove an administrative role from the given Group.
protected  SessionToken validateSession()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DQPSecurityAdminImpl

public DQPSecurityAdminImpl(EmbeddedConnectionFactoryImpl manager)
Method Detail

assignRoleToGroup

public void assignRoleToGroup(java.lang.String roleIdentifier,
                              java.lang.String groupIdentifier)
                       throws AdminException
Description copied from interface: SecurityAdmin
Assign to the given Group the given Administrative Role.

Specified by:
assignRoleToGroup in interface SecurityAdmin
Parameters:
roleIdentifier - one of AdminRoles.
groupIdentifier - the unique identifier for the Group. The WILDCARD cannot be used here.
Throws:
AdminException - if there's a system error.
Since:
4.3
See Also:
com.metamatrix.admin.api.server.ServerSecurityAdmin#addRoleToGroup(java.lang.String, java.lang.String)

removeRoleFromGroup

public void removeRoleFromGroup(java.lang.String roleIdentifier,
                                java.lang.String groupIdentifier)
                         throws AdminException
Description copied from interface: SecurityAdmin
Remove an administrative role from the given Group.

Specified by:
removeRoleFromGroup in interface SecurityAdmin
Parameters:
roleIdentifier - one of AdminRoles
groupIdentifier - the unique identifier for the group. The WILDCARD cannot be used here.
Throws:
AdminException - if there's a system error.
Since:
4.3
See Also:
ServerSecurityAdmin.removeRoleFromGroup(java.lang.String, java.lang.String)

authenticateUser

public boolean authenticateUser(java.lang.String username,
                                char[] credentials,
                                java.io.Serializable trustePayload,
                                java.lang.String applicationName)
                         throws AdminException
Description copied from interface: SecurityAdmin
Authenticate a user with the specified user name and credentials for use with the specified application. The application name may also be used by the Membership Service to determine the appropriate authentication mechanism.

Specified by:
authenticateUser in interface SecurityAdmin
Parameters:
username - the user name that is to be authenticated
applicationName - the name of the application for which the user is authenticating
Returns:
true if the authentication is successful
Throws:
AdminException

getGroupsForUser

public java.util.Collection<Group> getGroupsForUser(java.lang.String userIdentifier)
                                             throws AdminException
Description copied from interface: SecurityAdmin
Get the group memberships for the given user.

Specified by:
getGroupsForUser in interface SecurityAdmin
Parameters:
userIdentifier - The unique identifier for the user. This is generally a user name. The WILDCARD cannot be used here.
Returns:
The collection of groups in which the given user has membership.
Throws:
AdminException - if there's a system error.
Since:
4.3
See Also:
com.metamatrix.admin.api.server.ServerSecurityAdmin#getGroupsForUser(java.lang.String, boolean)

getGroups

public java.util.Collection<Group> getGroups(java.lang.String groupIdentifier)
                                      throws AdminException
Description copied from interface: SecurityAdmin
Get the group denoted by the given groupIdentifier.

Specified by:
getGroups in interface SecurityAdmin
Parameters:
groupIdentifier - The unique identifier for the Group. This is generally a group name. Note that by supplying the WILDCARD identifier, all all groups in the system will retrieved.
Returns:
The Collection of groups.
Throws:
AdminException - if there's a system error.
Since:
4.3
See Also:
ServerSecurityAdmin.getGroups(java.lang.String)

getRolesForGroup

public java.util.Collection getRolesForGroup(java.lang.String groupIdentifier)
                                      throws AdminException
Description copied from interface: SecurityAdmin
Get the Collection of administrative role names possessed by the given group, if any.

Specified by:
getRolesForGroup in interface SecurityAdmin
Parameters:
groupIdentifier - The unique identifier for the Group. This is group name. The WILDCARD cannot be used here.
Returns:
The Collection of Roles.
Throws:
AdminException - if there's a system error.
Since:
4.3
See Also:
ServerSecurityAdmin.getRolesForGroup(java.lang.String)

importDataRoles

public java.lang.String importDataRoles(java.lang.String vdbName,
                                        java.lang.String vdbVersion,
                                        char[] xmlContents,
                                        AdminOptions options)
                                 throws AdminException
Description copied from interface: SecurityAdmin
Import the data Roles for given vdb and version into the connected server

Specified by:
importDataRoles in interface SecurityAdmin
Parameters:
vdbName - - target name of the VDB, the roles to be imported under
vdbVersion - - target version of the vdb, the roles to be imported under
xmlContents - - character data array containing the XML file which defines the roles
options - - options to overwrite in case the matching roles already exist.
Returns:
a report of the import
Throws:
AdminException
See Also:
ServerSecurityAdmin.importDataRoles(java.lang.String, java.lang.String, char[], org.teiid.adminapi.AdminOptions)

exportDataRoles

public char[] exportDataRoles(java.lang.String vdbName,
                              java.lang.String vdbVersion)
                       throws AdminException
Description copied from interface: SecurityAdmin
Export the data roles defined for the given vdb from the current system

Specified by:
exportDataRoles in interface SecurityAdmin
Parameters:
vdbName - - Name of the vdb
vdbVersion - - version of the vdb
Returns:
- char[] stream containing the XML contents of the roles.
Throws:
AdminException
See Also:
ServerSecurityAdmin.exportDataRoles(java.lang.String, java.lang.String)

getDomainNames

public java.util.List<java.lang.String> getDomainNames()
                                                throws AdminException
Description copied from interface: SecurityAdmin
Returns the active authorization provider domain names, in authentication order.

Specified by:
getDomainNames in interface SecurityAdmin
Returns:
List
Throws:
AdminException

getGroupsForDomain

public java.util.Collection<Group> getGroupsForDomain(java.lang.String domainName)
                                               throws AdminException
Description copied from interface: SecurityAdmin
Return the Groups for a given domain. The domain name must be an specified exactly. See #getActiveDomainNames() for possible domain names.

Specified by:
getGroupsForDomain in interface SecurityAdmin
Returns:
Throws:
AdminException

accumulateSystemException

protected AdminException accumulateSystemException(AdminException parent,
                                                   java.lang.Exception e)

accumulateProcessingException

protected AdminException accumulateProcessingException(AdminException parent,
                                                       java.lang.Exception e)

prettyPrintBindingNames

protected java.lang.String prettyPrintBindingNames(java.util.List bindings)

getManager

public EmbeddedConnectionFactoryImpl getManager()
Returns:
Returns the manager.
Since:
4.3

convertToAdminObjects

protected java.lang.Object convertToAdminObjects(java.lang.Object src)

convertToAdminObjects

protected java.lang.Object convertToAdminObjects(java.lang.Object src,
                                                 java.lang.Object parent)

convertPropertyDefinitions

protected java.util.Collection convertPropertyDefinitions(ComponentType ctype,
                                                          java.util.Properties properties)
Convert a ComponentType and a set of properties into a Collection of com.metamatrix.admin.api.objects.PropertyDefinition objects

Parameters:
ctype -
properties -
Returns:
Since:
4.3

convertPropertyDefinitions

protected java.util.Collection convertPropertyDefinitions(java.util.Properties properties)
Convert a set of properties into a Collection of com.metamatrix.admin.api.objects.PropertyDefinition objects

Parameters:
ctype -
properties -
Returns:
Since:
4.3

validateSession

protected SessionToken validateSession()

changeVDBStatus

protected void changeVDBStatus(java.lang.String name,
                               java.lang.String version,
                               int status)
                        throws AdminException
Throws:
AdminException


Copyright © 2009. All Rights Reserved.