001/**
002 * Copyright 2005-2018 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 */
016package org.kuali.rice.krad.uif.container;
017
018import org.kuali.rice.krad.datadictionary.parse.BeanTag;
019import org.kuali.rice.krad.datadictionary.parse.BeanTagAttribute;
020import org.kuali.rice.krad.uif.component.ComponentSecurity;
021
022/**
023 * Collection Group security is used to flag that permissions exist for the associated {@link CollectionGroup}
024 * in KIM and should be checked to determine the associated group, line, and field state. In particular this adds
025 * the edit line and view line flags
026 *
027 * <p>
028 * In addition, properties such as additional role and permission details can be configured to use when
029 * checking the KIM permissions
030 * </p>
031 *
032 * @author Kuali Rice Team (rice.collab@kuali.org)
033 */
034@BeanTag(name = "collectionGroupSecurity")
035public class CollectionGroupSecurity extends ComponentSecurity {
036    private static final long serialVersionUID = 1134455196763917062L;
037
038    private boolean editLineAuthz;
039    private boolean viewLineAuthz;
040
041    public CollectionGroupSecurity() {
042        super();
043
044        editLineAuthz = false;
045        viewLineAuthz = false;
046    }
047
048    /**
049     * Indicates whether the collection group line has edit authorization and KIM should be consulted
050     *
051     * @return true if the line has edit authorization, false if not
052     */
053    @BeanTagAttribute
054    public boolean isEditLineAuthz() {
055        return editLineAuthz;
056    }
057
058    /**
059     * Setter for the edit line authorization flag
060     *
061     * @param editLineAuthz
062     */
063    public void setEditLineAuthz(boolean editLineAuthz) {
064        this.editLineAuthz = editLineAuthz;
065    }
066
067    /**
068     * Indicates whether the collection group line has view authorization and KIM should be consulted
069     *
070     * @return true if the line has view authorization, false if not
071     */
072    @BeanTagAttribute
073    public boolean isViewLineAuthz() {
074        return viewLineAuthz;
075    }
076
077    /**
078     * Setter for the view line authorization flag
079     *
080     * @param viewLineAuthz
081     */
082    public void setViewLineAuthz(boolean viewLineAuthz) {
083        this.viewLineAuthz = viewLineAuthz;
084    }
085}