View Javadoc

1   /*
2    * Copyright 2007 Hippo
3    *
4    * Licensed under the Apache 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.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" 
12   * BASIS, 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 nl.hippo.portal.cms.site;
17  
18  import java.io.IOException;
19  import java.io.InputStream;
20  import java.util.List;
21  
22  import javax.xml.parsers.ParserConfigurationException;
23  
24  import org.xml.sax.SAXException;
25  
26  /***
27   * @version $Id: DocumentTransformer.java 6122 2007-04-18 14:34:48Z pduin $
28   *
29   */
30  public interface DocumentTransformer {
31      
32      /***
33       * @param name Name of the item to transform
34       * @param documentStream xml stream of the document
35       * @param documentPaths the document transformer must add any paths to 
36       *      sources which are used to transform the object. 
37       *      Paths must be String and relative
38       * @return The transformed object, derived from the given input stream.
39       * @throws SAXException
40       * @throws IOException
41       * @throws ParserConfigurationException
42       */
43      Object transform(String name, InputStream documentStream, List documentPaths) throws SAXException, IOException,
44              ParserConfigurationException;
45  }