Package org.javlo.module.content
Class Edit
- java.lang.Object
-
- org.javlo.actions.AbstractModuleAction
-
- org.javlo.module.content.Edit
-
- All Implemented Interfaces:
IAction
,IModuleAction
public class Edit extends AbstractModuleAction
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Edit.ComponentWrapper
-
Field Summary
Fields Modifier and Type Field Description static String
CONTENT_RENDERER
-
Constructor Summary
Constructors Constructor Description Edit()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static boolean
checkPageSecurity(ContentContext ctx)
check is user have all right for modify the current page.static boolean
checkPageSecurity(ContentContext ctx, MenuElement page)
check is user have all right for modify a specific page.String
getActionGroupName()
the group name of the actionAbstractModuleContext
getModuleContext(javax.servlet.http.HttpSession session, Module module)
static String
performAddPage(RequestService requestService, ContentContext ctx, I18nAccess i18nAccess, ContentService content)
static String
performChangeArea(ContentContext ctx, RequestService requestService, EditContext editContext, I18nAccess i18nAccess, MessageRepository messageRepository)
static String
performChangeComponent(GlobalContext globalContext, EditContext editCtx, ContentContext ctx, ComponentContext componentContext, RequestService requestService, I18nAccess i18nAccess, Module currentModule, ContentModuleContext modCtx)
static String
performChangeLanguage(RequestService requestService, ContentContext ctx, GlobalContext globalContext, I18nAccess i18nAccess, MessageRepository messageRepository)
static String
performChangeMode(javax.servlet.http.HttpSession session, RequestService requestService, ContentModuleContext modCtx)
static String
performClearClipboard(ClipBoard clipboard, ContentContext ctx, EditContext editCtx)
static String
performClosepopup(RequestService rs, ContentContext ctx, MessageRepository messageRepository, I18nAccess i18nAccess)
static String
performConfirmReplace(RequestService rs, ContentContext ctx, GlobalContext globalContext, EditContext editCtx, javax.servlet.http.HttpSession session, MessageRepository messageRepository, I18nAccess i18nAccess)
static String
performCopy(RequestService rs, ContentContext ctx, EditContext editCtx, ContentService content, ClipBoard clipBoard, MessageRepository messageRepository, I18nAccess i18nAccess)
static String
performCopyPage(RequestService rs, ContentContext ctx, EditContext editCtx, MessageRepository messageRepository, I18nAccess i18nAccess)
static String
performDelete(ContentContext ctx, javax.servlet.http.HttpServletRequest request, ContentService content, EditContext editContext, javax.servlet.http.HttpServletResponse response, I18nAccess i18nAccess, MessageRepository messageRepository)
static String
performDeletePage(GlobalContext globalContext, ContentService content, ContentContext ctx, I18nAccess i18nAccess)
static String
performDisplayComponentsList(RequestService requestService, UserInterfaceContext userInterfaceContext, Module currentModule)
static String
performDuplicate(RequestService rs, ContentContext ctx, EditContext editCtx, MessageRepository messageRepository, I18nAccess i18nAccess)
static String
performEditpreview(RequestService requestService, ContentContext ctx, ComponentContext componentContext, EditContext editContext, ContentService content, ModulesContext moduleContext, ContentModuleContext modCtx)
static String
performInsert(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, RequestService rs, ContentService contentService, GlobalContext globalContext, javax.servlet.http.HttpSession session, EditContext editContext, ContentContext ctx, ContentService content, Module currentModule, I18nAccess i18nAccess, MessageRepository messageRepository)
static String
performInsertPage(RequestService rs, ContentContext ctx, MessageRepository messageRepository, ContentService content, EditContext editContext, PersistenceService persistenceService, I18nAccess i18nAccess)
static String
performInsertShared(RequestService rs, ContentContext ctx, GlobalContext globalContext, EditContext editContext, ContentService content, SharedContentService sharedContentService, Module currentModule, MessageRepository messageRepository, I18nAccess i18nAccess)
static String
performMoveComponent(RequestService rs, ContentContext ctx, ContentService content, ClipBoard clipboard, Module currentModule, PersistenceService persistenceService, MessageRepository messageRepository, I18nAccess i18nAccess)
static String
performMovePage(RequestService rs, ContentContext ctx, GlobalContext globalContext, ContentService content, I18nAccess i18nAccess, MessageRepository messageRepository)
static String
performMovePageToTrash(RequestService rs, ContentContext ctx, ContentService content, PersistenceService persistenceService, MessageRepository messageRepository, I18nAccess i18nAccess)
static String
performNeedValidation(ContentContext ctx, MenuElement currentPage, I18nAccess i18nAccess)
static String
performPageProperties(javax.servlet.ServletContext application, GlobalContext globalContext, ContentContext ctx, javax.servlet.http.HttpSession session, ContentService content, EditContext editCtx, RequestService requestService, I18nAccess i18nAccess, MessageRepository messageRepository)
static String
performPasteComp(RequestService rs, ContentContext ctx, ContentService content, EditContext editContext, ClipBoard clipboard, Module currentModule, PersistenceService persistenceService, MessageRepository messageRepository, I18nAccess i18nAccess)
static String
performPasteCompAsPage(RequestService rs, ContentContext ctx, ContentService content, EditContext editContext, ClipBoard clipboard, Module currentModule, PersistenceService persistenceService, MessageRepository messageRepository, I18nAccess i18nAccess)
static String
performPastePage(RequestService rs, ContentContext ctx, GlobalContext globalContext, EditContext editCtx, ContentService content, MessageRepository messageRepository, I18nAccess i18nAccess)
static String
performPreviewedit(javax.servlet.http.HttpServletRequest request, RequestService rs, EditContext editCtx)
static String
performPublish(javax.servlet.ServletContext application, javax.servlet.http.HttpServletRequest request, StaticConfig staticConfig, GlobalContext globalContext, ContentService content, ContentContext ctx, I18nAccess i18nAccess)
static String
performRefresh(ContentContext ctx)
static String
performSave(ContentContext ctx, EditContext editContext, GlobalContext globalContext, ContentService content, ComponentContext componentContext, RequestService requestService, I18nAccess i18nAccess, MessageRepository messageRepository, Module currentModule, AdminUserFactory adminUserFactory)
String
performSearch(ContentContext ctx, ModulesContext moduleContext, String query)
method called when a seach in lauched from search form.static String
performUpload(ContentContext ctx, EditContext editContext, GlobalContext globalContext, ContentService content, ComponentContext componentContext, RequestService requestService, I18nAccess i18nAccess, MessageRepository messageRepository, Module currentModule, AdminUserFactory adminUserFactory)
static String
performValidate(ContentContext ctx, MenuElement currentPage)
String
prepare(ContentContext ctx, ModulesContext modulesContext)
method called before module renderingstatic void
updatePreviewCommands(ContentContext ctx, String tab)
update previous command zone.static String
validNodeName(String name, I18nAccess i18nAccess)
verify the validity of a page name.-
Methods inherited from class org.javlo.actions.AbstractModuleAction
haveRight, haveRight, isLightInterface, performChangeRenderer, performWizard
-
-
-
-
Field Detail
-
CONTENT_RENDERER
public static String CONTENT_RENDERER
-
-
Method Detail
-
updatePreviewCommands
public static void updatePreviewCommands(ContentContext ctx, String tab) throws Exception
update previous command zone.- Parameters:
ctx
-data
- .currentModulenewId
- the id of the componentpreviousId
- the id, null for update and previous component for insert.- Throws:
Exception
-
getModuleContext
public AbstractModuleContext getModuleContext(javax.servlet.http.HttpSession session, Module module) throws Exception
- Overrides:
getModuleContext
in classAbstractModuleAction
- Throws:
Exception
-
getActionGroupName
public String getActionGroupName()
Description copied from interface:IAction
the group name of the action- Returns:
- a group name.
-
validNodeName
public static String validNodeName(String name, I18nAccess i18nAccess)
verify the validity of a page name.- Parameters:
name
-i18nAccess
-- Returns:
-
checkPageSecurity
public static boolean checkPageSecurity(ContentContext ctx) throws Exception
check is user have all right for modify the current page.- Parameters:
ctx
- the contentcontext- Returns:
- true if user have all right for modify the current page
- Throws:
Exception
-
checkPageSecurity
public static boolean checkPageSecurity(ContentContext ctx, MenuElement page) throws Exception
check is user have all right for modify a specific page.- Parameters:
ctx
-page
-- Returns:
- true if current user can modfify the page.
- Throws:
Exception
-
prepare
public String prepare(ContentContext ctx, ModulesContext modulesContext) throws Exception
Description copied from interface:IModuleAction
method called before module rendering- Specified by:
prepare
in interfaceIModuleAction
- Overrides:
prepare
in classAbstractModuleAction
- Parameters:
ctx
- the current context.modulesContext
- the context of the module. You can call getCurrentModule for recover the module.- Returns:
- eventually the error message
- Throws:
Exception
-
performSearch
public String performSearch(ContentContext ctx, ModulesContext moduleContext, String query) throws Exception
Description copied from interface:IModuleAction
method called when a seach in lauched from search form.- Specified by:
performSearch
in interfaceIModuleAction
- Overrides:
performSearch
in classAbstractModuleAction
query
- the text entered in the search input field.- Returns:
- eventually the error message
- Throws:
Exception
-
performChangeComponent
public static final String performChangeComponent(GlobalContext globalContext, EditContext editCtx, ContentContext ctx, ComponentContext componentContext, RequestService requestService, I18nAccess i18nAccess, Module currentModule, ContentModuleContext modCtx) throws Exception
- Throws:
Exception
-
performInsert
public static final String performInsert(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, RequestService rs, ContentService contentService, GlobalContext globalContext, javax.servlet.http.HttpSession session, EditContext editContext, ContentContext ctx, ContentService content, Module currentModule, I18nAccess i18nAccess, MessageRepository messageRepository) throws Exception
- Throws:
Exception
-
performDelete
public static final String performDelete(ContentContext ctx, javax.servlet.http.HttpServletRequest request, ContentService content, EditContext editContext, javax.servlet.http.HttpServletResponse response, I18nAccess i18nAccess, MessageRepository messageRepository) throws Exception
- Throws:
Exception
-
performSave
public static final String performSave(ContentContext ctx, EditContext editContext, GlobalContext globalContext, ContentService content, ComponentContext componentContext, RequestService requestService, I18nAccess i18nAccess, MessageRepository messageRepository, Module currentModule, AdminUserFactory adminUserFactory) throws Exception
- Throws:
Exception
-
performUpload
public static final String performUpload(ContentContext ctx, EditContext editContext, GlobalContext globalContext, ContentService content, ComponentContext componentContext, RequestService requestService, I18nAccess i18nAccess, MessageRepository messageRepository, Module currentModule, AdminUserFactory adminUserFactory) throws Exception
- Throws:
Exception
-
performChangeMode
public static final String performChangeMode(javax.servlet.http.HttpSession session, RequestService requestService, ContentModuleContext modCtx)
-
performPageProperties
public static final String performPageProperties(javax.servlet.ServletContext application, GlobalContext globalContext, ContentContext ctx, javax.servlet.http.HttpSession session, ContentService content, EditContext editCtx, RequestService requestService, I18nAccess i18nAccess, MessageRepository messageRepository) throws Exception
- Throws:
Exception
-
performChangeLanguage
public static final String performChangeLanguage(RequestService requestService, ContentContext ctx, GlobalContext globalContext, I18nAccess i18nAccess, MessageRepository messageRepository) throws IOException
- Throws:
IOException
-
performAddPage
public static String performAddPage(RequestService requestService, ContentContext ctx, I18nAccess i18nAccess, ContentService content) throws Exception
- Throws:
Exception
-
performChangeArea
public static final String performChangeArea(ContentContext ctx, RequestService requestService, EditContext editContext, I18nAccess i18nAccess, MessageRepository messageRepository) throws Exception
- Throws:
Exception
-
performNeedValidation
public static String performNeedValidation(ContentContext ctx, MenuElement currentPage, I18nAccess i18nAccess) throws Exception
- Throws:
Exception
-
performValidate
public static String performValidate(ContentContext ctx, MenuElement currentPage) throws Exception
- Throws:
Exception
-
performPublish
public static String performPublish(javax.servlet.ServletContext application, javax.servlet.http.HttpServletRequest request, StaticConfig staticConfig, GlobalContext globalContext, ContentService content, ContentContext ctx, I18nAccess i18nAccess) throws Exception
- Throws:
Exception
-
performDeletePage
public static String performDeletePage(GlobalContext globalContext, ContentService content, ContentContext ctx, I18nAccess i18nAccess) throws Exception
- Throws:
Exception
-
performMovePageToTrash
public static String performMovePageToTrash(RequestService rs, ContentContext ctx, ContentService content, PersistenceService persistenceService, MessageRepository messageRepository, I18nAccess i18nAccess) throws Exception
- Throws:
Exception
-
performPreviewedit
public static final String performPreviewedit(javax.servlet.http.HttpServletRequest request, RequestService rs, EditContext editCtx)
-
performEditpreview
public static String performEditpreview(RequestService requestService, ContentContext ctx, ComponentContext componentContext, EditContext editContext, ContentService content, ModulesContext moduleContext, ContentModuleContext modCtx) throws Exception
- Throws:
Exception
-
performDisplayComponentsList
public static String performDisplayComponentsList(RequestService requestService, UserInterfaceContext userInterfaceContext, Module currentModule) throws ContextException
- Throws:
ContextException
-
performMovePage
public static String performMovePage(RequestService rs, ContentContext ctx, GlobalContext globalContext, ContentService content, I18nAccess i18nAccess, MessageRepository messageRepository) throws Exception
- Throws:
Exception
-
performCopyPage
public static String performCopyPage(RequestService rs, ContentContext ctx, EditContext editCtx, MessageRepository messageRepository, I18nAccess i18nAccess) throws Exception
- Throws:
Exception
-
performDuplicate
public static String performDuplicate(RequestService rs, ContentContext ctx, EditContext editCtx, MessageRepository messageRepository, I18nAccess i18nAccess) throws Exception
- Throws:
Exception
-
performPastePage
public static String performPastePage(RequestService rs, ContentContext ctx, GlobalContext globalContext, EditContext editCtx, ContentService content, MessageRepository messageRepository, I18nAccess i18nAccess) throws Exception
- Throws:
Exception
-
performCopy
public static String performCopy(RequestService rs, ContentContext ctx, EditContext editCtx, ContentService content, ClipBoard clipBoard, MessageRepository messageRepository, I18nAccess i18nAccess) throws Exception
- Throws:
Exception
-
performPasteComp
public static String performPasteComp(RequestService rs, ContentContext ctx, ContentService content, EditContext editContext, ClipBoard clipboard, Module currentModule, PersistenceService persistenceService, MessageRepository messageRepository, I18nAccess i18nAccess) throws Exception
- Throws:
Exception
-
performPasteCompAsPage
public static String performPasteCompAsPage(RequestService rs, ContentContext ctx, ContentService content, EditContext editContext, ClipBoard clipboard, Module currentModule, PersistenceService persistenceService, MessageRepository messageRepository, I18nAccess i18nAccess) throws Exception
- Throws:
Exception
-
performMoveComponent
public static String performMoveComponent(RequestService rs, ContentContext ctx, ContentService content, ClipBoard clipboard, Module currentModule, PersistenceService persistenceService, MessageRepository messageRepository, I18nAccess i18nAccess) throws Exception
- Throws:
Exception
-
performClearClipboard
public static String performClearClipboard(ClipBoard clipboard, ContentContext ctx, EditContext editCtx) throws Exception
- Throws:
Exception
-
performInsertPage
public static String performInsertPage(RequestService rs, ContentContext ctx, MessageRepository messageRepository, ContentService content, EditContext editContext, PersistenceService persistenceService, I18nAccess i18nAccess) throws Exception
- Throws:
Exception
-
performConfirmReplace
public static String performConfirmReplace(RequestService rs, ContentContext ctx, GlobalContext globalContext, EditContext editCtx, javax.servlet.http.HttpSession session, MessageRepository messageRepository, I18nAccess i18nAccess) throws IOException
- Throws:
IOException
-
performInsertShared
public static String performInsertShared(RequestService rs, ContentContext ctx, GlobalContext globalContext, EditContext editContext, ContentService content, SharedContentService sharedContentService, Module currentModule, MessageRepository messageRepository, I18nAccess i18nAccess) throws Exception
- Throws:
Exception
-
performClosepopup
public static String performClosepopup(RequestService rs, ContentContext ctx, MessageRepository messageRepository, I18nAccess i18nAccess)
-
performRefresh
public static String performRefresh(ContentContext ctx) throws Exception
- Throws:
Exception
-
-