Teiid 8.3.0.Final

org.teiid.adminapi
Class AdminFactory.AdminImpl

java.lang.Object
  extended by org.teiid.adminapi.AdminFactory.AdminImpl
All Implemented Interfaces:
Admin
Enclosing class:
AdminFactory

public class AdminFactory.AdminImpl
extends Object
implements Admin


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.teiid.adminapi.Admin
Admin.Cache, Admin.SchemaObjectType
 
Constructor Summary
AdminFactory.AdminImpl(org.jboss.as.controller.client.ModelControllerClient connection)
           
 
Method Summary
 void addDataRoleMapping(String vdbName, int vdbVersion, String dataRole, String mappedRoleName)
          Assign a Role name to the Data Role in a given VDB
 void assignToModel(String vdbName, int vdbVersion, String modelName, String sourceName, String translatorName, String dsName)
          Assign a Translator and Data source to a VDB's Model
 org.jboss.dmr.ModelNode buildUndeployRequest(String name, boolean force)
           
 void cancelRequest(String sessionId, long executionId)
          Cancel Request
 void changeVDBConnectionType(String vdbName, int vdbVersion, VDB.ConnectionType type)
          Change the VDB.ConnectionType of the VDB.
 void clearCache(String cacheType)
          Clear the cache or caches specified by the cacheIdentifier.
 void clearCache(String cacheType, String vdbName, int vdbVersion)
          Clear the cache of the given VDB for provided cache type
 void close()
          Closes the admin connection
 void createDataSource(String deploymentName, String templateName, Properties properties)
          Creates a JCA data source
 void deleteDataSource(String deployedName)
          Delete data source.
 void deploy(String deployName, InputStream vdb)
          Deploy a artifact (VDB, JAR, RAR files)
 void deploy(String deployName, InputStream vdb, boolean persist)
           
 Collection<? extends CacheStatistics> getCacheStats(String cacheType)
          Get the Cache Statistics for the given type
 Collection<String> getCacheTypes()
          Get the Caches that correspond to the specified identifier pattern
 Properties getDataSource(String deployedName)
          Given the deployed name of the data source, this will return all the configuration properties used to create the datasource.
 Collection<String> getDataSourceNames()
          /subsystem=datasources:read-children-names(child-type=data-source) /subsystem=resource-adapters/resource-adapter={rar-file}:read-resource
 Set<String> getDataSourceTemplateNames()
          Get the Datasource templates available in the configuration.
 List<String> getDeployments()
           
 Collection<? extends EngineStatistics> getEngineStats()
          Get the Engine Statistics for the given type
 Set<String> getInstalledJDBCDrivers()
           
 String getProfileName()
           
 String getQueryPlan(String sessionId, int executionId)
          Get the Query Plan for the given session with provided execution id.
 Collection<? extends Request> getRequests()
          Get the all Requests that are currently in process
 Collection<? extends Request> getRequestsForSession(String sessionId)
          Get the Requests for the given session
 String getSchema(String vdbName, int vdbVersion, String modelName, EnumSet<Admin.SchemaObjectType> allowedTypes, String typeNamePattern)
          Retrieve the schema of the given model
 Collection<? extends Session> getSessions()
          Get all the current Sessions.
 Collection<PropertyDefinition> getTemplatePropertyDefinitions(String templateName)
          pattern on CLI /subsystem=datasources/data-source=foo:read-resource-description
 Collection<? extends Transaction> getTransactions()
          Get all transaction matching the identifier.
 Translator getTranslator(String deployedName)
          Get the translator by the given the deployed name.
 Collection<? extends Translator> getTranslators()
          Get the translators that are available in the configuration
 VDB getVDB(String vdbName, int vdbVersion)
          Get the VDB
 List<? extends VDB> getVDBs()
          Get the VDBs that currently deployed in the system
 Collection<? extends WorkerPoolStatistics> getWorkerPoolStats()
          Get the Worker Pool statistics in runtime engine.
 void markDataSourceAvailable(String jndiName)
          Tell the engine that the given source is available.
 void removeDataRoleMapping(String vdbName, int vdbVersion, String dataRole, String mappedRoleName)
          Remove a Role name to the Data Role in a given VDB
 void restartVDB(String vdbName, int vdbVersion, String... models)
          Restart the VDB.
 void setAnyAuthenticatedForDataRole(String vdbName, int vdbVersion, String dataRole, boolean anyAuthenticated)
          Set the any authenticated flag on the Data Role in a given VDB
 void terminateSession(String sessionId)
          Terminate the Session
 void terminateTransaction(String transactionId)
          Mark the given global transaction as rollback only.
 void undeploy(String deployedName)
          Undeploy artifact (VDB, JAR, RAR files)
 void undeploy(String deployedName, boolean force)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdminFactory.AdminImpl

