View Javadoc

1   /**
2    * Copyright 2005-2012 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.document.Document;
19  import org.kuali.rice.krad.util.KRADConstants;
20  
21  import java.io.Serializable;
22  import java.util.ArrayList;
23  import java.util.List;
24  
25  /**
26   * This object allows for grouping of related {@link WorkflowProperty} objects.  It defines a base path to which all {@link WorkflowProperty} are
27   * relative. See {@link #getBasePath()} for a explanation of the meaning of the base path
28   * 
29   *                 This element is used to define a set of workflowProperty tags, which are used to
30                  specify which document properties should be serialized during the document serialization
31                  process.  This element allows for all the nested workflowProperty tags to be relative
32                  to some base path.  This base path itself is relative to the object being serialized
33                  during the document serialization process (which is not necessarily the document itself,
34                  but a wrapper around the document).
35                  
36                  If blank/missing, the base path will be assumed to be the property path to the document
37   */
38  public class WorkflowPropertyGroup implements Serializable {
39      private static final long serialVersionUID = 1L;
40  
41      protected String basePath = KRADConstants.EMPTY_STRING;
42      protected List<WorkflowProperty> workflowProperties = new ArrayList<WorkflowProperty>();
43          
44      /**
45       * Returns the list of added {@link WorkflowProperty} objects.
46       * 
47       * @return list of {@link WorkflowProperty} objects.
48       */
49      public List<WorkflowProperty> getWorkflowProperties() {
50          return workflowProperties;
51      }
52  
53      /**
54       * Returns the base path of the group, which represents the path that all {@link WorkflowProperty} objects are relative to.  The base path
55       * itself should be relative from the object being serialized, which may not necessarily be the document, see {@link Document#wrapDocumentWithMetadataForXmlSerialization()}
56       * and {@link Document#getBasePathToDocumentDuringSerialization()}
57       * 
58       * @return the base path
59       */
60      public String getBasePath() {
61          return this.basePath;
62      }
63  
64      /**
65       * This element allows for all the nested workflowProperty tags to be relative
66                  to some base path.  This base path itself is relative to the object being serialized
67                  during the document serialization process (which is not necessarily the document itself,
68                  but a wrapper around the document).
69                  
70                  If blank/missing, the base path will be assumed to be the property path to the document
71       * 
72       * @param basePath see description of {@link #getBasePath()}
73       */
74      public void setBasePath(String basePath) {
75          this.basePath = basePath;
76      }
77  
78      public void setWorkflowProperties(List<WorkflowProperty> workflowProperties) {
79          this.workflowProperties = workflowProperties;
80      }
81  
82  }