lumis.doui.processaction
Class ProcessActionHandler<S extends Source>

Package class diagram package ProcessActionHandler
java.lang.Object
  extended by lumis.doui.processaction.ProcessActionHandler<S>
All Implemented Interfaces:
IProcessActionHandler, IParameters
Direct Known Subclasses:
AddChatRoomProcessActionHandler, AddItemActionHandler, AddPrincipalProcessActionHandler, BannerProcessActionHandler, BaseTableDataProcessActionHandler, BreadCrumbPropertiesProcessActionHandler, CacheProcessActionHandler, ChannelProcessActionHandler, CheckAlbumAccessProcessActionHandler, CheckAlbumDeleteProcessActionHandler, CheckCategoryDeleteProcessActionHandler, CheckCategoryDeleteProcessActionHandler, CheckDuplicateFolderProcessActionHandler, CheckDuplicateFolderProcessActionHandler, ClockProcessActionHandler, ClusterProcessActionHandler, ColProcessActionHandler, CommitAndPreviewProcessActionHandler, ConsumerConfigurationInterfaceProcessActionHandler, ContactUsMailProcessActionHandler, ContentAssociationProcessActionHandler, ContentWizardDeleteProcessActionHandler, CssProcessActionHandler, DatabaseViewGroupProcessActionHandler, DatabaseViewGroupTypeProcessActionHandler, DeleteChatRoomProcessActionHandler, DeleteProcessActionHandler, DeploymentProcessActionHandler, DeploymentProcessActionHandler, DocumentMoveProcessActionHandler, EditChatRoomProcessActionHandler, FieldsProcessActionHandler, FileSystemProcessActionHandler, FiltersProcessActionHandler, ForumProcessActionHandler, GenericAclActionHandler, GenericAclProcessActionHandler, GenericProcessActionHandler, GroupProcessActionHandler, GroupProcessActionHandler, GroupTypeProcessActionHandler, HtmlEditProcessActionHandler, HtmlProcessActionHandler, ImageMoveProcessActionHandler, ImportPrincipalsProcessActionHandler, InterfaceHolderPropertiesProcessActionHandler, InterfaceInstanceCustomPropertiesProcessActionHandler, LanguageProcessActionHandler, LinkTranslatorProcessActionHandler, LocaleProcessActionHandler, LoginProcessActionHandler, MailMarketingBulletinAddDataProcessActionHandler, MailMarketingBulletinUpdateDataProcessActionHandler, MailMarketingSendTestEmailProcessActionHandler, MaxRowsProcessActionHandler, MonitorEventProcessActionHandler, NavigationProcessActionHandler, NewArticleLinkProcessActionHandler, NewsletterModelAdminProcessActionHandler, ObserverProcessActionHandler, OrderByActionHandler, PageCacheProcessActionHandler, PageLinkConstraintCheckProcessActionHandler, PageProcessActionHandler, PageTemplateProcessActionHandler, ParticipateProcessActionHandler, PortletDeploymentProcessActionHandler, PrintProcessActionHandler, ProducerAddInterfaceInstanceProcessActionHandler, ProducerAdministrationListDeleteProcessActionHandler, ProducerConfigurationInterfaceProcessActionHandler, PublicDataFolderProcessActionHandler, PublishToPrincipalsProcessActionHandler, PublishToServiceInstancesProcessActionHandler, ReadPrincipalsProcessActionHandler, RegisterControlProcessActionHandler, RegisterMenuTypesProcessActionHandler, RegisterReportTypeProcessActionHandler, RegisterServiceProcessActionHandler, RegisterServiceTypesProcessActionHandler, RemotePortletConfigurationInterfaceProcessActionHandler, ReportProcessActionHandler, ResourceValidatorProcessActionHandler, RobotsTxtSitemapNameProcessActionHandler, RobotsTxtUserAgentNameProcessActionHandler, RoomDeleteValidatorProcessActionHandler, RssProcessActionHandler, ScheduleValidatorProcessActionHandler, SearchPropertiesProcessActionHandler, SelectImportFileProcessActionHandler, SelectPrincipalProcessActionHandler, SelectRepositoryProcessActionHandler, SelectRepositoryProcessActionHandler, SelectRepositoryProcessActionHandler, SelectWorkflowServiceInstanceProcessActionHandler, SendMailProcessActionHandler, SendToFriendMailProcessActionHandler, SerializationProcessActionHandler, ServiceInstanceCustomPropertiesProcessActionHandler, ServiceInstanceProcessActionHandler, ServiceInterfaceInstancePropertiesProcessActionHandler, SetCommentTotalInfoProcessActionHandler, SetContactRequestCategoryNullProcessActionHandler, SetMainArticleProcessActionHandler, SetMetaDataInfoProcessActionHandler, ShowReportProcessActionHandler, UniqueMimeTypeValidatorProcessActionHandler, UserProcessActionHandler, UserProcessActionHandler, ValidateArticleDeletionProcessActionHandler, ValidateArticleTitleProcessActionHandler, ValidateContentReferencesProcessActionHandler, ValidateSitemapChannelNameProcessAction, ValidateSitemapNameProcessActionHandler, VersionProcessActionHandler, VoteProcessActionHandler, WebPageProcessActionHandler, WebResourceServiceProcessActionHandler, WebServiceViewerConfigurationProcessActionHandler, WebServiceViewerParametersProcessActionHandler, WorkflowProcessActionHandler, XslCacheProcessActionHandler, XslEditorProcessActionHandler

