Package org.ogce.schemas.gfac.beans

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


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

      ApplicationBean appBean = xregistryAccesser.getApplicationBean(
          this.list.getSelectedValue().getQname().toString(),
          this.list.getSelectedValue().getDescription());

      if (appBean != null) {
       
        appBean.setApplicationName(this.list.getSelectedValue().getQname().getLocalPart());
        appBean.setObjectNamespace(this.list.getSelectedValue().getQname().getNamespaceURI());
        appBean.setHostName(this.list.getSelectedValue().getDescription());
       
        appWindow.show(appBean);
      } else {
        this.engine.getErrorWindow().error(this.dialog.getDialog(), "Cannot get value from Xregistry");
      }
View Full Code Here


          return;
        }
      }

      /* Generate Bean Object */
      ApplicationBean appBean = new ApplicationBean();
      appBean.setApplicationName(StringUtil.trimSpaceInString(this.applicationNameTextField.getText()));
      appBean.setHostName(StringUtil.trimSpaceInString(this.hostNameComboBox.getText()));
      appBean.setExecutable(StringUtil.trimSpaceInString(this.executableTextField.getText()));
      appBean.setWorkDir(StringUtil.trimSpaceInString(this.workDirectoryTextField.getText()));
      appBean.setTmpDir(StringUtil.trimSpaceInString(this.tempDirTextField.getText()));

      appBean.setProjectName(StringUtil.trimSpaceInString(this.projectNameComboBox.getText()));
      appBean.setJobType(StringUtil.trimSpaceInString(this.jobTypeComboBox.getText()));
      appBean.setQueue(StringUtil.trimSpaceInString(this.queueTextField.getText()));
      if (!this.maxWallTimeTextField.getText().equals("")) {
        appBean.setMaxWallTime(new Integer(Integer.parseInt(this.maxWallTimeTextField.getText())));
      }
      if (!this.procsCountTextField.getText().equals("")) {
        appBean.setPcount(new Integer(Integer.parseInt(this.procsCountTextField.getText())));
      }

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

