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.component;
020
021import java.io.Serializable;
022
023import lucee.runtime.exp.ExpressionException;
024import lucee.runtime.type.Duplicable;
025import lucee.runtime.type.util.ComponentUtil;
026
027public abstract class MemberSupport implements Serializable,Member,Duplicable {
028    private int access;
029        //private Component component;
030    //private Object value;
031   
032    /**
033     * Constructor of the class
034     * @param access
035     * @param value
036     */
037    public MemberSupport(int access) {
038        this.access=access;
039        //this.component=component;
040    }
041    
042        @Override
043        public int getAccess() {
044                return access;
045        }
046        
047        /**
048         * @param access
049         */
050        public void setAccess(int access) {
051                this.access = access;
052        }
053        /**
054         * @param access the access to set
055         * @throws ExpressionException 
056         */
057        public void setAccess(String access) throws ExpressionException {
058                this.access = ComponentUtil.toIntAccess(access);
059        }
060        
061}