1 package org.kuali.coeus.common.api.unit; 2 3 import java.util.List; 4 5 public interface UnitRepositoryService { 6 7 /** 8 * Finds a unit by unit number. The unit number cannot be blank. 9 * @param unitNumber the unit number. Cannot be blank. 10 * @return the unit or null if not found. 11 * @throws java.lang.IllegalArgumentException if the unitNumber is blank 12 */ 13 UnitContract findUnitByUnitNumber(String unitNumber); 14 15 /** 16 * Finds the top unit in the hierarchy. 17 * @return the unit or null if not found. 18 */ 19 UnitContract findTopUnit(); 20 21 /** 22 * Finds the hierarchy for unit,including all the parent units and the unit itself. 23 * If no matching Units are found an empty list is returned. 24 * The unit number cannot be blank. 25 * 26 * @param unitNumber the unit number. cannot be blank. 27 * @return a list of Units or an empty list if not found. 28 * @throws java.lang.IllegalArgumentException if the unitNumber is blank 29 */ 30 List<UnitContract> getUnitHierarchyForUnit(String unitNumber); 31 }