public class ResourceTag extends RenderServiceTag
Outputs the requested url representation of a resource. Named Resource Examples:
alf:resource name="resourceName" />alf:resource id="<protocol>://<endpoint>/<object id>" />alf:resource protocol="<protocol>" endpoint="<endpoint>" object="<object id>" />alf:resource name="resourceName" payload="metadata" />alf:resource name="resourceName" payload="content" />| Constructor and Description |
|---|
ResourceTag() |
| Modifier and Type | Method and Description |
|---|---|
String |
getEndpoint() |
String |
getId() |
String |
getName() |
String |
getObject() |
String |
getPayload() |
String |
getProtocol() |
protected int |
invokeRenderService(RenderService renderService,
RequestContext renderContext,
ModelObject modelObject)
This method should be implemented to invoke the required method of the
RenderService
that the subclass needs to render its output |
void |
release()
The life-cycle of a custom JSP tag is that the class is is instantiated when it is first required and
then re-used for all subsequent invocations.
|
void |
setEndpoint(String endpoint) |
void |
setId(String id) |
void |
setName(String name) |
void |
setObject(String object) |
void |
setPayload(String payload) |
void |
setProtocol(String protocol) |
doStartTagInternaldoCatch, doFinally, doStartTag, getRequestContextpublic void setName(String name)
public String getName()
public void setId(String id)
setId in class javax.servlet.jsp.tagext.TagSupportpublic String getId()
getId in class javax.servlet.jsp.tagext.TagSupportpublic void setProtocol(String protocol)
public String getProtocol()
public void setEndpoint(String endpoint)
public String getEndpoint()
public void setObject(String object)
public String getObject()
public void setPayload(String payload)
public String getPayload()
public void release()
The life-cycle of a custom JSP tag is that the class is is instantiated when it is first required and
then re-used for all subsequent invocations. When a JSP has non-mandatory properties it means that the
setters for those properties will not be called if the properties are not provided and the old values
will still be available which can corrupt the behaviour of the code. In order to prevent this from happening
we should override the release method to ensure that all instance variables are reset to their
initial state.
release in interface javax.servlet.jsp.tagext.Tagrelease in class javax.servlet.jsp.tagext.TagSupportprotected int invokeRenderService(RenderService renderService, RequestContext renderContext, ModelObject modelObject) throws RequestDispatchException
RenderServiceTagThis method should be implemented to invoke the required method of the RenderService
that the subclass needs to render its output
invokeRenderService in class RenderServiceTagrenderService - RenderServicerenderContext - RequestContextmodelObject - ModelObjectRequestDispatchExceptionCopyright © 2005–2016 Alfresco Software. All rights reserved.