@StableMinor(version="5.5",
             sinceVersion="4.0")
public abstract class ProcessActionHandler<S extends Source>
extends Object
implements IProcessActionHandler, IParameters

Base class for all doui process action handlers.

Since:
4.0.0

Field Summary
protected  DouiContext douiContext
           
protected  String id
           
protected  ILocalizationManager localizationManager
           
protected  Map<String,Object> parameters
           
protected  ProcessActionContainer processActionContainer
           
protected  Node processActionNode
           
static String RESPONSE_TYPE_CLOSE_WINDOW
           
static String RESPONSE_TYPE_HYPERLINK
           
static String RESPONSE_TYPE_MESSAGE
           
static String RESPONSE_TYPE_POPUP_INTERFACE
           
static String RESPONSE_TYPE_PREVIEW
           
static String RESPONSE_TYPE_REFRESH_PARENT
           
static String RESPONSE_TYPE_REQUEST_PROCESS_ACTION_CONFIRMATION_MESSAGE
           
static String RESPONSE_TYPE_REQUEST_PROCESS_ACTION_CONFIRMATION_PROCESS_ACTION_ID
           
static String RESPONSE_TYPE_RUN_JAVASCRIPT
           
static String RESPONSE_TYPE_SET_REQUEST_ATTRIBUTES
           
static String RESPONSE_TYPE_SET_REQUEST_PARAMETERS
           
static String RESPONSE_TYPE_SET_RESPONSE_PARAMETERS
           
static String RESPONSE_TYPE_STANDARD_COMMIT
           
static String RESPONSE_TYPE_STANDARD_EMBEDDED
           
static String RESPONSE_TYPE_STANDARD_POPUP
           
static String RESPONSE_TYPE_VALIDATE_PROCESS_ACTION_ON_RENDER
           
protected  SessionConfig sessionConfig
           
protected  S source
           
protected  SourceContainer sourceContainer
           
protected  ITransaction transaction
           
 
Constructor Summary
ProcessActionHandler()
           
 
Method Summary
protected  void addDefaultResponse()
          Sets the default response parameters based on the node specifications.
 void addResponseParameter(String name, String value)
          Adds the given name and value to the response parameters.
protected  boolean checkServiceInstancePermission(String permissionId)
          Returns true if the current user has the given permission.
protected  boolean checkServiceInstancePermission(String userId, String permissionId)
          Returns true if the given user has the given permission.
 String getId()
          Returns the identifier for the process action handler.
 Object getParameter(String name)
          Returns the parameter value.
<T> T
getParameter(String name, Class<T> expectedClass)
          Returns the parameter value converted to the expected class.
protected  IResource getResource()
          Returns the interface resource.
protected  IServiceInterfaceUrl getServiceInterfaceHyperLink(String destInterfaceId)
           
protected  IServiceInterfaceUrl getUrl(Node actionResponseNode, String destInterfaceId)
           
 void init(Node processActionNode, ProcessActionContainer processActionContainer)
          Called by the process action container to initialize the process action.
protected  String localize(String stringToLocalize)
          Localizes the string based on the interface resource.
protected  void processHyperLinkResponse(Node actionResponseNode, String destInterfaceId)
           
protected  void processPopupInterfaceResponse(Node actionResponseNode, String destInterfaceId)
           
protected  Object resolveFieldValueNode(Node fieldValueNode)
          Resolves the value for a fieldValue node.
 void setParameter(String name, Object value)
          All controls pass their values to a process action object via this method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface lumis.doui.processaction.IProcessActionHandler
processAction
 

Field Detail

RESPONSE_TYPE_MESSAGE

public static final String RESPONSE_TYPE_MESSAGE
See Also:
Constant Field Values

RESPONSE_TYPE_REFRESH_PARENT

