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.datadictionary.parse;
017
018/**
019 * Data storage class for information about a custom tag for a single bean object.
020 *
021 * @author Kuali Rice Team (rice.collab@kuali.org)
022 */
023public class BeanTagInfo {
024    private Class<?> beanClass;
025    private String parent;
026    private String tag;
027    private boolean defaultTag;
028
029    /**
030     * Constructor initalizing global values
031     */
032    public BeanTagInfo() {
033        beanClass = null;
034        parent = null;
035    }
036
037    /**
038     * Sets the class represented by the defined tag.
039     *
040     * @param beanClass - The class to be stored.
041     */
042    public void setBeanClass(Class<?> beanClass) {
043        this.beanClass = beanClass;
044    }
045
046    /**
047     * Retrieves the class represented by the tag.
048     * The bean class stored is the data object defined for the Spring Bean
049     *
050     * @return The class being defined by the tag.
051     */
052    public Class<?> getBeanClass() {
053        return beanClass;
054    }
055
056    /**
057     * Sets the default parent for the associated tag.
058     *
059     * @param parent - The name of the default parent bean for the tag.
060     */
061    public void setParent(String parent) {
062        this.parent = parent;
063    }
064
065    /**
066     * Retrieves the bean parent stored for the represented tag.
067     * The default parent bean to be used when the custom tag is used.
068     *
069     * @return The default parent bean value.
070     */
071    public String getParent() {
072        return this.parent;
073    }
074
075    public String getTag() {
076        return tag;
077    }
078
079    public void setTag(String tag) {
080        this.tag = tag;
081    }
082
083    public boolean isDefaultTag() {
084        return defaultTag;
085    }
086
087    public void setDefaultTag(boolean defaultTag) {
088        this.defaultTag = defaultTag;
089    }
090}