Coverage Report - org.kuali.rice.shareddata.api.county.CountyService
 
Classes in this File Line Coverage Branch Coverage Complexity
CountyService
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.county;
 18  
 
 19  
 import org.kuali.rice.core.api.exception.RiceIllegalArgumentException;
 20  
 import org.kuali.rice.shareddata.api.SharedDataConstants;
 21  
 
 22  
 import javax.jws.WebMethod;
 23  
 import javax.jws.WebParam;
 24  
 import javax.jws.WebResult;
 25  
 import javax.jws.WebService;
 26  
 import javax.jws.soap.SOAPBinding;
 27  
 import javax.xml.bind.annotation.XmlElement;
 28  
 import javax.xml.bind.annotation.XmlElementWrapper;
 29  
 import java.util.List;
 30  
 
 31  
 @WebService(name = "CountyService", targetNamespace = SharedDataConstants.Namespaces.SHAREDDATA_NAMESPACE)
 32  
 @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
 33  
 public interface CountyService {
 34  
 
 35  
     /**
 36  
      * Gets a {@link County} from a postal country code and postal code value.
 37  
      * <p/>
 38  
      * <p>
 39  
      * This method will return null if the state does not exist.
 40  
      * </p>
 41  
      * <p/>
 42  
      * <p>
 43  
      * This method will return active or inactive counties.
 44  
      * </p>
 45  
      *
 46  
      * @param countryCode country code. cannot be blank.
 47  
      * @param stateCode   postal state code. cannot be blank.
 48  
      * @param code        county code. cannot be blank
 49  
      * @return a {@link County} or null
 50  
      * @throws IllegalArgumentException country code, postal state code, or county code is blank
 51  
      */
 52  
     @WebMethod(operationName = "getCounty")
 53  
     @WebResult(name = "county")
 54  
     County getCounty(@WebParam(name = "countryCode") String countryCode, @WebParam(name = "stateCode") String stateCode, @WebParam(name = "code") String code)
 55  
             throws RiceIllegalArgumentException;
 56  
 
 57  
     /**
 58  
      * Gets all the {@link County County} for postal country code & postal state code.
 59  
      * <p/>
 60  
      * <p>
 61  
      * This method will always return an <b>immutable</b> Collection
 62  
      * even when no values exist.
 63  
      * </p>
 64  
      * <p/>
 65  
      * <p>
 66  
      * This method will only return active counties.
 67  
      * </p>
 68  
      *
 69  
      * @param countryCode state code. cannot be blank.
 70  
      * @param stateCode   postal state code. cannot be blank.
 71  
      * @return an immutable collection of counties
 72  
      * @throws IllegalArgumentException country code, postal state code is blank
 73  
      */
 74  
     @WebMethod(operationName = "findAllCountiesInCountryAndState")
 75  
     @XmlElementWrapper(name = "counties", required = true)
 76  
     @XmlElement(name = "county", required = false)
 77  
     @WebResult(name = "counties")
 78  
     List<County> findAllCountiesInCountryAndState(@WebParam(name = "countryCode") String countryCode, @WebParam(name = "stateCode") String stateCode)
 79  
             throws RiceIllegalArgumentException;
 80  
 }