Examples of DemoPortalException


Examples of com.intel.mountwilson.common.DemoPortalException

             
              //getting ApiClient Object from Session and downcast that object to Type T. 
                service = (T) session.getAttribute("apiClientObject");   
            } catch (Exception e) {
        log.error("Error while creating ApiCliennt Object. "+e.getMessage());
        throw new DemoPortalException("Error while creating ApiCliennt Object. "+e.getMessage(),e);
            }
           
        }
        return service;
     }
View Full Code Here

Examples of com.intel.mountwilson.common.DemoPortalException

        try{
          //getting Object from Session and downcast that object to X509Certificate.
          trustedCertificate = (X509Certificate[])session.getAttribute("trustedCertificates");   
        } catch (Exception e) {
          log.error("Error while creating ApiCliennt Object. "+e.getMessage());
          throw new DemoPortalException("Error while creating ApiCliennt Object. "+e.getMessage(),e);
        }
       
      }else{
        return null;
      }
View Full Code Here

Examples of com.intel.mountwilson.common.DemoPortalException

        static Logger log = LoggerFactory.getLogger(ConnectionUtil.class.getName());
 
  public static DemoPortalException handleException(Exception exceptionObject) throws DemoPortalException{
    exceptionObject.printStackTrace();
    if(exceptionObject.getClass().equals(ClientHandlerException.class)){
      return new DemoPortalException("Could not able to Connect to Server. Error Connection Refused.",exceptionObject);
    }
    if (exceptionObject.getClass().equals(JsonParseException.class)) {
      log.error("Error While Parsing Data. "+exceptionObject.getMessage());
      return new DemoPortalException("Error While parsing Data Using Jackson.",exceptionObject);
    }
    if (exceptionObject.getClass().equals(JsonMappingException.class)) {
      log.error("Error While Mapping Data. "+exceptionObject.getMessage());
      return new DemoPortalException("Error While Mapping Data Using Jackson.",exceptionObject);
    }
    if (exceptionObject.getClass().equals(IOException.class)) {
      return new DemoPortalException("IOEception."+exceptionObject.getMessage(),exceptionObject);
    }
    if (exceptionObject.getClass().equals(ApiException.class)) {
     
      /* Soni_Begin_17/09/2012_issue_for_consistent_Error_Message  */
      ApiException ae=(ApiException) exceptionObject;
                        return new DemoPortalException(ae.getMessage() + "[" + ae.getErrorCode() + "]");
                        /* Soni_End_17/09/2012_issue_for_consistent_Error_Message  */
                        //return new DemoPortalException("ApiException."+exceptionObject.getMessage(),exceptionObject);
    }
    if (exceptionObject.getClass().equals(IllegalArgumentException.class)) {
      return new DemoPortalException("IllegalArgumentException: "+exceptionObject.getMessage(),exceptionObject);
    }
    // Bug: 445 - To remove the "Error Cause" from the exception information.   
    return new DemoPortalException(exceptionObject.getMessage(),exceptionObject);
  }
View Full Code Here

Examples of com.intel.mountwilson.common.DemoPortalException

                                        for (HostDetailsEntityVO hostDetailsEntityVO : hostList) {
                                            hostVOs.add(getSingleHostTrust(hostDetailsEntityVO.getHostName(), apiClientServices, trustedCertificates));
                                        }
     
                                } else {
                                        throw new DemoPortalException("Currently there are no hosts configured in the system.");
                                }
                               
                                return hostVOs;
                        }
View Full Code Here

Examples of com.intel.mountwilson.common.DemoPortalException

       throw ConnectionUtil.handleException(e);
    }
   
    //Check if Return list is empty or Not, if empty throw Exception to controller with Specific message.
    if (hostList==null || hostList.size() < 0) {
      throw new DemoPortalException("Currently there are no hosts configured in the system.");
    }
   
    //Statements to change data according to need, replace all null values with Empty String so it will not shown up on screen.
    for (HostDetailsEntityVO hostDetailsEntityVO : hostList) {
      //System.out.println(hostDetailsEntityVO);
View Full Code Here

Examples of com.intel.mountwilson.common.DemoPortalException

          Map<String, String> oemInfo = new HashMap<String, String>();
          oemInfo.put(mleDetailsEntityVO.getMleName(), mleDetailsEntityVO.getMleVersion());
          list.add(oemInfo);
        }
      }else {
        throw new DemoPortalException("Currently no MLEs are configured in the system.");                               
      }
    }catch (Exception e) {
      throw ConnectionUtil.handleException(e);
    }
    return map;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.