Coverage Report - org.kuali.rice.kim.api.type.KimTypeInfoService
 
Classes in this File Line Coverage Branch Coverage Complexity
KimTypeInfoService
N/A
N/A
1
 
 1  
 /*
 2  
  * Copyright 2006-2011 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  
 
 17  
 package org.kuali.rice.kim.api.type;
 18  
 
 19  
 import java.util.Collection;
 20  
 
 21  
 public interface KimTypeInfoService {
 22  
 
 23  
     /**
 24  
      * Gets a {@link KimType} from a kim type id.
 25  
      * <p/>
 26  
      * <p>
 27  
      * This method will return null if the kim type does not exist.
 28  
      * </p>
 29  
      *
 30  
      * @param id the id to retrieve the kim type by. cannot be null.
 31  
      * @return a {@link KimType} or null
 32  
      * @throws IllegalArgumentException if the id is null
 33  
      */
 34  
     KimType getKimType(String id);
 35  
 
 36  
     /**
 37  
      * Gets a {@link KimType} from a kim type name and namespace code.
 38  
      * <p/>
 39  
      * <p>
 40  
      * This method will return null if the kim type does not exist.
 41  
      * </p>
 42  
      * <p/>
 43  
      * <p>
 44  
      * This method will only return active kim types.
 45  
      * </p>
 46  
      *
 47  
      * @param namespaceCode the namespaceCode to retrieve the kim type by. cannot be null.
 48  
      * @param name          the name to retrieve the kim type by. cannot be null.
 49  
      * @return a {@link KimType} or null
 50  
      * @throws IllegalArgumentException if the namespaceCode or name is null
 51  
      * @throws IllegalStateException    if multiple active results are found for a namespaceCode and name
 52  
      */
 53  
     KimType findKimTypeByNameAndNamespace(String namespaceCode, String name);
 54  
 
 55  
     /**
 56  
      * Gets all the {@link KimType KimTypes}.
 57  
      * <p/>
 58  
      * <p>
 59  
      * This method will always return an <b>immutable</b> Collection
 60  
      * even when no values exist.
 61  
      * </p>
 62  
      * <p/>
 63  
      * <p>
 64  
      * This method will only return active kim types.
 65  
      * </p>
 66  
      *
 67  
      * @return an immutable collection of kim types
 68  
      */
 69  
     Collection<KimType> findAllKimTypes();
 70  
 }