001    /**
002     * Copyright 2005-2013 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.element;
017    
018    import org.kuali.rice.krad.datadictionary.parse.BeanTag;
019    import org.kuali.rice.krad.datadictionary.parse.BeanTagAttribute;
020    import org.kuali.rice.krad.uif.field.FieldSecurity;
021    
022    /**
023     * Action field security adds the take action flags to the standard component security
024     *
025     * @author Kuali Rice Team (rice.collab@kuali.org)
026     */
027    @BeanTag(name = "actionSecurity-bean")
028    public class ActionSecurity extends FieldSecurity {
029        private static final long serialVersionUID = 585138507596582667L;
030    
031        private boolean performActionAuthz;
032        private boolean performLineActionAuthz;
033    
034        public ActionSecurity() {
035            super();
036    
037            performActionAuthz = false;
038            performLineActionAuthz = false;
039        }
040    
041        /**
042         * Indicates whether the action field has take action authorization and KIM should be consulted
043         *
044         * @return true if the action field has perform action authorization, false if not
045         */
046        @BeanTagAttribute(name="performActionAuthz")
047        public boolean isPerformActionAuthz() {
048            return performActionAuthz;
049        }
050    
051        /**
052         * Setter for the perform action authorization flag
053         *
054         * @param performActionAuthz
055         */
056        public void setPerformActionAuthz(boolean performActionAuthz) {
057            this.performActionAuthz = performActionAuthz;
058        }
059    
060        /**
061         * Indicates whether the line action field has take action authorization and KIM should be consulted
062         *
063         * @return true if the line action field has perform action authorization, false if not
064         */
065        @BeanTagAttribute(name="performLineActionAuthz")
066        public boolean isPerformLineActionAuthz() {
067            return performLineActionAuthz;
068        }
069    
070        /**
071         * Setter for the perform line action authorization flag
072         *
073         * @param performLineActionAuthz
074         */
075        public void setPerformLineActionAuthz(boolean performLineActionAuthz) {
076            this.performLineActionAuthz = performLineActionAuthz;
077        }
078    }