use of org.teiid.adminapi.VDB.Status in project teiid by teiid.
the class EngineStatistics method checkVDB.
static VDBMetaData checkVDB(OperationContext context, String vdbName, String vdbVersion) throws OperationFailedException {
ServiceController<?> sc = context.getServiceRegistry(false).getRequiredService(TeiidServiceNames.VDB_REPO);
VDBRepository repo = VDBRepository.class.cast(sc.getValue());
VDBMetaData vdb = repo.getLiveVDB(vdbName, vdbVersion);
if (vdb == null) {
throw new OperationFailedException(IntegrationPlugin.Util.gs(IntegrationPlugin.Event.TEIID50102, vdbName, vdbVersion));
}
Status status = vdb.getStatus();
if (status != VDB.Status.ACTIVE) {
throw new OperationFailedException(IntegrationPlugin.Util.gs(IntegrationPlugin.Event.TEIID50096, vdbName, vdbVersion));
}
return vdb;
}
use of org.teiid.adminapi.VDB.Status in project teiid by teiid.
the class EmbeddedAdminImpl method checkVDB.
private VDBMetaData checkVDB(String vdbName, String vdbVersion) throws AdminProcessingException {
VDBMetaData vdb = this.embeddedServer.repo.getLiveVDB(vdbName, vdbVersion);
if (vdb == null) {
throw new AdminProcessingException(RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40131, vdbName, vdbVersion));
}
Status status = vdb.getStatus();
if (status != VDB.Status.ACTIVE) {
throw new AdminProcessingException(RuntimePlugin.Util.gs(RuntimePlugin.Event.TEIID40132, vdbName, vdbVersion, status));
}
return vdb;
}
Aggregations