Package com.intel.mountwilson.datamodel

Examples of com.intel.mountwilson.datamodel.HostDetailsEntityVO


        responseView.addObject("result",false);
        responseView.addObject("message",e1.getMessage());
      }
    System.out.println(hostObject);
    ObjectMapper mapper = new ObjectMapper();
    HostDetailsEntityVO dataVO = new HostDetailsEntityVO();
   
    try {
      dataVO = mapper.readValue(hostObject,HostDetailsEntityVO.class);
    } catch (JsonParseException e) {
      log.error("Error While Parsing request parameters Data. "+e.getMessage());
      responseView.addObject("result",false);
      responseView.addObject("message","Error While Parsing request parameters Data.");
      return responseView;
    } catch (JsonMappingException e) {
      log.error("Error While Mapping request parameters to Mle Data Object. "+e.getMessage());
      responseView.addObject("result",false);
      responseView.addObject("message","Error While Mapping request parameters to Mle Data Object.");
      return responseView;
    } catch (IOException e) {
      log.error("IO Exception "+e.getMessage());
      responseView.addObject("result",false);
      responseView.addObject("message","Error While Mapping request parameters to Mle Data Object.");
      return responseView;
    }
   
    dataVO.setUpdatedOn(new Date(System.currentTimeMillis()));
   
    try {
      if (newhost) {
        System.err.println("dataForNew : "+dataVO);
        responseView.addObject("result",demoPortalServices.saveNewHostData(dataVO,getAttestationService(req,AttestationService.class)));
View Full Code Here


    }
        return xmlOutput.getWriter().toString();
    }
   
   public static HostDetailsEntityVO getHostVOObjectFromTxtHostRecord(TxtHostRecord txtHostDetail) {
      HostDetailsEntityVO entityVO = new HostDetailsEntityVO();
    entityVO.setHostId(getConvertedHostName(txtHostDetail.HostName));
    entityVO.setHostName(txtHostDetail.HostName);
    entityVO.setHostIPAddress(txtHostDetail.IPAddress);
    entityVO.setHostPort(txtHostDetail.Port.toString());
    entityVO.setHostDescription(txtHostDetail.Description);
    entityVO.setBiosName(txtHostDetail.BIOS_Name);
    entityVO.setBiosBuildNo(txtHostDetail.BIOS_Version);
    entityVO.setVmmName(txtHostDetail.VMM_OSName+" "+txtHostDetail.VMM_OSVersion+HelperConstant.OS_VMM_INFORMATION_SEPERATOR+txtHostDetail.VMM_Name);
    entityVO.setVmmBuildNo(txtHostDetail.VMM_Version);
    entityVO.setvCenterDetails(txtHostDetail.AddOn_Connection_String);
    entityVO.setOemName(txtHostDetail.BIOS_Oem);
    entityVO.setLocation(txtHostDetail.Location);
    entityVO.setEmailAddress(txtHostDetail.Email);
      return entityVO;
    }
View Full Code Here

   */
  @Override
  public TrustedHostVO getSingleHostTrust(String hostName,AttestationService apiClientServices,X509Certificate[] trustedCertificates)throws DemoPortalException {
   
    TrustedHostVO hostVO = null;
    HostDetailsEntityVO hostDetailsEntityVO = new HostDetailsEntityVO();
    hostDetailsEntityVO.setHostName(hostName);
    String xmloutput = null;
       
       
                                            HostTrustResponse hostTrustResponse = null;
                                                try {
                                                        log.info("Getting trust Information for Host "+hostName);
                                                        hostTrustResponse = apiClientServices.getHostTrust(new Hostname(hostDetailsEntityVO.getHostName()));
                                                        List<TxtHostRecord> hosts = apiClientServices.queryForHosts(hostDetailsEntityVO.getHostName());
                                                        TxtHostRecord txtHostRecord = null;
                                                        for(TxtHostRecord record : hosts) {
                                                            if( record.HostName.equals(hostDetailsEntityVO.getHostName())) {
                                                                txtHostRecord = record;
                                                            }
                                                        }
                                                        hostVO = ConverterUtil.getTrustedHostVoFromHostTrustResponseAndTxtHostRecord(hostTrustResponse, txtHostRecord);
                                                } catch (Exception e) {
View Full Code Here

  }
   
   
  @Override
  public HostDetailsEntityVO getSingleHostDetailFromDB(String hostName,AttestationService service) throws DemoPortalException {
    HostDetailsEntityVO hostDetailsEntityVO  = new HostDetailsEntityVO();
    try{
      hostDetailsEntityVO = ConverterUtil.getHostVOObjectFromTxtHostRecord(service.queryForHosts(hostName).get(0));
    } catch (Exception e) {
      log.error("Error While getting data from DataBase."+e.getMessage());
       throw ConnectionUtil.handleException(e);
    }
     
   
                                        if(hostDetailsEntityVO.getHostIPAddress() == null || hostDetailsEntityVO.getHostIPAddress().equals("null")){
                                                hostDetailsEntityVO.setHostIPAddress("");
                                        }
                                        if(hostDetailsEntityVO.getHostPort() == null || hostDetailsEntityVO.getHostPort().equals("null")){
                                                hostDetailsEntityVO.setHostPort("");
                                        }
                                        if(hostDetailsEntityVO.getEmailAddress() == null || hostDetailsEntityVO.getEmailAddress().equals("null")){
                                                hostDetailsEntityVO.setEmailAddress("");
                                        }
                                        if(hostDetailsEntityVO.getvCenterDetails() == null || hostDetailsEntityVO.getvCenterDetails().equals("null")){
                                                hostDetailsEntityVO.setvCenterDetails("");
                                        }
                                        if(hostDetailsEntityVO.getHostDescription() == null || hostDetailsEntityVO.getHostDescription().equals("null")){
                                                hostDetailsEntityVO.setHostDescription("");
                                        }

                                                return hostDetailsEntityVO;
  }
View Full Code Here

TOP

Related Classes of com.intel.mountwilson.datamodel.HostDetailsEntityVO

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.