| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| CampusService |
|
| 1.0;1 |
| 1 | /** | |
| 2 | * Copyright 2005-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 | package org.kuali.rice.location.api.campus; | |
| 17 | ||
| 18 | import org.kuali.rice.core.api.exception.RiceIllegalArgumentException; | |
| 19 | import org.kuali.rice.location.api.LocationConstants; | |
| 20 | import org.springframework.cache.annotation.Cacheable; | |
| 21 | ||
| 22 | import javax.jws.WebMethod; | |
| 23 | import javax.jws.WebParam; | |
| 24 | import javax.jws.WebService; | |
| 25 | import javax.jws.soap.SOAPBinding; | |
| 26 | import java.util.List; | |
| 27 | ||
| 28 | /** | |
| 29 | * <p>CampusService interface.</p> | |
| 30 | * | |
| 31 | * @author Kuali Rice Team (rice.collab@kuali.org) | |
| 32 | */ | |
| 33 | @WebService(name = "campusService", targetNamespace = LocationConstants.Namespaces.LOCATION_NAMESPACE_2_0) | |
| 34 | @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED) | |
| 35 | public interface CampusService { | |
| 36 | ||
| 37 | /** | |
| 38 | * This will return a {@link Campus}. | |
| 39 | * | |
| 40 | * @param code the code of the campus to return | |
| 41 | * @throws IllegalArgumentException if the code is null | |
| 42 | * @throws IllegalStateException if the campus does not exist in the system under the | |
| 43 | * specific code | |
| 44 | */ | |
| 45 | @WebMethod(operationName="getCampus") | |
| 46 | @Cacheable(value=Campus.Cache.NAME, key="'code=' + #p0") | |
| 47 | Campus getCampus(@WebParam(name = "code") String code) throws RiceIllegalArgumentException; | |
| 48 | ||
| 49 | /** | |
| 50 | * This will return all {@link Campus}. | |
| 51 | */ | |
| 52 | @WebMethod(operationName="findAllCampuses") | |
| 53 | @Cacheable(value=Campus.Cache.NAME, key="'all'") | |
| 54 | List<Campus> findAllCampuses(); | |
| 55 | ||
| 56 | /** | |
| 57 | * This will return a {@link CampusType}. | |
| 58 | * | |
| 59 | * @param code the code of the campus type to return | |
| 60 | * @return CampusType object represented by the passed in code | |
| 61 | * @throws IllegalArgumentException if the code is null | |
| 62 | * @throws IllegalStateException if the campus does not exist in the system under the | |
| 63 | * specific code | |
| 64 | */ | |
| 65 | @WebMethod(operationName="getCampusType") | |
| 66 | @Cacheable(value=CampusType.Cache.NAME, key="'code=' + #p0") | |
| 67 | CampusType getCampusType(@WebParam(name = "code") String code) throws RiceIllegalArgumentException; | |
| 68 | ||
| 69 | /** | |
| 70 | * This will return all {@link CampusType}. | |
| 71 | */ | |
| 72 | @WebMethod(operationName="findAllCampusTypes") | |
| 73 | @Cacheable(value=CampusType.Cache.NAME, key="'all'") | |
| 74 | List<CampusType> findAllCampusTypes(); | |
| 75 | } |