public abstract class BaseImageTag
extends javax.servlet.jsp.tagext.SimpleTagSupport
ScaleImageTag
.Modifier and Type | Field and Description |
---|---|
protected String |
imageContentNodeName
Attribute: The name of the new content node to create.
|
protected String |
parentContentNodeName
Attribute: The node where the images are to be saved.
|
protected static String |
PROPERTIES_CONTENTTYPE_VALUE
The valye of the contentType nodeData in the properties node.
|
protected static String |
PROPERTIES_EXTENSION_VALUE
The value of the extension nodeData in the properties node.
|
Constructor and Description |
---|
BaseImageTag() |
Modifier and Type | Method and Description |
---|---|
Color |
convertHexToColor(String hex) |
int[] |
convertHexToRGB(String hex)
Converts HEX color to RGB color.
|
String |
convertToSimpleString(String string)
Replace any special characters that are not letters or numbers with a replacement string.
|
protected void |
createImageNode(File imageFile,
Content imageNode)
Create a new imageNode with the image in it.
|
protected abstract String |
getFilename() |
protected javax.jcr.Node |
getImageContentNode() |
protected javax.servlet.http.HttpServletRequest |
getRequest() |
void |
setImageContentNodeName(String imageContentNodeName)
Setter for the
imageContentNodeName tag attribute. |
void |
setParentContentNodeName(String parentContentNodeName)
Setter for the
parentContentNodeName tag attribute. |
protected static final String PROPERTIES_EXTENSION_VALUE
protected static final String PROPERTIES_CONTENTTYPE_VALUE
protected String parentContentNodeName
protected String imageContentNodeName
public void setImageContentNodeName(String imageContentNodeName)
imageContentNodeName
tag attribute.public void setParentContentNodeName(String parentContentNodeName)
parentContentNodeName
tag attribute.protected abstract String getFilename()
protected javax.servlet.http.HttpServletRequest getRequest()
protected javax.jcr.Node getImageContentNode() throws javax.jcr.PathNotFoundException, javax.jcr.RepositoryException, AccessDeniedException
javax.jcr.PathNotFoundException
javax.jcr.RepositoryException
AccessDeniedException
public String convertToSimpleString(String string)
public int[] convertHexToRGB(String hex)
hex
- HEX valueprotected void createImageNode(File imageFile, Content imageNode) throws javax.jcr.PathNotFoundException, javax.jcr.AccessDeniedException, javax.jcr.RepositoryException, FileNotFoundException, IOException
imageFile
- the fileimageNode
- The node that will contain the text images.javax.jcr.PathNotFoundException
javax.jcr.AccessDeniedException
javax.jcr.RepositoryException
FileNotFoundException
IOException
Copyright © 2003–2015 Magnolia International Ltd.. All rights reserved.