Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
StyleService |
|
| 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.core.api.style; | |
17 | ||
18 | import java.util.List; | |
19 | ||
20 | import javax.xml.transform.Templates; | |
21 | import javax.xml.transform.TransformerConfigurationException; | |
22 | ||
23 | /** | |
24 | * Service for working with stylesheets. This service provides pure data-oriented | |
25 | * operations as well as operations dealing with pre-compiled stylesheets. It's | |
26 | * intended that most clients will interact with this service in lieu of the | |
27 | * lower-level {@link StyleRepositoryService}. | |
28 | * | |
29 | * @see Style | |
30 | * @see StyleRepositoryService | |
31 | * | |
32 | * @author Kuali Rice Team (rice.collab@kuali.org) | |
33 | * | |
34 | */ | |
35 | public interface StyleService { | |
36 | ||
37 | /** | |
38 | * @see StyleRepositoryService#getStyle(String) | |
39 | */ | |
40 | public Style getStyle(String styleName); | |
41 | ||
42 | /** | |
43 | * @see StyleRepositoryService#getAllStyleNames() | |
44 | */ | |
45 | public List<String> getAllStyleNames(); | |
46 | ||
47 | /** | |
48 | * @see StyleRepositoryService#saveStyle(Style) | |
49 | */ | |
50 | public void saveStyle(Style data); | |
51 | ||
52 | /** | |
53 | * Gets a compiled version of the style with the given name. | |
54 | * | |
55 | * @param styleName the name of the style for which to retrieve a compiled version | |
56 | * | |
57 | * @return a compiled version of the stylesheet as a {@link Templates} instance | |
58 | * | |
59 | * @throws TransformerConfigurationException if compilation of the stylesheet fails | |
60 | * @throws IllegalArgumentException if the given styleName is null or blank | |
61 | */ | |
62 | public Templates getStyleAsTranslet(String styleName) throws TransformerConfigurationException; | |
63 | ||
64 | ||
65 | } |