|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.portlet.GenericPortlet
com.gentics.api.portalnode.plugin.AbstractGenticsPlugin
com.gentics.api.portalnode.plugin.ViewPlugin
public class ViewPlugin
Views plugin to manage multiple views (forms)
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.gentics.api.portalnode.plugin.AbstractGenticsPlugin |
---|
AbstractGenticsPlugin.SubPluginEventBrokerProvider |
Field Summary | |
---|---|
static String |
JAXB_CONTEXTPATH
context path for the JAXB context |
protected static FilenameFilter |
VIEW_DEFINITION_FILES
filename filter for views files |
protected static String |
VIEWS_CACHE_REGION
region for the views cache |
protected static String |
VIEWS_PROPERTIES
name of the view.properties file |
Fields inherited from class com.gentics.api.portalnode.plugin.AbstractGenticsPlugin |
---|
logger |
Constructor Summary | |
---|---|
ViewPlugin()
|
Method Summary | |
---|---|
protected boolean |
checkViewFiles()
Check all view files separately for configuration errors |
protected void |
checkViewNode(Node viewNode)
Check a single view node for configuration errors |
Boolean |
getDoubleClickProtection()
Get whether doubleclickprotection is on for all views |
Object |
getProperty(String key)
Get the property named by key or null if the property does not exist or is not set. |
protected File |
getViewbasedir()
Returns the configured viewbasedir. |
Object |
getViewData(String viewId,
String componentId)
Convenience method to get the value of the specified component of the specified view |
Map |
getViewDataAsMap(String viewId)
Get app data from the components of the given view |
protected Document |
getViewDocument(DocumentBuilder docBuilder,
File viewFile)
Get the view document either from the cache or parse the file content |
protected com.gentics.portalnode.genericmodules.object.generator.Views |
getViews()
Method to get the currently set views in a threadsafe way. |
void |
init()
|
protected Document |
parseFile(DocumentBuilder docBuilder,
File viewFile)
Parse the given file into a Document |
void |
processAction(javax.portlet.ActionRequest actionRequest,
javax.portlet.ActionResponse actionResponse)
Copied from Java Portlet API: Called by the portlet container to allow the portlet to process an action request. |
protected void |
removeViewDocumentFromCache(File viewFile)
Remove the view document from the cache (if present) |
void |
render(javax.portlet.RenderRequest request,
javax.portlet.RenderResponse response)
|
void |
serveResource(javax.portlet.ResourceRequest request,
javax.portlet.ResourceResponse response)
|
void |
setActiveView(String viewName)
set the active view by name. |
void |
setDoubleclickprotection(String doubleClickProtection)
Set the doubleclickprotection |
void |
setModule(GenticsPortlet module)
Set the module which registeres and uses this plugin. |
boolean |
setProperty(String name,
Object value)
Set (modify) the property name to resolve to the given value |
void |
setViewbasedir(String baseDirPath)
Set the path to the baseDir of te views definition files |
boolean |
setViewData(String viewId,
String componentId,
Object value)
Convenience method to set the value of the specified component of the specified view |
void |
setViews(Node viewsDefinition)
Set the views configuration as Node. |
Methods inherited from class com.gentics.api.portalnode.plugin.AbstractGenticsPlugin |
---|
addEventListener, afterProcessAction, afterProcessPluginAction, canResolve, get, getContainerRuntimeOptions, getEventBroker, getFileUploadProvider, getFullPluginName, getGenticsPortletContext, getId, getImp, getModule, getParameter, getPlugin, getSessionPropertyName, getTemplateProcessor, handleEvent, i18n, initSessionPropertyNames, logdebug, logdebug, logerror, logError, logFatal, logFatal, loginfo, loginfo, logwarn, logwarn, onPluginEvent, processPluginAction, registerPlugin, renderPlugin, returnFileUploadProvider, returnTemplateProcessor, setEventBrokerProvider, setId, setParameter, setPluginName, toString, triggerPluginEvent, unregisterPlugin |
Methods inherited from class javax.portlet.GenericPortlet |
---|
destroy, doDispatch, doEdit, doHeaders, doHelp, doView, getDefaultNamespace, getInitParameter, getInitParameterNames, getNextPossiblePortletModes, getPortletConfig, getPortletContext, getPortletName, getProcessingEventQNames, getPublicRenderParameterNames, getPublishingEventQNames, getResourceBundle, getSupportedLocales, getTitle, init, processEvent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.gentics.api.lib.resolving.Resolvable |
---|
canResolve, get |
Methods inherited from interface javax.portlet.Portlet |
---|
destroy, init |
Methods inherited from interface javax.portlet.PortletConfig |
---|
getDefaultNamespace, getInitParameter, getInitParameterNames, getPortletContext, getPortletName, getProcessingEventQNames, getPublicRenderParameterNames, getPublishingEventQNames, getResourceBundle, getSupportedLocales |
Field Detail |
---|
protected static final String VIEWS_PROPERTIES
protected static final String VIEWS_CACHE_REGION
protected static final FilenameFilter VIEW_DEFINITION_FILES
public static final String JAXB_CONTEXTPATH
Constructor Detail |
---|
public ViewPlugin()
Method Detail |
---|
public void render(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response) throws javax.portlet.PortletException, IOException
render
in interface javax.portlet.Portlet
render
in class javax.portlet.GenericPortlet
javax.portlet.PortletException
IOException
public void processAction(javax.portlet.ActionRequest actionRequest, javax.portlet.ActionResponse actionResponse) throws javax.portlet.PortletException, IOException
AbstractGenticsPlugin
processAction
in interface javax.portlet.Portlet
processAction
in class AbstractGenticsPlugin
javax.portlet.PortletException
IOException
Portlet.processAction(javax.portlet.ActionRequest,
javax.portlet.ActionResponse)
public void init() throws javax.portlet.PortletException
init
in class javax.portlet.GenericPortlet
javax.portlet.PortletException
public void setViews(Node viewsDefinition)
viewsDefinition
- views configurationpublic void setModule(GenticsPortlet module)
GenticsPlugin
AbstractGenticsPortlet.registerPlugin(String, GenticsPlugin)
and need not be called from outside.
setModule
in interface GenticsPlugin
setModule
in class AbstractGenticsPlugin
module
- module using this pluginpublic Object getProperty(String key)
Resolvable
Resolvable.get(String)
.
getProperty
in interface Resolvable
getProperty
in class AbstractGenticsPlugin
key
- key of the property
public boolean setProperty(String name, Object value) throws InsufficientPrivilegesException
Changeable
setProperty
in interface Changeable
name
- name of the property to set/modifyvalue
- (new) value to set
InsufficientPrivilegesException
- when the property may not be
changedpublic Object getViewData(String viewId, String componentId)
viewId
- id of the viewcomponentId
- id of the component
public boolean setViewData(String viewId, String componentId, Object value)
viewId
- id of the viewcomponentId
- id of the componentvalue
- new value of the component. the object class depends on the
type of the component.
public Map getViewDataAsMap(String viewId)
viewId
- id of the view
public void setActiveView(String viewName)
viewName
- name of the view.public void setViewbasedir(String baseDirPath)
baseDirPath
- path to the views definition filespublic void setDoubleclickprotection(String doubleClickProtection)
doubleClickProtection
- flag for doubleclickprotectionpublic Boolean getDoubleClickProtection()
protected File getViewbasedir()
protected Document getViewDocument(DocumentBuilder docBuilder, File viewFile) throws SAXException, IOException
docBuilder
- document builderviewFile
-
SAXException
IOException
protected void removeViewDocumentFromCache(File viewFile)
viewFile
- view fileprotected Document parseFile(DocumentBuilder docBuilder, File viewFile) throws SAXException, IOException
docBuilder
- document builderviewFile
- file to parse
SAXException
IOException
protected boolean checkViewFiles()
protected void checkViewNode(Node viewNode) throws javax.xml.bind.JAXBException
viewNode
- view node
javax.xml.bind.JAXBException
protected com.gentics.portalnode.genericmodules.object.generator.Views getViews()
public 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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |