Package org.apache.camel.model

Examples of org.apache.camel.model.LogDefinition


        assertEquals("choice1", choice.getId());

        WhenDefinition when = (WhenDefinition) choice.getOutputs().get(0);
        assertEquals("when1", when.getId());

        LogDefinition log1 = (LogDefinition) when.getOutputs().get(0);
        assertEquals("log1", log1.getId());

        ToDefinition to1 = (ToDefinition) when.getOutputs().get(1);
        assertEquals("camel", to1.getId());

        OtherwiseDefinition other = (OtherwiseDefinition) choice.getOutputs().get(1);
        assertEquals("otherwise1", other.getId());

        LogDefinition log2 = (LogDefinition) other.getOutputs().get(0);
        assertEquals("log2", log2.getId());

        ToDefinition to2 = (ToDefinition) other.getOutputs().get(1);
        assertEquals("to1", to2.getId());

        ToDefinition to3 = (ToDefinition) other.getOutputs().get(2);
View Full Code Here


        WhenDefinition when = choice.getWhenClauses().get(0);
        assertTrue(when.hasCustomIdAssigned());
        assertEquals("UK", when.getId());

        LogDefinition log = (LogDefinition) choice.getOtherwise().getOutputs().get(0);
        assertFalse(log.hasCustomIdAssigned());
    }
View Full Code Here

        WhenDefinition when = choice.getWhenClauses().get(0);
        assertTrue(when.hasCustomIdAssigned());
        assertEquals("UK", when.getId());

        LogDefinition log = (LogDefinition) choice.getOtherwise().getOutputs().get(0);
        assertFalse(log.hasCustomIdAssigned());
    }
View Full Code Here

        assertEquals("choice1", choice.getId());

        WhenDefinition when = (WhenDefinition) choice.getOutputs().get(0);
        assertEquals("when1", when.getId());

        LogDefinition log1 = (LogDefinition) when.getOutputs().get(0);
        assertEquals("log1", log1.getId());

        ToDefinition to1 = (ToDefinition) when.getOutputs().get(1);
        assertEquals("camel", to1.getId());

        OtherwiseDefinition other = (OtherwiseDefinition) choice.getOutputs().get(1);
        assertEquals("otherwise1", other.getId());

        LogDefinition log2 = (LogDefinition) other.getOutputs().get(0);
        assertEquals("log2", log2.getId());

        ToDefinition to2 = (ToDefinition) other.getOutputs().get(1);
        assertEquals("to1", to2.getId());

        ToDefinition to3 = (ToDefinition) other.getOutputs().get(2);
View Full Code Here

    }

    @SuppressWarnings("rawtypes")
    @Override
    public ProcessorDefinition createCamelDefinition() {
        LogDefinition answer = new LogDefinition();

        answer.setMessage(toXmlPropertyValue(PROPERTY_MESSAGE, this.getMessage()));
        answer.setLoggingLevel(toXmlPropertyValue(PROPERTY_LOGGINGLEVEL, this.getLoggingLevel()));
        answer.setLogName(toXmlPropertyValue(PROPERTY_LOGNAME, this.getLogName()));
        answer.setMarker(toXmlPropertyValue(PROPERTY_MARKER, this.getMarker()));
        answer.setLoggerRef(toXmlPropertyValue(PROPERTY_LOGGERREF, this.getLoggerRef()));

        super.savePropertiesToCamelDefinition(answer);
        return answer;
    }
View Full Code Here

    @Override
    protected void loadPropertiesFromCamelDefinition(ProcessorDefinition processor) {
        super.loadPropertiesFromCamelDefinition(processor);

        if (processor instanceof LogDefinition) {
            LogDefinition node = (LogDefinition) processor;

            this.setMessage(node.getMessage());
            this.setLoggingLevel(node.getLoggingLevel());
            this.setLogName(node.getLogName());
            this.setMarker(node.getMarker());
            this.setLoggerRef(node.getLoggerRef());
        } else {
            throw new IllegalArgumentException("ProcessorDefinition not an instanceof LogDefinition. Was " + processor.getClass().getName());
        }
    }
View Full Code Here

        assertEquals("choice1", choice.getId());

        WhenDefinition when = (WhenDefinition) choice.getOutputs().get(0);
        assertEquals("when1", when.getId());

        LogDefinition log1 = (LogDefinition) when.getOutputs().get(0);
        assertEquals("log1", log1.getId());

        ToDefinition to1 = (ToDefinition) when.getOutputs().get(1);
        assertEquals("camel", to1.getId());

        OtherwiseDefinition other = (OtherwiseDefinition) choice.getOutputs().get(1);
        assertEquals("otherwise1", other.getId());

        LogDefinition log2 = (LogDefinition) other.getOutputs().get(0);
        assertEquals("log2", log2.getId());

        ToDefinition to2 = (ToDefinition) other.getOutputs().get(1);
        assertEquals("to1", to2.getId());

        ToDefinition to3 = (ToDefinition) other.getOutputs().get(2);
View Full Code Here

        assertEquals("choice1", choice.getId());

        WhenDefinition when = (WhenDefinition) choice.getOutputs().get(0);
        assertEquals("when1", when.getId());

        LogDefinition log1 = (LogDefinition) when.getOutputs().get(0);
        assertEquals("log1", log1.getId());

        ToDefinition to1 = (ToDefinition) when.getOutputs().get(1);
        assertEquals("camel", to1.getId());

        OtherwiseDefinition other = (OtherwiseDefinition) choice.getOutputs().get(1);
        assertEquals("otherwise1", other.getId());

        LogDefinition log2 = (LogDefinition) other.getOutputs().get(0);
        assertEquals("log2", log2.getId());

        ToDefinition to2 = (ToDefinition) other.getOutputs().get(1);
        assertEquals("to1", to2.getId());

        ToDefinition to3 = (ToDefinition) other.getOutputs().get(2);
View Full Code Here

TOP

Related Classes of org.apache.camel.model.LogDefinition

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.