Package com.intel.mountwilson.as.common

Examples of com.intel.mountwilson.as.common.ASException


                                    return txtHostList;
                                } catch (ASException e) {
                                    throw e;
                                }
                                catch(CryptographyException e) {
                                    throw new ASException(e,ErrorCode.AS_ENCRYPTION_ERROR, e.getCause() == null ? e.getMessage() : e.getCause().getMessage());
                                }
                                catch (Exception e) {
                                    throw new ASException(e);
                                }

  }
View Full Code Here


            }

        }catch(ASException ase){
            throw ase;
        } catch (Exception e) {
            throw new ASException(e);
        }


        return allOemData;
    }
View Full Code Here

        try {
            TblOem tblOem = tblOemJpaController.findTblOemByName(oemData.getName());
           
            if(tblOem == null)
                throw new ASException(ErrorCode.WS_OEM_DOES_NOT_EXIST, oemData.getName());
           
            tblOem.setDescription(oemData.getDescription());
           
            tblOemJpaController.edit(tblOem);
           
        } catch(ASException ase){
            throw ase;
        } catch (Exception e) {
           
            throw new ASException(e);
        }
        return "true";
    }
View Full Code Here

    public String createOem(OemData oemData) {
        try {
            TblOem tblOem = tblOemJpaController.findTblOemByName(oemData.getName());
           
            if(tblOem != null)
                throw new ASException(ErrorCode.WS_OEM_ALREADY_EXISTS, oemData.getName());
           
            tblOem = new TblOem();
            tblOem.setName(oemData.getName());
            tblOem.setDescription(oemData.getDescription());
           
            tblOemJpaController.create(tblOem);
           
        } catch(ASException ase){
            throw ase;
        } catch (Exception e) {
            throw new ASException(e);
        }
        return "true";
    }
View Full Code Here

    public String deleteOem(String osName) {
        try{
            TblOem tblOem = tblOemJpaController.findTblOemByName(osName);
           
            if(tblOem == null){
                throw new ASException(ErrorCode.WS_OEM_DOES_NOT_EXIST, osName);
            }
           
            Collection<TblMle> tblMleCollection = tblOem.getTblMleCollection();
            if( tblMleCollection != null ) {
                log.info("OEM is currently associated with # MLEs: " + tblMleCollection.size());
           
                if(!tblMleCollection.isEmpty()){
                    throw new ASException(ErrorCode.WS_OEM_ASSOCIATION_EXISTS, osName, tblMleCollection.size());
                }
            }
           
            tblOemJpaController.destroy(tblOem.getId());
            } catch(ASException ase){
                throw ase;
                
            } catch (Exception e) {
                throw new ASException(e);
            }
        return "true";
    }
View Full Code Here

TOP

Related Classes of com.intel.mountwilson.as.common.ASException

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.