Class AbstractResourceTag
- java.lang.Object
-
- jakarta.servlet.jsp.tagext.TagSupport
-
- net.anotheria.tags.BaseTagSupport
-
- net.anotheria.anosite.tags.resource.AbstractResourceTag
-
- All Implemented Interfaces:
jakarta.servlet.jsp.tagext.IterationTag,jakarta.servlet.jsp.tagext.JspTag,jakarta.servlet.jsp.tagext.Tag,Serializable
- Direct Known Subclasses:
CmsFileTag,CmsImageTag
public abstract class AbstractResourceTag extends net.anotheria.tags.BaseTagSupportAbstract resource TAG.- Author:
- h3ll
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classAbstractResourceTag.ReadPropertyTypeDefines property type - by which tag should read document, or build result.protected static classAbstractResourceTag.ResultPropertyTypeDefines result type - which should be returned by tag.
-
Constructor Summary
Constructors Constructor Description AbstractResourceTag()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description intdoEndTag()protected abstract StringgetAliasFromDocument(net.anotheria.asg.data.DataObject document)Returns alias title - if available.protected abstract StringgetAltFromDocument(net.anotheria.asg.data.DataObject document)Returns alt attribute value - if available.protected abstract net.anotheria.asg.data.DataObjectgetDocument()ReturnDataObjectaccording to incomingAbstractResourceTag.ReadPropertyType.protected static org.slf4j.LoggergetLog()Returns Logger instance.StringgetPropertyValue()protected static IASResourceDataServicegetResourceDataService()Returns ResourceService.protected abstract StringgetResourcePath()Return resource path.StringgetResultPropertyName()protected AbstractResourceTag.ResultPropertyTypegetResultType()ReturnsAbstractResourceTag.ResultPropertyTypebased on current resultPropertyName value.StringgetSelectPropertyName()protected AbstractResourceTag.ReadPropertyTypegetSelectType()ReturnsAbstractResourceTag.ReadPropertyTypebased on current selectPropertyName value.protected abstract StringgetTitleFromDocument(net.anotheria.asg.data.DataObject document)Returns document title - if available.booleanisAddContextPath()voidsetAddContextPath(boolean addContextPath)voidsetPropertyValue(String propertyValue)voidsetResultPropertyName(String aResultPropertyName)voidsetSelectPropertyName(String aSelectPropertyName)-
Methods inherited from class net.anotheria.tags.BaseTagSupport
getId, getName, getProperty, getScope, lookup, quote, release, setId, setName, setProperty, setScope, toString, write, writeLn
-
-
-
-
Method Detail
-
getResourceDataService
protected static IASResourceDataService getResourceDataService()
Returns ResourceService.- Returns:
IASResourceDataService
-
getLog
protected static org.slf4j.Logger getLog()
Returns Logger instance.- Returns:
Logger
-
getSelectType
protected AbstractResourceTag.ReadPropertyType getSelectType()
ReturnsAbstractResourceTag.ReadPropertyTypebased on current selectPropertyName value.- Returns:
AbstractResourceTag.ReadPropertyType
-
setSelectPropertyName
public void setSelectPropertyName(String aSelectPropertyName)
-
getPropertyValue
public String getPropertyValue()
-
setPropertyValue
public void setPropertyValue(String propertyValue)
-
isAddContextPath
public boolean isAddContextPath()
-
setAddContextPath
public void setAddContextPath(boolean addContextPath)
-
getResultType
protected AbstractResourceTag.ResultPropertyType getResultType()
ReturnsAbstractResourceTag.ResultPropertyTypebased on current resultPropertyName value.
-
setResultPropertyName
public void setResultPropertyName(String aResultPropertyName)
-
getSelectPropertyName
public String getSelectPropertyName()
-
getResultPropertyName
public String getResultPropertyName()
-
doEndTag
public int doEndTag() throws jakarta.servlet.jsp.JspException- Specified by:
doEndTagin interfacejakarta.servlet.jsp.tagext.Tag- Overrides:
doEndTagin classjakarta.servlet.jsp.tagext.TagSupport- Throws:
jakarta.servlet.jsp.JspException
-
getTitleFromDocument
protected abstract String getTitleFromDocument(net.anotheria.asg.data.DataObject document)
Returns document title - if available.- Parameters:
document-DataObject- Returns:
- string property
-
getAliasFromDocument
protected abstract String getAliasFromDocument(net.anotheria.asg.data.DataObject document)
Returns alias title - if available.- Parameters:
document-DataObject- Returns:
- string property
-
getAltFromDocument
protected abstract String getAltFromDocument(net.anotheria.asg.data.DataObject document)
Returns alt attribute value - if available.- Parameters:
document-DataObjectinstance- Returns:
Stringproperty
-
getResourcePath
protected abstract String getResourcePath()
Return resource path.- Returns:
- resource path
-
getDocument
protected abstract net.anotheria.asg.data.DataObject getDocument() throws jakarta.servlet.jsp.JspExceptionReturnDataObjectaccording to incomingAbstractResourceTag.ReadPropertyType.- Returns:
DataObject- Throws:
jakarta.servlet.jsp.JspException- on errors
-
-