Coverage Report - org.kuali.rice.shareddata.api.country.CountryService
 
Classes in this File Line Coverage Branch Coverage Complexity
CountryService
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.shareddata.api.country;
 18  
 
 19  
 import org.kuali.rice.core.api.exception.RiceIllegalArgumentException;
 20  
 import org.kuali.rice.core.api.exception.RiceIllegalStateException;
 21  
 import org.kuali.rice.shareddata.api.SharedDataConstants;
 22  
 
 23  
 import javax.jws.WebMethod;
 24  
 import javax.jws.WebParam;
 25  
 import javax.jws.WebResult;
 26  
 import javax.jws.WebService;
 27  
 import javax.jws.soap.SOAPBinding;
 28  
 import java.util.List;
 29  
 
 30  
 
 31  
 @WebService(name = "CountryService", targetNamespace = SharedDataConstants.Namespaces.SHAREDDATA_NAMESPACE)
 32  
 @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
 33  
 public interface CountryService {
 34  
 
 35  
     /**
 36  
      * Lookup a country object based on the given country code.
 37  
      *
 38  
      * @param code the given country code
 39  
      * @return a country object with the given country code.  A null reference is returned if an invalid or
 40  
      *         non-existant code is supplied.
 41  
      */
 42  
     @WebMethod(operationName = "getCountry")
 43  
     @WebResult(name = "country")
 44  
     Country getCountry(@WebParam(name = "code") String code) throws RiceIllegalArgumentException;
 45  
 
 46  
     /**
 47  
      * Get a country object based on an alternate country code
 48  
      *
 49  
      * @param alternateCode the given alternate country code
 50  
      * @return A country object with the given alternate country code if a country with that alternate country code
 51  
      *         exists.  Otherwise, null is returned.
 52  
      * @throws IllegalStateException if multiple Countries exist with the same passed in alternateCode
 53  
      * @throws IllegalArgumentException if alternateCode is null or is a whitespace only string.
 54  
      */
 55  
     @WebMethod(operationName = "getCountryByAlternateCode")
 56  
     @WebResult(name = "country")
 57  
     Country getCountryByAlternateCode(@WebParam(name = "alternateCode") String alternateCode)
 58  
             throws RiceIllegalStateException, RiceIllegalArgumentException;
 59  
 
 60  
    /**
 61  
      * Returns all Countries that are not restricted.
 62  
      *
 63  
      * @return all countries that are not restricted
 64  
      */
 65  
     @WebMethod(operationName = "findAllCountriesNotRestricted")
 66  
     @WebResult(name = "countriesNotRestricted")
 67  
     List<Country> findAllCountriesNotRestricted();
 68  
 
 69  
     /**
 70  
      * Returns all Countries
 71  
      *
 72  
      * @return all countries
 73  
      */
 74  
     @WebMethod(operationName = "findAllCountries")
 75  
     @WebResult(name = "allCountries")
 76  
     List<Country> findAllCountries();
 77  
 }