use of org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule in project airavata by apache.
the class AppInterfaceTest method addAppModule.
public String addAppModule(String moduleName) {
try {
ApplicationModule module = new ApplicationModule();
module.setAppModuleName(moduleName);
module.setAppModuleVersion("1.0.0");
module.setAppModuleDescription("WeatherForcast");
return appcatalog.getApplicationInterface().addApplicationModule(module, ServerSettings.getDefaultUserGateway());
} catch (AppCatalogException e) {
logger.error(e.getMessage(), e);
} catch (ApplicationSettingsException e) {
e.printStackTrace();
}
return null;
}
use of org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule in project airavata by apache.
the class RegistryServerHandler method getApplicationModule.
/**
* Fetch a Application Module.
*
* @param appModuleId The unique identifier of the application module required
* @return applicationModule
* Returns an Application Module Object.
*/
@Override
public ApplicationModule getApplicationModule(String appModuleId) throws RegistryServiceException, TException {
try {
appCatalog = RegistryFactory.getAppCatalog();
ApplicationModule module = appCatalog.getApplicationInterface().getApplicationModule(appModuleId);
logger.debug("Airavata retrieved application module with module id : " + appModuleId);
return module;
} catch (AppCatalogException e) {
logger.error(appModuleId, "Error while retrieving application module...", e);
RegistryServiceException exception = new RegistryServiceException();
exception.setMessage("Error while retrieving the adding application module. More info : " + e.getMessage());
throw exception;
}
}
use of org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule in project airavata by apache.
the class AiravataServerHandler method getApplicationModule.
/**
* Fetch a Application Module.
*
* @param appModuleId The identifier for the requested application module
* @return applicationModule
* Returns a application Module Object.
*/
@Override
@SecurityCheck
public ApplicationModule getApplicationModule(AuthzToken authzToken, String appModuleId) throws InvalidRequestException, AiravataClientException, AiravataSystemException, AuthorizationException, TException {
RegistryService.Client regClient = registryClientPool.getResource();
try {
ApplicationModule result = regClient.getApplicationModule(appModuleId);
registryClientPool.returnResource(regClient);
return result;
} catch (Exception e) {
logger.error(appModuleId, "Error while retrieving application module...", e);
AiravataSystemException exception = new AiravataSystemException();
exception.setAiravataErrorType(AiravataErrorType.INTERNAL_ERROR);
exception.setMessage("Error while retrieving the adding application module. More info : " + e.getMessage());
registryClientPool.returnBrokenResource(regClient);
throw exception;
}
}
use of org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule in project airavata by apache.
the class RegisterSampleApplicationsUtils method createApplicationModule.
public static ApplicationModule createApplicationModule(String appModuleName, String appModuleVersion, String appModuleDescription) {
ApplicationModule module = new ApplicationModule();
module.setAppModuleDescription(appModuleDescription);
module.setAppModuleName(appModuleName);
module.setAppModuleVersion(appModuleVersion);
return module;
}
Aggregations