public static final String RESPONSE_TYPE_REFRESH_PARENT
See Also:
Constant Field Values

RESPONSE_TYPE_CLOSE_WINDOW

public static final String RESPONSE_TYPE_CLOSE_WINDOW
See Also:
Constant Field Values

RESPONSE_TYPE_RUN_JAVASCRIPT

public static final String RESPONSE_TYPE_RUN_JAVASCRIPT
See Also:
Constant Field Values

RESPONSE_TYPE_SET_REQUEST_PARAMETERS

public static final String RESPONSE_TYPE_SET_REQUEST_PARAMETERS
See Also:
Constant Field Values

RESPONSE_TYPE_SET_RESPONSE_PARAMETERS

public static final String RESPONSE_TYPE_SET_RESPONSE_PARAMETERS
See Also:
Constant Field Values

RESPONSE_TYPE_SET_REQUEST_ATTRIBUTES

public static final String RESPONSE_TYPE_SET_REQUEST_ATTRIBUTES
See Also:
Constant Field Values

RESPONSE_TYPE_REQUEST_PROCESS_ACTION_CONFIRMATION_MESSAGE

public static final String RESPONSE_TYPE_REQUEST_PROCESS_ACTION_CONFIRMATION_MESSAGE
See Also:
Constant Field Values

RESPONSE_TYPE_REQUEST_PROCESS_ACTION_CONFIRMATION_PROCESS_ACTION_ID

public static final String RESPONSE_TYPE_REQUEST_PROCESS_ACTION_CONFIRMATION_PROCESS_ACTION_ID
See Also:
Constant Field Values

RESPONSE_TYPE_VALIDATE_PROCESS_ACTION_ON_RENDER

public static final String RESPONSE_TYPE_VALIDATE_PROCESS_ACTION_ON_RENDER
See Also:
Constant Field Values

RESPONSE_TYPE_STANDARD_POPUP

public static final String RESPONSE_TYPE_STANDARD_POPUP
See Also:
Constant Field Values

RESPONSE_TYPE_STANDARD_EMBEDDED

public static final String RESPONSE_TYPE_STANDARD_EMBEDDED
See Also:
Constant Field Values

RESPONSE_TYPE_STANDARD_COMMIT

public static final String RESPONSE_TYPE_STANDARD_COMMIT
See Also:
Constant Field Values

RESPONSE_TYPE_HYPERLINK

public static final String RESPONSE_TYPE_HYPERLINK
See Also:
Constant Field Values

RESPONSE_TYPE_POPUP_INTERFACE

public static final String RESPONSE_TYPE_POPUP_INTERFACE
See Also:
Constant Field Values

RESPONSE_TYPE_PREVIEW

public static final String RESPONSE_TYPE_PREVIEW
See Also:
Constant Field Values

processActionContainer

protected ProcessActionContainer processActionContainer

douiContext

protected DouiContext douiContext

transaction

protected ITransaction transaction

sourceContainer

protected SourceContainer sourceContainer

processActionNode

protected Node processActionNode

source

protected S extends Source source

sessionConfig

protected SessionConfig sessionConfig

localizationManager

protected ILocalizationManager localizationManager

parameters

protected Map<String,Object> parameters

id

protected String id
Constructor Detail

ProcessActionHandler

public ProcessActionHandler()
Method Detail

init

public void init(Node processActionNode,
                 ProcessActionContainer processActionContainer)
          throws PortalException
Description copied from interface: IProcessActionHandler
Called by the process action container to initialize the process action.

The process action node is a copy of the node specified in the doui definition.

Specified by:
init in interface IProcessActionHandler
Throws:
PortalException

setParameter

public void setParameter(String name,
                         Object value)
Description copied from interface: IProcessActionHandler
All controls pass their values to a process action object via this method.

The controls call this method before the processAction() method is called.

Specified by:
setParameter in interface IProcessActionHandler
Specified by:
setParameter in interface IParameters

getId

public String getId()
             throws PortalException
Description copied from interface: IProcessActionHandler
Returns the identifier for the process action handler.

Specified by:
getId in interface IProcessActionHandler
Returns:
the process action identifier.
Throws:
PortalException

getParameter

public Object getParameter(String name)
Description copied from interface: IProcessActionHandler
Returns the parameter value.

Specified by:
getParameter in interface IProcessActionHandler
Specified by:
getParameter in interface IParameters

resolveFieldValueNode

protected Object resolveFieldValueNode(Node fieldValueNode)
                                throws PortalException
Resolves the value for a fieldValue node.

