com.dotmarketing.portal.struts
Class DotPortletAction

java.lang.Object
  extended by PortletAction
      extended by com.dotmarketing.portal.struts.DotPortletAction
Direct Known Subclasses:
AddRegistrationAction, DirectorAction, EditBannerAction, EditCampaignAction, EditCategoryAction, EditCommunicationsAction, EditContainerAction, EditContentletAction, EditDiscountCodeAction, EditEntityAction, EditEventAction, EditEventAction, EditEventAction, EditEventLocationAction, EditFacilityAction, EditFieldAction, EditFileAction, EditFolderAction, EditFormatAction, EditHostAction, EditHTMLPageAction, EditJobAction, EditLanguageAction, EditLanguageManagerAction, EditLinkAction, EditMailingListAction, EditOrderAction, EditOrganizationAction, EditPriceAction, EditProductAction, EditRecuranceAction, EditRegistrationAction, EditRelationshipAction, EditResumeAction, EditSearchFirmAction, EditStructureAction, EditSubscriberAction, EditTemplateAction, EditUserAdditionalInfoAction, EditUserCategoriesAction, EditUserCommentAction, EditUserManagerAction, EditUserPreferenceAction, EditUserProxyAction, EditVirtualLinkAction, EditWorkflowTaskAction, HTMLPageReportAction, ImportContentletsAction, LoadTreeAction, OrderMenuAction, PreviewHTMLPageAction, PublishContainersAction, PublishContentletsAction, PublishFilesAction, PublishFolderAction, PublishHTMLPagesAction, PublishLinksAction, PublishTemplatesAction, RegisterUserAction, RelateProductAction, UploadMultipleFilesAction, ViewCampaignsAction, ViewCategoryAction, ViewCheckOutAction, ViewCmsMaintenanceAction, ViewCommunicationsAction, ViewContainersAction, ViewContentletAction, ViewDiscountCodeAction, ViewEventsAction, ViewEventsAction, ViewFacilitiesAction, ViewFilesAction, ViewFolderThumbNailsAction, ViewHTMLPagesAction, ViewHTMLPageViewsAction, ViewLinksAction, ViewMailingListAction, ViewOrganizationsAction, ViewProductsAction, ViewRelationshipsAction, ViewReportAction, ViewStructureAction, ViewTemplatesAction, ViewUserClicksAction, ViewUserCommentsAction, ViewUserManagerListAction, ViewUsersAction, ViewWorkflowTasksAction

public class DotPortletAction
extends PortletAction

Author:
Maria

Constructor Summary
DotPortletAction()
           
 
Method Summary
 void _applyPermissions(ActionRequest req, Inode inode)
           
 void _applyPermissions(ActionRequest req, java.lang.String webKey)
           
protected  void _checkCopyAndMovePermissions(Inode webAsset, Folder parentFolder, User user, HttpServletRequest httpReq, java.lang.String action)
           
protected  void _checkCopyAndMovePermissions(Inode webAsset, User user, HttpServletRequest httpReq, java.lang.String action)
           
protected  void _checkDeletePermissions(Structure structure, User user, HttpServletRequest httpReq)
           
protected  void _checkPermissions(Inode webAsset, Folder parentFolder, User user, HttpServletRequest httpReq)
           
protected  void _checkPermissions(Inode webAsset, User user, HttpServletRequest httpReq)
           
protected  void _checkUserPermissions(Inode webAsset, User user, int permission)
           
protected  void _checkWritePermissions(Inode inode, User user, HttpServletRequest httpReq)
           
protected  void _copyPermissions(Inode from, Inode to)
           
 void _deleteVersionWebAsset(ActionRequest req, ActionResponse res, PortletConfig config, ActionForm form, User user, java.lang.String webKeyEdit)
          Generic method to delete a WebAsset version
 void _deleteWebAsset(ActionRequest req, ActionResponse res, PortletConfig config, ActionForm form, User user, java.lang.String webKeyEdit)
          Generic method to delete a WebAsset
