Coverage Report - org.kuali.rice.core.api.style.StyleRepositoryService
 
Classes in this File Line Coverage Branch Coverage Complexity
StyleRepositoryService
N/A
N/A
1
 
 1  
 /*
 2  
  * Copyright 2005-2007 The Kuali Foundation
 3  
  * 
 4  
  * 
 5  
  * Licensed under the Educational Community License, Version 2.0 (the "License");
 6  
  * you may not use this file except in compliance with the License.
 7  
  * You may obtain a copy of the License at
 8  
  * 
 9  
  * http://www.opensource.org/licenses/ecl2.php
 10  
  * 
 11  
  * Unless required by applicable law or agreed to in writing, software
 12  
  * distributed under the License is distributed on an "AS IS" BASIS,
 13  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 14  
  * See the License for the specific language governing permissions and
 15  
  * limitations under the License.
 16  
  */
 17  
 
 18  
 package org.kuali.rice.core.api.style;
 19  
 
 20  
 import java.util.List;
 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  
 
 28  
 import org.kuali.rice.core.api.CoreConstants;
 29  
 import org.kuali.rice.core.api.exception.RiceIllegalArgumentException;
 30  
 
 31  
 /**
 32  
  * Service for interacting with {@link Style} data. This service primarily
 33  
  * consists of pure data-access operations on a repository of styles which are
 34  
  * accessible based on their name or id which are both unique.
 35  
  * 
 36  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 37  
  */
 38  
 @WebService(name = "styleRepositoryServiceSoap", targetNamespace = CoreConstants.Namespaces.CORE_NAMESPACE_2_0)
 39  
 @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
 40  
 public interface StyleRepositoryService {
 41  
 
 42  
         /**
 43  
          * Returns the style with the given name.  If no style with the given name
 44  
          * can be found, this method will return null.
 45  
          * 
 46  
          * @param styleName the name of the style to retrieve, must not be null or
 47  
          * blank
 48  
          * 
 49  
          * @return the style with the given name, or null if no style with the given
 50  
          * name could be found
 51  
          * 
 52  
          * @throws IllegalArgumentException if the given styleName is null or blank
 53  
          */
 54  
         @WebMethod(operationName = "getStyle")
 55  
         @WebResult(name = "style")
 56  
         public Style getStyle(@WebParam(name = "styleName") String styleName) throws RiceIllegalArgumentException;
 57  
 
 58  
         /**
 59  
          * Creates or updates the Style represented by the given record.  If the
 60  
          * styleId on the style is not null, then it will update the existing
 61  
          * style record which has that id.  Otherwise it will create a new style in
 62  
          * the repository.
 63  
          * 
 64  
          * <p>When updating an existing style, the caller needs to ensure that the
 65  
          * styleId, versionNumber, and objectId values are set on the given Style
 66  
          * object.
 67  
          * 
 68  
          * @param style the style data to create or update in the repository
 69  
          * 
 70  
          * @return the style with the given name, or null if no style with the given
 71  
          * name could be found
 72  
          * 
 73  
          * @throws IllegalArgumentException if the given style is null
 74  
          */
 75  
         @WebMethod(operationName = "saveStyle")
 76  
         public void saveStyle(@WebParam(name = "style") Style style) throws RiceIllegalArgumentException;
 77  
         
 78  
         /**
 79  
          * Returns a list of the names for all active styles in the repository. If
 80  
          * there are no active styles, this list will be empty.  It will never
 81  
          * return null.
 82  
          * 
 83  
          * @return the list of names for all active styles
 84  
          */
 85  
         @WebMethod(operationName="getStyleNames")
 86  
     @WebResult(name = "styleNames")
 87  
     public List<String> getAllStyleNames();
 88  
 
 89  
 }