com.dotmarketing.portal.struts
Class DotPortletAction

java.lang.Object
  extended by org.apache.struts.action.Action
      extended by com.liferay.portal.struts.PortletAction
          extended by com.dotmarketing.portal.struts.DotPortletAction
Direct Known Subclasses:
DirectorAction, EditCampaignAction, EditCategoryAction, EditCommunicationsAction, EditContainerAction, EditContentletAction, EditFieldAction, EditFileAction, EditFolderAction, EditHTMLPageAction, EditLanguageAction, EditLanguageKeysAction, EditLinkAction, EditRelationshipAction, EditReportAction, EditSchedulerAction, EditStructureAction, EditTemplateAction, EditUserAdditionalInfoAction, EditUserCategoriesAction, EditUserCommentAction, EditUserFilterAction, EditUserManagerAction, EditUserPreferenceAction, EditUserProxyAction, EditVirtualLinkAction, EditWorkflowTaskAction, HTMLPageReportAction, ImportContentletsAction, OrderContentletAction, OrderMenuAction, PreviewHTMLPageAction, PublishContainersAction, PublishFilesAction, PublishFolderAction, PublishHTMLPagesAction, PublishLinksAction, PublishTemplatesAction, RunReportAction, UploadMultipleFilesAction, ViewCalendarAction, ViewCampaignsAction, ViewCategoriesAction, ViewCategoryAction, ViewCMSMaintenanceAction, ViewCommunicationsAction, ViewContainersAction, ViewContentletAction, ViewDashboardAction, ViewFilesAction, ViewFormHandlerAction, ViewHostsAction, ViewHTMLPagesAction, ViewHTMLPageViewsAction, ViewLinksAction, ViewRelationshipsAction, ViewReportAction, ViewReportsAction, ViewStructureAction, ViewTemplatesAction, ViewUserClicksAction, ViewUserCommentsAction, ViewUserManagerListAction, ViewWorkflowTasksAction

public class DotPortletAction
extends com.liferay.portal.struts.PortletAction

Author:
Maria

Field Summary
 
Fields inherited from class org.apache.struts.action.Action
defaultLocale, servlet
 
Constructor Summary
DotPortletAction()
           
 
Method Summary
protected  void _checkCopyAndMovePermissions(Inode webAsset, Folder parentFolder, com.liferay.portal.model.User user, javax.servlet.http.HttpServletRequest httpReq, java.lang.String action)
           
protected  void _checkCopyAndMovePermissions(Inode webAsset, com.liferay.portal.model.User user, javax.servlet.http.HttpServletRequest httpReq, java.lang.String action)
           
protected  void _checkDeletePermissions(Inode inode, com.liferay.portal.model.User user, javax.servlet.http.HttpServletRequest httpReq)
           
protected  void _checkDeletePermissions(Inode inode, com.liferay.portal.model.User user, javax.servlet.http.HttpServletRequest httpReq, java.util.ArrayList<java.lang.String> adminRoles)
           
static void _checkPermissions(Inode webAsset, Folder parentFolder, com.liferay.portal.model.User user, javax.servlet.http.HttpServletRequest httpReq)
           
protected  void _checkPermissions(Inode webAsset, com.liferay.portal.model.User user, javax.servlet.http.HttpServletRequest httpReq)
           
protected  void _checkReadPermissions(Inode inode, com.liferay.portal.model.User user, javax.servlet.http.HttpServletRequest httpReq)
           
protected  void _checkReadPermissions(Inode inode, com.liferay.portal.model.User user, javax.servlet.http.HttpServletRequest httpReq, java.util.ArrayList<java.lang.String> adminRoles)
           
protected static void _checkUserPermissions(Inode webAsset, com.liferay.portal.model.User user, int permission)
           
protected  void _checkWritePermissions(Inode inode, com.liferay.portal.model.User user, javax.servlet.http.HttpServletRequest httpReq)
           
protected  void _checkWritePermissions(Inode inode, com.liferay.portal.model.User user, javax.servlet.http.HttpServletRequest httpReq, java.util.ArrayList<java.lang.String> adminRoles)
           