Parameters:
id - the id of the fieldValue node.
Returns:
the resolved value for the node, or null if none was found.
Throws:
PortalException
Since:
4.0.10

getParameter

public <T> T getParameter(String name,
                          Class<T> expectedClass)
               throws PortalException
Description copied from interface: IProcessActionHandler
Returns the parameter value converted to the expected class.

Specified by:
getParameter in interface IProcessActionHandler
Type Parameters:
T - the expected class.
Parameters:
name - the parameter name.
expectedClass - the expected class.
Returns:
the parameter value, converted to the expected class, or null if there is no such parameter value set.
Throws:
PortalException

addDefaultResponse

protected void addDefaultResponse()
                           throws PortalException
Sets the default response parameters based on the node specifications.

Possible response types.

doui_closeWindow, RESPONSE_TYPE_CLOSE_WINDOW: closes the current window.

doui_hyperLink, RESPONSE_TYPE_HYPERLINK: Used to redirect the browser to another page / url after the process action. In addition parameters may be passed to the destination page.

doui_message, RESPONSE_TYPE_MESSAGE: displays a message to the end user. This type requires a message attribute to be specified. This message will be translated to the users current language.

doui_refreshParen, RESPONSE_TYPE_REFRESH_PARENTt: refreshes the parent window.

doui_runJavascript, RESPONSE_TYPE_RUN_JAVASCRIPT: runs the javascript specified in the script node within the reponse.

doui_setRequestParameters, RESPONSE_TYPE_SET_REQUEST_PARAMETERS: sets all the current parameters values to the following render request to the current interface.

doui_standardPopup, RESPONSE_TYPE_STANDARD_POPUP: Used interfaces that are within popup windows. This internally is converted to two responses. One doui_refreshParent response followed by one doui_closeWindow response.

doui_standardEmbedded, RESPONSE_TYPE_STANDARD_EMBEDDED: Used in interfaces that are embedded within portal pages. This is equivalent to a doui_setRequestParameters response.

doui_standardCommit, RESPONSE_TYPE_STANDARD_COMMIT: Used in standard add and edit administration interfaces. This response detects whether the current interface is a popup or an embedded interface. If popup, this response is equivalent to a doui_refreshParent response followed by a doui_closeWindow response. If embedded, this response detects where the administration list interface is located and redirects the portal to the page that contains that interface.

doui_setResponseParameters, RESPONSE_TYPE_SET_RESPONSE_PARAMETERS: Sets the specified parameters to the following render request to the current interface.

doui_setRequestAttributes, RESPONSE_TYPE_SET_REQUEST_ATTRIBUTES: Used primarily to share data between different process actions. Sets parameter values in the request attributes. These attributes may be read by subsequent process actions with the same id.

Throws:
PortalException
Since:
4.0.11

processPopupInterfaceResponse

protected void processPopupInterfaceResponse(Node actionResponseNode,
                                             String destInterfaceId)
                                      throws PortalException
Throws:
PortalException

processHyperLinkResponse

protected void processHyperLinkResponse(Node actionResponseNode,
                                        String destInterfaceId)
                                 throws PortalException
Throws:
PortalException

getUrl

protected IServiceInterfaceUrl getUrl(Node actionResponseNode,
                                      String destInterfaceId)
                               throws PortalException
Throws:
PortalException

getServiceInterfaceHyperLink

protected IServiceInterfaceUrl getServiceInterfaceHyperLink(String destInterfaceId)
                                                     throws PortalException
Throws:
PortalException

addResponseParameter

public void addResponseParameter(String name,
                                 String value)
                          throws PortalException
Adds the given name and value to the response parameters.

Parameters:
name -
value -
Throws:
PortalException
Since:
4.0.11

localize

protected String localize(String stringToLocalize)
                   throws PortalException
Localizes the string based on the interface resource.

Parameters:
stringToLocalize -
Returns:
Throws:
PortalException
Since:
4.0.11

getResource

protected IResource getResource()
                         throws PortalException
Returns the interface resource.

Returns:
Throws:
PortalException
Since:
4.0.11

checkServiceInstancePermission

protected boolean checkServiceInstancePermission(String permissionId)
                                          throws PortalException
Returns true if the current user has the given permission.

Parameters:
permissionId -
Returns:
Throws:
PortalException
Since:
4.0.11

checkServiceInstancePermission

protected boolean checkServiceInstancePermission(String userId,
                                                 String permissionId)
                                          throws PortalException
Returns true if the given user has the given permission.

Parameters:
userId -
permissionId -
Returns:
Throws:
PortalException
Since:
4.0.11


Lumisportal  5.5.0.091130 - Copyright © 2001-2007, Lumis. All Rights Reserved.