com.atlassian.confluence.content.render.xhtml
Class ImageAttributeWriter

java.lang.Object
  extended by com.atlassian.confluence.content.render.xhtml.ImageAttributeWriter
Direct Known Subclasses:
StorageImageAttributeWriter, ViewImageAttributeWriter

public class ImageAttributeWriter
extends java.lang.Object

A class encapsulating the commonality in marshalling the attributes for an image in view, edit and storage. Any attributes which have particular handling requirements based on the output will not be handled by this class.


Constructor Summary
ImageAttributeWriter(javax.xml.stream.XMLStreamWriter writer)
           
 
Method Summary
protected  void writeAttribute(java.lang.String name, java.lang.String value)
          Write the supplied attribute name and value, unless the value is blank in which case nothing will be written.
 void writeAttribute(java.lang.String prefix, java.lang.String namespaceURI, java.lang.String localName, java.lang.String value)
          Writes the attribute with the given prefix and namespace, if the prefix or namespace is blank writeAttribute(String, String) will be called.
 void writeAttributes(EmbeddedImage embeddedImage)
           
 void writeAttributes(java.lang.String prefix, java.lang.String namespace, EmbeddedImage embeddedImage)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageAttributeWriter

public ImageAttributeWriter(javax.xml.stream.XMLStreamWriter writer)
Method Detail

writeAttributes

public void writeAttributes(EmbeddedImage embeddedImage)
                     throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException

writeAttributes

public void writeAttributes(java.lang.String prefix,
                            java.lang.String namespace,
                            EmbeddedImage embeddedImage)
                     throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException

writeAttribute

protected void writeAttribute(java.lang.String name,
                              java.lang.String value)
                       throws javax.xml.stream.XMLStreamException
Write the supplied attribute name and value, unless the value is blank in which case nothing will be written.

Parameters:
name -
value -
Throws:
javax.xml.stream.XMLStreamException

writeAttribute

public void writeAttribute(java.lang.String prefix,
                           java.lang.String namespaceURI,
                           java.lang.String localName,
                           java.lang.String value)
                    throws javax.xml.stream.XMLStreamException
Writes the attribute with the given prefix and namespace, if the prefix or namespace is blank writeAttribute(String, String) will be called. If a value is not provided the attribute will not be written.

Parameters:
prefix - The attribute namespace prefix.
namespaceURI - The URI of the namespace.
localName - Name of the attribute
value - Value of the attribute, if not supplied will not be written.
Throws:
javax.xml.stream.XMLStreamException


Copyright © 2003-2014 Atlassian. All Rights Reserved.