com.gentics.api.portalnode.action
Interface PluggableActionContext


public interface PluggableActionContext

interface for the context of a pluggable action.

Author:
norbert

Method Summary
 void addActionResponse(String actionId, PluggableActionResponse actionResponse)
          add the pluggable action response of an already (successfully) invoked action to the context
 void addAdditionalActionData(String key, Object object)
          add an additional piece of information that can be resolved using the resolver returned by getAdditionalDataResolver().
 void clearView()
          Clear the view of this context
 boolean clearView(String viewId)
          Clear the view with the given id
 void fillFormFromResolvable(Resolvable object)
          Fill the attributes of the resolvable into the view of this context
 boolean fillFormFromResolvable(String viewId, Resolvable object)
          Fill the attribute of the resolvable object into the view with the given id
 void fillMapFromForm(Map componentData)
          Fill the attributes from the view of this context into the map
 boolean fillMapFromForm(String viewId, Map componentData)
          Fill the attributes from the view with the given id into the map
 void fillObjectFromForm(Resolvable object, List writtenAttributes)
          Fill the attributes from the view of this context into the resolvable object
 boolean fillObjectFromForm(String viewId, Resolvable object, List writtenAttributes)
          Fill the attributes from the view with the given id into the resolvable object
 Resolvable getActionResolver()
          get a resolvable to resolve actions (and their response parameters)
 Resolvable getAdditionalDataResolver()
          get the resolver for the data added with addAdditionalActionData(String, Object).
 Map getBaseObjects()
          Get an unmodifiable map of the context base objects
 PropertySetter getContextPropertySetter()
          Get the property setter for all context properties.
 GenticsPortlet getModule()
          get the module that uses the pluggable action
 javax.portlet.PortletRequest getPortletRequest()
          get the originating portlet request
 RuleTree getRuleTree()
          get a ruletree that can resolve everything in the context of the actions
 TemplateProcessor getTemplateProcessor()
          Get a template processor.
 boolean hideView(String viewId)
          Hide the given view (only works for nested forms)
 void returnTemplateProcessor(TemplateProcessor templateProcessor)
          Return the template processor which was previously fetched via getTemplateProcessor().
 boolean switchToView(String viewId)
          Switch to the view with the given id
 void triggerEvent(ActionEvent event)
          trigger an action event
 

Method Detail

getModule

GenticsPortlet getModule()
get the module that uses the pluggable action

Returns:
the module

triggerEvent

void triggerEvent(ActionEvent event)
                  throws NoEventsAllowedException
trigger an action event

Parameters:
event - action event to trigger
Throws:
NoEventsAllowedException - when events cannot be handled right now

addActionResponse

void addActionResponse(String actionId,
                       PluggableActionResponse actionResponse)
add the pluggable action response of an already (successfully) invoked action to the context

Parameters:
actionId - id of the action
actionResponse - pluggable action response

getActionResolver

Resolvable getActionResolver()
get a resolvable to resolve actions (and their response parameters)

Returns:
resolvable for the actions

addAdditionalActionData

void addAdditionalActionData(String key,
                             Object object)
add an additional piece of information that can be resolved using the resolver returned by getAdditionalDataResolver().

Parameters:
key - key of the property
object - data to be resolved

getAdditionalDataResolver

Resolvable getAdditionalDataResolver()
get the resolver for the data added with addAdditionalActionData(String, Object).

Returns:
resolvable object

getRuleTree

RuleTree getRuleTree()
get a ruletree that can resolve everything in the context of the actions

Returns:
ruletree

getPortletRequest

javax.portlet.PortletRequest getPortletRequest()
get the originating portlet request

Returns:
originating portlet request

getContextPropertySetter

PropertySetter getContextPropertySetter()
Get the property setter for all context properties.

Returns:
property setter for the context

getBaseObjects

Map getBaseObjects()
Get an unmodifiable map of the context base objects

Returns:
map of context base objects

fillObjectFromForm

void fillObjectFromForm(Resolvable object,
                        List writtenAttributes)
Fill the attributes from the view of this context into the resolvable object

Parameters:
object - resolvable object to fill with attributes
writtenAttributes - list to collect the really written attributes

fillObjectFromForm

boolean fillObjectFromForm(String viewId,
                           Resolvable object,
                           List writtenAttributes)
Fill the attributes from the view with the given id into the resolvable object

Parameters:
viewId - id of the view
object - resolvable object to fill with attributes
writtenAttributes - list to collect the really written attributes
Returns:
true when the view existed, false if not

fillMapFromForm

void fillMapFromForm(Map componentData)
Fill the attributes from the view of this context into the map

Parameters:
componentData - map that is filled with the component data

fillMapFromForm

boolean fillMapFromForm(String viewId,
                        Map componentData)
Fill the attributes from the view with the given id into the map

Parameters:
viewId - id of the view
componentData - map that is filled with the component data
Returns:
true when the view existed, false if not

fillFormFromResolvable

void fillFormFromResolvable(Resolvable object)
Fill the attributes of the resolvable into the view of this context

Parameters:
object -

fillFormFromResolvable

boolean fillFormFromResolvable(String viewId,
                               Resolvable object)
Fill the attribute of the resolvable object into the view with the given id

Parameters:
viewId - view id
object - resolvable object
Returns:
true when the view existed and was filled, false if not

switchToView

boolean switchToView(String viewId)
Switch to the view with the given id

Parameters:
viewId - id of the view
Returns:
true when the view exists and is selected, false if the view does not exist

hideView

boolean hideView(String viewId)
Hide the given view (only works for nested forms)

Parameters:
viewId - id of the view, must inlude the id of the nestedform to hide ([viewid].[nestedformid])
Returns:
true when the view exists and is a nested form, false if the view does not exist or is not nested

clearView

boolean clearView(String viewId)
Clear the view with the given id

Parameters:
viewId - id of the view
Returns:
true when the view exists, false if not

clearView

void clearView()
Clear the view of this context


getTemplateProcessor

TemplateProcessor getTemplateProcessor()
Get a template processor. Template processors must be returned via returnTemplateProcessor(TemplateProcessor) after usage

Returns:
template processor

returnTemplateProcessor

void returnTemplateProcessor(TemplateProcessor templateProcessor)
Return the template processor which was previously fetched via getTemplateProcessor().

Parameters:
templateProcessor - template processor that is no longer used


Copyright © 2013 Gentics Software GmbH. All Rights Reserved.