Class AddWidgetToHolderAction
- java.lang.Object
-
- lumis.service.pagepersonalization.widgetmanipulationaction.AddWidgetToHolderAction
-
- All Implemented Interfaces:
WidgetManipulationAction
public class AddWidgetToHolderAction extends Object
AnAbstractWidgetManipulationAction
implementation for adding user widgets. Requires the following parameters:- ii: The widget interface instance identifier.
- hi: The holder service interface instance identifier.
- p: The position (zero based) in which the widget has been moved into the destination holder.
- Since:
- 6.0.0
- Version:
- $Revision: 20509 $ $Date: 2017-09-11 16:18:14 -0300 (Mon, 11 Sep 2017) $
-
-
Constructor Summary
Constructors Constructor Description AddWidgetToHolderAction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
checkManageHolderPermission(String serviceInstanceId)
Checks if the current session has permission to manage the widgets holder.protected void
checkPersonalizePagePermission(String serviceInstanceId)
Checks if the current session has permission to personalize a widget holder for itself.String
doAction(HttpServletRequest request, IPortalMode portalMode, ITransaction transaction)
Performs necessary widget manipulation.
-
-
-
Method Detail
-
checkManageHolderPermission
protected void checkManageHolderPermission(String serviceInstanceId) throws PortalException
Checks if the current session has permission to manage the widgets holder.- Parameters:
serviceInstanceId
- the holder's service instance identifier.- Throws:
AccessDeniedException
- if the session does not has the permission.PortalException
- Since:
- 6.0.0
-
checkPersonalizePagePermission
protected void checkPersonalizePagePermission(String serviceInstanceId) throws PortalException
Checks if the current session has permission to personalize a widget holder for itself.- Parameters:
serviceInstanceId
- the holder's service instance identifier.- Throws:
AccessDeniedException
- if the session does not has the permission.PortalException
- Since:
- 6.0.0
-
doAction
public String doAction(HttpServletRequest request, IPortalMode portalMode, ITransaction transaction) throws PortalException
Description copied from interface:WidgetManipulationAction
Performs necessary widget manipulation. Must return aHTTP status code
to indicate if it was succeeded or not. It is not responsible of implementing classes torollback
orclose
the transaction. If the return code is different fromHttpServletResponse.SC_OK
, the caller will do therollback
automatically.- Specified by:
doAction
in interfaceWidgetManipulationAction
- Parameters:
request
- the HTTP servlet request.portalMode
- the current portal mode.transaction
- the transaction to be used.- Returns:
- the json result as a string.
- Throws:
PortalException
-
-