public AdminFactory.AdminImpl(org.jboss.as.controller.client.ModelControllerClient connection)
Method Detail

clearCache

public void clearCache(String cacheType)
                throws AdminException
Description copied from interface: Admin
Clear the cache or caches specified by the cacheIdentifier.

Specified by:
clearCache in interface Admin
Parameters:
cacheType - Cache Type No wild cards currently supported, must be explicit
Throws:
AdminException

clearCache

public void clearCache(String cacheType,
                       String vdbName,
                       int vdbVersion)
                throws AdminException
Description copied from interface: Admin
Clear the cache of the given VDB for provided cache type

Specified by:
clearCache in interface Admin
Parameters:
cacheType - Cache Type No wild cards currently supported, must be explicit
vdbName - - Name of the VDB
vdbVersion - - VDB version
Throws:
AdminException

close

public void close()
Description copied from interface: Admin
Closes the admin connection

Specified by:
close in interface Admin

getInstalledJDBCDrivers

public Set<String> getInstalledJDBCDrivers()
                                    throws AdminProcessingException
Throws:
AdminProcessingException

getProfileName

public String getProfileName()
                      throws AdminProcessingException
Throws:
AdminProcessingException

createDataSource

public void createDataSource(String deploymentName,
                             String templateName,
                             Properties properties)
                      throws AdminException
Description copied from interface: Admin
Creates a JCA data source

Specified by:
createDataSource in interface Admin
Parameters:
deploymentName - - name of the source
templateName - - template of data source
properties - - properties
Throws:
AdminException

getDataSource

public Properties getDataSource(String deployedName)
                         throws AdminException
Description copied from interface: Admin
Given the deployed name of the data source, this will return all the configuration properties used to create the datasource. If sensitive information like passwords are masked, they will NOT be decrypted. "driver-name" property on the returned properties defines the template name used to create this data source.

Specified by:
getDataSource in interface Admin
Throws:
AdminException

deleteDataSource

public void deleteDataSource(String deployedName)
                      throws AdminException
Description copied from interface: Admin
Delete data source.

Specified by:
deleteDataSource in interface Admin
Throws:
AdminException

undeploy

public void undeploy(String deployedName)
              throws AdminException
Description copied from interface: Admin
Undeploy artifact (VDB, JAR, RAR files)

Specified by:
undeploy in interface Admin
Throws:
AdminException

undeploy

public void undeploy(String deployedName,
                     boolean force)
              throws AdminException
Throws:
AdminException

buildUndeployRequest

public org.jboss.dmr.ModelNode buildUndeployRequest(String name,
                                                    boolean force)
                                             throws org.jboss.as.cli.operation.OperationFormatException
Throws:
org.jboss.as.cli.operation.OperationFormatException

deploy

public void deploy(String deployName,
                   InputStream vdb)
            throws AdminException
Description copied from interface: Admin
Deploy a artifact (VDB, JAR, RAR files)

Specified by:
deploy in interface Admin
Parameters:
deployName - Name of the VDB file to save under
Throws:
AdminException

deploy

public void deploy(String deployName,
                   InputStream vdb,
                   boolean persist)
            throws AdminException
Throws:
AdminException

getCacheStats

public Collection<? extends CacheStatistics> getCacheStats(String cacheType)
                                                    throws AdminException
Description copied from interface: Admin
Get the Cache Statistics for the given type

Specified by:
getCacheStats in interface Admin
Parameters:
cacheType - Cache Type
Returns:
Collection of CacheStatistics
Throws:
AdminException

getEngineStats

public Collection<? extends EngineStatistics> getEngineStats()
                                                      throws AdminException