protected  void _copyPermissions(Inode from, Inode to)
           
 void _deleteVersionWebAsset(javax.portlet.ActionRequest req, javax.portlet.ActionResponse res, javax.portlet.PortletConfig config, org.apache.struts.action.ActionForm form, com.liferay.portal.model.User user, java.lang.String webKeyEdit)
          Generic method to delete a WebAsset version
 void _deleteWebAsset(javax.portlet.ActionRequest req, javax.portlet.ActionResponse res, javax.portlet.PortletConfig config, org.apache.struts.action.ActionForm form, com.liferay.portal.model.User user, java.lang.String webKeyEdit)
          Generic method to delete a WebAsset
protected  Folder _editWebAsset(javax.portlet.ActionRequest req, javax.portlet.ActionResponse res, javax.portlet.PortletConfig config, org.apache.struts.action.ActionForm form, com.liferay.portal.model.User user, java.lang.String webKey)
          Generic Edit WebAsset method.
protected  com.liferay.portal.model.User _getUser(javax.portlet.ActionRequest req)
          Method to obtain the User from Liferay on an ActionRequest
protected  com.liferay.portal.model.User _getUser(javax.portlet.RenderRequest req)
          Method to obtain the User from Liferay on a RenderRequest
protected  WebAsset _getVersionBackWebAsset(javax.portlet.ActionRequest req, javax.portlet.ActionResponse res, javax.portlet.PortletConfig config, org.apache.struts.action.ActionForm form, com.liferay.portal.model.User user, java.lang.Class className, java.lang.String webKey)
          Generic method to get a version back from an asset.
 void _getVersionsWebAsset(javax.portlet.ActionRequest req, javax.portlet.ActionResponse res, javax.portlet.PortletConfig config, org.apache.struts.action.ActionForm form, com.liferay.portal.model.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, javax.portlet.ActionRequest req)
          Method to handle an exception.
protected  void _handleException(java.lang.Exception e, javax.portlet.ActionRequest req, boolean showStackTrace)
          Method to handle an exception.
