View Javadoc
1   /**
2    * Copyright 2005-2015 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.data.metadata;
17  
18  import java.io.Serializable;
19  
20  /**
21  * An interface for attributes common to all primary metadata objects. (name, backing object, labels, etc...)
22  *
23  * @author Kuali Rice Team (rice.collab@kuali.org)
24  */
25  public interface MetadataCommon extends Serializable {
26  
27      /**
28      * {@link MetadataMergeAction} which determines how to handle the embedding of this object when multiple metadata
29      * providers are in use.
30      *
31      * @see MetadataMergeAction
32      * @return the merge action to use when embedding this metadata when multiple metadata providers are in use
33      */
34  	MetadataMergeAction getMergeAction();
35  
36      /**
37      * Provider specific name of the persistent storage behind this object type. For a data object, this would likely be
38      * the table name. For an attribute, this would be the table column name. It is to be used for reference purposes
39      * only.
40      *
41      * The default implementation will return the name property if none is provided by the metadata providers.
42      *
43      * @return String representing the backing object. Must not return null.
44      */
45  	String getBackingObjectName();
46  
47      /**
48      * The name of the object as known to the system. This would be the class name, attribute name, etc...
49      *
50      * @return name
51      */
52  	String getName();
53  
54      /**
55      * The user displayed name of the object.
56      *
57      * @return user diplayed name
58      */
59  	String getLabel();
60  
61      /**
62      * A shorter version of the user displayed name of the object.
63      *
64      * @return short name
65      */
66  	String getShortLabel();
67  
68      /**
69      * A longer description of the object.
70      *
71      * This can be used to provide a more complete description of the data object and its purpose. This information can
72      * be used when displaying help information to the end-user.
73      *
74      * @return description
75      */
76  	String getDescription();
77  
78      /**
79      * Whether this metadata object should be considered read-only by calling code.
80      *
81      * <p>
82      * That is, the persistence layer is not likely to accept/persist an update to this object, attribute, collection,
83      * reference.
84      * </p>
85      *
86      * @return whether metadata read-only
87      */
88  	boolean isReadOnly();
89  }