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.io.Serializable;
020    import java.util.Map;
021    
022    /**
023     * The class in this SCXML object model that corresponds to the
024     * <param> SCXML element.
025     *
026     */
027    public class Param implements NamespacePrefixesHolder, Serializable {
028    
029        /**
030         * Serial version UID.
031         */
032        private static final long serialVersionUID = 1L;
033    
034        /**
035         * The param name.
036         */
037        private String name;
038    
039        /**
040         * The param expression, may be null.
041         */
042        private String expr;
043    
044        /**
045         * The current XML namespaces in the SCXML document for this action node,
046         * preserved for deferred XPath evaluation.
047         */
048        private Map namespaces;
049    
050        /**
051         * Default no-args constructor for Digester.
052         */
053        public Param() {
054            name = null;
055            expr = null;
056        }
057        /**
058         * Get the name for this param.
059         *
060         * @return String The param name.
061         */
062        public final String getName() {
063            return name;
064        }
065    
066        /**
067         * Set the name for this param.
068         *
069         * @param name The param name.
070         */
071        public final void setName(final String name) {
072            this.name = name;
073        }
074    
075        /**
076         * Get the expression for this param value.
077         *
078         * @return String The expression for this param value.
079         */
080        public final String getExpr() {
081            return expr;
082        }
083    
084        /**
085         * Set the expression for this param value.
086         *
087         * @param expr The expression for this param value.
088         */
089        public final void setExpr(final String expr) {
090            this.expr = expr;
091        }
092    
093        /**
094         * Get the XML namespaces at this action node in the SCXML document.
095         *
096         * @return Returns the map of namespaces.
097         */
098        public final Map getNamespaces() {
099            return namespaces;
100        }
101    
102        /**
103         * Set the XML namespaces at this action node in the SCXML document.
104         *
105         * @param namespaces The document namespaces.
106         */
107        public final void setNamespaces(final Map namespaces) {
108            this.namespaces = namespaces;
109        }
110    
111    }
112