public abstract class AContentDisplayPortlet extends AGenticsPortlet
Modifier and Type | Field and Description |
---|---|
protected Set<String> |
attributes
attributes that should be fetched for the content beans
|
static String |
ATTRIBUTES_KEY
The Constant CONTENTID_RENDER_PARAMETER.
|
private String[] |
defaultAttributes
default attributes that should be fetched in any case
|
protected Set<String> |
downloadMimetypes
fragments of mimetypes that should be delivered as attachment, default:
office documents.
|
private static String |
DOWNLOADMIMETYPES_KEY |
private boolean |
isDisplayVersion
defines if there should be included the version in resource urls
|
private boolean |
isVelocityRendered
parameter to determine if velocity should be rendered
|
static String |
ISVELOCITYRENDERED_KEY
Config key for the boolean value isvelocityrendered
|
private String |
jspEditTemplate
The jsp edit template.
|
private String |
jspTemplate
The jsp template.
|
private com.gentics.api.lib.expressionparser.Expression |
pageRule
The page rule.
|
private com.gentics.cr.rendering.ContentRenderer |
renderer
The renderer.
|
private com.gentics.cr.RequestProcessor |
rp
The rp.
|
private com.gentics.cr.CRConfigUtil |
rpConfig
The Request processor config.
|
private static String |
SERVE_RESOURCE_VERSION_KEY |
private com.gentics.cr.util.velocity.VelocityTools |
tools
VelocityTools to deploy into the template context. |
protected org.apache.velocity.app.VelocityEngine |
vEngine
The Velocity render Engine Used for content velocity rendering
|
CONTENTID_OVERRIDE_ATTRIBUTE, CONTENTID_RENDER_PARAMETER, INITPARAM_EDITTEMPLATE_NAME, INITPARAM_STARTFOLDER_NAME, INITPARAM_STARTPAGE_NAME, INITPARAM_VIEWTEMPLATE_NAME, log, PAGE_RULE, TEMPLATE_CACHEZONE_KEY, TEMPLATECACHE_CONFIG_KEY
Constructor and Description |
---|
AContentDisplayPortlet() |
Modifier and Type | Method and Description |
---|---|
protected void |
dispatch(javax.portlet.RenderRequest request,
javax.portlet.RenderResponse response)
The dispatcher method.
|
protected abstract void |
doInternalView(javax.portlet.RenderRequest request,
javax.portlet.RenderResponse response)
Do internal view.
|
void |
doView(javax.portlet.RenderRequest request,
javax.portlet.RenderResponse response) |
protected void |
executeVelocityRender(javax.portlet.RenderRequest request,
javax.portlet.RenderResponse response,
com.gentics.cr.CRResolvableBean crBean) |
protected com.gentics.cr.RequestProcessor |
getRp()
returns the request processor
|
protected abstract void |
handleError(javax.portlet.RenderRequest request,
javax.portlet.RenderResponse response,
javax.portlet.PortletException exception)
Handle error.
|
protected void |
initialize()
the portlet instance initialize method.
|
protected void |
prepareDisplayResponse(javax.portlet.RenderRequest request,
javax.portlet.RenderResponse response)
Displays the content.
|
void |
processAction(javax.portlet.ActionRequest request,
javax.portlet.ActionResponse response) |
void |
serveResource(javax.portlet.ResourceRequest request,
javax.portlet.ResourceResponse response) |
getContentid, getCrConf, getLog, getStartfolder, getStartpage, getTemplate, init, setCrConf, setLog
destroy, doDispatch, doEdit, doHeaders, doHelp, getContainerRuntimeOptions, getDefaultNamespace, getInitParameter, getInitParameterNames, getNextPossiblePortletModes, getPortletConfig, getPortletContext, getPortletName, getProcessingEventQNames, getPublicRenderParameterNames, getPublishingEventQNames, getResourceBundle, getSupportedLocales, getTitle, init, processEvent, render
private static final String SERVE_RESOURCE_VERSION_KEY
public static final String ISVELOCITYRENDERED_KEY
public static final String ATTRIBUTES_KEY
private static final String DOWNLOADMIMETYPES_KEY
private com.gentics.api.lib.expressionparser.Expression pageRule
private com.gentics.cr.RequestProcessor rp
private com.gentics.cr.rendering.ContentRenderer renderer
private String jspTemplate
private String jspEditTemplate
private com.gentics.cr.CRConfigUtil rpConfig
protected org.apache.velocity.app.VelocityEngine vEngine
private com.gentics.cr.util.velocity.VelocityTools tools
VelocityTools
to deploy into the template context.private boolean isVelocityRendered
private String[] defaultAttributes
protected Set<String> downloadMimetypes
serveResource(ResourceRequest, ResourceResponse)
with startwith() method.private boolean isDisplayVersion
protected void initialize()
AGenticsPortlet
in this method every kind of Gentics portlet can initialize its own connectors and helpers
This method is called exact once on portlet init.
Please use this method if you have to initialize components within your portlet instance (E.g. connectors, helper classes etc.)
initialize
in class AGenticsPortlet
public void processAction(javax.portlet.ActionRequest request, javax.portlet.ActionResponse response) throws javax.portlet.PortletException, IOException
processAction
in interface javax.portlet.Portlet
processAction
in class AGenticsPortlet
javax.portlet.PortletException
IOException
public final void doView(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response) throws javax.portlet.PortletException, IOException
doView
in class javax.portlet.GenericPortlet
javax.portlet.PortletException
IOException
public final void serveResource(javax.portlet.ResourceRequest request, javax.portlet.ResourceResponse response) throws javax.portlet.PortletException, IOException
serveResource
in interface javax.portlet.ResourceServingPortlet
serveResource
in class javax.portlet.GenericPortlet
javax.portlet.PortletException
IOException
protected void prepareDisplayResponse(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response) throws javax.portlet.PortletException, IOException
Here the content is fetched with the Request Processor and processed by the Velocity Renderer if configured
request
- the requestresponse
- the responsejavax.portlet.PortletException
- the portlet exceptionIOException
- Signals that an I/O exception has occurred.protected void executeVelocityRender(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response, com.gentics.cr.CRResolvableBean crBean) throws IOException
IOException
protected void dispatch(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response) throws javax.portlet.PortletException, IOException
request
- the request.response
- the response.javax.portlet.PortletException
- the portlet exceptionIOException
- Signals that an I/O exception has occurred.protected abstract void doInternalView(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response) throws javax.portlet.PortletException, IOException
TODO
request
- the requestresponse
- the responsejavax.portlet.PortletException
- the portlet exceptionIOException
- Signals that an I/O exception has occurred.protected abstract void handleError(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response, javax.portlet.PortletException exception) throws javax.portlet.PortletException
request
- the requestresponse
- the responseexception
- the exceptionjavax.portlet.PortletException
protected com.gentics.cr.RequestProcessor getRp()
Copyright © 2014 Gentics Software GmbH. All Rights Reserved.