View Javadoc
1   /**
2    * Copyright 2005-2016 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 java.util.List;
19  
20  import org.kuali.rice.krad.datadictionary.state.StateMapping;
21  import org.kuali.rice.krad.datadictionary.validator.ValidationTrace;
22  
23  /**
24   * Defines methods common to all DataDictionaryDefinition types.
25   *
26   * DD: The highest level objects in the data dictionary are of
27   * the following types:
28   * BusinessObjectEntry
29   * MaintenanceDocumentEntry
30   * TransactionalDocumentEntry
31   *
32   * JSTL: The data dictionary is exposed as a Map which is accessed
33   * by referring to the "DataDictionary" global constant.  This Map contains
34   * the following kinds of entries keyed as indicated:
35   * Business Object Entries -
36   * Key = dataObjectClass name
37   * Value = Map created by BusinessObjectEntryMapper
38   * Maintenance Document entries -
39   * Key = DocumentType name
40   * Value = Map created by MaintenanceObjectEntryMapper
41   * Transactional Document entries -
42   * Key = DocumentType name
43   * Value = Map created by TransactionalDocumentEntryMapper
44   *
45   * All elements are exposed to JSTL as Maps (where the element has a
46   * unique key by which they can be retrieved), or Strings.  For collections
47   * of elements having no unique key, the entry's position in the list
48   * (0, 1, etc.) is used as its index.
49   *
50   * All Maps (except the top-level DataDictionary one) are guaranteed to
51   * present their entries with an iteration order identical to the order
52   * in which the elements were defined in XML.
53   */
54  public interface DataDictionaryEntry extends DictionaryBean {
55      /**
56       * @return String used as a globally-unique key for this entry's jstl-exported version
57       */
58      public String getJstlKey();
59  
60      /**
61       * Kicks off complete entry-wide validation which couldn't be done earlier.
62       *
63       * @throws org.kuali.rice.krad.datadictionary.exception.CompletionException if a problem arises during
64       * validation-completion
65       */
66      @Deprecated // KNS Version
67      public void completeValidation();
68  
69      /**
70       * Validates that the data objects created from the Spring Beans are correct
71       *
72       * @param tracer - Record of object's location
73       */
74      public void completeValidation(ValidationTrace tracer);
75  
76      /**
77       * @param attributeName
78       * @return AttributeDefinition with the given name, or null if none with that name exists
79       */
80      public AttributeDefinition getAttributeDefinition(String attributeName);
81  
82      /**
83       * Returns the full class name of the underlying object.
84       */
85      public String getFullClassName();
86  
87      /**
88       * @return a Map containing all RelationshipDefinitions associated with this BusinessObjectEntry, indexed by
89       *         relationshipName
90       */
91      public List<RelationshipDefinition> getRelationships();
92  
93      /**
94       * StateMapping for this DataDictionaryEntry, this represents the states of this entry, their names, and where
95       * to find the state information on the model
96       *
97       * @return StateMapping object
98       */
99      public StateMapping getStateMapping();
100 
101     /**
102      * Set the StateMapping object which represents state information for this entry
103      *
104      * @param stateMapping StateMapping object
105      */
106     public void setStateMapping(StateMapping stateMapping);
107 }