| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| StyleRepositoryService | 
  | 
  | 1.0;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 | ||
| 30 |  /** | |
| 31 |   * Service for interacting with {@link Style} data. This service primarily | |
| 32 |   * consists of pure data-access operations on a repository of styles which are | |
| 33 |   * accessible based on their name or id which are both unique. | |
| 34 |   *  | |
| 35 |   * @author Kuali Rice Team (rice.collab@kuali.org) | |
| 36 |   */ | |
| 37 |  @WebService(name = "styleRepositoryServiceSoap", targetNamespace = CoreConstants.Namespaces.CORE_NAMESPACE_2_0) | |
| 38 | @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)  | |
| 39 | public interface StyleRepositoryService {  | |
| 40 | ||
| 41 |          /** | |
| 42 |           * Returns the style with the given name.  If no style with the given name | |
| 43 |           * can be found, this method will return null. | |
| 44 |           *  | |
| 45 |           * @param styleName the name of the style to retrieve, must not be null or | |
| 46 |           * blank | |
| 47 |           *  | |
| 48 |           * @return the style with the given name, or null if no style with the given | |
| 49 |           * name could be found | |
| 50 |           *  | |
| 51 |           * @throws IllegalArgumentException if the given styleName is null or blank | |
| 52 |           */ | |
| 53 |          @WebMethod(operationName = "getStyle") | |
| 54 |          @WebResult(name = "style") | |
| 55 | public Style getStyle(@WebParam(name = "styleName") String styleName);  | |
| 56 | ||
| 57 |          /** | |
| 58 |           * Creates or updates the Style represented by the given record.  If the | |
| 59 |           * styleId on the style is not null, then it will update the existing | |
| 60 |           * style record which has that id.  Otherwise it will create a new style in | |
| 61 |           * the repository. | |
| 62 |           *  | |
| 63 |           * <p>When updating an existing style, the caller needs to ensure that the | |
| 64 |           * styleId, versionNumber, and objectId values are set on the given Style | |
| 65 |           * object. | |
| 66 |           *  | |
| 67 |           * @param style the style data to create or update in the repository | |
| 68 |           *  | |
| 69 |           * @return the style with the given name, or null if no style with the given | |
| 70 |           * name could be found | |
| 71 |           *  | |
| 72 |           * @throws IllegalArgumentException if the given style is null | |
| 73 |           */ | |
| 74 |          @WebMethod(operationName = "saveStyle") | |
| 75 | public void saveStyle(@WebParam(name = "style") Style style);  | |
| 76 | ||
| 77 |          /** | |
| 78 |           * Returns a list of the names for all active styles in the repository. If | |
| 79 |           * there are no active styles, this list will be empty.  It will never | |
| 80 |           * return null. | |
| 81 |           *  | |
| 82 |           * @return the list of names for all active styles | |
| 83 |           */ | |
| 84 |          @WebMethod(operationName="getStyleNames") | |
| 85 |      @WebResult(name = "styleNames") | |
| 86 |      public List<String> getAllStyleNames(); | |
| 87 | ||
| 88 | }  |