Package org.ogce.schemas.gfac.beans

Examples of org.ogce.schemas.gfac.beans.HostBean


      if (!hostWindow.isEngineSet()) {
        hostWindow.setXBayaEngine(this.engine);
      }

      HostBean hostBean = xregistryAccesser.getHostBean(host);
     
      mapping = new LeadResourceMapping(host);
      try{
        mapping.setGatekeeperEPR(new URI(hostBean.getGateKeeperendPointReference()));
      }catch(Exception e){
        this.engine.getErrorWindow().error(e);
      }
     
    }
View Full Code Here


      if (!hostWindow.isEngineSet()) {
        hostWindow.setXBayaEngine(this.engine);
      }

      HostBean hostBean = xregistryAccesser.getHostBean(this.list
          .getSelectedValue().getQname().toString());
      if (hostBean != null) {
       
        hostBean.setHostName(this.list
              .getSelectedValue().getQname().getLocalPart());
       
        hostWindow.show(hostBean);
      } else {
        this.engine.getErrorWindow().error(this.dialog.getDialog(), "Cannot get value from Xregistry");
View Full Code Here

    /* Input Validity Check */
    // TODO

    try {
      /* Generate Bean Object */
      HostBean hostBean = new HostBean();
      hostBean.setHostName(this.hostNameComboBox.getText());
      Object[] serviceTypes = this.serviceTypesList.getSelectedValues();
      List<String> serviceTypesArrayList = new ArrayList<String>();
      for (Object obj : serviceTypes) {
        serviceTypesArrayList.add((String) obj);
      }
      hostBean.setServiceType(serviceTypesArrayList);
      hostBean.setHostEnv(StringUtil
          .trimSpaceInString(this.hostEnvTextField.getText()));
      hostBean.setTmpDir(StringUtil
          .trimSpaceInString(this.tempDirTextField.getText()));
      hostBean.setSshEnabled(this.sshEnabledCheckBox.isSelected());
      hostBean.setGateKeeperJobManager(this.jobManagerComboBox.getText());
      hostBean
          .setGateKeeperendPointReference(this.gateKeeprEndpointComboBox
              .getText());
      System.out.println(this.gateKeeprEndpointComboBox.getText());
      hostBean.setWsGram(this.wsGramPresentCheckBox.isSelected());
      hostBean.setGridFtpendPointReference(this.gridFTPEndPointComboBox
          .getText());
     
      if (!this.gfacPathTextField.getText().isEmpty()) {
        hostBean.setgFacPath(this.gfacPathTextField.getText());
      }
     
      if (!this.jdkPathTextField.getText().isEmpty()) {
        hostBean.setJdkPath(this.jdkPathTextField.getText());
        hostBean.setJdkName(this.jdkNameComboBox.getText());
      }

      /* Register to XRegistry */
      XRegistryAccesser xRegAccesser = new XRegistryAccesser(this.engine);

View Full Code Here

  public static HostBean simpleHostBeanRequest(String hostDescStr)
      throws XmlException {
    HostDescriptionType hostDesc = HostDescriptionDocument.Factory.parse(
        hostDescStr).getHostDescription();

    HostBean hostBean = new HostBean();

    hostBean.setHostName(hostDesc.getHostName());
    hostBean.setGFacPath(hostDesc.getHostConfiguration().getGFacPath());

    PortRangeType portRange = hostDesc.getHostConfiguration()
        .getPortRange();
    if (portRange != null) {
      hostBean.setPortRangeStart(portRange.getStart());
      hostBean.setPortRangeEnd(portRange.getEnd());
    }
    PackageType[] java = hostDesc.getHostConfiguration().getJavaArray();
    if (java.length > 0) {
      hostBean.setJdkPath(java[0].getHome());
    }
    hostBean.setTmpDir(hostDesc.getHostConfiguration().getTmpDir());
    NameValuePairType[] hostEnvs = hostDesc.getHostConfiguration()
        .getHostEnvArray();
    if (hostEnvs.length > 0) {
      StringBuffer buf = new StringBuffer();
      String prefix = "";
      for (NameValuePairType envVal : hostEnvs) {
        buf.append(prefix);
        buf.append(envVal.getName()).append("=").append(
            envVal.getValue());
        prefix = ",";
      }
      hostBean.setHostEnv(buf.toString());
    }
    hostBean.setSshEnabled(hostDesc.getHostConfiguration().getSshEnabled());
    if (hostDesc.getHostConfiguration().getGlobusGatekeeperArray().length > 0) {
      hostBean
          .setGateKeeperJobManager(hostDesc.getHostConfiguration()
              .getGlobusGatekeeperArray(0).getJobmanagertype()
              .toString());
      // We are taking 1st value for now
      hostBean.setGateKeeperendPointReference(hostDesc
          .getHostConfiguration().getGlobusGatekeeperArray(0)
          .getEndPointReference().toString());
      hostBean.setGateKeeperName(hostDesc.getHostConfiguration()
          .getGlobusGatekeeperArray(0).getName());
      hostBean.setWsGram(hostDesc.getHostConfiguration()
          .getGlobusGatekeeperArray(0).getWsGram());
    }
    if (hostDesc.getHostConfiguration().getGridFTPArray().length > 0) {
      hostBean.setGridFtpName(hostDesc.getHostConfiguration()
          .getGridFTPArray(0).getName());
      hostBean.setGridFtpendPointReference(hostDesc
          .getHostConfiguration().getGridFTPArray(0)
          .getEndPointReference());
    }

    return hostBean;
View Full Code Here

  public void testHostHostUtilsBeanRequest() throws XmlException, GFacSchemaException {
    /* Get XMLString by HostBean */
    hostDesc = XmlFormatter.format(HostUtils.simpleHostXMLRequest(hostBean));
   
    /* Generate new HostBean by XMLString */
    HostBean bean = HostUtils.simpleHostBeanRequest(hostDesc);
    hostDesc = hostDesc.replaceAll(" ", "");
    hostDesc = hostDesc.replaceAll("\n", "");
   
    /* Get new XMLString by new HostBean */
    String hostDescToCompare = XmlFormatter.format(HostUtils.simpleHostXMLRequest(bean));
View Full Code Here

            } catch (XRegistryClientException e) {
                throw new XRegistryMigrationException("Issue getting the host description with " +
                        "name " + hostDesc.getName().getLocalPart() + " from XRegistry instance " +
                        e.getMessage(), e);
            }
            HostBean hostBean;
            try {
                hostBean = org.ogce.schemas.gfac.beans.
                        utils.HostUtils.simpleHostBeanRequest(hostDescStr);
                log.info("Host : " + hostBean.getHostName());
                log.info(hostDescStr);

            } catch (XmlException e) {
                throw new XRegistryMigrationException("Issue creating the OGCE Schema Host Bean " +
                        e.getMessage(), e);
View Full Code Here

TOP

Related Classes of org.ogce.schemas.gfac.beans.HostBean

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.