protected  Folder _editWebAsset(ActionRequest req, ActionResponse res, PortletConfig config, ActionForm form, User user, java.lang.String webKey)
          Generic Edit WebAsset method.
protected  User _getUser(ActionRequest req)
          Method to obtain the User from Liferay on an ActionRequest
protected  WebAsset _getVersionBackWebAsset(ActionRequest req, ActionResponse res, PortletConfig config, ActionForm form, User user, java.lang.Class className, java.lang.String webKey)
          Generic method to get a version back from an asset.
 void _getVersionsWebAsset(ActionRequest req, ActionResponse res, PortletConfig config, ActionForm form, User user, java.lang.String webKeyEdit, java.lang.String webKeyVersions)
          Generic Method to Get Versions of a WebAsset
protected  void _handleException(java.lang.Exception e, ActionRequest req)
          Method to handle an exception.
protected  void _handleException(java.lang.Exception e, ActionRequest req, boolean showStackTrace)
          Method to handle an exception.
 void _lockWebAsset(ActionRequest req, ActionResponse res, PortletConfig config, ActionForm form, User user, java.lang.String webKey)
           
 void _moveWebAsset(ActionRequest req, ActionResponse res, PortletConfig config, ActionForm form, User user, java.lang.Class webAssetClass, java.lang.String webKey)
          Generic method to move a WebAsset to another Folder
 void _publishWebAsset(ActionRequest req, ActionResponse res, PortletConfig config, ActionForm form, User user, java.lang.String formWebKey)
          Generic method to publish a WebAsset
 void _retrieveWebAsset(ActionRequest req, ActionResponse res, PortletConfig config, ActionForm form, User user, java.lang.Class myClass, java.lang.String webkey)
          Generic method to retrieve a WebAsset based on the inode on the request
protected  void _sendToReferral(ActionRequest req, ActionResponse res, java.lang.String referer)
          Method to redirect to the referer if set, if not to the redirect.
 void _undeleteWebAsset(ActionRequest req, ActionResponse res, PortletConfig config, ActionForm form, User user, java.lang.String webKeyEdit)
          Generic method to undelete a WebAsset
 void _unLockWebAsset(ActionRequest req, ActionResponse res, PortletConfig config, ActionForm form, User user, java.lang.String webKey)
          Generic Method to unlock a WebAsset
 void _unPublishWebAsset(ActionRequest req, ActionResponse res, PortletConfig config, ActionForm form, User user, java.lang.String webKeyEdit)
          Generic method to unpublish a WebAsset
