KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > celtix > tools > common > toolspec > ToolContext


1 package org.objectweb.celtix.tools.common.toolspec;
2
3 import java.io.*;
4 import org.w3c.dom.Document JavaDoc;
5 import org.objectweb.celtix.tools.common.ToolException;
6 public interface ToolContext {
7
8     /**
9      * Request an input stream.
10      * @param id the id of the stream in the streams sections of the tool's definition document.
11      */

12     InputStream getInputStream(String JavaDoc id) throws ToolException;
13
14     /**
15      * Request the standard input stream.
16      */

17     InputStream getInputStream() throws ToolException;
18
19     /**
20      * Request a document based on the input stream.
21      * This is only returned if the mime type of incoming stream is xml.
22      */

23     Document JavaDoc getInputDocument(String JavaDoc id) throws ToolException;
24
25     /**
26      * Request a document based on the standard input stream.
27      * This is only returned if the mime type of incoming stream is xml.
28      */

29     Document JavaDoc getInputDocument() throws ToolException;
30
31     OutputStream getOutputStream(String JavaDoc id) throws ToolException;
32
33     OutputStream getOutputStream() throws ToolException;
34
35     String JavaDoc getParameter(String JavaDoc name) throws ToolException;
36
37     String JavaDoc[] getParameters(String JavaDoc name) throws ToolException;
38
39     boolean hasParameter(String JavaDoc name) throws ToolException;
40
41     void sendDocument(String JavaDoc id, Document JavaDoc doc);
42
43     void sendDocument(Document JavaDoc doc);
44
45     void executePipeline();
46
47     void setUserObject(String JavaDoc key, Object JavaDoc o);
48
49     Object JavaDoc getUserObject(String JavaDoc key);
50
51 }
52
Popular Tags