com.gentics.api.portalnode.plugin
Interface GenticsPluginServer

All Known Subinterfaces:
GenticsPortlet
All Known Implementing Classes:
AbstractGenticsPlugin, AbstractGenticsPortlet, ViewPlugin

public interface GenticsPluginServer

The GenticsPluginServer defines a contract for using Embedded "HelperModules" (called Plugins) inside the Portal.Node Environment. Purpose is to reduce complexity, coding time and code lines by providing a set of predefined snippet generators (plugins) that allow efficent coding and resource usage. The Plugins handle Events, are processing actions and are rendering their output like a Porlet Module, but are embedded into other Portlets

Author:
robert MOD 20040926 DG

Method Summary
 void afterProcessPluginAction(String PluginID, javax.portlet.ActionRequest actionRequest, javax.portlet.ActionResponse actionResponse)
          process the afterProcessAction of the given plugin
 GenticsPlugin getPlugin(String Id)
          returns a plugin from the server (if registered), or else null
 void onPluginEvent(EventRequest eventRequest, EventResponse eventResponse)
          onPluginEvent will be called everytime a plugin triggers an event
 void processPluginAction(String PluginID, javax.portlet.ActionRequest actionRequest, javax.portlet.ActionResponse actionResponse)
          processes a plugin action the pluginserver needs to distribute actions to its plugins
 void registerPlugin(String Id, GenticsPlugin plugin)
          allows to register plugins to the server so he can further distribute events and forward actions as well as provide rendering facility
 String renderPlugin(String Id, javax.portlet.RenderRequest request, javax.portlet.RenderResponse response)
          renders a plugin specified by the pluginid it provides the plugin with a adapted request and response so it can only see its own variables
 void unregisterPlugin(String id)
          Unregister the plugin with the given id.
 

Method Detail

registerPlugin

void registerPlugin(String Id,
                    GenticsPlugin plugin)
allows to register plugins to the server so he can further distribute events and forward actions as well as provide rendering facility

Parameters:
Id - the pluginid
plugin - the plugin

unregisterPlugin

void unregisterPlugin(String id)
Unregister the plugin with the given id.

Parameters:
id - id of the plugin to unregister

getPlugin

GenticsPlugin getPlugin(String Id)
returns a plugin from the server (if registered), or else null

Parameters:
Id - pluginid
Returns:
found plugin or null

renderPlugin

String renderPlugin(String Id,
                    javax.portlet.RenderRequest request,
                    javax.portlet.RenderResponse response)
                    throws javax.portlet.PortletException,
                           IOException
renders a plugin specified by the pluginid it provides the plugin with a adapted request and response so it can only see its own variables

Parameters:
Id - plugin id
request - the request of the module calling
response - the response of the calling module
Returns:
the snippet generated by the plugin
Throws:
javax.portlet.PortletException - an exception if anything in terms of processing goes wrong
IOException - any i/o problems

onPluginEvent

void onPluginEvent(EventRequest eventRequest,
                   EventResponse eventResponse)
onPluginEvent will be called everytime a plugin triggers an event

Parameters:
eventRequest - the event request
eventResponse - the event response

processPluginAction

void processPluginAction(String PluginID,
                         javax.portlet.ActionRequest actionRequest,
                         javax.portlet.ActionResponse actionResponse)
                         throws javax.portlet.PortletException,
                                IOException
processes a plugin action the pluginserver needs to distribute actions to its plugins

Parameters:
PluginID - pluginid
actionRequest - request
actionResponse - response
Throws:
javax.portlet.PortletException - any processing problem
IOException - any i/o problem

afterProcessPluginAction

void afterProcessPluginAction(String PluginID,
                              javax.portlet.ActionRequest actionRequest,
                              javax.portlet.ActionResponse actionResponse)
                              throws javax.portlet.PortletException,
                                     IOException
process the afterProcessAction of the given plugin

Parameters:
PluginID - pluginid
actionRequest - request
actionResponse - response
Throws:
javax.portlet.PortletException
IOException


Copyright © 2013 Gentics Software GmbH. All Rights Reserved.