01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
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: package org.apache.portals.applications.transform;
18:
19: import java.io.OutputStream;
20: import java.io.Writer;
21: import java.util.Map;
22:
23: import org.w3c.dom.Document;
24: import org.xml.sax.InputSource;
25:
26: /**
27: * This interface is a facade for all Transformation related operations.
28: * Transformation service abstracts the XSL Transform manipulation, maintenance,
29: * caching and transformation resolution algorithms.
30: *
31: * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
32: * @version $Id: Transform.java 516448 2007-03-09 16:25:47Z ate $
33: */
34: public interface Transform {
35:
36: /**
37: * Performs a transform on an input stream, writing the transformed content to a Writer
38: *
39: * @param xsltPath The path to a local XSLT file
40: * @param inputSource The input stream and description containing content to be transformed.
41: * @param writer The output stream receiving the transformed content.
42: * @param properties Map of XSLT properties passed into transformer
43: */
44: public void transform(String xsltPath, InputSource inputSource,
45: Writer writer, Map properties) throws TransformException;
46:
47: /**
48: * Performs a transform on an input stream, writing the transformed content to a Writer
49: *
50: * @param xsltPath The path to a local XSLT file
51: * @param inputSource The input stream and description containing content to be transformed.
52: * @param outputStream The output stream receiving the transformed content.
53: * @param properties Map of XSLT properties passed into transformer
54: */
55: public void transform(String xsltPath, InputSource inputSource,
56: OutputStream os, Map properties) throws TransformException;
57:
58: /**
59: * Performs a transform on an input stream, writing the transformed content to a Writer
60: *
61: * @param xsltPath The path to a local XSLT file
62: * @param document The W3C document to be transformed.
63: * @param outputStream The output stream receiving the transformed content.
64: * @param properties Map of XSLT properties passed into transformer
65: */
66: public TransformObjectPublisher getPublisher();
67:
68: public void transform(String xsltPath, Document document,
69: OutputStream os, Map parameters) throws TransformException;
70:
71: }
|