View Full Code Here

  public void testApplicationUtilsBeanRequest() throws XmlException {
    /* Get XMLString by ApplicationBean */
    appDesc = XmlFormatter.format(ApplicationUtils.simpleAppXMLRequest(appBean));
   
    /* Generate new ApplicationBean by XMLString */
    ApplicationBean bean = ApplicationUtils.simpleApplicationBeanRequest(appDesc);
    appDesc = appDesc.replaceAll(" ", "");
    appDesc = appDesc.replaceAll("\n", "");
   
    /* Get new XMLString by new ApplicationBean */
    String appDescToCompare = XmlFormatter.format(ApplicationUtils.simpleAppXMLRequest(bean));
View Full Code Here

      throws XmlException {

    ApplicationDescriptionType applicationDescriptionType = ApplicationDescriptionDocument.Factory
        .parse(appDescStr).getApplicationDescription();

    ApplicationBean appBean = new ApplicationBean();

    appBean.setHostName(applicationDescriptionType
        .getDeploymentDescription().getHostName());
    ApplicationName appXbeanName = applicationDescriptionType
        .getApplicationName();

    appBean.setApplicationName(appXbeanName.getStringValue());

    appBean.setObjectNamespace(appXbeanName.getTargetNamespace());
    appBean.setExecutable(applicationDescriptionType
        .getDeploymentDescription().getExecutable());
    appBean.setWorkDir(applicationDescriptionType
        .getDeploymentDescription().getWorkDir());
    appBean.setTmpDir(applicationDescriptionType.getDeploymentDescription()
        .getTmpDir());
    if (applicationDescriptionType.isSetProject()) {
      appBean.setProjectName(applicationDescriptionType.getProject()
          .getProjectName());

    }
    if (applicationDescriptionType.getJobType() != null) {
      appBean.setJobType(applicationDescriptionType.getJobType()
          .toString());
    }

    if (applicationDescriptionType.getQueue() != null) {
      appBean.setQueue(applicationDescriptionType.getQueue()
          .getQueueName());
    }

    if (applicationDescriptionType.isSetCount()) {
      appBean.setPcount(applicationDescriptionType.getCount());
    }

    if (applicationDescriptionType.isSetMaxWallTime()) {
      appBean.setMaxWallTime(applicationDescriptionType.getMaxWallTime());
    }
    if (applicationDescriptionType.isSetMinMemory()) {
      appBean.setMinMemory(applicationDescriptionType.getMinMemory());
    }
    if (applicationDescriptionType.getHostCount() > 0) {
      appBean.setHostCount(applicationDescriptionType.getHostCount());
    }
    if (applicationDescriptionType.getRslparmArray() != null) {
      RSLParmType[] rslParmType = applicationDescriptionType
          .getRslparmArray();
      for (RSLParmType rslParmType2 : rslParmType) {
        appBean.setRslparmName(rslParmType2.getName());
        appBean.setRslparmValue(rslParmType2.getStringValue());
      }
    }
    if (applicationDescriptionType.getDeploymentDescription()
        .getLeadNameListFile() != null) {
      appBean.setLeadNameListFile(applicationDescriptionType
          .getDeploymentDescription().getLeadNameListFile());
    }

    return appBean;
  }
View Full Code Here

                String serviceName = serviceBean.getServiceName();
                ServiceDescription serviceDescription = jcrRegistry.getServiceDesc(serviceName);
                if(serviceDescription == null) {
                    service = MigrationUtil.createServiceDescription(serviceBean);
                    jcrRegistry.saveServiceDescription(service);
                    ApplicationBean appBean =
                            saveApplicationDescriptionWithName(client, applicationName, service);
                    if (appBean != null){
                        jcrRegistry.deployServiceOnHost(service.getType().
                                getName(), appBean.getHostName());
                    }
                } else {
                    serviceName = serviceName + "_" + count++;
                    service = MigrationUtil.createServiceDescription(serviceName,serviceBean);
                    log.info("Service Description named " +
                            service.getType().getName() +
                            " exists in the registry. Therefore, saving it as " +
                            serviceName + " in the registry.");

                    jcrRegistry.saveServiceDescription(service);
                    ApplicationBean appBean = saveApplicationDescriptionWithName(client,
                            applicationName, service);
                    if (appBean != null){
                        jcrRegistry.deployServiceOnHost(service.getType().getName(),
                                appBean.getHostName());
                    }

                }
            } catch (RegistryException e) {
                throw new XRegistryMigrationException("Issue accessing the JCR Registry " +
View Full Code Here

        } catch (XRegistryClientException e) {
            throw new XRegistryMigrationException("Issue accessing XRegistry " + e.getMessage(), e);
        }
        Map<QName, FindAppDescResponseDocument.FindAppDescResponse.AppData> val2 =
                new HashMap<QName, FindAppDescResponseDocument.FindAppDescResponse.AppData>();
        ApplicationBean appBean = null;
        int count = 0;
        for (FindAppDescResponseDocument.FindAppDescResponse.AppData appDesc : appData) {
            val2.put(appDesc.getName(), appDesc);
            String appDescStr;
            try {
                appDescStr = client.getAppDesc(appDesc.getName().toString(),appDesc.getHostName());
            } catch (XRegistryClientException e) {
                throw new XRegistryMigrationException("Issue retrieving Application " +
                        "Description form XRegistry instance " + e.getMessage(), e);
            }
            try {
                appBean = org.ogce.schemas.gfac.beans.
                        utils.ApplicationUtils.simpleApplicationBeanRequest(appDescStr);
                log.info("Application : " + appBean.getApplicationName());
                log.info(appDescStr);

            } catch (XmlException e) {
                throw new XRegistryMigrationException("Issue creating the OGCE Schema " +
                        "Application Bean " + e.getMessage(), e);
            }

            try {
                String name = service.getType().getName();
                String hostName = appBean.getHostName();
                Thread.sleep(1000);
                ApplicationDeploymentDescription appDepDesc =
                        jcrRegistry.getDeploymentDescription(name, hostName);
                if(appDepDesc == null) {
                    if(log.isDebugEnabled()) {
View Full Code Here

TOP

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

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.