|
||||||||||
| 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 java.lang.String |
JAXB_CONTEXTPATH
context path for the JAXB context |
protected static java.io.FilenameFilter |
VIEW_DEFINITION_FILES
filename filter for views files |
protected static java.lang.String |
VIEWS_CACHE_REGION
region for the views cache |
protected static java.lang.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(org.w3c.dom.Node viewNode)
Check a single view node for configuration errors |
java.lang.Boolean |
getDoubleClickProtection()
Get whether doubleclickprotection is on for all views |
java.lang.Object |
getProperty(java.lang.String key)
Get the property named by key or null if the property does not exist or is not set. |
protected java.io.File |
getViewbasedir()
Returns the configured viewbasedir. |
java.lang.Object |
getViewData(java.lang.String viewId,
java.lang.String componentId)
Convenience method to get the value of the specified component of the specified view |
java.util.Map |
getViewDataAsMap(java.lang.String viewId)
Get app data from the components of the given view |
protected org.w3c.dom.Document |
getViewDocument(javax.xml.parsers.DocumentBuilder docBuilder,
java.io.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 org.w3c.dom.Document |
parseFile(javax.xml.parsers.DocumentBuilder docBuilder,
java.io.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(java.io.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(java.lang.String viewName)
set the active view by name. |
void |
setDoubleclickprotection(java.lang.String doubleClickProtection)
Set the doubleclickprotection |
void |
setModule(GenticsPortlet module)
Set the module which registeres and uses this plugin. |
boolean |
setProperty(java.lang.String name,
java.lang.Object value)
Set (modify) the property name to resolve to the given value |
void |
setViewbasedir(java.lang.String baseDirPath)
Set the path to the baseDir of te views definition files |
boolean |
setViewData(java.lang.String viewId,
java.lang.String componentId,
java.lang.Object value)
Convenience method to set the value of the specified component of the specified view |
void |
setViews(org.w3c.dom.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 java.lang.String VIEWS_PROPERTIES
protected static final java.lang.String VIEWS_CACHE_REGION
protected static final java.io.FilenameFilter VIEW_DEFINITION_FILES
public static final java.lang.String JAXB_CONTEXTPATH
| Constructor Detail |
|---|
public ViewPlugin()
| Method Detail |
|---|
public void render(javax.portlet.RenderRequest request,
javax.portlet.RenderResponse response)
throws javax.portlet.PortletException,
java.io.IOException
render in interface javax.portlet.Portletrender in class javax.portlet.GenericPortletjavax.portlet.PortletException
java.io.IOException
public void processAction(javax.portlet.ActionRequest actionRequest,
javax.portlet.ActionResponse actionResponse)
throws javax.portlet.PortletException,
java.io.IOException
AbstractGenticsPlugin
processAction in interface javax.portlet.PortletprocessAction in class AbstractGenticsPluginjavax.portlet.PortletException
java.io.IOExceptionPortlet.processAction(javax.portlet.ActionRequest,
javax.portlet.ActionResponse)
public void init()
throws javax.portlet.PortletException
init in class javax.portlet.GenericPortletjavax.portlet.PortletExceptionpublic void setViews(org.w3c.dom.Node viewsDefinition)
viewsDefinition - views configurationpublic void setModule(GenticsPortlet module)
GenticsPluginAbstractGenticsPortlet.registerPlugin(String, GenticsPlugin)
and need not be called from outside.
setModule in interface GenticsPluginsetModule in class AbstractGenticsPluginmodule - module using this pluginpublic java.lang.Object getProperty(java.lang.String key)
ResolvableResolvable.get(String).
getProperty in interface ResolvablegetProperty in class AbstractGenticsPluginkey - key of the property
public boolean setProperty(java.lang.String name,
java.lang.Object value)
throws InsufficientPrivilegesException
Changeable
setProperty in interface Changeablename - name of the property to set/modifyvalue - (new) value to set
InsufficientPrivilegesException - when the property may not be
changed
public java.lang.Object getViewData(java.lang.String viewId,
java.lang.String componentId)
viewId - id of the viewcomponentId - id of the component
public boolean setViewData(java.lang.String viewId,
java.lang.String componentId,
java.lang.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 java.util.Map getViewDataAsMap(java.lang.String viewId)
viewId - id of the view
public void setActiveView(java.lang.String viewName)
viewName - name of the view.public void setViewbasedir(java.lang.String baseDirPath)
baseDirPath - path to the views definition filespublic void setDoubleclickprotection(java.lang.String doubleClickProtection)
doubleClickProtection - flag for doubleclickprotectionpublic java.lang.Boolean getDoubleClickProtection()
protected java.io.File getViewbasedir()
protected org.w3c.dom.Document getViewDocument(javax.xml.parsers.DocumentBuilder docBuilder,
java.io.File viewFile)
throws org.xml.sax.SAXException,
java.io.IOException
docBuilder - document builderviewFile -
org.xml.sax.SAXException
java.io.IOExceptionprotected void removeViewDocumentFromCache(java.io.File viewFile)
viewFile - view file
protected org.w3c.dom.Document parseFile(javax.xml.parsers.DocumentBuilder docBuilder,
java.io.File viewFile)
throws org.xml.sax.SAXException,
java.io.IOException
docBuilder - document builderviewFile - file to parse
org.xml.sax.SAXException
java.io.IOExceptionprotected boolean checkViewFiles()
protected void checkViewNode(org.w3c.dom.Node viewNode)
throws javax.xml.bind.JAXBException
viewNode - view node
javax.xml.bind.JAXBExceptionprotected com.gentics.portalnode.genericmodules.object.generator.Views getViews()
public void serveResource(javax.portlet.ResourceRequest request,
javax.portlet.ResourceResponse response)
throws javax.portlet.PortletException,
java.io.IOException
serveResource in interface javax.portlet.ResourceServingPortletserveResource in class javax.portlet.GenericPortletjavax.portlet.PortletException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||