001    /**
002     * Copyright 2005-2014 The Kuali Foundation
003     *
004     * Licensed under the Educational Community License, Version 2.0 (the "License");
005     * you may not use this file except in compliance with the License.
006     * You may obtain a copy of the License at
007     *
008     * http://www.opensource.org/licenses/ecl2.php
009     *
010     * Unless required by applicable law or agreed to in writing, software
011     * distributed under the License is distributed on an "AS IS" BASIS,
012     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013     * See the License for the specific language governing permissions and
014     * limitations under the License.
015     */
016    package org.kuali.rice.krad.uif.field;
017    
018    import org.kuali.rice.krad.datadictionary.AttributeSecurity;
019    import org.kuali.rice.krad.datadictionary.parse.BeanTag;
020    import org.kuali.rice.krad.datadictionary.parse.BeanTagAttribute;
021    
022    /**
023     * Data field security adds attribute security to the standard component security
024     *
025     * <p>
026     * The {@link AttributeSecurity} can be configured for the field to indicate there is security at the data layer
027     * (configured by component (class) and property). If the field is backed by a data dictionary
028     * {@link org.kuali.rice.krad.datadictionary.AttributeDefinition} the attribute security can be configured there and
029     * will be picked up and inserted into the field security
030     * </p>
031     *
032     * @author Kuali Rice Team (rice.collab@kuali.org)
033     */
034    @BeanTag(name = "dataFieldSecurity-bean")
035    public class DataFieldSecurity extends FieldSecurity {
036        private static final long serialVersionUID = 585138507596582667L;
037    
038        private AttributeSecurity attributeSecurity;
039    
040        public DataFieldSecurity() {
041            super();
042        }
043    
044        /**
045         * Attribute security instance configured or picked up for the field
046         *
047         * @return AttributeSecurity instance
048         */
049        @BeanTagAttribute(name="attributeSecurity",type= BeanTagAttribute.AttributeType.SINGLEBEAN)
050        public AttributeSecurity getAttributeSecurity() {
051            return attributeSecurity;
052        }
053    
054        /**
055         * Setter for the fields attribute security
056         *
057         * @param attributeSecurity
058         */
059        public void setAttributeSecurity(AttributeSecurity attributeSecurity) {
060            this.attributeSecurity = attributeSecurity;
061        }
062    
063    }