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 java.util.List;
19  
20  
21  /**
22   * Defines methods common to all DataDictionaryDefinition types.
23   * 
24   *     DD: The highest level objects in the data dictionary are of
25          the following types:
26          * BusinessObjectEntry
27          * MaintenanceDocumentEntry
28          * TransactionalDocumentEntry
29  
30      JSTL: The data dictionary is exposed as a Map which is accessed
31      by referring to the "DataDictionary" global constant.  This Map contains
32      the following kinds of entries keyed as indicated:
33          * Business Object Entries -
34              Key = dataObjectClass name
35              Value = Map created by BusinessObjectEntryMapper
36          * Maintenance Document entries -
37              Key = DocumentType name
38              Value = Map created by MaintenanceObjectEntryMapper
39          * Transactional Document entries -
40              Key = DocumentType name
41              Value = Map created by TransactionalDocumentEntryMapper
42  
43      All elements are exposed to JSTL as Maps (where the element has a
44      unique key by which they can be retrieved), or Strings.  For collections
45      of elements having no unique key, the entry's position in the list
46      (0, 1, etc.) is used as its index.
47  
48      All Maps (except the top-level DataDictionary one) are guaranteed to
49      present their entries with an iteration order identical to the order
50      in which the elements were defined in XML.
51  
52   */
53  public interface DataDictionaryEntry {
54      /**
55       * @return String used as a globally-unique key for this entry's jstl-exported version
56       */
57      public String getJstlKey();
58  
59      /**
60       * Kicks off complete entry-wide validation which couldn't be done earlier.
61       * 
62       * @throws org.kuali.rice.krad.datadictionary.exception.CompletionException if a problem arises during validation-completion
63       */
64      public void completeValidation();
65  
66      /**
67       * @param attributeName
68       * @return AttributeDefinition with the given name, or null if none with that name exists
69       */
70      public AttributeDefinition getAttributeDefinition(String attributeName);
71  
72      /**
73       * Returns the full class name of the underlying object.
74       */
75      public String getFullClassName();
76      
77      /**
78       * @return a Map containing all RelationshipDefinitions associated with this BusinessObjectEntry, indexed by relationshipName
79       */
80      public List<RelationshipDefinition> getRelationships();
81  }