001/**
002 *
003 * Copyright (c) 2014, the Railo Company Ltd. All rights reserved.
004 *
005 * This library is free software; you can redistribute it and/or
006 * modify it under the terms of the GNU Lesser General Public
007 * License as published by the Free Software Foundation; either 
008 * version 2.1 of the License, or (at your option) any later version.
009 * 
010 * This library is distributed in the hope that it will be useful,
011 * but WITHOUT ANY WARRANTY; without even the implied warranty of
012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
013 * Lesser General Public License for more details.
014 * 
015 * You should have received a copy of the GNU Lesser General Public 
016 * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
017 * 
018 **/
019package lucee.runtime.ext.tag;
020
021import lucee.runtime.tag.MissingAttribute;
022import lucee.runtime.type.Collection;
023import lucee.runtime.type.KeyImpl;
024
025public class TagMetaDataAttrImpl extends MissingAttribute implements TagMetaDataAttr { 
026        private String description;
027        private boolean required;
028        private boolean isRuntimeExpressionValue;
029        private String defaultValue;
030        
031        /**
032         * Constructor of the class
033         * @param name
034         * @param required
035         * @param type
036         */
037        public TagMetaDataAttrImpl(String name,String[] alias, boolean required, String type, boolean isRuntimeExpressionValue,String defaultValue,String description) {
038                this(KeyImpl.getInstance(name),alias,required,type,isRuntimeExpressionValue,defaultValue,description);
039        }
040        
041        /**
042         * Constructor of the class
043         * @param name
044         * @param required
045         * @param type
046         * @param description
047         */
048        public TagMetaDataAttrImpl(Collection.Key name,String[] alias, boolean required, String type, boolean isRuntimeExpressionValue,String defaultValue, String description) {
049                super(name,type,alias);
050                this.required = required;
051                this.description = description;
052                this.defaultValue = defaultValue;
053                this.isRuntimeExpressionValue = isRuntimeExpressionValue;
054        }
055
056        @Override
057        public String getDescription() {
058                return description;
059        }
060
061
062        @Override
063        public boolean isRequired() {
064                return required;
065        }
066
067        @Override
068        public boolean isRuntimeExpressionValue() {
069                return isRuntimeExpressionValue;
070        }
071
072        @Override
073        public String getDefaultVaue() {
074                return defaultValue;
075        }
076}