public class AdminFactory.AdminImpl extends Object implements Admin
Admin.Cache, Admin.SchemaObjectType, Admin.TranlatorPropertyType
Constructor and Description |
---|
AdminImpl(org.jboss.as.controller.client.ModelControllerClient connection) |
Modifier and Type | Method and Description |
---|---|
void |
addDataRoleMapping(String vdbName,
int vdbVersion,
String dataRole,
String mappedRoleName)
Assign a Role name to the Data Role in a given VDB
|
void |
addDataRoleMapping(String vdbName,
String vdbVersion,
String dataRole,
String mappedRoleName)
Assign a Role name to the Data Role in a given VDB
|
void |
addSource(String vdbName,
int vdbVersion,
String modelName,
String sourceName,
String translatorName,
String dsName)
Adds a
Translator and Data source to a VDB 's Model |
void |
addSource(String vdbName,
String vdbVersion,
String modelName,
String sourceName,
String translatorName,
String dsName)
Adds 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 |
changeVDBConnectionType(String vdbName,
String 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 |
clearCache(String cacheType,
String vdbName,
String 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
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 vdb)
Deploy a artifact (VDB, JAR, RAR files)
|
void |
deploy(String deployName,
InputStream vdb,
boolean persist)
Deploy a artifact (VDB, JAR, RAR files)
|
void |
flush() |
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()
Get existing deployments on in the sysem
|
Collection<? extends EngineStatistics> |
getEngineStats()
Get the Engine Statistics for the given type
|
Set<String> |
getInstalledJDBCDrivers() |
String |
getProfileName() |
String |
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 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
|
String |
getSchema(String vdbName,
String 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 PropertyDefinition> |
getTranslatorPropertyDefinitions(String translatorName)
Deprecated.
|
Collection<? extends PropertyDefinition> |
getTranslatorPropertyDefinitions(String translatorName,
Admin.TranlatorPropertyType type)
Get all of the available configuration Properties for the specified translator
|
Collection<? extends Translator> |
getTranslators()
Get the translators that are available in the configuration
|
VDB |
getVDB(String vdbName,
int vdbVersion)
Get the VDB
|
VDB |
getVDB(String vdbName,
String vdbVersion)
Get the VDB
|
List<? extends VDB> |
getVDBs()
Get the VDBs that are currently deployed in the system
|
List<? extends VDB> |
getVDBs(boolean singleInstance)
Get the VDBs that are 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 |
removeDataRoleMapping(String vdbName,
String vdbVersion,
String dataRole,
String mappedRoleName)
Remove a Role name to the Data Role in a given VDB
|
void |
removeSource(String vdbName,
int vdbVersion,
String modelName,
String sourceName)
Removes a
Translator and Data source from a VDB 's Model |
void |
removeSource(String vdbName,
String vdbVersion,
String modelName,
String sourceName)
Removes a
Translator and Data source from a VDB 's Model |
void |
restart()
Restart the Server
|
void |
restartVDB(String vdbName,
int vdbVersion,
String... models)
Restart the VDB.
|
void |
restartVDB(String vdbName,
String 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 |
setAnyAuthenticatedForDataRole(String vdbName,
String vdbVersion,
String dataRole,
boolean anyAuthenticated)
Set the any authenticated flag on the Data Role in a given VDB
|
void |
setProfileName(String name)
Set the profile name.
|
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) |
void |
updateSource(String vdbName,
int vdbVersion,
String sourceName,
String translatorName,
String dsName)
Update a source's
Translator and Data source |
void |
updateSource(String vdbName,
String vdbVersion,
String sourceName,
String translatorName,
String dsName)
Update a source's
Translator and Data source |
public AdminImpl(org.jboss.as.controller.client.ModelControllerClient connection)
public void setProfileName(String name)
Admin
setProfileName
in interface Admin
public void clearCache(String cacheType) throws AdminException
Admin
clearCache
in interface Admin
cacheType
- Cache Type
No wild cards currently supported, must be explicitAdminException
public void clearCache(String cacheType, String vdbName, String vdbVersion) throws AdminException
Admin
clearCache
in interface Admin
cacheType
- Cache Type
No wild cards currently supported, must be explicitvdbName
- - Name of the VDBvdbVersion
- - VDB versionAdminException
public void close()
Admin
public Set<String> getInstalledJDBCDrivers() throws AdminException
AdminException
public String getProfileName()
public void createDataSource(String deploymentName, String templateName, Properties properties) throws AdminException
Admin
createDataSource
in interface Admin
deploymentName
- - This becomes the pool name, as well as the jndi name of the sourcetemplateName
- - type of source. See Admin.getDataSourceNames()
for all available types.properties
- - All properties needed to create a data source, like connection-url, user, password
to see all the properties use Admin.getTemplatePropertyDefinitions(String)
to retrieve the full list.
The transaction-support property can be set to LocalTransaction for sources that support local transactions.AdminException
public Properties getDataSource(String deployedName) throws AdminException
Admin
getDataSource
in interface Admin
AdminException
public void deleteDataSource(String deployedName) throws AdminException
Admin
deleteDataSource
in interface Admin
AdminException
public void undeploy(String deployedName) throws AdminException
Admin
undeploy
in interface Admin
AdminException
public void undeploy(String deployedName, boolean force) throws AdminException
AdminException
public org.jboss.dmr.ModelNode buildUndeployRequest(String name, boolean force) throws org.jboss.as.cli.operation.OperationFormatException
org.jboss.as.cli.operation.OperationFormatException
public void deploy(String deployName, InputStream vdb) throws AdminException
Admin
deploy
in interface Admin
deployName
- Name of the VDB file to save underAdminException
public void deploy(String deployName, InputStream vdb, boolean persist) throws AdminException
Admin
deploy
in interface Admin
deployName
- Name of the VDB file to save underpersist
- the deployed artifact is persisted or notAdminException
public Collection<? extends CacheStatistics> getCacheStats(String cacheType) throws AdminException
Admin
getCacheStats
in interface Admin
cacheType
- Cache TypeCacheStatistics
AdminException
public Collection<? extends EngineStatistics> getEngineStats() throws AdminException
Admin
getEngineStats
in interface Admin
EngineStatistics
AdminException
public Collection<String> getCacheTypes() throws AdminException
Admin
getCacheTypes
in interface Admin
String
AdminException
public Collection<String> getDataSourceNames() throws AdminException
getDataSourceNames
in interface Admin
AdminException
Admin.getDataSourceNames()
public List<String> getDeployments()
Admin
getDeployments
in interface Admin
public Set<String> getDataSourceTemplateNames() throws AdminException
Admin
getDataSourceTemplateNames
in interface Admin
AdminException
public Collection<? extends WorkerPoolStatistics> getWorkerPoolStats() throws AdminException
Admin
getWorkerPoolStats
in interface Admin
WorkerPoolStatistics
AdminException
public void cancelRequest(String sessionId, long executionId) throws AdminException
Admin
cancelRequest
in interface Admin
sessionId
- session Identifier for the request.executionId
- request IdentifierAdminException
public Collection<? extends Request> getRequests() throws AdminException
Admin
getRequests
in interface Admin
Request
AdminException
public Collection<? extends Request> getRequestsForSession(String sessionId) throws AdminException
Admin
getRequestsForSession
in interface Admin
Request
AdminException
public Collection<? extends Session> getSessions() throws AdminException
Admin
getSessions
in interface Admin
Session
AdminException
public Collection<PropertyDefinition> getTemplatePropertyDefinitions(String templateName) throws AdminException
getTemplatePropertyDefinitions
in interface Admin
templateName
- - Name of the connectorAdminException
@Deprecated public Collection<? extends PropertyDefinition> getTranslatorPropertyDefinitions(String translatorName) throws AdminException
Admin
getTranslatorPropertyDefinitions
in interface Admin
translatorName
- - Name of the translatorAdminException
Admin.getTranslatorPropertyDefinitions(java.lang.String)
public Collection<? extends PropertyDefinition> getTranslatorPropertyDefinitions(String translatorName, Admin.TranlatorPropertyType type) throws AdminException
Admin
getTranslatorPropertyDefinitions
in interface Admin
translatorName
- - Name of the translatortype
- - Type of property definition (import, override, extension-metadata)AdminException
public Collection<? extends Transaction> getTransactions() throws AdminException
Admin
getTransactions
in interface Admin
AdminException
public void terminateSession(String sessionId) throws AdminException
Admin
terminateSession
in interface Admin
AdminException
public void terminateTransaction(String transactionId) throws AdminException
Admin
terminateTransaction
in interface Admin
AdminException
public Translator getTranslator(String deployedName) throws AdminException
Admin
getTranslator
in interface Admin
deployedName
- - name of the deployed translatorAdminException
public Collection<? extends Translator> getTranslators() throws AdminException
Admin
getTranslators
in interface Admin
Translator
AdminException
public VDB getVDB(String vdbName, String vdbVersion) throws AdminException
Admin
getVDB
in interface Admin
AdminException
public List<? extends VDB> getVDBs() throws AdminException
Admin
getVDBs
in interface Admin
VDB
s. There could be multiple VDBs with the
same name in the Collection but they will differ by VDB version.AdminException
public List<? extends VDB> getVDBs(boolean singleInstance) throws AdminException
Admin
getVDBs
in interface Admin
singleInstance
- Admin.getVDBs()
.
VDB
s.AdminException
public void addDataRoleMapping(String vdbName, String vdbVersion, String dataRole, String mappedRoleName) throws AdminException
Admin
addDataRoleMapping
in interface Admin
AdminException
public void clearCache(String cacheType, String vdbName, int vdbVersion) throws AdminException
Admin
clearCache
in interface Admin
cacheType
- Cache Type
No wild cards currently supported, must be explicitvdbName
- - Name of the VDBvdbVersion
- - VDB versionAdminException
public void addDataRoleMapping(String vdbName, int vdbVersion, String dataRole, String mappedRoleName) throws AdminException
Admin
addDataRoleMapping
in interface Admin
AdminException
public void removeDataRoleMapping(String vdbName, int vdbVersion, String dataRole, String mappedRoleName) throws AdminException
Admin
removeDataRoleMapping
in interface Admin
AdminException
public void setAnyAuthenticatedForDataRole(String vdbName, int vdbVersion, String dataRole, boolean anyAuthenticated) throws AdminException
Admin
setAnyAuthenticatedForDataRole
in interface Admin
AdminException
public void changeVDBConnectionType(String vdbName, int vdbVersion, VDB.ConnectionType type) throws AdminException
Admin
VDB.ConnectionType
of the VDB
.changeVDBConnectionType
in interface Admin
vdbName
- Name of the VDBvdbVersion
- Version of the VDBAdminException
public void updateSource(String vdbName, int vdbVersion, String sourceName, String translatorName, String dsName) throws AdminException
Admin
Translator
and Data sourceupdateSource
in interface Admin
vdbName
- Name of the VDBvdbVersion
- Version of the VDBsourceName
- source namedsName
- data source name that can found in the JNDI map.AdminException
public void addSource(String vdbName, int vdbVersion, String modelName, String sourceName, String translatorName, String dsName) throws AdminException
Admin
Translator
and Data source to a VDB
's ModeladdSource
in interface Admin
vdbName
- Name of the VDBvdbVersion
- Version of the VDBmodelName
- Name of the ModelsourceName
- source namedsName
- data source name that can found in the JNDI map.AdminException
public VDB getVDB(String vdbName, int vdbVersion) throws AdminException
Admin
getVDB
in interface Admin
AdminException
public void removeSource(String vdbName, int vdbVersion, String modelName, String sourceName) throws AdminException
Admin
Translator
and Data source from a VDB
's ModelremoveSource
in interface Admin
vdbName
- Name of the VDBvdbVersion
- Version of the VDBmodelName
- Name of the ModelsourceName
- source nameAdminException
public void restartVDB(String vdbName, int vdbVersion, String... models) throws AdminException
Admin
restartVDB
in interface Admin
models
- names for which metadata needs to be reloaded, if null or not supplied all models reloadedAdminException
public String getSchema(String vdbName, int vdbVersion, String modelName, EnumSet<Admin.SchemaObjectType> allowedTypes, String typeNamePattern) throws AdminException
Admin
getSchema
in interface Admin
allowedTypes
- EnumSettypeNamePattern
- RegEx pattern to filter to names of tables, procedures that are being read. Null means no filter.AdminException
public void removeDataRoleMapping(String vdbName, String vdbVersion, String dataRole, String mappedRoleName) throws AdminException
Admin
removeDataRoleMapping
in interface Admin
AdminException
public void setAnyAuthenticatedForDataRole(String vdbName, String vdbVersion, String dataRole, boolean anyAuthenticated) throws AdminException
Admin
setAnyAuthenticatedForDataRole
in interface Admin
AdminException
public void changeVDBConnectionType(String vdbName, String vdbVersion, VDB.ConnectionType type) throws AdminException
Admin
VDB.ConnectionType
of the VDB
.changeVDBConnectionType
in interface Admin
vdbName
- Name of the VDBvdbVersion
- Version of the VDBAdminException
public void updateSource(String vdbName, String vdbVersion, String sourceName, String translatorName, String dsName) throws AdminException
Admin
Translator
and Data sourceupdateSource
in interface Admin
vdbName
- Name of the VDBvdbVersion
- Version of the VDBsourceName
- source namedsName
- data source name that can found in the JNDI map.AdminException
public void addSource(String vdbName, String vdbVersion, String modelName, String sourceName, String translatorName, String dsName) throws AdminException
Admin
Translator
and Data source to a VDB
's ModeladdSource
in interface Admin
vdbName
- Name of the VDBvdbVersion
- Version of the VDBmodelName
- Name of the ModelsourceName
- source namedsName
- data source name that can found in the JNDI map.AdminException
public void removeSource(String vdbName, String vdbVersion, String modelName, String sourceName) throws AdminException
Admin
Translator
and Data source from a VDB
's ModelremoveSource
in interface Admin
vdbName
- Name of the VDBvdbVersion
- Version of the VDBmodelName
- Name of the ModelsourceName
- source nameAdminException
public void markDataSourceAvailable(String jndiName) throws AdminException
Admin
markDataSourceAvailable
in interface Admin
AdminException
public void restartVDB(String vdbName, String vdbVersion, String... models) throws AdminException
Admin
restartVDB
in interface Admin
models
- names for which metadata needs to be reloaded, if null or not supplied all models reloadedAdminException
public String getSchema(String vdbName, String vdbVersion, String modelName, EnumSet<Admin.SchemaObjectType> allowedTypes, String typeNamePattern) throws AdminException
Admin
getSchema
in interface Admin
typeNamePattern
- RegEx pattern to filter to names of tables, procedures that are being read. Null means no filter.AdminException
public String getQueryPlan(String sessionId, long executionId) throws AdminException
Admin
getQueryPlan
in interface Admin
AdminException
public void restart()
Admin
public void flush()
Copyright © 2019. All rights reserved.