View Javadoc

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