    001    /*
    002     * Licensed to the Apache Software Foundation (ASF) under one or more
    003     * contributor license agreements.  See the NOTICE file distributed with
    004     * this work for additional information regarding copyright ownership.
    005     * The ASF licenses this file to You under the Apache License, Version 2.0
    006     * (the "License"); you may not use this file except in compliance with
    007     * the License.  You may obtain a copy of the License at
    008     *
    009     *     http://www.apache.org/licenses/LICENSE-2.0
    010     *
    011     * Unless required by applicable law or agreed to in writing, software
    012     * distributed under the License is distributed on an "AS IS" BASIS,
    013     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    014     * See the License for the specific language governing permissions and
    015     * limitations under the License.
    016     */
    017    package org.apache.commons.scxml.model;
    018
    019    import java.util.Collection;
    020
    021    import org.apache.commons.logging.Log;
    022    import org.apache.commons.scxml.ErrorReporter;
    023    import org.apache.commons.scxml.EventDispatcher;
    024    import org.apache.commons.scxml.SCInstance;
    025    import org.apache.commons.scxml.SCXMLExpressionException;
    026
    027    /**
    028     * The class in this SCXML object model that corresponds to the
    029     * <elseif> SCXML element.
    030     *
    031     */
    032    public class ElseIf extends Action {
    033
    034        /**
    035         * Serial version UID.
    036         */
    037        private static final long serialVersionUID = 1L;
    038
    039        /**
    040         * An conditional expression which can be evaluated to true or false.
    041         */
    042        private String cond;
    043
    044        /**
    045         * Constructor.
    046         */
    047        public ElseIf() {
    048            super();
    049        }
    050
    051        /**
    052         * Get the conditional expression.
    053         *
    054         * @return Returns the cond.
    055         */
    056        public final String getCond() {
    057            return cond;
    058        }
    059
    060        /**
    061         * Set the conditional expression.
    062         *
    063         * @param cond The cond to set.
    064         */
    065        public final void setCond(final String cond) {
    066            this.cond = cond;
    067        }
    068
    069        /**
    070         * {@inheritDoc}
    071         */
    072        public void execute(final EventDispatcher evtDispatcher,
    073                final ErrorReporter errRep, final SCInstance scInstance,
    074                final Log appLog, final Collection derivedEvents)
    075        throws ModelException, SCXMLExpressionException {
    076            // nothing to do, the <if> container will take care of this
    077            return;
    078        }
    079
    080    }
    081