Package org.apache.slide.projector.descriptor

Examples of org.apache.slide.projector.descriptor.ResultDescriptor


    public ParameterDescriptor[] getParameterDescriptors() {
        return parameterDescriptors;
    }

    public ResultDescriptor getResultDescriptor() {
        return new ResultDescriptor(
                new StateDescriptor[] { StateDescriptor.OK_DESCRIPTOR },
                new ResultEntryDescriptor[]{
                    new ResultEntryDescriptor(OUTPUT, new DefaultMessage("templateArrayRenderer/result/output"), "*", true)
                });
    }
View Full Code Here


    public ParameterDescriptor[] getParameterDescriptors() {
        return parameterDescriptors;
    }

    public ResultDescriptor getResultDescriptor() {
        return new ResultDescriptor(
                new StateDescriptor[] { StateDescriptor.OK_DESCRIPTOR },
                new ResultEntryDescriptor[]{
                    new ResultEntryDescriptor(OUTPUT, new DefaultMessage("templateMapRenderer/result/output"), "*", true)
                });
    }
View Full Code Here

            new ParameterDescriptor(PASSWORD, new ParameterMessage("login/password"), new StringValueDescriptor(4,12)),
        };
    }

    public ResultDescriptor getResultDescriptor() {
        return new ResultDescriptor(new StateDescriptor[] {
           new StateDescriptor(LOGIN_OK, new DefaultMessage("login/state/ok")),
           new StateDescriptor(LOGIN_FAILED, new DefaultMessage("login/state/failed"))
        });
    }
View Full Code Here

    public ParameterDescriptor[] getParameterDescriptors() {
        return parameterDescirptors;
    }

    public ResultDescriptor getResultDescriptor() {
        return new ResultDescriptor(new StateDescriptor[] { StateDescriptor.OK_DESCRIPTOR });
    }
View Full Code Here

    public ParameterDescriptor[] getParameterDescriptors() {
        return new ParameterDescriptor[] { getParameterDescriptor() };
    }

    public ResultDescriptor getResultDescriptor() {
        return new ResultDescriptor(
                new StateDescriptor[] { StateDescriptor.OK_DESCRIPTOR },
                new ResultEntryDescriptor[] {
                    getResultEntryDescriptor()
                });
    }
View Full Code Here

        };
    }


    public ResultDescriptor getResultDescriptor() {
        return new ResultDescriptor(new StateDescriptor[]{ StateDescriptor.OK_DESCRIPTOR },
                new ResultEntryDescriptor[]{
                    new ResultEntryDescriptor(TITLE, new DefaultMessage("exceptionRenderer/result/title"), "text/plain", true),
                    new ResultEntryDescriptor(TEXT, new DefaultMessage("exceptionRenderer/result/text"), "text/plain", true),
                    new ResultEntryDescriptor(SUMMARY, new DefaultMessage("exceptionRenderer/result/summary"), "text/plain", true),
                    new ResultEntryDescriptor(DETAILS, new DefaultMessage("exceptionRenderer/result/details"), "text/plain", true),
View Full Code Here

      for ( Iterator i = stateElements.iterator(); i.hasNext(); ) {
        Element stateElement = (Element)i.next();
        String description = stateElement.getAttributeValue("description");
        states.add(new StateDescriptor(stateElement.getTextTrim(), new DefaultMessage(description)));
      }
      resultDescriptor = new ResultDescriptor((StateDescriptor [])states.toArray(new StateDescriptor[states.size()]), (ResultEntryDescriptor[])resultEntryDescriptors.toArray(new ResultEntryDescriptor[resultEntryDescriptors.size()]));
      List providedEnvironmentElements = XPath.newInstance("/process/description/output/environment").selectNodes(rootElement);
      List providedEnvironment = new ArrayList();
      for ( Iterator i = providedEnvironmentElements.iterator(); i.hasNext(); ) {
        Element environmentElement = (Element)i.next();
        String key = environmentElement.getAttributeValue("key");
View Full Code Here

    }
    return firstStep;
  }
 
  static void checkRoutings(Step step, Processor processor) throws ValidationException {
    ResultDescriptor resultDescriptor = processor.getResultDescriptor();
    StateDescriptor[] states = resultDescriptor.getStateDescriptors();
    for ( int i = 0; i < states.length; i++ ) {
      String state = states[i].getState();
      List routings = step.getRoutingConfigurations();
      boolean routingFound = false;
      for ( Iterator j = routings.iterator(); j.hasNext() ; ) {
View Full Code Here

            List resources = new ArrayList();
            buildArray(resources, rootPage);
            Value[] array = new Value[resources.size()];
            ArrayValue arrayResource = new ArrayValue((Value [])resources.toArray(array));
            result.addResultEntry(SimpleProcessor.OUTPUT, arrayResource);
            resultDescriptors = new ResultDescriptor(
                    new StateDescriptor[] { StateDescriptor.OK_DESCRIPTOR },
                    new ResultEntryDescriptor[] {
                        new ResultEntryDescriptor(SimpleProcessor.OUTPUT, new DefaultMessage("sitemap/output"), ArrayValue.CONTENT_TYPE, false)
                    });
        } catch (Exception exception) {
View Full Code Here

        ParameterDescriptor[] parameterDescriptors = processor.getParameterDescriptors();
        if ( parameterDescriptors.length > 1 && countRequiredParameters(parameterDescriptors) > 1 ) {
            throw new ProcessException(new ErrorMessage("valueProcessorNeedsTooManyParametersException"));
        }
        if ( resultKey  == null ) {
            ResultDescriptor resultDescriptor = processor.getResultDescriptor();
            if ( resultDescriptor.getResultEntryDescriptors().length == 0 ) {
                throw new ProcessException(new ErrorMessage("parameterProcessingException", new String[] { simpleProcessorUri.toString() }));
            } else {
                resultKey = resultDescriptor.getResultEntryDescriptors()[0].getName();
            }
        }
        if ( input == null && parameterDescriptors.length == 1 && parameterDescriptors[0].isRequired()) {
            throw new ProcessException(new ErrorMessage("requiredParameterMissing", new String[]{parameterDescriptors[0].getName()}));
        } else if ( input == null && parameterDescriptors.length > 1 ) {
View Full Code Here

TOP

Related Classes of org.apache.slide.projector.descriptor.ResultDescriptor

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.