Class ImageAttributeWriter
- java.lang.Object
-
- com.atlassian.confluence.content.render.xhtml.ImageAttributeWriter
-
- Direct Known Subclasses:
StorageImageAttributeWriter
,ViewImageAttributeWriter
public class ImageAttributeWriter extends 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.
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
ignoreWidthHeight
-
Constructor Summary
Constructors Constructor Description ImageAttributeWriter(XMLStreamWriter writer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
writeAttribute(String name, String value)
Write the supplied attribute name and value, unless the value is blank in which case nothing will be written.void
writeAttribute(String prefix, String namespaceURI, String localName, String value)
Writes the attribute with the given prefix and namespace, if the prefix or namespace is blankwriteAttribute(String, String)
will be called.void
writeAttributes(EmbeddedImage embeddedImage)
void
writeAttributes(String prefix, String namespace, EmbeddedImage embeddedImage)
-
-
-
Constructor Detail
-
ImageAttributeWriter
public ImageAttributeWriter(XMLStreamWriter writer)
-
-
Method Detail
-
writeAttributes
public void writeAttributes(EmbeddedImage embeddedImage) throws XMLStreamException
- Throws:
XMLStreamException
-
writeAttributes
public void writeAttributes(String prefix, String namespace, EmbeddedImage embeddedImage) throws XMLStreamException
- Throws:
XMLStreamException
-
writeAttribute
protected void writeAttribute(String name, String value) throws XMLStreamException
Write the supplied attribute name and value, unless the value is blank in which case nothing will be written.- Parameters:
name
-value
-- Throws:
XMLStreamException
-
writeAttribute
public void writeAttribute(String prefix, String namespaceURI, String localName, String value) throws XMLStreamException
Writes the attribute with the given prefix and namespace, if the prefix or namespace is blankwriteAttribute(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 attributevalue
- Value of the attribute, if not supplied will not be written.- Throws:
XMLStreamException
-
-