Examples of ChoiceDefinition


Examples of com.volantis.shared.metadata.type.ChoiceDefinition

                            value,
                            null,
                            "Null choice name."));
                }
            } else {
                final ChoiceDefinition choiceDefinition =
                    getChoiceDefinition(choiceName);
               
                if (choiceDefinition == null) {
                    // No choice definition for selected choice name is an error.
                    errors.add(new VerificationError(
                            VerificationError.TYPE_UNEXPECTED_VALUE,
                            path,
                            value,
                            null,
                            "Choice '" + choiceName + "' is not expected here."));
                } else {
                    // Verify choice value against its type.
                    Collection valueErrors =
                        choiceDefinition.getType().verify(choiceValue.getValue());
                   
                    errors.addAll(valueErrors);
                }
            }
        }
View Full Code Here

Examples of com.volantis.shared.metadata.type.ChoiceDefinition

     *
     * @param name The name of the choice.
     * @return The choice definition.
     */
    private ChoiceDefinition getChoiceDefinition(String name) {
        ChoiceDefinition choiceDefinition = null;
       
        Iterator iterator = choiceDefinitions.iterator();
       
        while (iterator.hasNext()) {
            ChoiceDefinition choiceDefinitionCandidate =
                (ChoiceDefinition) iterator.next();
           
            if (choiceDefinitionCandidate.getName().equals(name)) {
                choiceDefinition = choiceDefinitionCandidate;
            }
        }
               
        return choiceDefinition;
View Full Code Here

Examples of org.apache.camel.model.ChoiceDefinition

            this.image = imagePrefix + "ContentBasedRouterIcon.png";
            this.nodeType = "Content Based Router";
            this.label = "Choice";
            this.edgeLabel = "";

            ChoiceDefinition choice = (ChoiceDefinition)node;
            List<ProcessorDefinition> outputs = new ArrayList<ProcessorDefinition>(choice.getWhenClauses());
            if (choice.getOtherwise() != null) {
                outputs.add(choice.getOtherwise());
            }
            this.outputs = outputs;
        } else if (node instanceof RecipientListDefinition) {
            this.image = imagePrefix + "RecipientListIcon.png";
            this.nodeType = "Recipient List";
View Full Code Here

Examples of org.apache.camel.model.ChoiceDefinition

            this.image = imagePrefix + "ContentBasedRouterIcon.png";
            this.nodeType = "Content Based Router";
            this.label = "Choice";
            this.edgeLabel = "";

            ChoiceDefinition choice = (ChoiceDefinition)node;
            List<ProcessorDefinition> outputs = new ArrayList<ProcessorDefinition>(choice.getWhenClauses());
            if (choice.getOtherwise() != null) {
                outputs.add(choice.getOtherwise());
            }
            this.outputs = outputs;
        } else if (node instanceof RecipientListDefinition) {
            this.image = imagePrefix + "RecipientListIcon.png";
            this.nodeType = "Recipient List";
View Full Code Here

Examples of org.apache.camel.model.ChoiceDefinition

            this.image = imagePrefix + "ContentBasedRouterIcon.png";
            this.nodeType = "Content Based Router";
            this.label = "Choice";
            this.edgeLabel = "";

            ChoiceDefinition choice = (ChoiceDefinition)node;
            List<ProcessorDefinition> outputs = new ArrayList<ProcessorDefinition>(choice.getWhenClauses());
            if (choice.getOtherwise() != null) {
                outputs.add(choice.getOtherwise());
            }
            this.outputs = outputs;
        } else if (node instanceof RecipientListDefinition) {
            this.image = imagePrefix + "RecipientListIcon.png";
            this.nodeType = "Recipient List";
View Full Code Here

Examples of org.apache.camel.model.ChoiceDefinition

            this.image = imagePrefix + "ContentBasedRouterIcon.png";
            this.nodeType = "Content Based Router";
            this.label = "Choice";
            this.edgeLabel = "";

            ChoiceDefinition choice = (ChoiceDefinition)node;
            List<ProcessorDefinition> outputs = new ArrayList<ProcessorDefinition>(choice.getWhenClauses());
            if (choice.getOtherwise() != null) {
                outputs.add(choice.getOtherwise());
            }
            this.outputs = outputs;
        } else if (node instanceof RecipientListDefinition) {
            this.image = imagePrefix + "RecipientListIcon.png";
            this.nodeType = "Recipient List";
View Full Code Here

Examples of org.apache.camel.model.ChoiceDefinition

            this.image = imagePrefix + "ContentBasedRouterIcon.png";
            this.nodeType = "Content Based Router";
            this.label = "Choice";
            this.edgeLabel = "";

            ChoiceDefinition choice = (ChoiceDefinition)node;
            List<ProcessorDefinition> outputs = new ArrayList<ProcessorDefinition>(choice.getWhenClauses());
            if (choice.getOtherwise() != null) {
                outputs.add(choice.getOtherwise());
            }
            this.outputs = outputs;
        } else if (node instanceof RecipientListDefinition) {
            this.image = imagePrefix + "RecipientListIcon.png";
            this.nodeType = "Recipient List";
View Full Code Here

Examples of org.apache.camel.model.ChoiceDefinition

    private ChoiceDefinitionRenderer() {
        // Utility class, no public or protected default constructor
    }   

    public static void render(StringBuilder buffer, ProcessorDefinition processor) {
        ChoiceDefinition choice = (ChoiceDefinition)processor;
        buffer.append(".").append(choice.getShortName()).append("()");
        for (WhenDefinition when : choice.getWhenClauses()) {
            ProcessorDefinitionRenderer.render(buffer, when);
        }
        OtherwiseDefinition other = choice.getOtherwise();
        if (other != null) {
            ProcessorDefinitionRenderer.render(buffer, other);
        }
        buffer.append(".end()");
    }
View Full Code Here

Examples of org.apache.camel.model.ChoiceDefinition

            this.image = imagePrefix + "ContentBasedRouterIcon.png";
            this.nodeType = "Content Based Router";
            this.label = "Choice";
            this.edgeLabel = "";

            ChoiceDefinition choice = (ChoiceDefinition)node;
            List<ProcessorDefinition<?>> outputs = new ArrayList<ProcessorDefinition<?>>(choice.getWhenClauses());
            if (choice.getOtherwise() != null) {
                outputs.add(choice.getOtherwise());
            }
            this.outputs = outputs;
        } else if (node instanceof RecipientListDefinition) {
            this.image = imagePrefix + "RecipientListIcon.png";
            this.nodeType = "Recipient List";
View Full Code Here

Examples of org.apache.camel.model.ChoiceDefinition

    private ChoiceDefinitionRenderer() {
        // Utility class, no public or protected default constructor
    }   

    public static void render(StringBuilder buffer, ProcessorDefinition<?> processor) {
        ChoiceDefinition choice = (ChoiceDefinition)processor;
        buffer.append(".").append(choice.getShortName()).append("()");
        for (WhenDefinition when : choice.getWhenClauses()) {
            ProcessorDefinitionRenderer.render(buffer, when);
        }
        OtherwiseDefinition other = choice.getOtherwise();
        if (other != null) {
            ProcessorDefinitionRenderer.render(buffer, other);
        }
        buffer.append(".end()");
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.