Package org.apache.lenya.cms.workflow

Examples of org.apache.lenya.cms.workflow.Condition


   
    /** Returns if the transition can fire in a certain situation.
     *
     */
    public boolean canFire(Situation situation) {
        Condition conditions[] = getConditions();
        boolean canFire = true;
        for (int i = 0; i < conditions.length; i++) {
            if (!conditions[i].isComplied(situation)) {
                canFire = false;
            }
View Full Code Here


            throws WorkflowBuildException {
               
        assert className != null;
        assert expression != null;
       
        Condition condition;
        try {
            Class clazz = Class.forName(className);
            condition = (Condition) clazz.newInstance();
            condition.setExpression(expression);
        }
        catch (ClassNotFoundException e) {
            throw new WorkflowBuildException(e);
        }
        catch (InstantiationException e) {
View Full Code Here

        transition.setEvent(event);
       
        // load conditions
        NodeList conditionElements = element.getElementsByTagNameNS(NAMESPACE, CONDITION_ELEMENT);
        for (int i = 0; i < conditionElements.getLength(); i++) {
            Condition condition = buildCondition((Element) conditionElements.item(i));
            transition.addCondition(condition);
        }
       
        // load actions
        NodeList actionElements = element.getElementsByTagNameNS(NAMESPACE, ACTION_ELEMENT);
View Full Code Here

   
    protected Condition buildCondition(Element element)
            throws WorkflowBuildException {
        String className = element.getAttribute(CLASS_ATTRIBUTE);
        String expression = DocumentHelper.getSimpleElementText(element);
        Condition condition = ConditionFactory.createCondition(className, expression);
        return condition;
    }
View Full Code Here

TOP

Related Classes of org.apache.lenya.cms.workflow.Condition

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.