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.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       * @return DataObjectMetadata for the type or null if none is known
35       */
36  	DataObjectMetadata getMetadata(Class<?> type);
37  
38      /**
39       * Returns all metadata for all known data object types.
40       *
41       * @return all metadata for all known data object types
42       */
43  	Map<Class<?>, DataObjectMetadata> getAllMetadata();
44  
45      /**
46       * Indicates whether or not the repository contains metadata for the given type.
47       *
48       * @param type the type to check metadata for
49       * @return true if the repository contains metadata for the given type, false otherwise
50       */
51      boolean contains(Class<?> type);
52  
53  }