Package org.apache.slide.projector.descriptor

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


            }
        }
        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 ) {
            ParameterDescriptor requiredParameter = getRequiredParameter(parameterDescriptors);
            if ( requiredParameter != null ) throw new ProcessException(new ErrorMessage("requiredParameterMissing", new String[]{ requiredParameter.getName()}));
        } else {
            try {
                // check for SimpleProcessor to avoid HashMap creation
                if ( processor instanceof EnvironmentConsumer ) {
                    Process.checkRequirements((EnvironmentConsumer)processor, context);
View Full Code Here


        ParameterDescriptor []parentParameterDescriptors = super.getParameterDescriptors();
        // remove fragment parameter
        parameterDescriptors = new ParameterDescriptor[parentParameterDescriptors.length+1];
        int index = 0;
        for ( int i = 0; i < parentParameterDescriptors.length; i++ ) {
            ParameterDescriptor descriptor = parentParameterDescriptors[i];
            if ( descriptor.getName() != FRAGMENT ) {
                parameterDescriptors[index] = parentParameterDescriptors[i];
                index++;
            }
        }
        parameterDescriptors[parentParameterDescriptors.length-1] = new ParameterDescriptor(OFFSET, new ParameterMessage("tableRenderer/offset"), new NumberValueDescriptor(), new NumberValue(new Integer(0)));
        parameterDescriptors[parentParameterDescriptors.length] = new ParameterDescriptor(LENGTH, new ParameterMessage("tableRenderer/length"), new NumberValueDescriptor(), new NumberValue(new Integer(0)));

        headerTemplate = getOptionalFragment(HEADER_FRAGMENT);
        footerTemplate = getOptionalFragment(FOOTER_FRAGMENT);
        firstTemplate = getOptionalFragment(FIRST_FRAGMENT);
        lastTemplate = getOptionalFragment(LAST_FRAGMENT);
View Full Code Here

            SimpleImporter importer = new SimpleImporter();
            ConfigurationHandler handler = new ConfigurationHandler();
            importer.addSimpleImportHandler(handler);
            importer.parse(new InputSource(configuration));
            parameterDescriptors = new ParameterDescriptor[] {
                new ParameterDescriptor(SimpleProcessor.INPUT, new ParameterMessage(handler.getDescription()), handler.getValueDesriptor())
            };
            resultDescriptor = new ResultDescriptor(handler.getStateDescriptors());
        } catch (Exception exception) {
            logger.log(Level.SEVERE, "Error while parsing router configuration", exception);
        }
View Full Code Here

        }
        return new StringValue(buffer.toString());
    }

    public ParameterDescriptor getParameterDescriptor() {
        return new ParameterDescriptor(INPUT, new ParameterMessage("arrayRenderer/input"), new ArrayValueDescriptor(new StringValueDescriptor()));
    }
View Full Code Here

        List nodeList = xPath.selectNodes(rootElement);
        return createValueFromNodeList(nodeList);
    }

    public ParameterDescriptor getParameterDescriptor() {
        return new ParameterDescriptor(INPUT, new ParameterMessage("xPathQuery/parameter/input"), new StringValueDescriptor());
    }
View Full Code Here

   
    public void configure(StreamableValue config) throws ConfigurationException {
        super.configure(config);
        // remove fragment parameter
        List parameterList = new ArrayList();
        parameterList.add(new ParameterDescriptor(PARAMETER, new ParameterMessage("tablePager/parameter"), MapValueDescriptor.ANY, new MapValue(new HashMap())));
        parameterList.add(new ParameterDescriptor(SHOW_RANGE, new ParameterMessage("tablePager/showRange"), new BooleanValueDescriptor(), BooleanValue.FALSE));
        parameterList.add(new ParameterDescriptor(RANGE, new ParameterMessage("tablePager/range"), new NumberValueDescriptor(), new NumberValue(new Integer(0))));
        parameterList.add(new ParameterDescriptor(TableHandler.ID, new ParameterMessage("tableRenderer/id"), new StringValueDescriptor(), new StringValue("table")));
        parameterList.add(new ParameterDescriptor(TableHandler.STORE, new ParameterMessage("tableRenderer/store"), new StringValueDescriptor(Store.stores), new StringValue(Store.stores[Store.SESSION])));
        parameterDescriptors = (ParameterDescriptor[])parameterList.toArray(new ParameterDescriptor[parameterList.size()]);

        pre = getOptionalFragment(PRE_FRAGMENT);
        post = getOptionalFragment(POST_FRAGMENT);
        first = getOptionalFragment(FIRST_FRAGMENT);
View Full Code Here

        resultEntries.put(URL, new StringValue(url));
        return new Result(StateDescriptor.OK, resultEntries);
    }

    public ParameterDescriptor[] getParameterDescriptors() {
        return new ParameterDescriptor[]{ new ParameterDescriptor(SimpleProcessor.INPUT, new ParameterMessage("cachedContent/parameter/input"), new URIValueDescriptor()) }; }
View Full Code Here

        transformer.transform(new JDOMSource(document), result);
        return new DocumentValue(result.getDocument());
    }

    public ParameterDescriptor getParameterDescriptor() {
        return new ParameterDescriptor(INPUT, new ParameterMessage("xslTransformer/parameter/input"), new XMLValueDescriptor());
    }
View Full Code Here

    public Value process(Value input, Context context) throws Exception {
        return input;
    }

    public ParameterDescriptor getParameterDescriptor() {
        return new ParameterDescriptor(INPUT, new ParameterMessage("echo/parameter/input"), new AnyValueDescriptor());
    }
View Full Code Here

        URI uri = new URIValue(input.toString());
        return Projector.getRepository().getResource(uri, context.getCredentials());
    }

    public ParameterDescriptor getParameterDescriptor() {
        return new ParameterDescriptor(INPUT, new ParameterMessage("simpleProcessor/parameter/input"), new URIValueDescriptor());
    }
View Full Code Here

TOP

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

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.