Package edu.indiana.extreme.gfac.beans

Examples of edu.indiana.extreme.gfac.beans.MethodBean


    }
    MethodType method = GfacUtils.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());

    // Done to convert the parameter type of enum to string which was not
    // possible in JSF selectOneListbox. For inputText it works without
View Full Code Here


    }

    ArrayList<Object> operations = serviceInfo.getOperations();

    for (int i = 0; i < operations.size(); i++) {
      MethodBean op = (MethodBean) operations.get(i);

      if (op == null) {
        throw new GfacException("Operation can not be Null", FaultCode.InvaliedLocalArgumnet);
      }

      MethodType[] methods = pt.getMethodArray();
      MethodType method = null;
      if (methods != null) {
        for (MethodType oldMethod : methods) {
          if (op.getMethodName().equals(oldMethod.getMethodName())) {
            method = oldMethod;
          }
        }
      }
      if (method == null) {
        method = pt.addNewMethod();
      }
      method.setMethodName(op.getMethodName());
      method.setMethodDescription(op.getMethodDescription());
      ApplicationType appType = method.getApplication();
      if (appType == null) {
        appType = method.addNewApplication();
      }
      appType.setParamValuesOnly(true);
      ApplicationName appNameType = appType.getApplicationName();
      if (appNameType == null) {
        appNameType = appType.addNewApplicationName();
      }
      QName appName = new QName(serviceInfo.getObjectNamespace(), serviceInfo.getApplicationName());
      appNameType.setStringValue(appName.getLocalPart());
      appNameType.setTargetNamespace(appName.getNamespaceURI());
      appType.setApplicationDescription(op.getMethodDescription());

      // Boolean parameters from Service screen
      if (op.isStageOutputDataFiles()) {
        method.setStageOutputDataFiles(true);
      }

      if (op.isForceFileStagingToWorkDir()) {
        method.setForceFileStagingToWorkDir(true);
      }

      if (op.isUseLEADNameListFile()) {
        appType.setUseLEADNameListFile(true);
      }

      if (op.isUseLEADNameListPropertiesFile()) {
        appType.setUseLEADNameListPropertiesFile(true);
      }

      InputParameterType[] inputs = method.getInputParameterArray();
      HashMap<String, InputParameterType> inputMap = new HashMap<String, InputParameterType>();
      if (inputs != null) {
        for (InputParameterType inputParameterType : inputs) {
          inputMap.put(inputParameterType.getParameterName(), inputParameterType);
        }
      }

      OutputParameterType[] outputs = method.getOutputParameterArray();
      HashMap<String, OutputParameterType> outputMap = new HashMap<String, OutputParameterType>();
      if (inputs != null) {
        for (OutputParameterType outputParameterType : outputs) {
          outputMap.put(outputParameterType.getParameterName(), outputParameterType);
        }
      }

      ArrayList<ParamObject> inputparams = op.getInputParms();
      for (int y = 0; y < inputparams.size(); y++) {
        ParamObject param = (ParamObject) inputparams.get(y);
        InputParameterType inputParm = inputMap.get(param.getName());
        if (inputParm == null) {
          inputParm = method.addNewInputParameter();
        }
        inputParm.setParameterName(param.getName());
        inputParm.setParameterDescription(param.getDesc());
        InputDataType.Enum type = InputDataType.Enum.forString(param.getType());
        inputParm.setParameterType(type);
      }

      ArrayList<ParamObject> outputparams = op.getOutputParms();
      for (int y = 0; y < outputparams.size(); y++) {
        ParamObject param = (ParamObject) outputparams.get(y);
        OutputParameterType outputParm = outputMap.get(param.getName());
        if (outputParm == null) {
          outputParm = method.addNewOutputParameter();
View Full Code Here

    }

    ArrayList<Object> operations = serviceInfo.getOperations();

    for (int i = 0; i < operations.size(); i++) {
      MethodBean op = (MethodBean) operations.get(i);

      if (op == null) {
        throw new GfacException("Operation can not be Null", FaultCode.InvaliedLocalArgumnet);
      }

      MethodType[] methods = pt.getMethodArray();
      MethodType method = null;
      if (methods != null) {
        for (MethodType oldMethod : methods) {
          if (op.getMethodName().equals(oldMethod.getMethodName())) {
            method = oldMethod;
          }
        }
      }
      if (method == null) {
        method = pt.addNewMethod();
      }
      method.setMethodName(op.getMethodName());
      method.setMethodDescription(op.getMethodDescription());
      ApplicationType appType = method.getApplication();
      if (appType == null) {
        appType = method.addNewApplication();
      }
      appType.setParamValuesOnly(true);
      ApplicationName appNameType = appType.getApplicationName();
      if (appNameType == null) {
        appNameType = appType.addNewApplicationName();
      }
      QName appName = new QName(serviceInfo.getObjectNamespace(), serviceInfo.getApplicationName());
      appNameType.setStringValue(appName.getLocalPart());
      appNameType.setTargetNamespace(appName.getNamespaceURI());
      appType.setApplicationDescription(op.getMethodDescription());

      // Boolean parameters from Service screen
      if (op.isStageOutputDataFiles()) {
        method.setStageOutputDataFiles(true);
      }

      if (op.isForceFileStagingToWorkDir()) {
        method.setForceFileStagingToWorkDir(true);
      }

      if (op.isUseLEADNameListFile()) {
        appType.setUseLEADNameListFile(true);
      }

      if (op.isUseLEADNameListPropertiesFile()) {
        appType.setUseLEADNameListPropertiesFile(true);
      }

      InputParameterType[] inputs = method.getInputParameterArray();
      HashMap<String, InputParameterType> inputMap = new HashMap<String, InputParameterType>();
      if (inputs != null) {
        for (InputParameterType inputParameterType : inputs) {
          inputMap.put(inputParameterType.getParameterName(), inputParameterType);
        }
      }

      OutputParameterType[] outputs = method.getOutputParameterArray();
      HashMap<String, OutputParameterType> outputMap = new HashMap<String, OutputParameterType>();
      if (inputs != null) {
        for (OutputParameterType outputParameterType : outputs) {
          outputMap.put(outputParameterType.getParameterName(), outputParameterType);
        }
      }

      ArrayList<ParamObject> inputparams = op.getInputParms();
      for (int y = 0; y < inputparams.size(); y++) {
        ParamObject param = (ParamObject) inputparams.get(y);
        InputParameterType inputParm = inputMap.get(param.getName());
        if (inputParm == null) {
          inputParm = method.addNewInputParameter();
        }
        inputParm.setParameterName(param.getName());
        inputParm.setParameterDescription(param.getDesc());
        InputDataType.Enum type = InputDataType.Enum.forString(param.getType());
        inputParm.setParameterType(type);
      }

      ArrayList<ParamObject> outputparams = op.getOutputParms();
      for (int y = 0; y < outputparams.size(); y++) {
        ParamObject param = (ParamObject) outputparams.get(y);
        OutputParameterType outputParm = outputMap.get(param.getName());
        if (outputParm == null) {
          outputParm = method.addNewOutputParameter();
View Full Code Here

TOP

Related Classes of edu.indiana.extreme.gfac.beans.MethodBean

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.