View Javadoc

1   /**
2    * Copyright 2005-2013 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.util.Map;
19  
20  import org.kuali.rice.krad.data.metadata.DataObjectMetadata;
21  
22  /**
23   * Public (read-only) interface to MetadataProvider stack.
24   * Implementations must be thread safe.
25   *
26   * @author Kuali Rice Team (rice.collab@kuali.org)
27   */
28  public interface MetadataRepository {
29  
30      /**
31       * Obtain metadata for specified data object type
32       *
33       * @param type the data object type for which to return metadata
34       *
35       * @return DataObjectMetadata for the type or null if none is known
36       */
37  	DataObjectMetadata getMetadata(Class<?> type);
38  
39      /**
40       * Returns all metadata for all known data object types
41       *
42       * @return all metadata for all known data object types
43       */
44  	Map<Class<?>, DataObjectMetadata> getAllMetadata();
45  
46      /**
47       * Indicates whether or not the repository contains metadata for the given type.
48       *
49       * @param type the type to check metadata for
50       *
51       * @return true if the repository contains metadata for the given type, false otherwise
52       */
53      boolean contains(Class<?> type);
54  
55  }