Package org.airavata.appcatalog.cpi

Examples of org.airavata.appcatalog.cpi.AppCatalogException


            }
            em.getTransaction().commit();
            em.close();
        } catch (Exception e) {
            logger.error(e.getMessage(), e);
            throw new AppCatalogException(e);
        } finally {
            if (em != null && em.isOpen()) {
                if (em.getTransaction().isActive()){
                    em.getTransaction().rollback();
                }
View Full Code Here


        HashMap<String, String> ids;
        if (identifier instanceof Map){
            ids = (HashMap)identifier;
        }else {
            logger.error("Identifier should be a map with the field name and it's value");
            throw new AppCatalogException("Identifier should be a map with the field name and it's value");
        }

        EntityManager em = null;
        try {
            em = AppCatalogJPAUtils.getEntityManager();
            GSISSHPreJobCommand gsisshPreJobCommand = em.find(GSISSHPreJobCommand.class, new GSISSHPreJobCommandPK(
                    ids.get(GSISSHPreJobCommandConstants.SUBMISSION_ID),
                    ids.get(GSISSHPreJobCommandConstants.COMMAND)));

            em.close();
            return gsisshPreJobCommand != null;
        } catch (ApplicationSettingsException e) {
            logger.error(e.getMessage(), e);
            throw new AppCatalogException(e);
        } finally {
            if (em != null && em.isOpen()) {
                if (em.getTransaction().isActive()) {
                    em.getTransaction().rollback();
                }
View Full Code Here

            moduleResource.save();
            applicationModule.setAppModuleId(moduleResource.getModuleId());
            return moduleResource.getModuleId();
        }catch (Exception e) {
            logger.error("Error while adding application module "+applicationModule.getAppModuleName()+" ["+applicationModule.getAppModuleVersion()+"]", e);
            throw new AppCatalogException(e);
        }
    }
View Full Code Here

                }
            }
            return resource.getInterfaceId();
        }catch (Exception e) {
            logger.error("Error while adding application interface "+applicationInterfaceDescription.getApplicationName(), e);
            throw new AppCatalogException(e);
        }
    }
View Full Code Here

            moduleMappingResource.setModuleResource((AppModuleResource)appModuleResource.get(moduleId));
            moduleMappingResource.setAppInterfaceResource((AppInterfaceResource)interfaceResource.get(interfaceId));
            moduleMappingResource.save();
        }catch (Exception e) {
            logger.error("Error while saving application module mapping "+moduleId, e);
            throw new AppCatalogException(e);
        }
    }
View Full Code Here

            existingModule.setModuleDesc(updatedModule.getAppModuleDescription());
            existingModule.setModuleVersion(updatedModule.getAppModuleVersion());
            existingModule.save();
        }catch (Exception e) {
            logger.error("Error while updating application module "+moduleId, e);
            throw new AppCatalogException(e);
        }
    }
View Full Code Here

                    outputResource.save();
                }
            }
        }catch (Exception e) {
            logger.error("Error while updating application interface "+interfaceId, e);
            throw new AppCatalogException(e);
        }
    }
View Full Code Here

        try {
            AppModuleResource appModuleResource = new AppModuleResource();
            return AppCatalogThriftConversion.getApplicationModuleDesc((AppModuleResource) appModuleResource.get(moduleId));
        }catch (Exception e) {
            logger.error("Error while retrieving application module "+moduleId, e);
            throw new AppCatalogException(e);
        }
    }
View Full Code Here

        try {
            AppInterfaceResource interfaceResource = new AppInterfaceResource();
            return AppCatalogThriftConversion.getApplicationInterfaceDescription((AppInterfaceResource)interfaceResource.get(interfaceId));
        }catch (Exception e) {
            logger.error("Error while retrieving application interface '"+interfaceId, e);
            throw new AppCatalogException(e);
        }
    }
View Full Code Here

                    throw new IllegalArgumentException("Unsupported field name for app module.");
                }
            }
        }catch (Exception e){
            logger.error("Error while retrieving app module list...", e);
            throw new AppCatalogException(e);
        }
        return modules;
    }
View Full Code Here

TOP

Related Classes of org.airavata.appcatalog.cpi.AppCatalogException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.