Package org.teiid.adminapi
Interface Admin
-
- All Known Implementing Classes:
AdminFactory.AdminImpl
,EmbeddedAdminImpl
public interface Admin
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Admin.Cache
static class
Admin.SchemaObjectType
static class
Admin.TranlatorPropertyType
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
addDataRoleMapping(String vdbName, int vdbVersion, String dataRole, String mappedRoleName)
Deprecated.void
addDataRoleMapping(String vdbName, String vdbVersion, String dataRole, String mappedRoleName)
Assign a Role name to the Data Role in a given VDBvoid
addSource(String vdbName, int vdbVersion, String modelName, String sourceName, String translatorName, String dsName)
Deprecated.void
addSource(String vdbName, String vdbVersion, String modelName, String sourceName, String translatorName, String dsName)
Adds aTranslator
and Data source to aVDB
's Modelvoid
cancelRequest(String sessionId, long executionId)
Cancel Requestvoid
changeVDBConnectionType(String vdbName, int vdbVersion, VDB.ConnectionType type)
Deprecated.void
changeVDBConnectionType(String vdbName, String vdbVersion, VDB.ConnectionType type)
Change theVDB.ConnectionType
of theVDB
.void
clearCache(String cacheType)
Clear the cache or caches specified by the cacheIdentifier.void
clearCache(String cacheType, String vdbName, int vdbVersion)
Deprecated.void
clearCache(String cacheType, String vdbName, String vdbVersion)
Clear the cache of the given VDB for provided cache typevoid
close()
Closes the admin connectionvoid
createDataSource(String deploymentName, String templateName, Properties properties)
Creates a JCA data source
Use this method to create JDBC driver based connection, XA-datasource or Resource Adapter.void
deleteDataSource(String deployedName)
Delete data source.void
deploy(String deployName, InputStream content)
Deploy a artifact (VDB, JAR, RAR files)void
deploy(String deployName, InputStream content, boolean persistent)
Deploy a artifact (VDB, JAR, RAR files)void
deployVDBZip(URL url)
Deploy a .vdb or .zip vdb.Collection<? extends CacheStatistics>
getCacheStats(String cacheType)
Get the Cache Statistics for the given typeCollection<String>
getCacheTypes()
Get the Caches that correspond to the specified identifier patternProperties
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()
Returns the all names of all the data sources available in the configuration.Set<String>
getDataSourceTemplateNames()
Get the Datasource templates available in the configuration.List<String>
getDeployments()
Get existing deployments on in the sysemCollection<? extends EngineStatistics>
getEngineStats()
Get the Engine Statistics for the given typeString
getQueryPlan(String sessionId, long 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 processCollection<? extends Request>
getRequestsForSession(String sessionId)
Get the Requests for the given sessionString
getSchema(String vdbName, int vdbVersion, String modelName, EnumSet<Admin.SchemaObjectType> allowedTypes, String typeNamePattern)
Deprecated.String
getSchema(String vdbName, String vdbVersion, String modelName, EnumSet<Admin.SchemaObjectType> allowedTypes, String typeNamePattern)
Retrieve the schema of the given modelCollection<? extends Session>
getSessions()
Get all the current Sessions.Collection<? extends PropertyDefinition>
getTemplatePropertyDefinitions(String templateName)
Get all of the available configuration Properties for the specified connectorCollection<? extends Transaction>
getTransactions()
Get all transaction matching the identifier.Translator
getTranslator(String deployedName)
Get the translator by the given the deployed name.Collection<? extends PropertyDefinition>
getTranslatorPropertyDefinitions(String translatorName)
Deprecated.Collection<? extends PropertyDefinition>
getTranslatorPropertyDefinitions(String translatorName, Admin.TranlatorPropertyType type)
Get all of the available configuration Properties for the specified translatorCollection<? extends Translator>
getTranslators()
Get the translators that are available in the configurationVDB
getVDB(String vdbName, int vdbVersion)
Deprecated.VDB
getVDB(String vdbName, String vdbVersion)
Get the VDBCollection<? extends VDB>
getVDBs()
Get the VDBs that are currently deployed in the systemCollection<? extends VDB>
getVDBs(boolean singleInstance)
Get the VDBs that are currently deployed in the systemCollection<? 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)
Deprecated.void
removeDataRoleMapping(String vdbName, String vdbVersion, String dataRole, String mappedRoleName)
Remove a Role name to the Data Role in a given VDBvoid
removeSource(String vdbName, int vdbVersion, String modelName, String sourceName)
Deprecated.void
removeSource(String vdbName, String vdbVersion, String modelName, String sourceName)
Removes aTranslator
and Data source from aVDB
's Modelvoid
restart()
Restart the Servervoid
restartVDB(String vdbName, int vdbVersion, String... models)
Deprecated.void
restartVDB(String vdbName, String vdbVersion, String... models)
Restart the VDB.void
setAnyAuthenticatedForDataRole(String vdbName, int vdbVersion, String dataRole, boolean anyAuthenticated)
Deprecated.void
setAnyAuthenticatedForDataRole(String vdbName, String vdbVersion, String dataRole, boolean anyAuthenticated)
Set the any authenticated flag on the Data Role in a given VDBvoid
setProfileName(String name)
Set the profile name.void
terminateSession(String sessionId)
Terminate the Sessionvoid
terminateTransaction(String transactionId)
Mark the given global transaction as rollback only.void
undeploy(String deployedName)
Undeploy artifact (VDB, JAR, RAR files)void
updateSource(String vdbName, int vdbVersion, String sourceName, String translatorName, String dsName)
Deprecated.void
updateSource(String vdbName, String vdbVersion, String sourceName, String translatorName, String dsName)
Update a source'sTranslator
and Data source
-
-
-
Method Detail
-
removeSource
@Deprecated void removeSource(String vdbName, int vdbVersion, String modelName, String sourceName) throws AdminException
Deprecated.Removes aTranslator
and Data source from aVDB
's Model- Parameters:
vdbName
- Name of the VDBvdbVersion
- Version of the VDBmodelName
- Name of the ModelsourceName
- source name- Throws:
AdminException
-
removeSource
void removeSource(String vdbName, String vdbVersion, String modelName, String sourceName) throws AdminException
Removes aTranslator
and Data source from aVDB
's Model- Parameters:
vdbName
- Name of the VDBvdbVersion
- Version of the VDBmodelName
- Name of the ModelsourceName
- source name- Throws:
AdminException
-
addSource
@Deprecated void addSource(String vdbName, int vdbVersion, String modelName, String sourceName, String translatorName, String dsName) throws AdminException
Deprecated.Adds aTranslator
and Data source to aVDB
's Model- Parameters:
vdbName
- Name of the VDBvdbVersion
- Version of the VDBmodelName
- Name of the ModelsourceName
- source nametranslatorName
-dsName
- data source name that can found in the JNDI map.- Throws:
AdminException
-
addSource
void addSource(String vdbName, String vdbVersion, String modelName, String sourceName, String translatorName, String dsName) throws AdminException
Adds aTranslator
and Data source to aVDB
's Model- Parameters:
vdbName
- Name of the VDBvdbVersion
- Version of the VDBmodelName
- Name of the ModelsourceName
- source nametranslatorName
-dsName
- data source name that can found in the JNDI map.- Throws:
AdminException
-
updateSource
@Deprecated void updateSource(String vdbName, int vdbVersion, String sourceName, String translatorName, String dsName) throws AdminException
Deprecated.Update a source'sTranslator
and Data source- Parameters:
vdbName
- Name of the VDBvdbVersion
- Version of the VDBsourceName
- source nametranslatorName
-dsName
- data source name that can found in the JNDI map.- Throws:
AdminException
-
updateSource
void updateSource(String vdbName, String vdbVersion, String sourceName, String translatorName, String dsName) throws AdminException
Update a source'sTranslator
and Data source- Parameters:
vdbName
- Name of the VDBvdbVersion
- Version of the VDBsourceName
- source nametranslatorName
-dsName
- data source name that can found in the JNDI map.- Throws:
AdminException
-
changeVDBConnectionType
@Deprecated void changeVDBConnectionType(String vdbName, int vdbVersion, VDB.ConnectionType type) throws AdminException
Deprecated.Change theVDB.ConnectionType
of theVDB
.- Parameters:
vdbName
- Name of the VDBvdbVersion
- Version of the VDBtype
-- Throws:
AdminException
-
changeVDBConnectionType
void changeVDBConnectionType(String vdbName, String vdbVersion, VDB.ConnectionType type) throws AdminException
Change theVDB.ConnectionType
of theVDB
.- Parameters:
vdbName
- Name of the VDBvdbVersion
- Version of the VDBtype
-- Throws:
AdminException
-
deploy
void deploy(String deployName, InputStream content) throws AdminException
Deploy a artifact (VDB, JAR, RAR files)- Parameters:
deployName
- Name of the VDB file to save undercontent
-- Throws:
AdminException
-
deploy
void deploy(String deployName, InputStream content, boolean persistent) throws AdminException
Deploy a artifact (VDB, JAR, RAR files)- Parameters:
deployName
- Name of the VDB file to save undercontent
-persistent
- the deployed artifact is persisted or not- Throws:
AdminException
-
getDeployments
List<String> getDeployments() throws AdminException
Get existing deployments on in the sysem- Throws:
AdminException
-
undeploy
void undeploy(String deployedName) throws AdminException
Undeploy artifact (VDB, JAR, RAR files)- Parameters:
deployedName
-- Throws:
AdminException
-
getVDBs
Collection<? extends VDB> getVDBs() throws AdminException
Get the VDBs that are currently deployed in the system- Returns:
- Collection of
VDB
s. There could be multiple VDBs with the same name in the Collection but they will differ by VDB version. - Throws:
AdminException
-
getVDB
@Deprecated VDB getVDB(String vdbName, int vdbVersion) throws AdminException
Deprecated.Get the VDB- Parameters:
vdbName
-vdbVersion
-- Returns:
- Throws:
AdminException
-
getVDB
VDB getVDB(String vdbName, String vdbVersion) throws AdminException
Get the VDB- Parameters:
vdbName
-vdbVersion
-- Returns:
- Throws:
AdminException
-
restartVDB
@Deprecated void restartVDB(String vdbName, int vdbVersion, String... models) throws AdminException
Deprecated.Restart the VDB. This issues reload of the metadata.- Parameters:
vdbName
-vdbVersion
-models
- names for which metadata needs to be reloaded, if null or not supplied all models reloaded- Throws:
AdminException
-
restartVDB
void restartVDB(String vdbName, String vdbVersion, String... models) throws AdminException
Restart the VDB. This issues reload of the metadata.- Parameters:
vdbName
-vdbVersion
-models
- names for which metadata needs to be reloaded, if null or not supplied all models reloaded- Throws:
AdminException
-
getTranslators
Collection<? extends Translator> getTranslators() throws AdminException
Get the translators that are available in the configuration- Returns:
- Collection of
Translator
- Throws:
AdminException
-
getTranslator
Translator getTranslator(String deployedName) throws AdminException
Get the translator by the given the deployed name.- Parameters:
deployedName
- - name of the deployed translator- Returns:
- null if not found
- Throws:
AdminException
-
getWorkerPoolStats
Collection<? extends WorkerPoolStatistics> getWorkerPoolStats() throws AdminException
Get the Worker Pool statistics in runtime engine.- Returns:
- Collection of
WorkerPoolStatistics
- Throws:
AdminException
-
getCacheTypes
Collection<String> getCacheTypes() throws AdminException
Get the Caches that correspond to the specified identifier pattern- Returns:
- Collection of
String
- Throws:
AdminException
-
getSessions
Collection<? extends Session> getSessions() throws AdminException
Get all the current Sessions.- Returns:
- Collection of
Session
- Throws:
AdminException
-
getRequests
Collection<? extends Request> getRequests() throws AdminException
Get the all Requests that are currently in process- Returns:
- Collection of
Request
- Throws:
AdminException
-
getRequestsForSession
Collection<? extends Request> getRequestsForSession(String sessionId) throws AdminException
Get the Requests for the given session- Returns:
- Collection of
Request
- Throws:
AdminException
-
getTemplatePropertyDefinitions
Collection<? extends PropertyDefinition> getTemplatePropertyDefinitions(String templateName) throws AdminException
Get all of the available configuration Properties for the specified connector- Parameters:
templateName
- - Name of the connector- Returns:
- Throws:
AdminException
-
getTranslatorPropertyDefinitions
@Deprecated Collection<? extends PropertyDefinition> getTranslatorPropertyDefinitions(String translatorName) throws AdminException
Deprecated.Get all of the available configuration Properties for the specified translator- Parameters:
translatorName
- - Name of the translator- Returns:
- Throws:
AdminException
- See Also:
getTranslatorPropertyDefinitions(java.lang.String)
-
getTranslatorPropertyDefinitions
Collection<? extends PropertyDefinition> getTranslatorPropertyDefinitions(String translatorName, Admin.TranlatorPropertyType type) throws AdminException
Get all of the available configuration Properties for the specified translator- Parameters:
translatorName
- - Name of the translatortype
- - Type of property definition (import, override, extension-metadata)- Returns:
- Throws:
AdminException
-
getTransactions
Collection<? extends Transaction> getTransactions() throws AdminException
Get all transaction matching the identifier.- Returns:
- Throws:
AdminException
-
clearCache
void clearCache(String cacheType) throws AdminException
Clear the cache or caches specified by the cacheIdentifier.- Parameters:
cacheType
- Cache Type No wild cards currently supported, must be explicit- Throws:
AdminException
-
clearCache
@Deprecated void clearCache(String cacheType, String vdbName, int vdbVersion) throws AdminException
Deprecated.Clear the cache of the given VDB for provided cache type- Parameters:
cacheType
- Cache Type No wild cards currently supported, must be explicitvdbName
- - Name of the VDBvdbVersion
- - VDB version- Throws:
AdminException
-
clearCache
void clearCache(String cacheType, String vdbName, String vdbVersion) throws AdminException
Clear the cache of the given VDB for provided cache type- Parameters:
cacheType
- Cache Type No wild cards currently supported, must be explicitvdbName
- - Name of the VDBvdbVersion
- - VDB version- Throws:
AdminException
-
getCacheStats
Collection<? extends CacheStatistics> getCacheStats(String cacheType) throws AdminException
Get the Cache Statistics for the given type- Parameters:
cacheType
- Cache Type- Returns:
- Collection of
CacheStatistics
- Throws:
AdminException
-
getEngineStats
Collection<? extends EngineStatistics> getEngineStats() throws AdminException
Get the Engine Statistics for the given type- Returns:
- Collection of
EngineStatistics
- Throws:
AdminException
-
terminateSession
void terminateSession(String sessionId) throws AdminException
Terminate the Session- Parameters:
sessionId
- Session IdentifierSession
. No wild cards currently supported, must be explicit- Throws:
AdminException
-
cancelRequest
void cancelRequest(String sessionId, long executionId) throws AdminException
Cancel Request- Parameters:
sessionId
- session Identifier for the request.executionId
- request Identifier- Throws:
AdminException
-
terminateTransaction
void terminateTransaction(String transactionId) throws AdminException
Mark the given global transaction as rollback only.- Parameters:
transactionId
-- Throws:
AdminException
-
close
void close()
Closes the admin connection
-
addDataRoleMapping
@Deprecated void addDataRoleMapping(String vdbName, int vdbVersion, String dataRole, String mappedRoleName) throws AdminException
Deprecated.Assign a Role name to the Data Role in a given VDB- Parameters:
vdbName
-vdbVersion
-dataRole
-mappedRoleName
-- Throws:
AdminException
-
addDataRoleMapping
void addDataRoleMapping(String vdbName, String vdbVersion, String dataRole, String mappedRoleName) throws AdminException
Assign a Role name to the Data Role in a given VDB- Parameters:
vdbName
-vdbVersion
-dataRole
-mappedRoleName
-- Throws:
AdminException
-
removeDataRoleMapping
@Deprecated void removeDataRoleMapping(String vdbName, int vdbVersion, String dataRole, String mappedRoleName) throws AdminException
Deprecated.Remove a Role name to the Data Role in a given VDB- Parameters:
vdbName
-vdbVersion
-dataRole
-mappedRoleName
-- Throws:
AdminException
-
removeDataRoleMapping
void removeDataRoleMapping(String vdbName, String vdbVersion, String dataRole, String mappedRoleName) throws AdminException
Remove a Role name to the Data Role in a given VDB- Parameters:
vdbName
-vdbVersion
-dataRole
-mappedRoleName
-- Throws:
AdminException
-
setAnyAuthenticatedForDataRole
@Deprecated void setAnyAuthenticatedForDataRole(String vdbName, int vdbVersion, String dataRole, boolean anyAuthenticated) throws AdminException
Deprecated.Set the any authenticated flag on the Data Role in a given VDB- Parameters:
vdbName
-vdbVersion
-dataRole
-anyAuthenticated
-- Throws:
AdminException
-
setAnyAuthenticatedForDataRole
void setAnyAuthenticatedForDataRole(String vdbName, String vdbVersion, String dataRole, boolean anyAuthenticated) throws AdminException
Set the any authenticated flag on the Data Role in a given VDB- Parameters:
vdbName
-vdbVersion
-dataRole
-anyAuthenticated
-- Throws:
AdminException
-
createDataSource
void createDataSource(String deploymentName, String templateName, Properties properties) throws AdminException
Creates a JCA data source
Use this method to create JDBC driver based connection, XA-datasource or Resource Adapter. Template Name defines the type of connection, if the template name is ends with "-xa" it is considered to be a XA based data source.- Parameters:
deploymentName
- - This becomes the pool name, as well as the jndi name of the sourcetemplateName
- - type of source. SeegetDataSourceNames()
for all available types.properties
- - All properties needed to create a data source, like connection-url, user, password to see all the properties usegetTemplatePropertyDefinitions(String)
to retrieve the full list. The transaction-support property can be set to LocalTransaction for sources that support local transactions.- Throws:
AdminException
-
getDataSource
Properties getDataSource(String deployedName) throws AdminException
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.- Throws:
AdminException
-
deleteDataSource
void deleteDataSource(String deployedName) throws AdminException
Delete data source.- Parameters:
deployedName
-- Throws:
AdminException
-
getDataSourceNames
Collection<String> getDataSourceNames() throws AdminException
Returns the all names of all the data sources available in the configuration.- Throws:
AdminException
-
getDataSourceTemplateNames
Set<String> getDataSourceTemplateNames() throws AdminException
Get the Datasource templates available in the configuration.- Returns:
- Set of template names.
- Throws:
AdminException
-
markDataSourceAvailable
void markDataSourceAvailable(String jndiName) throws AdminException
Tell the engine that the given source is available. Pending dynamic vdb metadata loads will be resumed.- Parameters:
jndiName
-- Throws:
AdminException
-
getSchema
@Deprecated String getSchema(String vdbName, int vdbVersion, String modelName, EnumSet<Admin.SchemaObjectType> allowedTypes, String typeNamePattern) throws AdminException
Deprecated.Retrieve the schema of the given model- Parameters:
vdbName
-vdbVersion
-modelName
-allowedTypes
-EnumSet
Type of schema objects to retrieve, null means ALL the schema object typestypeNamePattern
- RegEx pattern to filter to names of tables, procedures that are being read. Null means no filter.- Throws:
AdminException
-
getSchema
String getSchema(String vdbName, String vdbVersion, String modelName, EnumSet<Admin.SchemaObjectType> allowedTypes, String typeNamePattern) throws AdminException
Retrieve the schema of the given model- Parameters:
vdbName
-vdbVersion
-modelName
-allowedTypes
-EnumSet
Type of schema objects to retrieve, null means ALL the schema object typestypeNamePattern
- RegEx pattern to filter to names of tables, procedures that are being read. Null means no filter.- Throws:
AdminException
-
getQueryPlan
String getQueryPlan(String sessionId, long executionId) throws AdminException
Get the Query Plan for the given session with provided execution id.- Parameters:
sessionId
-executionId
-- Returns:
- Throws:
AdminException
-
restart
void restart()
Restart the Server
-
setProfileName
void setProfileName(String name)
Set the profile name. A null value will set the default profile name.- Parameters:
name
-
-
getVDBs
Collection<? extends VDB> getVDBs(boolean singleInstance) throws AdminException
Get the VDBs that are currently deployed in the system- Parameters:
singleInstance
-
- true to return the VDB list from only a single server instance, which is the same asgetVDBs()
.
- false to get all VDBs from all servers in the domain- Returns:
- Collection of
VDB
s. - Throws:
AdminException
-
deployVDBZip
void deployVDBZip(URL url) throws AdminException
Deploy a .vdb or .zip vdb. The deployment name will be taken from the url file name.- Throws:
AdminException
-
-