protected  org.apache.struts.action.ActionForward _handleException(java.lang.Exception e, javax.portlet.RenderRequest req, org.apache.struts.action.ActionMapping mapping)
          Method to handle an exception.
 void _moveWebAsset(javax.portlet.ActionRequest req, javax.portlet.ActionResponse res, javax.portlet.PortletConfig config, org.apache.struts.action.ActionForm form, com.liferay.portal.model.User user, java.lang.Class webAssetClass, java.lang.String webKey)
          Generic method to move a WebAsset to another Folder
 void _publishWebAsset(javax.portlet.ActionRequest req, javax.portlet.ActionResponse res, javax.portlet.PortletConfig config, org.apache.struts.action.ActionForm form, com.liferay.portal.model.User user, java.lang.String formWebKey)
          Generic method to publish a WebAsset
 void _retrieveWebAsset(javax.portlet.ActionRequest req, javax.portlet.ActionResponse res, javax.portlet.PortletConfig config, org.apache.struts.action.ActionForm form, com.liferay.portal.model.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(javax.portlet.ActionRequest req, javax.portlet.ActionResponse res, java.lang.String referer)
          Method to redirect to the referer if set, if not to the redirect.
 void _undeleteWebAsset(javax.portlet.ActionRequest req, javax.portlet.ActionResponse res, javax.portlet.PortletConfig config, org.apache.struts.action.ActionForm form, com.liferay.portal.model.User user, java.lang.String webKeyEdit)
          Generic method to undelete a WebAsset
 void _unLockWebAsset(javax.portlet.ActionRequest req, javax.portlet.ActionResponse res, javax.portlet.PortletConfig config, org.apache.struts.action.ActionForm form, com.liferay.portal.model.User user, java.lang.String webKey)
          Generic Method to unlock a WebAsset
 void _unPublishWebAsset(javax.portlet.ActionRequest req, javax.portlet.ActionResponse res, javax.portlet.PortletConfig config, org.apache.struts.action.ActionForm form, com.liferay.portal.model.User user, java.lang.String webKeyEdit)
          Generic method to unpublish a WebAsset
protected  void _viewWebAssets(javax.portlet.RenderRequest req, com.liferay.portal.model.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, java.lang.String hostChangedWebKey)
          Generic method for View Assets Actions.
protected  void _viewWebAssets(javax.portlet.RenderRequest req, com.liferay.portal.model.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, java.lang.String hostChangedWebKey, java.lang.String parent)
           
 CategoryAPI getCategoryAPI()
           
 java.lang.String getForward(javax.portlet.ActionRequest req)
           
 java.lang.String getForward(javax.portlet.ActionRequest req, java.lang.String defaultValue)
           
 void setCategoryAPI(CategoryAPI categoryAPI)
           
 
Methods inherited from class com.liferay.portal.struts.PortletAction
execute, getForward, getForward, getResources, getResources, getResources, getResources, processAction, render, setForward
 
Methods inherited from class org.apache.struts.action.Action
addErrors, addMessages, execute, generateToken, getDataSource, getDataSource, getErrors, getLocale, getMessages, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, resetToken, saveErrors, saveErrors, saveMessages, saveMessages, saveToken, setLocale, setServlet
 
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(javax.portlet.ActionRequest req,
                                   javax.portlet.ActionResponse res,
                                   javax.portlet.PortletConfig config,
                                   org.apache.struts.action.ActionForm form,
                                   com.liferay.portal.model.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(javax.portlet.ActionRequest req,
                              javax.portlet.ActionResponse res,
                              javax.portlet.PortletConfig config,
                              org.apache.struts.action.ActionForm form,
                              com.liferay.portal.model.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(javax.portlet.ActionRequest req,
                            javax.portlet.ActionResponse res,
                            javax.portlet.PortletConfig config,
                            org.apache.struts.action.ActionForm form,
                            com.liferay.portal.model.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(javax.portlet.ActionRequest req,
                               javax.portlet.ActionResponse res,
                               javax.portlet.PortletConfig config,
                               org.apache.struts.action.ActionForm form,
                               com.liferay.portal.model.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(javax.portlet.ActionRequest req,
                                 javax.portlet.ActionResponse res,
                                 javax.portlet.PortletConfig config,
                                 org.apache.struts.action.ActionForm form,
                                 com.liferay.portal.model.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(javax.portlet.ActionRequest req,
                            javax.portlet.ActionResponse res,
                            javax.portlet.PortletConfig config,
                            org.apache.struts.action.ActionForm form,
                            com.liferay.portal.model.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(javax.portlet.ActionRequest req,
                          javax.portlet.ActionResponse res,
                          javax.portlet.PortletConfig config,
                          org.apache.struts.action.ActionForm form,
                          com.liferay.portal.model.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(javax.portlet.ActionRequest req,
                             javax.portlet.ActionResponse res,
                             javax.portlet.PortletConfig config,
                             org.apache.struts.action.ActionForm form,
                             com.liferay.portal.model.User user,
                             java.lang.String formWebKey)
                      throws WebAssetException,
                             java.lang.Exception
Generic method to publish a WebAsset

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

_retrieveWebAsset

public void _retrieveWebAsset(javax.portlet.ActionRequest req,
                              javax.portlet.ActionResponse res,
                              javax.portlet.PortletConfig config,
                              org.apache.struts.action.ActionForm form,
                              com.liferay.portal.model.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(javax.portlet.ActionRequest req,
                               javax.portlet.ActionResponse res,
                               javax.portlet.PortletConfig config,
                               org.apache.struts.action.ActionForm form,
                               com.liferay.portal.model.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(javax.portlet.ActionRequest req,
                                           javax.portlet.ActionResponse res,
                                           javax.portlet.PortletConfig config,
                                           org.apache.struts.action.ActionForm form,
                                           com.liferay.portal.model.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(javax.portlet.RenderRequest req,
                              com.liferay.portal.model.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,
                              java.lang.String hostChangedWebKey)
                       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

_viewWebAssets

protected void _viewWebAssets(javax.portlet.RenderRequest req,
                              com.liferay.portal.model.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,
                              java.lang.String hostChangedWebKey,
                              java.lang.String parent)
                       throws java.lang.Exception
Throws:
java.lang.Exception

_handleException

protected void _handleException(java.lang.Exception e,
                                javax.portlet.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,
                                javax.portlet.ActionRequest req,
                                boolean showStackTrace)
Method to handle an exception. Rollbacks the transaction and forwards to an error page.

Parameters:
e -
req -

_handleException

protected org.apache.struts.action.ActionForward _handleException(java.lang.Exception e,
                                                                  javax.portlet.RenderRequest req,
                                                                  org.apache.struts.action.ActionMapping mapping)
Method to handle an exception. Rollbacks the transaction and forwards to an error page.

Parameters:
e -
req -

_sendToReferral

protected void _sendToReferral(javax.portlet.ActionRequest req,
                               javax.portlet.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 com.liferay.portal.model.User _getUser(javax.portlet.ActionRequest req)
Method to obtain the User from Liferay on an ActionRequest

Parameters:
req -
Returns:

_getUser

protected com.liferay.portal.model.User _getUser(javax.portlet.RenderRequest req)
Method to obtain the User from Liferay on a RenderRequest

Parameters:
req -
Returns:

getForward

public java.lang.String getForward(javax.portlet.ActionRequest req)

getForward

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

_checkUserPermissions

protected static void _checkUserPermissions(Inode webAsset,
                                            com.liferay.portal.model.User user,
                                            int permission)
                                     throws com.liferay.portal.struts.ActionException,
                                            DotDataException
Throws:
com.liferay.portal.struts.ActionException
DotDataException

_checkPermissions

public static void _checkPermissions(Inode webAsset,
                                     Folder parentFolder,
                                     com.liferay.portal.model.User user,
                                     javax.servlet.http.HttpServletRequest httpReq)
                              throws java.lang.Exception
Throws:
java.lang.Exception

_checkPermissions

protected void _checkPermissions(Inode webAsset,
                                 com.liferay.portal.model.User user,
                                 javax.servlet.http.HttpServletRequest httpReq)
                          throws java.lang.Exception
Throws:
java.lang.Exception

_checkWritePermissions

protected void _checkWritePermissions(Inode inode,
                                      com.liferay.portal.model.User user,
                                      javax.servlet.http.HttpServletRequest httpReq)
                               throws java.lang.Exception
Throws:
java.lang.Exception

_checkWritePermissions

protected void _checkWritePermissions(Inode inode,
                                      com.liferay.portal.model.User user,
                                      javax.servlet.http.HttpServletRequest httpReq,
                                      java.util.ArrayList<java.lang.String> adminRoles)
                               throws java.lang.Exception
Throws:
java.lang.Exception

_checkReadPermissions

protected void _checkReadPermissions(Inode inode,
                                     com.liferay.portal.model.User user,
                                     javax.servlet.http.HttpServletRequest httpReq)
                              throws java.lang.Exception
Throws:
java.lang.Exception

_checkReadPermissions

protected void _checkReadPermissions(Inode inode,
                                     com.liferay.portal.model.User user,
                                     javax.servlet.http.HttpServletRequest httpReq,
                                     java.util.ArrayList<java.lang.String> adminRoles)
                              throws java.lang.Exception
Throws:
java.lang.Exception

_checkDeletePermissions

protected void _checkDeletePermissions(Inode inode,
                                       com.liferay.portal.model.User user,
                                       javax.servlet.http.HttpServletRequest httpReq)
                                throws java.lang.Exception
Throws:
java.lang.Exception

_checkDeletePermissions

protected void _checkDeletePermissions(Inode inode,
                                       com.liferay.portal.model.User user,
                                       javax.servlet.http.HttpServletRequest httpReq,
                                       java.util.ArrayList<java.lang.String> adminRoles)
                                throws java.lang.Exception
Throws:
java.lang.Exception

_checkCopyAndMovePermissions

protected void _checkCopyAndMovePermissions(Inode webAsset,
                                            Folder parentFolder,
                                            com.liferay.portal.model.User user,
                                            javax.servlet.http.HttpServletRequest httpReq,
                                            java.lang.String action)
                                     throws java.lang.Exception
Throws:
java.lang.Exception

_checkCopyAndMovePermissions

protected void _checkCopyAndMovePermissions(Inode webAsset,
                                            com.liferay.portal.model.User user,
                                            javax.servlet.http.HttpServletRequest httpReq,
                                            java.lang.String action)
                                     throws java.lang.Exception
Throws:
java.lang.Exception

_copyPermissions

protected void _copyPermissions(Inode from,
                                Inode to)
                         throws com.liferay.portal.struts.ActionException,
                                DotDataException
Throws:
com.liferay.portal.struts.ActionException
DotDataException

getCategoryAPI

public CategoryAPI getCategoryAPI()

setCategoryAPI

public void setCategoryAPI(CategoryAPI categoryAPI)


Copyright © 2013 dotCMS Inc. All Rights Reserved.