View Javadoc

1   /**
2    * Copyright 2005-2013 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.rice.krad.datadictionary;
17  
18  import org.kuali.rice.krad.datadictionary.parse.BeanTag;
19  import org.kuali.rice.krad.datadictionary.parse.BeanTagAttribute;
20  import org.kuali.rice.krad.document.Document;
21  import org.kuali.rice.krad.util.KRADConstants;
22  
23  import java.io.Serializable;
24  import java.util.ArrayList;
25  import java.util.List;
26  
27  /**
28   * Allows for grouping of related {@link WorkflowProperty} objects
29   *
30   * <p>
31   * This element is used to define a set of workflowProperty tags, which are used to
32   * specify which document properties should be serialized during the document serialization
33   * process.  This element allows for all the nested workflowProperty tags to be relative
34   * to some base path.  This base path itself is relative to the object being serialized
35   * during the document serialization process (which is not necessarily the document itself,
36   * but a wrapper around the document).If blank/missing, the base path will be assumed to be
37   * the property path to the document.
38   * </p>
39   *
40   * @author Kuali Rice Team (rice.collab@kuali.org)
41   */
42  @BeanTag(name = "workflowPropertyGroup-bean")
43  public class WorkflowPropertyGroup implements Serializable {
44      private static final long serialVersionUID = 1L;
45  
46      protected String basePath = KRADConstants.EMPTY_STRING;
47      protected List<WorkflowProperty> workflowProperties = new ArrayList<WorkflowProperty>();
48  
49      /**
50       * The list of {@link WorkflowProperty} objects
51       *
52       * @return List<WorkflowProperty>
53       */
54      @BeanTagAttribute(name = "workflowProperties", type = BeanTagAttribute.AttributeType.LISTBEAN)
55      public List<WorkflowProperty> getWorkflowProperties() {
56          return workflowProperties;
57      }
58  
59      /**
60       * The base path of the group which all {@link WorkflowProperty} objects are relative to
61       *
62       * <p>
63       * The base path itself should be relative from the object being serialized, which may not necessarily be the
64       * document, see {@link Document#wrapDocumentWithMetadataForXmlSerialization()}
65       * and {@link Document#getBasePathToDocumentDuringSerialization()}. If blank/missing, the base path will be
66       * assumed to be the property path to the document.
67       * </p>
68       *
69       * @return String
70       */
71      @BeanTagAttribute(name = "basePath")
72      public String getBasePath() {
73          return this.basePath;
74      }
75  
76      /**
77       * Setter for the base path
78       *
79       * @param basePath - the base path
80       */
81      public void setBasePath(String basePath) {
82          this.basePath = basePath;
83      }
84  
85      /**
86       * Setter for workflow properties list
87       *
88       * @param workflowProperties - the list of workflow properties
89       */
90      public void setWorkflowProperties(List<WorkflowProperty> workflowProperties) {
91          this.workflowProperties = workflowProperties;
92      }
93  
94  }