Package org.ogce.schemas.gfac.beans

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


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

      ServiceBean serviceBean = xregistryAccesser
          .getServiceBean(this.list.getSelectedValue().getQname());
      if (serviceBean != null) {
       
        serviceBean.setServiceName(this.list.getSelectedValue().getQname().getLocalPart());
        serviceBean.setObjectNamespace(this.list.getSelectedValue().getQname().getNamespaceURI());
       
        serviceWindow.show(serviceBean);
      } else {
        this.engine.getErrorWindow().error(this.dialog.getDialog(), "Cannot get value from Xregistry");
      }
View Full Code Here


      return;
    }

    /* Generate Bean Object */
    try {
      ServiceBean serviceBean = new ServiceBean();
      serviceBean.setServiceName(StringUtil.trimSpaceInString(this.serviceNameTextField.getText()));
      serviceBean.setApplicationName(this.appNameComboBox.getText());
      serviceBean.setNotAfterInactiveMinutes(Integer.parseInt(this.inactivityLimitTextField.getText()));

      MethodBean methodBean = new MethodBean();
      methodBean.setMethodName(StringUtil.trimSpaceInString(this.methodNameTextField.getText()));
      methodBean.setMethodDescription(this.methodDescTextField.getText());

      // input arguments setup
      for (ParamObject paraObject : this.inputArguments) {
        methodBean.addInputParms(paraObject);
      }

      // output arguments setup
      for (ParamObject paraObject : this.outputArguments) {
        methodBean.addOutputParms(paraObject);
      }

      serviceBean.setMethodBean(methodBean);

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

      if (!this.isEditing) {
View Full Code Here

  public static ServiceBean serviceBeanRequest(String serviceMapStr)
      throws XmlException, IOException {

    int notAfterInactiveMinutes = 15;

    ServiceBean serviceBean = new ServiceBean();
    ServiceMapDocument serviceMapDocument = ServiceMapDocument.Factory
        .parse(new StringReader(serviceMapStr));
    ServiceMapType serviceMapType = serviceMapDocument.getServiceMap();
    ServiceType serviceType = serviceMapType.getService();
    serviceBean.setServiceDescription(serviceType.getServiceDescription());

    if (serviceMapType.getLifeTime() != null) {
      notAfterInactiveMinutes = serviceMapType.getLifeTime()
          .getNotAfterInactiveMinutes();
    }
    MethodType method = findOperationWithApplication(serviceMapType);
    ApplicationType appType = method.getApplication();
    ApplicationName appxbeanName = method.getApplication()
        .getApplicationName();
    String appName = new QName(appxbeanName.getTargetNamespace(),
        appxbeanName.getStringValue()).toString();
    MethodBean methodBean = new MethodBean(method.getMethodName(), method
        .getMethodDescription(), method.isSetStageOutputDataFiles(),
        method.isSetForceFileStagingToWorkDir(), appType
            .isSetUseLEADNameListFile(), appType
            .isSetUseLEADNameListPropertiesFile());

    InputParameterType[] inputparams = method.getInputParameterArray();
    for (int index = 0; index < inputparams.length; index++) {

      InputParameterType inputParameterType = inputparams[index];
      methodBean.addInputParms(new ParamObject(inputParameterType
          .getParameterName(), inputParameterType.getParameterType()
          .toString(), index, inputParameterType
          .getParameterDescription()));

    }

    OutputParameterType[] outparams = method.getOutputParameterArray();
    for (int index = 0; index < outparams.length; index++) {

      OutputParameterType outputParameterType = outparams[index];
      methodBean.addOutputParms(new ParamObject(outputParameterType
          .getParameterName(), outputParameterType.getParameterType()
          .toString(), index, outputParameterType
          .getParameterDescription()));

    }

    serviceBean.setApplicationName(appName);
    serviceBean.setServiceName(serviceMapType.getService().getServiceName()
        .getStringValue());
    serviceBean.setApplicationName(appxbeanName.getStringValue());
    serviceBean.setNotAfterInactiveMinutes(notAfterInactiveMinutes);
    serviceBean.setMethodBean(methodBean);
    serviceBean.setObjectNamespace(serviceMapType.getService()
        .getServiceName().getTargetNamespace());

    return serviceBean;
  }
View Full Code Here

  public void testServiceUtilsBeanRequest() throws GFacSchemaException, XmlException, IOException {
    /* Get XMLString by ServiceBean */
    serviceMapStr = XmlFormatter.format(ServiceUtils.simpleServiceXMLRequest(serviceBean));
   
    /* Generate new ServiceBean by XMLString */
    ServiceBean bean = ServiceUtils.serviceBeanRequest(serviceMapStr);
    serviceMapStr = serviceMapStr.replaceAll(" ", "");
    serviceMapStr = serviceMapStr.replaceAll("\n", "");
   
    /* Get new XMLString by new ServiceBean */
    String serviceMapStrToCompare = XmlFormatter.format(ServiceUtils.simpleServiceXMLRequest(bean));
View Full Code Here

            } catch (XRegistryClientException e) {
                throw new XRegistryMigrationException("Issue retrieving Service Description form " +
                        "XRegistry instance " + e.getMessage(), e);
            }

            ServiceBean serviceBean;
            String applicationName;
            try {
                serviceBean = org.ogce.schemas.gfac.beans.
                        utils.ServiceUtils.serviceBeanRequest(serviceDescStr);
                applicationName = serviceBean.getApplicationName();
                log.info("Service : " + serviceBean.getServiceName());
                log.info(serviceDescStr);
            } catch (XmlException e) {
                throw new XRegistryMigrationException("Issue creating the OGCE Schema Service " +
                        "Bean " + e.getMessage(), e);
            } catch (IOException e) {
                throw new XRegistryMigrationException("Issue creating the OGCE Schema Service " +
                        "Bean " + e.getMessage(), e);
            }

            try {
                String serviceName = serviceBean.getServiceName();
                ServiceDescription serviceDescription = jcrRegistry.getServiceDesc(serviceName);
                if(serviceDescription == null) {
                    service = MigrationUtil.createServiceDescription(serviceBean);
                    jcrRegistry.saveServiceDescription(service);
                    ApplicationBean appBean =
View Full Code Here

TOP

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

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.