View Javadoc

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