org.millstone.base.terminal
Interface PaintTarget

All Known Implementing Classes:
WebPaintTarget

public interface PaintTarget

This interface defines the methods for painting XML to the UIDL stream.

Since:
3.0
Version:
3.0.3
Author:
IT Mill Ltd.

Method Summary
 void addAttribute(java.lang.String name, boolean value)
          Adds a boolean attribute to component.
 void addAttribute(java.lang.String name, int value)
          Adds a integer attribute to component.
 void addAttribute(java.lang.String name, long value)
          Adds a long attribute to component.
 void addAttribute(java.lang.String name, Resource value)
          Adds a resource attribute to component.
 void addAttribute(java.lang.String name, java.lang.String value)
          Adds a string attribute to component.
 void addSection(java.lang.String sectionTagName, java.lang.String sectionData)
          Print single XMLsection.
 void addText(java.lang.String text)
          Add text node.
 void addUIDL(java.lang.String uidl)
          Add UIDL directly.
 void addUploadStreamVariable(VariableOwner owner, java.lang.String name)
          Add a upload stream type variable.
 void addVariable(VariableOwner owner, java.lang.String name, boolean value)
          Add a boolean type variable.
 void addVariable(VariableOwner owner, java.lang.String name, int value)
          Add a int type variable.
 void addVariable(VariableOwner owner, java.lang.String name, java.lang.String value)
          Add a string type variable.
 void addVariable(VariableOwner owner, java.lang.String name, java.lang.String[] value)
          Add a string array type variable.
 void addXMLSection(java.lang.String sectionTagName, java.lang.String sectionData, java.lang.String namespace)
          Print single XML section.
 void endTag(java.lang.String tagName)
          Print element end tag.
 void startTag(java.lang.String tagName)
          Print element start tag.
 

Method Detail

addSection

public void addSection(java.lang.String sectionTagName,
                       java.lang.String sectionData)
                throws PaintException
Print single XMLsection. Prints full XML section. The section data is escaped from XML tags and surrounded by XML start and end-tags.

PaintException

startTag

public void startTag(java.lang.String tagName)
              throws PaintException
Print element start tag.
Todo:
 Checking of input values
 

Parameters:
tagName - The name of the start tag
PaintException

endTag

public void endTag(java.lang.String tagName)
            throws PaintException
Print element end tag. If the parent tag is closed before every child tag is closed an MillstoneException is raised.

Throws:
IOException - The writing failed due to input/output error
PaintException

addAttribute

public void addAttribute(java.lang.String name,
                         boolean value)
                  throws PaintException
Adds a boolean attribute to component. Atributes must be added before any content is written.

Parameters:
name - Attribute name
value - Attribute value
Returns:
this object
PaintException

addAttribute

public void addAttribute(java.lang.String name,
                         int value)
                  throws PaintException
Adds a integer attribute to component. Atributes must be added before any content is written.

Parameters:
name - Attribute name
value - Attribute value
Returns:
this object
PaintException

addAttribute

public void addAttribute(java.lang.String name,
                         Resource value)
                  throws PaintException
Adds a resource attribute to component. Atributes must be added before any content is written.

Parameters:
name - Attribute name
value - Attribute value
Returns:
this object
PaintException

addAttribute

public void addAttribute(java.lang.String name,
                         long value)
                  throws PaintException
Adds a long attribute to component. Atributes must be added before any content is written.

Parameters:
name - Attribute name
value - Attribute value
Returns:
this object
PaintException

addAttribute

public void addAttribute(java.lang.String name,
                         java.lang.String value)
                  throws PaintException
Adds a string attribute to component. Atributes must be added before any content is written.

Parameters:
name - Boolean attribute name
value - Boolean attribute value
Returns:
this object
PaintException

addVariable

public void addVariable(VariableOwner owner,
                        java.lang.String name,
                        java.lang.String value)
                 throws PaintException
Add a string type variable.

Parameters:
owner - Listener for variable changes
name - Variable name
value - Variable initial value
Returns:
Reference to this.
PaintException

addVariable

public void addVariable(VariableOwner owner,
                        java.lang.String name,
                        int value)
                 throws PaintException
Add a int type variable.

Parameters:
owner - Listener for variable changes
name - Variable name
value - Variable initial value
Returns:
Reference to this.
PaintException

addVariable

public void addVariable(VariableOwner owner,
                        java.lang.String name,
                        boolean value)
                 throws PaintException
Add a boolean type variable.

Parameters:
owner - Listener for variable changes
name - Variable name
value - Variable initial value
Returns:
Reference to this.
PaintException

addVariable

public void addVariable(VariableOwner owner,
                        java.lang.String name,
                        java.lang.String[] value)
                 throws PaintException
Add a string array type variable.

Parameters:
owner - Listener for variable changes
name - Variable name
value - Variable initial value
Returns:
Reference to this.
PaintException

addUploadStreamVariable

public void addUploadStreamVariable(VariableOwner owner,
                                    java.lang.String name)
                             throws PaintException
Add a upload stream type variable.

Parameters:
owner - Listener for variable changes
name - Variable name
Returns:
Reference to this.
PaintException

addXMLSection

public void addXMLSection(java.lang.String sectionTagName,
                          java.lang.String sectionData,
                          java.lang.String namespace)
                   throws PaintException
Print single XML section. Prints full XML section. The section data must be XML and it is surrounded by XML start and end-tags.

PaintException

addUIDL

public void addUIDL(java.lang.String uidl)
             throws PaintException
Add UIDL directly. The UIDL must be valid in accordance with the UIDL.dtd

PaintException

addText

public void addText(java.lang.String text)
             throws PaintException
Add text node. All the contents of the text are XML-escaped.

Parameters:
text - Text to add
PaintException


Copyright © 2000,2001,2002 IT Mill Ltd. All Rights Reserved.