protected  void _viewWebAssets(RenderRequest req, User user, java.lang.Class className, java.lang.String tableName, java.lang.String countWebKey, java.lang.String viewWebKey, java.lang.String queryWebKey, java.lang.String showDeletedWebKey)
          Generic method for View Assets Actions.
 java.lang.String getForward(ActionRequest req)
           
 java.lang.String getForward(ActionRequest req, java.lang.String defaultValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DotPortletAction

public DotPortletAction()
Method Detail

_deleteVersionWebAsset

public void _deleteVersionWebAsset(ActionRequest req,
                                   ActionResponse res,
                                   PortletConfig config,
                                   ActionForm form,
                                   User user,
                                   java.lang.String webKeyEdit)
                            throws java.lang.Exception
Generic method to delete a WebAsset version

Parameters:
req -
res -
config -
form -
user -
webKeyEdit -
Throws:
java.lang.Exception

_undeleteWebAsset

public void _undeleteWebAsset(ActionRequest req,
                              ActionResponse res,
                              PortletConfig config,
                              ActionForm form,
                              User user,
                              java.lang.String webKeyEdit)
                       throws java.lang.Exception
Generic method to undelete a WebAsset

Parameters:
req -
res -
config -
form -
user -
webKeyEdit -
Throws:
java.lang.Exception

_deleteWebAsset

public void _deleteWebAsset(ActionRequest req,
                            ActionResponse res,
                            PortletConfig config,
                            ActionForm form,
                            User user,
                            java.lang.String webKeyEdit)
                     throws java.lang.Exception
Generic method to delete a WebAsset

Parameters:
req -
res -
config -
form -
user -
webKeyEdit -
Throws:
java.lang.Exception

_unPublishWebAsset

public void _unPublishWebAsset(ActionRequest req,
                               ActionResponse res,
                               PortletConfig config,
                               ActionForm form,
                               User user,
                               java.lang.String webKeyEdit)
                        throws java.lang.Exception
Generic method to unpublish a WebAsset

Parameters:
req -
res -
config -
form -
user -
webKeyEdit -
Throws:
java.lang.Exception

_getVersionsWebAsset

public void _getVersionsWebAsset(ActionRequest req,
                                 ActionResponse res,
                                 PortletConfig config,
                                 ActionForm form,
                                 User user,
                                 java.lang.String webKeyEdit,
                                 java.lang.String webKeyVersions)
                          throws java.lang.Exception
Generic Method to Get Versions of a WebAsset

Parameters:
req -
res -
config -
form -
user -
webKeyEdit -
webKeyVersions -
Throws:
java.lang.Exception

_unLockWebAsset

public void _unLockWebAsset(ActionRequest req,
                            ActionResponse res,
                            PortletConfig config,
                            ActionForm form,
                            User user,
                            java.lang.String webKey)
                     throws java.lang.Exception
Generic Method to unlock a WebAsset

Parameters:
req -
res -
config -
form -
user -
webKey -
Throws:
java.lang.Exception

_moveWebAsset

public void _moveWebAsset(ActionRequest req,
                          ActionResponse res,
                          PortletConfig config,
                          ActionForm form,
                          User user,
                          java.lang.Class webAssetClass,
                          java.lang.String webKey)
                   throws java.lang.Exception
Generic method to move a WebAsset to another Folder

Parameters:
req -
res -
config -
form -
user -
webAssetClass -
webKey -
Throws:
java.lang.Exception

_publishWebAsset

public void _publishWebAsset(ActionRequest req,
                             ActionResponse res,
                             PortletConfig config,
                             ActionForm form,
                             User user,
                             java.lang.String formWebKey)
                      throws java.lang.Exception
Generic method to publish a WebAsset

Parameters:
req -
res -
config -
form -
user -
formWebKey -
Throws:
java.lang.Exception

_retrieveWebAsset

public void _retrieveWebAsset(ActionRequest req,
                              ActionResponse res,
                              PortletConfig config,
                              ActionForm form,
                              User user,
                              java.lang.Class myClass,
                              java.lang.String webkey)
                       throws java.lang.Exception
Generic method to retrieve a WebAsset based on the inode on the request

Parameters:
req -
res -
config -
form -
user -
myClass -
webkey -
Throws:
java.lang.Exception

_editWebAsset

protected Folder _editWebAsset(ActionRequest req,
                               ActionResponse res,
                               PortletConfig config,
                               ActionForm form,
                               User user,
                               java.lang.String webKey)
                        throws java.lang.Exception
Generic Edit WebAsset method. Still needs to be implemented on the class, so it's still part of the interface

Parameters:
req -
res -
config -
form -
user -
webKey -
Returns:
Folder: parent Folder for this WebAsset if the webasset is a contentlet, a container or a template it returns a void (inode = 0) folder.
Throws:
java.lang.Exception

_getVersionBackWebAsset

protected WebAsset _getVersionBackWebAsset(ActionRequest req,
                                           ActionResponse res,
                                           PortletConfig config,
                                           ActionForm form,
                                           User user,
                                           java.lang.Class className,
                                           java.lang.String webKey)
                                    throws java.lang.Exception
Generic method to get a version back from an asset. Needs to be implemented on each class for the relations between assets Set in the webKey the new version created with the working information.

Parameters:
req -
res -
config -
form -
user -
className -
webKey -
Returns:
The new working asset
Throws:
java.lang.Exception

_viewWebAssets

protected void _viewWebAssets(RenderRequest req,
                              User user,
                              java.lang.Class className,
                              java.lang.String tableName,
                              java.lang.String countWebKey,
                              java.lang.String viewWebKey,
                              java.lang.String queryWebKey,
                              java.lang.String showDeletedWebKey)
                       throws java.lang.Exception
Generic method for View Assets Actions.

Parameters:
req -
user -
className: - Asset Class
tableName: - Table Name
countWebKey: - WebKey to store the Count
viewWebKey: - WebKey to store the Listings
Throws:
java.lang.Exception

_handleException

protected void _handleException(java.lang.Exception e,
                                ActionRequest req)
Method to handle an exception. Rollbacks the transaction and forwards to an error page.

Parameters:
e -
req -

_handleException

protected void _handleException(java.lang.Exception e,
                                ActionRequest req,
                                boolean showStackTrace)
Method to handle an exception. Rollbacks the transaction and forwards to an error page.

Parameters:
e -
req -

_sendToReferral

protected void _sendToReferral(ActionRequest req,
                               ActionResponse res,
                               java.lang.String referer)
                        throws java.lang.Exception
Method to redirect to the referer if set, if not to the redirect. Closes the transaction before redirecting.

Parameters:
req -
res -
referer -
Throws:
java.lang.Exception

_getUser

protected User _getUser(ActionRequest req)
Method to obtain the User from Liferay on an ActionRequest

Parameters:
req -
Returns:

getForward

public java.lang.String getForward(ActionRequest req)

getForward

public java.lang.String getForward(ActionRequest req,
                                   java.lang.String defaultValue)

_lockWebAsset

public void _lockWebAsset(ActionRequest req,
                          ActionResponse res,
                          PortletConfig config,
                          ActionForm form,
                          User user,
                          java.lang.String webKey)
                   throws java.lang.Exception
Throws:
java.lang.Exception

_applyPermissions

public void _applyPermissions(ActionRequest req,
                              java.lang.String webKey)

_applyPermissions

public void _applyPermissions(ActionRequest req,
                              Inode inode)

_checkUserPermissions

protected void _checkUserPermissions(Inode webAsset,
                                     User user,
                                     int permission)
                              throws ActionException
Throws:
ActionException

_checkPermissions

protected void _checkPermissions(Inode webAsset,
                                 Folder parentFolder,
                                 User user,
                                 HttpServletRequest httpReq)
                          throws java.lang.Exception
Throws:
java.lang.Exception

_checkPermissions

protected void _checkPermissions(Inode webAsset,
                                 User user,
                                 HttpServletRequest httpReq)
                          throws java.lang.Exception
Throws:
java.lang.Exception

_checkWritePermissions

protected void _checkWritePermissions(Inode inode,
                                      User user,
                                      HttpServletRequest httpReq)
                               throws java.lang.Exception
Throws:
java.lang.Exception

_checkDeletePermissions

protected void _checkDeletePermissions(Structure structure,
                                       User user,
                                       HttpServletRequest httpReq)
                                throws java.lang.Exception
Throws:
java.lang.Exception

_checkCopyAndMovePermissions

protected void _checkCopyAndMovePermissions(Inode webAsset,
                                            Folder parentFolder,
                                            User user,
                                            HttpServletRequest httpReq,
                                            java.lang.String action)
                                     throws java.lang.Exception
Throws:
java.lang.Exception

_checkCopyAndMovePermissions

protected void _checkCopyAndMovePermissions(Inode webAsset,
                                            User user,
                                            HttpServletRequest httpReq,
                                            java.lang.String action)
                                     throws java.lang.Exception
Throws:
java.lang.Exception

_copyPermissions

protected void _copyPermissions(Inode from,
                                Inode to)
                         throws ActionException
Throws:
ActionException


Copyright © 2006 Dotmarketing, Inc. All Rights Reserved.