public abstract class AGenticsPortlet
extends javax.portlet.GenericPortlet
This is the basic Gentics portlet abstract class that provides some basic features
Modifier and Type | Field and Description |
---|---|
static String |
CONTENTID_OVERRIDE_ATTRIBUTE
The Constant CONTENTID_OVERRIDE_PARAMETER.
|
static String |
CONTENTID_RENDER_PARAMETER
The Constant CONTENTID_RENDER_PARAMETER.
|
private CCPortletConfig |
crConf
The Content Repository configuration.
|
static String |
INITPARAM_EDITTEMPLATE_NAME
The Constant INITPARAM_EDITTEMPLATE_NAME.
|
static String |
INITPARAM_STARTFOLDER_NAME
The Constant INITPARAM_STARTFOLDER_NAME.
|
static String |
INITPARAM_STARTPAGE_NAME
The Constant INITPARAM_STARTPAGE_NAME.
|
static String |
INITPARAM_VIEWTEMPLATE_NAME
The Constant INITPARAM_VIEWTAMPLATE_NAME.
|
protected org.apache.log4j.Logger |
log
the Logger.
|
static String |
PAGE_RULE
the Page Rule.
|
private String |
startfolder
the startfolder for this portlet instance.
|
private String |
startpage
the startpage for this portlet instance.
|
static String |
TEMPLATE_CACHEZONE_KEY
The Constant TEMPLATE_CACHEZONE_KEY.
|
private org.apache.jcs.JCS |
templateCache
the template cache
|
static String |
TEMPLATECACHE_CONFIG_KEY
configuration key for enabling or disabling the JCS template cache.
|
Constructor and Description |
---|
AGenticsPortlet() |
Modifier and Type | Method and Description |
---|---|
protected String |
getContentid(javax.portlet.RenderRequest request)
Returns the current contentid for the portlet.
|
protected CCPortletConfig |
getCrConf()
Gets the cr conf.
|
protected org.apache.log4j.Logger |
getLog()
Gets the log.
|
protected String |
getStartfolder()
Gets the startfolder.
|
protected String |
getStartpage()
Gets the startpage.
|
protected com.gentics.cr.template.ITemplate |
getTemplate(String templatePath)
Gets the File Template from configured Template path or from default
template file path if left empty.
|
void |
init() |
protected abstract void |
initialize()
the portlet instance initialize method.
|
void |
processAction(javax.portlet.ActionRequest request,
javax.portlet.ActionResponse response) |
protected void |
setCrConf(CCPortletConfig crConfig)
Sets the cr conf.
|
protected void |
setLog(org.apache.log4j.Logger logger)
Sets the log.
|
private void |
setStartfolder(String sf)
Sets the startfolder.
|
private void |
setStartpage(String sp)
Sets the startpage.
|
destroy, doDispatch, doEdit, doHeaders, doHelp, doView, getContainerRuntimeOptions, getDefaultNamespace, getInitParameter, getInitParameterNames, getNextPossiblePortletModes, getPortletConfig, getPortletContext, getPortletName, getProcessingEventQNames, getPublicRenderParameterNames, getPublishingEventQNames, getResourceBundle, getSupportedLocales, getTitle, init, processEvent, render, serveResource
public static final String INITPARAM_STARTPAGE_NAME
public static final String INITPARAM_STARTFOLDER_NAME
public static final String INITPARAM_VIEWTEMPLATE_NAME
public static final String INITPARAM_EDITTEMPLATE_NAME
public static final String CONTENTID_RENDER_PARAMETER
public static final String CONTENTID_OVERRIDE_ATTRIBUTE
public static final String TEMPLATECACHE_CONFIG_KEY
public static final String TEMPLATE_CACHEZONE_KEY
public static final String PAGE_RULE
protected org.apache.log4j.Logger log
private CCPortletConfig crConf
private String startfolder
private String startpage
private org.apache.jcs.JCS templateCache
public final void init()
init
in class javax.portlet.GenericPortlet
protected abstract void initialize()
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.)
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 javax.portlet.GenericPortlet
javax.portlet.PortletException
IOException
protected String getContentid(javax.portlet.RenderRequest request) throws com.gentics.cr.exceptions.CRException
request
- the requestcom.gentics.cr.exceptions.CRException
protected com.gentics.cr.template.ITemplate getTemplate(String templatePath) throws FileNotFoundException, com.gentics.cr.exceptions.CRException
templatePath
- the path of the templateFileNotFoundException
- the file not found exceptioncom.gentics.cr.exceptions.CRException
- the cR exceptionprotected org.apache.log4j.Logger getLog()
protected void setLog(org.apache.log4j.Logger logger)
logger
- the new logprotected CCPortletConfig getCrConf()
protected void setCrConf(CCPortletConfig crConfig)
crConfig
- the new cr confprotected String getStartfolder()
private void setStartfolder(String sf)
sf
- the new startfolderprotected String getStartpage()
private void setStartpage(String sp)
sp
- the new startpageCopyright © 2014 Gentics Software GmbH. All Rights Reserved.