001/** 002 * Copyright 2005-2016 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.document.Document; 019import org.kuali.rice.krad.util.KRADConstants; 020 021import java.io.Serializable; 022import java.util.ArrayList; 023import java.util.List; 024 025/** 026 * This object allows for grouping of related {@link WorkflowProperty} objects. It defines a base path to which all {@link WorkflowProperty} are 027 * relative. See {@link #getBasePath()} for a explanation of the meaning of the base path 028 * 029 * This element is used to define a set of workflowProperty tags, which are used to 030 specify which document properties should be serialized during the document serialization 031 process. This element allows for all the nested workflowProperty tags to be relative 032 to some base path. This base path itself is relative to the object being serialized 033 during the document serialization process (which is not necessarily the document itself, 034 but a wrapper around the document). 035 036 If blank/missing, the base path will be assumed to be the property path to the document 037 */ 038public class WorkflowPropertyGroup implements Serializable { 039 private static final long serialVersionUID = 1L; 040 041 protected String basePath = KRADConstants.EMPTY_STRING; 042 protected List<WorkflowProperty> workflowProperties = new ArrayList<WorkflowProperty>(); 043 044 /** 045 * Returns the list of added {@link WorkflowProperty} objects. 046 * 047 * @return list of {@link WorkflowProperty} objects. 048 */ 049 public List<WorkflowProperty> getWorkflowProperties() { 050 return workflowProperties; 051 } 052 053 /** 054 * Returns the base path of the group, which represents the path that all {@link WorkflowProperty} objects are relative to. The base path 055 * itself should be relative from the object being serialized, which may not necessarily be the document, see {@link Document#wrapDocumentWithMetadataForXmlSerialization()} 056 * and {@link Document#getBasePathToDocumentDuringSerialization()} 057 * 058 * @return the base path 059 */ 060 public String getBasePath() { 061 return this.basePath; 062 } 063 064 /** 065 * This element allows for all the nested workflowProperty tags to be relative 066 to some base path. This base path itself is relative to the object being serialized 067 during the document serialization process (which is not necessarily the document itself, 068 but a wrapper around the document). 069 070 If blank/missing, the base path will be assumed to be the property path to the document 071 * 072 * @param basePath see description of {@link #getBasePath()} 073 */ 074 public void setBasePath(String basePath) { 075 this.basePath = basePath; 076 } 077 078 public void setWorkflowProperties(List<WorkflowProperty> workflowProperties) { 079 this.workflowProperties = workflowProperties; 080 } 081 082}