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 */
016package org.kuali.rice.krad.datadictionary;
017
018import org.kuali.rice.krad.datadictionary.parse.BeanTag;
019import org.kuali.rice.krad.datadictionary.parse.BeanTagAttribute;
020import org.kuali.rice.krad.document.Document;
021import org.kuali.rice.krad.util.KRADConstants;
022
023import java.io.Serializable;
024import java.util.ArrayList;
025import java.util.List;
026
027/**
028 * Allows for grouping of related {@link WorkflowProperty} objects
029 *
030 * <p>
031 * This element is used to define a set of workflowProperty tags, which are used to
032 * specify which document properties should be serialized during the document serialization
033 * process.  This element allows for all the nested workflowProperty tags to be relative
034 * to some base path.  This base path itself is relative to the object being serialized
035 * during the document serialization process (which is not necessarily the document itself,
036 * but a wrapper around the document).If blank/missing, the base path will be assumed to be
037 * the property path to the document.
038 * </p>
039 *
040 * @author Kuali Rice Team (rice.collab@kuali.org)
041 */
042@BeanTag(name = "workflowPropertyGroup")
043public class WorkflowPropertyGroup implements Serializable {
044    private static final long serialVersionUID = 1L;
045
046    protected String basePath = KRADConstants.EMPTY_STRING;
047    protected List<WorkflowProperty> workflowProperties = new ArrayList<WorkflowProperty>();
048
049    /**
050     * The list of {@link WorkflowProperty} objects
051     *
052     * @return List<WorkflowProperty>
053     */
054    @BeanTagAttribute(name = "workflowProperties", type = BeanTagAttribute.AttributeType.LISTBEAN)
055    public List<WorkflowProperty> getWorkflowProperties() {
056        return workflowProperties;
057    }
058
059    /**
060     * The base path of the group which all {@link WorkflowProperty} objects are relative to
061     *
062     * <p>
063     * The base path itself should be relative from the object being serialized, which may not necessarily be the
064     * document, see {@link Document#wrapDocumentWithMetadataForXmlSerialization()}
065     * and {@link Document#getBasePathToDocumentDuringSerialization()}. If blank/missing, the base path will be
066     * assumed to be the property path to the document.
067     * </p>
068     *
069     * @return String
070     */
071    @BeanTagAttribute(name = "basePath")
072    public String getBasePath() {
073        return this.basePath;
074    }
075
076    /**
077     * Setter for the base path
078     *
079     * @param basePath - the base path
080     */
081    public void setBasePath(String basePath) {
082        this.basePath = basePath;
083    }
084
085    /**
086     * Setter for workflow properties list
087     *
088     * @param workflowProperties - the list of workflow properties
089     */
090    public void setWorkflowProperties(List<WorkflowProperty> workflowProperties) {
091        this.workflowProperties = workflowProperties;
092    }
093
094}