Description copied from interface: Admin
Get the Engine Statistics for the given type

Specified by:
getEngineStats in interface Admin
Returns:
Collection of EngineStatistics
Throws:
AdminException

getCacheTypes

public Collection<String> getCacheTypes()
                                 throws AdminException
Description copied from interface: Admin
Get the Caches that correspond to the specified identifier pattern

Specified by:
getCacheTypes in interface Admin
Returns:
Collection of String
Throws:
AdminException

getDataSourceNames

public Collection<String> getDataSourceNames()
                                      throws AdminException
/subsystem=datasources:read-children-names(child-type=data-source) /subsystem=resource-adapters/resource-adapter={rar-file}:read-resource

Specified by:
getDataSourceNames in interface Admin
Throws:
AdminException
See Also:
Admin.getDataSourceNames()

getDeployments

public List<String> getDeployments()

getDataSourceTemplateNames

public Set<String> getDataSourceTemplateNames()
                                       throws AdminProcessingException
Description copied from interface: Admin
Get the Datasource templates available in the configuration.

Specified by:
getDataSourceTemplateNames in interface Admin
Returns:
Set of template names.
Throws:
AdminProcessingException

getWorkerPoolStats

public Collection<? extends WorkerPoolStatistics> getWorkerPoolStats()
                                                              throws AdminProcessingException
Description copied from interface: Admin
Get the Worker Pool statistics in runtime engine.

Specified by:
getWorkerPoolStats in interface Admin
Returns:
Collection of WorkerPoolStatistics
Throws:
AdminProcessingException

cancelRequest

public void cancelRequest(String sessionId,
                          long executionId)
                   throws AdminProcessingException
Description copied from interface: Admin
Cancel Request

Specified by:
cancelRequest in interface Admin
Parameters:
sessionId - session Identifier for the request.
executionId - request Identifier
Throws:
AdminProcessingException

getRequests

public Collection<? extends Request> getRequests()
                                          throws AdminException
Description copied from interface: Admin
Get the all Requests that are currently in process

Specified by:
getRequests in interface Admin
Returns:
Collection of Request
Throws:
AdminException

getRequestsForSession

public Collection<? extends Request> getRequestsForSession(String sessionId)
                                                    throws AdminException
Description copied from interface: Admin
Get the Requests for the given session

Specified by:
getRequestsForSession in interface Admin
Returns:
Collection of Request
Throws:
AdminException

getSessions

public Collection<? extends Session> getSessions()
                                          throws AdminException
Description copied from interface: Admin
Get all the current Sessions.

Specified by:
getSessions in interface Admin
Returns:
Collection of Session
Throws:
AdminException

getTemplatePropertyDefinitions

public Collection<PropertyDefinition> getTemplatePropertyDefinitions(String templateName)
                                                              throws AdminException
pattern on CLI /subsystem=datasources/data-source=foo:read-resource-description

Specified by:
getTemplatePropertyDefinitions in interface Admin
Parameters:
templateName - - Name of the connector
Returns:
Throws:
AdminException

getTransactions

public Collection<? extends Transaction> getTransactions()
                                                  throws AdminException
Description copied from interface: Admin
Get all transaction matching the identifier.

Specified by:
getTransactions in interface Admin
Returns:
Throws:
AdminException

terminateSession

public void terminateSession(String sessionId)
                      throws AdminException
Description copied from interface: Admin
Terminate the Session

Specified by:
terminateSession in interface Admin
Throws:
AdminException

terminateTransaction

public void terminateTransaction(String transactionId)
                          throws AdminException
Description copied from interface: Admin
Mark the given global transaction as rollback only.

Specified by:
terminateTransaction in interface Admin
Throws:
AdminException

getTranslator

public Translator getTranslator(String deployedName)
                         throws AdminException
Description copied from interface: Admin
Get the translator by the given the deployed name.

Specified by:
getTranslator in interface Admin
Parameters:
deployedName - - name of the deployed translator
Returns:
null if not found
Throws:
AdminException

getTranslators

public Collection<? extends Translator> getTranslators()
                                                throws AdminException
Description copied from interface: Admin
Get the translators that are available in the configuration

Specified by:
getTranslators in interface Admin
Returns:
Collection of Translator
Throws:
AdminException

getVDB

public VDB getVDB(String vdbName,
                  int vdbVersion)
           throws AdminException
Description copied from interface: Admin
Get the VDB

Specified by:
getVDB in interface Admin
Returns:
Throws:
AdminException

getVDBs

public List<? extends VDB> getVDBs()
                            throws AdminException
Description copied from interface: Admin
Get the VDBs that currently deployed in the system

Specified by:
getVDBs in interface Admin
Returns:
Collection of VDBs. There could be multiple VDBs with the same name in the Collection but they will differ by VDB version.
Throws:
AdminException

addDataRoleMapping

public void addDataRoleMapping(String vdbName,
                               int vdbVersion,
                               String dataRole,
                               String mappedRoleName)
                        throws AdminException
Description copied from interface: Admin
Assign a Role name to the Data Role in a given VDB

Specified by:
addDataRoleMapping in interface Admin
Throws:
AdminException

removeDataRoleMapping

public void removeDataRoleMapping(String vdbName,
                                  int vdbVersion,
                                  String dataRole,
                                  String mappedRoleName)
                           throws AdminException
Description copied from interface: Admin
Remove a Role name to the Data Role in a given VDB

Specified by:
removeDataRoleMapping in interface Admin
Throws:
AdminException

setAnyAuthenticatedForDataRole

public void setAnyAuthenticatedForDataRole(String vdbName,
                                           int vdbVersion,
                                           String dataRole,
                                           boolean anyAuthenticated)
                                    throws AdminException
Description copied from interface: Admin
Set the any authenticated flag on the Data Role in a given VDB

Specified by:
setAnyAuthenticatedForDataRole in interface Admin
Throws:
AdminException

changeVDBConnectionType

public void changeVDBConnectionType(String vdbName,
                                    int vdbVersion,
                                    VDB.ConnectionType type)
                             throws AdminException
Description copied from interface: Admin
Change the VDB.ConnectionType of the VDB.

Specified by:
changeVDBConnectionType in interface Admin
Parameters:
vdbName - Name of the VDB
vdbVersion - Version of the VDB
Throws:
AdminException

assignToModel

public void assignToModel(String vdbName,
                          int vdbVersion,
                          String modelName,
                          String sourceName,
                          String translatorName,
                          String dsName)
                   throws AdminException
Description copied from interface: Admin
Assign a Translator and Data source to a VDB's Model

Specified by:
assignToModel in interface Admin
Parameters:
vdbName - Name of the VDB
vdbVersion - Version of the VDB
modelName - Name of the Model to map Connection Factory
sourceName - sourceName for the model
dsName - data source name that can found in the JNDI map.
Throws:
AdminException

markDataSourceAvailable

public void markDataSourceAvailable(String jndiName)
                             throws AdminException
Description copied from interface: Admin
Tell the engine that the given source is available. Pending dynamic vdb metadata loads will be resumed.

Specified by:
markDataSourceAvailable in interface Admin
Throws:
AdminException

restartVDB

public void restartVDB(String vdbName,
                       int vdbVersion,
                       String... models)
                throws AdminException
Description copied from interface: Admin
Restart the VDB. This issues reload of the metadata.

Specified by:
restartVDB in interface Admin
models - names for which metadata needs to be reloaded, if null or not supplied all models reloaded
Throws:
AdminException

getSchema

public String getSchema(String vdbName,
                        int vdbVersion,
                        String modelName,
                        EnumSet<Admin.SchemaObjectType> allowedTypes,
                        String typeNamePattern)
                 throws AdminException
Description copied from interface: Admin
Retrieve the schema of the given model

Specified by:
getSchema in interface Admin
typeNamePattern - RegEx pattern to filter to names of tables, procedures that are being read. Null means no filter.
Throws:
AdminException

getQueryPlan

public String getQueryPlan(String sessionId,
                           int executionId)
                    throws AdminException
Description copied from interface: Admin
Get the Query Plan for the given session with provided execution id.

Specified by:
getQueryPlan in interface Admin
Returns:
Throws:
AdminException

Teiid 8.3.0.Final

Copyright © 2013 JBoss by Red Hat. All Rights Reserved.