Class JcmsFormHandler
- java.lang.Object
-
- com.jalios.jcms.context.JcmsContext
-
- com.jalios.jcms.context.JcmsJspContext
-
- com.jalios.jcms.handler.JcmsFormHandler
-
- All Implemented Interfaces:
JcmsConstants,JaliosConstants
- Direct Known Subclasses:
AbstractAutocompleteHandler,AbstractCaddyHandler,AbstractQueryHandler,AccessTokenManagerHandler,AddJPortalServiceHandler,AdminHandler,AdminSearchEnginesHandler,AlertHandler,ApplicationAppModalHandler,ApplicationDefaultAppHandler,ApplicationDeployHandler,ApplicationLauncherActionsHandler,ApplicationQueryHandler,AssociatedPDFUploadHandler,AsyncShortcutHandler,AuditApplicationLauncherModal,AvoidanceLinkAdminEditHandler,BackgroundProcessHandler,BackOfficeActionHandler,BackOfficeDisplayHandler,CacheManagerHandler,CategoryCleanerHandler,CheckIntegrityHandler,CheckRightsHandler,ClassificationAdminHandler,CompositePropertiesHandler,DBPublicationCategoriesCheckerHandler,DelegateConfirmModalHandler,DemoHandler,DemoModalHandler,DemoModalStepHandler,DeployManagerDownloadHandler,DeployManagerUpgradeHandler,DeployManagerUpgradeUploadHandler,DisplayPluginHandler,EditAlertRuleHandler,EditDataHandler,EditImageHandler,EditMailProviderHandler,EditPluginHandler,ExportCatListHandler,FavoriteWorkspaceHandler,FileProcessorAdminHandler,FriendlyURLsHandler,IconChooserModalHandler,ImportCatListHandler,ImportConflictHandler,ImportManagerHandler,JBlockEditorHandler,JcmsJsonActionHandler,JcmsUploadFormHandler,JPortalDisplayHandler,JPortalEditorHandler,JPortalEditPorletHandler,JPortalEditPortletUIHandler,JPortalHistoryHandler,JSyncManagerHandler,LegacyWitnessFileImportHandler,LoggingSetupHandler,MailEditHandler,MailPasswordHandler,MediaActionsHandler,MediaInfosHandler,MediaTracksHandler,MemberAlertSettingsHandler,MemberListHandler,MemberPhotoGroupModalHandler,MergeCategoryHandler,MergeFileDocumentHandler,ModalPromptHandler,MonitoringChartHandler,PluginDataInfosHandler,PortletDisplayHandler,PortletIndicatorDisplayHandler,PortletWorkflowHandler,ProcessL10nHandler,ProfilerHandler,PropertiesEditorHandler,PropertiesHandler,PubBrowserHandler,PublicationFollowerHandler,PublicDownloadHandler,PublicLinkAppHandler,ReadAckHandler,ReaderTrackerQueryHandler,RecommendApplicationHandler,RecommendationHandler,RecommendationReaderTrackerHandler,ReportHandler,ResetApplicationLauncherModal,ResetPasswordHandler,SendAlertHandler,SidebarHandler,SiteLanguageHandler,StoreAnonymizerHandler,StoreCleanerHandler,SwitchAccessibilityContextHandler,SyncLdapHandler,TemplateInitialisationHandler,TopbarApplicationMenuBadgeHandler,TopbarCaddyMenuHandler,TopbarHandler,TypeEditorHandler,TypeListEditorHandler,UnifiedInsertHandler,UpgradeManagerHandler,VersionHandler,WFEditorHandler,WorkReportHandler,WorkspaceWizardHandler,WysiwygInlineEditionHandler,ZipFilesHandler
public abstract class JcmsFormHandler extends JcmsJspContext implements JcmsConstants
This abstract class is the super class of all the Form Handler classes (i.e. JavaBean classes used in JSP pages for processing form).To implement a custom form handler :
- Add setters to trigger custom operations,
- Add setters for receive optional parameters,
- Implement
processAction()to check for any operation, validate precondition and perform action, - Create a JSP :
- with the handler as a JavaBean
- for which you'll invoke the validate() method
The following example demonstrate uses of a form handler to receive a firstname as an input and when validated display a Hello World message to the user
Java filecom.example.jcmsplugin.hello.HelloWorldHandler.java:package com.example.jcmsplugin.hello; import java.io.IOException; import com.jalios.jcms.HttpUtil; import com.jalios.jcms.context.JcmsMessage; import com.jalios.jcms.context.JcmsMessage.Level; import com.jalios.jcms.handler.JcmsFormHandler; import com.jalios.util.Util; public class HelloWorldHandler extends JcmsFormHandler { // Possible operations private boolean opSayHello = false; private boolean opCancel = false; // Member variables private String firstname = null; @Override public boolean processAction() throws IOException { if (validateSayHello()) { return performSayHello(); } if (validateCancel()) { return performCancel(); } return false; } // --------------------------------------------------------------- // Say Hello // --------------------------------------------------------------- public boolean validateSayHello() { if (!opSayHello) { return false; } if (Util.isEmpty(this.firstname)) { addMsg(new JcmsMessage(Level.WARN, glp("jcmsplugin.myplugin.myhandler.missing-firsname"))); return false; } return true; } public boolean performSayHello() throws IOException { // In I18N properties : // jcmsplugin.myplugin.myhandler.say-hello: Hello {0} ! // addMsgSession(request, new JcmsMessage(Level.INFO, glp("jcmsplugin.myplugin.myhandler.say-hello", HttpUtil.encodeForHTML(firstname)))); return false; } // --------------------------------------------------------------- // Cancel // --------------------------------------------------------------- public boolean validateCancel() { return opCancel; } public boolean performCancel() throws IOException { sendRedirect(Util.notEmpty(redirect) ? redirect : "index.jsp"); return true; } // --------------------------------------------------------------- // Setters // --------------------------------------------------------------- public void setOpSayHello(String opSayHello) { this.opSayHello = true; } public void setOpCancel(String opCancel) { this.opCancel = true; } public String getFirstname() { return this.firstname; } public void setFirstname(String firstname) { this.firstname = firstname; } }JSPsayHello.jsp:<%@ include file='/jcore/doInitPage.jspf' %><% %><jsp:useBean id="formHandler" scope="page" class="com.example.jcmsplugin.hello.HelloWorldHandler"><% %><jsp:setProperty name="formHandler" property="request" value="<%= request %>" /><% %><jsp:setProperty name="formHandler" property="response" value="<%= response %>" /><% %><jsp:setProperty name="formHandler" property="*" /><% %></jsp:useBean><% if (formHandler.validate()) { return; } %><%@ include file='/jcore/doEmptyHeader.jspf' %><% %><%@ include file='/jcore/doMessageBox.jspf' %> <div id='hello'> <form action="sayHello.jsp" name="sayHelloForm" method="post"> <%-- Inputs --%> <jalios:field name="firstname" formHandler="<%= formHandler %>"> <jalios:control /> </jalios:field> <%-- Hidden Inputs --%> <% if (Util.notEmpty(formHandler.getRedirect())) { %> <input type="hidden" name="redirect" value="<%= encodeForHTMLAttribute(formHandler.getRedirect()) %>" /> } <% %> <%-- Buttons --%> <%= WidgetUtil.printHtmlButton("opSayHello", glp("jcmsplugin.btn.sayhello"), true, null, true) %> <%= WidgetUtil.printHtmlButton("opCancel", glp("ui.com.btn.cancel"), true, null, false) %> </form> </div>Data Handlers (handlers inheriting fromEditDataHandler) must perform additionnal operation, see corresponding JavaDoc.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.HashMap<java.lang.String,java.lang.Object>contextMapprotected booleancsrfValidationEnabledBoolean indicating if CSRF validation should be performed (true, which is the default), or not (false).protected java.util.HashSet<java.lang.String>editFieldSetprotected intformStepprotected booleannoRedirectprotected booleannoSendRedirectprotected booleanopprotected booleanopFinishprotected booleanopNextprotected booleanopPreviousprotected booleanpopupEditionprotected java.lang.Stringredirectprotected booleanredirectOnClosePopupprotected booleanworkspaceForced-
Fields inherited from class com.jalios.jcms.context.JcmsJspContext
AJAX_REQUEST_ATTRIBUTES, BODY_HEADER, CSS_FOOTER, CSS_HEADER, cssboMap, cssfoMap, CUSTOM_HEADER, editIcon, HTTPEQUIV_HEADER, httpequivMap, HTTPNAME_HEADER, httpnameMap, initEditIcon, JAVASCRIPT_CODE_SET_ATTRIBUTE, JAVASCRIPT_SET_ATTRIBUTE, jsboSet, jsfoSet, out, pageContext, SHOW_EDIT_ICON, STYLE_HEADER
-
Fields inherited from class com.jalios.jcms.context.JcmsContext
browser, caddy, channel, inFO, initDone, initWorkspace, isAdmin, isAjaxRequest, isDBMember, isDebug, isDebugTemplatePath, isLogged, loggedMember, request, response, userCountry, userLang, userLocale, userZoneId, workspace
-
Fields inherited from interface com.jalios.util.JaliosConstants
CRLF, MILLIS_IN_ONE_DAY, MILLIS_IN_ONE_HOUR, MILLIS_IN_ONE_MINUTE, MILLIS_IN_ONE_MONTH, MILLIS_IN_ONE_SECOND, MILLIS_IN_ONE_WEEK, MILLIS_IN_ONE_YEAR
-
Fields inherited from interface com.jalios.jcms.JcmsConstants
ADATE_SEARCH, ADMIN_NOTES_PROP, ADVANCED_TAB, AJAX_MODE_ATTR, ARCHIVES_DIR, ASCII_WIDTH, CATEGORY_TAB, CDATE_SEARCH, CLASS_PROPERTY, COMMON_ALARM, CONTENT_TAB, COOKIE_MAX_AGE, COUNTRY_SPRITE, CS_TYPOLOGY_ROOT_CAT_VID, CTRL_TOPIC_INTERNAL, CTRL_TOPIC_REF, CTRL_TOPIC_VALUE, CTRL_TOPIC_WRITE, CUSTOM_PROP, DATA_DIRECTORY, DEFAULT_PHOTO_PROP, DOCCHOOSER_HEIGHT, DOCCHOOSER_WIDTH, DOCS_DIR, EDATE_SEARCH, EMAIL_REGEXP, ERROR_MSG, FORBIDDEN_FILE_ACCESS, FORBIDDEN_REDIRECT, FORCE_REDIRECT, GLYPH_ICON_PREFIX, ICON_ARCHIVE, ICON_ICON_PREFIX, ICON_LOCK, ICON_LOCK_STRONG, ICON_PREFIX_PROP, ICON_WARN, ICON_WH_BOOK_CLOSED, ICON_WH_BOOK_OPEN, INFORMATION_MSG, IS_IN_FRONT_OFFICE, JALIOS_JUNIT_PROP, JCMS_CADDY, JCMS_MSG_LIST, JCMS_TOASTR_COLLECTION, JSYNC_DOWNLOAD_DIR, JSYNC_SYNC_ALARM, LANG_SPRITE, LOG_FILE, LOG_TOPIC_SECURITY, LOGGER_PROP, LOGGER_XMLPROP, MBR_PHOTO_DIR, MDATE_SEARCH, MONITOR_XML, OP_CREATE, OP_CREATE_STR, OP_DEEP_COPY, OP_DEEP_COPY_STR, OP_DEEP_DELETE, OP_DEEP_DELETE_STR, OP_DELETE, OP_DELETE_STR, OP_MERGE, OP_MERGE_STR, OP_UPDATE, OP_UPDATE_STR, ORGANIZATION_ROOT_GROUP_PROP, PDATE_SEARCH, PHOTO_DIR, PHOTO_ICON, PHOTO_ICON_HEIGHT, PHOTO_ICON_PROP_PREFIX, PHOTO_ICON_WIDTH, PHOTO_LARGE, PHOTO_LARGE_HEIGHT, PHOTO_LARGE_PROP_PREFIX, PHOTO_LARGE_WIDTH, PHOTO_MINI, PHOTO_MINI_HEIGHT, PHOTO_MINI_PROP_PREFIX, PHOTO_MINI_WIDTH, PHOTO_NORMAL, PHOTO_NORMAL_HEIGHT, PHOTO_NORMAL_PROP_PREFIX, PHOTO_NORMAL_WIDTH, PHOTO_SMALL, PHOTO_SMALL_HEIGHT, PHOTO_SMALL_PROP_PREFIX, PHOTO_SMALL_WIDTH, PHOTO_TINY, PHOTO_TINY_HEIGHT, PHOTO_TINY_PROP_PREFIX, PHOTO_TINY_WIDTH, PREVIOUS_TAB, PRINT_VIEW, PRIVATE_FILE_ACCESS, PUBLIC_FILE_ACCESS, RAW_CONTENT_ICON_PREFIX, READ_RIGHT_TAB, SDATE_SEARCH, SEARCHENGINE_ALARM, SECURITY_LOG_FILE, SESSION_AUTHORIZED_FILENAMES_SET, SPRITE_ICON_PREFIX, STATS_REPORT_DIR, STATUS_PROP, STORE_DIR, STORE_XML, SUCCESS_MSG, SVG_ICON_PREFIX, SVGINLINE_ICON_PREFIX, TEMPLATE_TAB, THUMBNAIL_LARGE_HEIGHT, THUMBNAIL_LARGE_WIDTH, THUMBNAIL_SMALL_HEIGHT, THUMBNAIL_SMALL_WIDTH, TTCARD_MEDIA_HEIGHT, TTCARD_MEDIA_WIDTH, TYPES_ICON_ALT_PROP, TYPES_ICON_SUFFIX_PROP, TYPES_ICON_TITLE_PROP, TYPES_PREFIX_PROP, TYPES_THUMB_SUFFIX_PROP, UDATE_SEARCH, UPDATE_RIGHT_TAB, UPLOAD_DIR, UPLOAD_PERMISSION_COUNT_PROP_PREFIX, UPLOAD_PERMISSION_SIZE_PROP_PREFIX, URL_REGEXP, VID_LOGGED_MEMBER, WARNING_MSG, WEBAPP_PROP, WFEXPRESS_ALARM, WFREMINDER_ALARM, WORKFLOW_TAB, WORKFLOW_XML
-
-
Constructor Summary
Constructors Constructor Description JcmsFormHandler()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected booleanafterValidation(boolean result)protected ControllerStatuscanStartProcess(BackgroundProcess process)protected booleancheckMissingField(java.lang.Object obj, java.lang.String prop)java.lang.StringgetAvailableMainLanguage()BackgroundProcessgetBackgroundProcess()protected java.lang.StringgetClosePopupUrl()protected java.util.HashMap<java.lang.String,java.lang.Object>getControllerContext()Build a controller context.java.util.HashSet<java.lang.String>getEditFieldSet()intgetFormStep()Retrieve the current step of edition when invoking this form handler.intgetFormStepCount()Retrieve the total number of steps used for edition when invoking this form handler.java.lang.StringgetFormStepFinishLabel()java.lang.StringgetFormStepHiddenFields()java.lang.String[]getFormStepLabels(java.lang.String userLang)Returns the label array for the steps.java.lang.StringgetFormStepPrefixProp()java.lang.StringgetHiddenField(java.lang.String name, boolean value)java.lang.StringgetHiddenField(java.lang.String name, boolean[] array)java.lang.StringgetHiddenField(java.lang.String name, double value)java.lang.StringgetHiddenField(java.lang.String name, double[] array)java.lang.StringgetHiddenField(java.lang.String name, int value)java.lang.StringgetHiddenField(java.lang.String name, int[] array)java.lang.StringgetHiddenField(java.lang.String name, long value)java.lang.StringgetHiddenField(java.lang.String name, long[] array)java.lang.StringgetHiddenField(java.lang.String name, Data value)java.lang.StringgetHiddenField(java.lang.String name, Data[] array)java.lang.StringgetHiddenField(java.lang.String name, java.lang.String value)java.lang.StringgetHiddenField(java.lang.String name, java.lang.String[] array)java.lang.StringgetHiddenField(java.lang.String name, java.util.Date value)java.lang.StringgetHiddenField(java.lang.String name, java.util.Date[] array)<T extends Data>
java.lang.StringgetHiddenField(java.lang.String name, java.util.Set<T> set)java.lang.StringgetHiddenFieldML(java.lang.String name, java.util.HashMap<java.lang.String,java.lang.String> map)protected java.lang.StringgetMainLangValue(java.lang.String[] array, boolean trim, boolean escape)protected java.lang.String[]getMainLangValueArray(java.lang.String[] array, boolean trim, boolean escape)Deprecated.protected java.util.HashMap<java.lang.String,java.lang.String>getMLMap(java.lang.String[] array, boolean trim, boolean escape)Deprecated.protected java.util.HashMap<java.lang.String,java.lang.String[]>getMLMapArray(java.lang.String[] array, boolean trim, boolean escape)Deprecated.java.lang.StringgetModalRedirect()Get the redirect value to be used in the modals with modalRedirect.jspf and the request attribute 'modal.redirect'.protected static java.lang.StringgetMonolingualValue(TypeFieldEntry tfe, java.lang.String[] array)Return the first value from the given array, properly sanitized for usage in the specified field.protected static java.lang.String[]getMonolingualValueArray(TypeFieldEntry tfe, java.lang.String[] array)Return the values from the given array, properly sanitized for usage in the specified field.static java.lang.StringgetMultilingualMainValue(TypeFieldEntry tfe, java.lang.String[] array)Return the main value (ie: value of main site language) from the given array, properly sanitized for usage in the specified multilingual field.protected static java.lang.String[]getMultilingualMainValueArray(TypeFieldEntry tfe, java.lang.String[] array)Return the main values (ie: values of main site language) from the given array, properly sanitized for usage in the specified multilingual field.static java.util.HashMap<java.lang.String,java.lang.String>getMultilingualMLMap(TypeFieldEntry tfe, java.lang.String[] array)Return a language map (ISO-639 language code to value) of all values but the value corresponding main site language, extracted from the specified array, and properly sanitized for usage in the specified multilingual field.protected static java.util.HashMap<java.lang.String,java.lang.String[]>getMultilingualMLMapArray(TypeFieldEntry tfe, java.lang.String[] array)Return a language map (ISO-639 language code to values) of all values but the value corresponding main site language, extracted from the specified array, and properly sanitized for usage in the specified multilingual field.java.lang.StringgetRedirect()Get the value of redirect.booleangetRedirectOnClosePopup()Return the value indicating whether the redirect value should be applied to the opener when closing the popup edition.WorkspacegetWorkspace()Retrieve the current Workspace variable for this context either from request if inFO or from session if in back office.protected voidinit()Method to implement if you need to initialize your handler from parameter received, prior to all security validation.booleanisFieldEdition(java.lang.String field)protected booleanisFieldMissing(java.lang.String field)Check if the given parameter is present in the query parametersbooleanisFormStepClickable()Returns true if the form step are clickable.booleanisPartialFieldEdition()Returns true if this is a partial field edition (i.e.booleanisPopupEdition()booleanisWorkspaceForced()protected static java.util.HashMap<java.lang.String,java.util.List<java.lang.String>>mapStringArrayToMapStringList(java.util.Map<java.lang.String,java.lang.String[]> map)Convert a map contaning Array of String, into to a map containg List of String.protected static java.util.HashMap<java.lang.String,java.lang.String[]>mapStringListToMapStringArray(java.util.Map<java.lang.String,java.util.List<java.lang.String>> map)Convert a map contaning List of String, into to a map containg Array of String.protected booleanmustSendForbiddenOnCSRF()Check behavior to apply on CSRF error.protected booleanperformFinish()protected booleanperformNext()protected booleanperformPrevious()booleanprocessAction()Method to be implemented to check/validate action to be performed and process them.protected booleanprocessStatus(ControllerStatus status)Process the ControllerStatus: do nothing if OK, or send on forbidden, or put a warning message in the request.static java.lang.Stringsanitize(TypeFieldEntry tfe, java.lang.String unsafeInput)Sanitize the specified input string for the usage of the specified field.static java.lang.String[]sanitize(TypeFieldEntry tfe, java.lang.String[] unsafeInput)Sanitize the specified input strings for the usage of the specified field.voidsendRedirect(java.lang.String url)Redirect current request to given URL.
OverridesJcmsContext.sendRedirect(String)to use behavior provided bysendRedirect(String, boolean).voidsendRedirect(java.lang.String url, boolean checkRedirect)Set the redirect in the response.voidsetEditField(java.lang.String[] v)voidsetFormStep(int step)Set the current step of edition when invoking this form handler.voidsetNoRedirect(boolean noRedirect)Set the value of noRedirect.voidsetNoSendRedirect(boolean noSendRedirect)Set the value of noSendRedirect.voidsetOpFinish(java.lang.String v)voidsetOpNext(java.lang.String v)voidsetOpPrevious(java.lang.String v)voidsetPopupEdition(boolean v)Set where this form handler is being invoked in a popup.voidsetRedirect(java.lang.String url)Set the value of redirect.voidsetRedirectOnClosePopup(boolean redirectOnClosePopup)Set whether the redirect value should be applied to the opener when closing the popup edition.
The value set by this method will be used only when using popup edition (setPopupEdition(boolean)).voidsetWorkspace(Workspace wspc)voidsetWs(java.lang.String v)booleanshowCancelButton()Check if the "Cancel" button should be displayed in step modal form.booleanshowFinishButton()Check if the "Finish" button should be displayed in step modal form.booleanshowNextButton()Check if the "Next" button should be displayed in step modal form.booleanshowPreviousButton()Check if the "Previous" button should be displayed in step modal form.protected java.util.concurrent.CompletableFuture<java.lang.Void>startProcess(BackgroundProcess process)protected java.lang.StringupdateUploadedField(java.lang.String fieldName, java.lang.String value, boolean isFileDocument, boolean override)Deprecated.protected voidupdateUploadedFields(java.lang.String fieldName, java.lang.String[] values, boolean isFileDocument, boolean override)Deprecated.protected voidupdateUploadedFields(java.lang.String fieldName, java.lang.String[] values, FileUploadOptions options)Perform upload then, replace all values with value MultipartRequest.MULTIPART_UPLOAD with the real File realtive path.booleanvalidate()Method invoked by JSP to validate all conditions (authorization, parameters, ...), and eventualy trigger the action that was requested to the handler.protected booleanvalidateCSRF()protected booleanvalidateFinish()protected booleanvalidateNext()protected booleanvalidatePrevious()-
Methods inherited from class com.jalios.jcms.context.JcmsJspContext
addAvoidanceLink, addBodyAttributes, addCSSHeader, addCSSHeader, addCSSHeader, addCSSHeader, addCustomHeader, addHandlebarTemplate, addHttpEquivHeader, addHttpNameHeader, addJavaScript, addJavaScript, addJavaScript, addJavaScriptCode, addPrefetchHeader, addStyleHeader, addStyleHeader, addWebAssets, checkAccess, checkAccess, checkCSRF, debugDisplayContext, disablePacker, forceEditIcon, forceUpdate, getAjaxRequestAttribute, getAjaxRequestId, getAllHeadersDiffMap, getAllHeadersMap, getAvoidanceLinks, getBackOfficeCSSHeader, getBackOfficeJavaScriptSet, getBodyAttributes, getContentForm, getCSSHeaders, getCtxCategories, getCurrentCategory, getCustomHeaders, getDocType, getFinalCSSFooterMap, getFinalCSSMap, getFinalJavaScriptSet, getFrontOfficeCSSHeader, getFrontOfficeJavaScriptSet, getHandlebarTemplates, getHttpEquivHeaders, getHttpNameHeaders, getJavaScriptCodeSet, getJavaScriptSet, getJSONBridge, getPageContext, getPageTitle, getPageZone, getPortal, getPortalCategory, getPortlet, getPublication, getStyleHeaders, getTemplateUsage, internalSetupEmptyHeader, isEditIcon, isEditIcon, isEditIconForPublish, isEditIconForPublish, isPrintView, registerDisplayContext, removeAjaxRequestAttribute, setAjaxRequestAttribute, setAjaxRequestId, setAllHeadersDiffMap, setDocType, setEditIcon, setPageContext, setPageTitle, setPageZone, setShowEditIcon, setTemplateUsage, showEditIcon, showEditIcon, showEditIcon, workaroundBrowserBaseHrefBug
-
Methods inherited from class com.jalios.jcms.context.JcmsContext
addCookie, addMsg, addMsg, addMsgSession, addMsgSession, addToastr, addToastr, addToastrSession, addToastrSession, applySelector, copyMsgListToMsgSessionList, forceWorkspaceUpdate, getBaseUrl, getBrowser, getCaddy, getContextPath, getErrorMsg, getErrorMsgList, getErrorMsgSession, getErrorMsgSessionList, getInfoMsg, getInfoMsgList, getInfoMsgSession, getInfoMsgSessionList, getLoggedMember, getMsgList, getMsgSessionList, getRequest, getResponse, getSession, getSuccessMsg, getSuccessMsgList, getSuccessMsgSession, getSuccessMsgSessionList, getToastrCollection, getToastrSessionCollection, getUploadedFile, getUploadedFileList, getUploadedFiles, getUploadedFiles, getUrlWithCommonUpdatedParams, getUserCountry, getUserLang, getUserLocale, getUserZoneId, getWarningMsg, getWarningMsgList, getWarningMsgSession, getWarningMsgSessionList, glp, isAdmin, isAdminZone, isAjaxRequest, isDBMember, isDebug, isDebugTemplate, isInFrontOffice, isLogged, isWebdavAccess, isWorkZone, removeMessage, removeMessage, removeMsg, retrieveUploadedFile, select, sendError, sendError, sendForbidden, sendForbidden, sendRedirect, sendRedirect, sendRedirect, setErrorMsg, setErrorMsg, setErrorMsgSession, setErrorMsgSession, setInfoMsg, setInfoMsg, setInfoMsgSession, setInfoMsgSession, setLoggedMember, setRequest, setResponse, setSuccessMsg, setSuccessMsg, setSuccessMsgSession, setSuccessMsgSession, setWarningMsg, setWarningMsg, setWarningMsgSession, setWarningMsgSession, updateWorkspace, validateRegexp, validateSchedule
-
-
-
-
Field Detail
-
redirect
protected java.lang.String redirect
-
noRedirect
protected boolean noRedirect
-
noSendRedirect
protected boolean noSendRedirect
-
redirectOnClosePopup
protected boolean redirectOnClosePopup
-
workspaceForced
protected boolean workspaceForced
-
popupEdition
protected boolean popupEdition
-
editFieldSet
protected java.util.HashSet<java.lang.String> editFieldSet
-
contextMap
protected java.util.HashMap<java.lang.String,java.lang.Object> contextMap
-
formStep
protected int formStep
-
op
protected boolean op
-
opPrevious
protected boolean opPrevious
-
opNext
protected boolean opNext
-
opFinish
protected boolean opFinish
-
csrfValidationEnabled
protected boolean csrfValidationEnabled
Boolean indicating if CSRF validation should be performed (true, which is the default), or not (false).You can disable CSRF validation in your handler by setting this value to false in your own
init()implementation. Warning : changing this behavior IS NOT RECOMMENDED. Use wisely. You can invokevalidateCSRF()manually at another time.- Since:
- jcms-10.0.6 / JCMS-9049 / SEC-199
-
-
Method Detail
-
init
protected void init()
Method to implement if you need to initialize your handler from parameter received, prior to all security validation.You must absolutely not perform any action which modify data or site configuration.
Therefore it is strongly recommend NOT TO implement this method, or use very wisely.
-
validate
public final boolean validate() throws java.io.IOExceptionMethod invoked by JSP to validate all conditions (authorization, parameters, ...), and eventualy trigger the action that was requested to the handler.Override
processAction()if you need to provide custom actions.- Returns:
- true if a redirect was done, false otherwise
- Throws:
java.io.IOException- if error occured during validate- Since:
- jcms-7.1 in JcmsFormHandler (was in EditDataHandler), final since JCMS-6004
-
validateCSRF
protected boolean validateCSRF()
- Returns:
- false if CSRF is enabled and
JcmsJspContext.checkCSRF()failed, true otherwise. - Since:
- jcms-10.0.6
-
mustSendForbiddenOnCSRF
protected boolean mustSendForbiddenOnCSRF()
Check behavior to apply on CSRF error.Default behavior is to send forbidden redirect, this method allows the redirection to be skipped and form to be displayed.
Override with extreme precaution, if you want to display form on CSRF error, make sure user is authorized to access data manipulated.
- Returns:
- true to send forbidden (default), false to display form with current user data. In both case processAction is not invoked.
- Since:
- jcms-10.0.7 / SEC-208
-
afterValidation
protected boolean afterValidation(boolean result) throws java.io.IOException- Throws:
java.io.IOException
-
processAction
public boolean processAction() throws java.io.IOExceptionMethod to be implemented to check/validate action to be performed and process them.Default implementation is to return false. No need to call super method.
This method may NOT be invoked at all if security validation are not met.
You must ensure your handler and JSP can work properly without any code invoked in this method.
- Returns:
- false if no redirection is needed, true otherwise
- Throws:
java.io.IOException- IO Exception
-
getAvailableMainLanguage
public java.lang.String getAvailableMainLanguage()
-
showCancelButton
public boolean showCancelButton()
Check if the "Cancel" button should be displayed in step modal form.The default implementation of this method is to always return true.
You can provide a custom FormHandler to override this behavior.
See jcore/doStepButtons.jspf for use of this method.
- Returns:
- true to display the "Cancel" button, false to hide it
- Since:
- jcms-7.1.2 jcms-7.2 as requested by issue JCMS-3057
-
showNextButton
public boolean showNextButton()
Check if the "Next" button should be displayed in step modal form.The default implementation of this method is to return true unless the finish button is being displayed by method
showFinishButton().You can provide a custom FormHandler to override this behavior.
See jcore/doStepButtons.jspf for use of this method.
- Returns:
- true to display the "Next" button, false to hide it
-
showPreviousButton
public boolean showPreviousButton()
Check if the "Previous" button should be displayed in step modal form.The default implementation of this method is to return true if the current step (as returned by
getFormStep()is higher than 0.You can provide a custom FormHandler to override this behavior.
See jcore/doStepButtons.jspf for use of this method.
- Returns:
- true to display the "Previous" button, false to hide it
-
showFinishButton
public boolean showFinishButton()
Check if the "Finish" button should be displayed in step modal form.The default implementation of this method is to return true if the current step (as returned by
getFormStep()is the last one (as compared withgetFormStepCount().You can provide a custom FormHandler to override this behavior.
See jcore/doStepButtons.jspf for use of this method.
- Returns:
- true to display the "Finish" button, false to hide it
-
getFormStepCount
public int getFormStepCount()
Retrieve the total number of steps used for edition when invoking this form handler.The default implementation of this method is to return 1, corresponding to one step (which means only 1 screen being displayed).
You can provide a custom FormHandler to override this behavior.
See jcore/doSteps.jspf for use of this method.
- Returns:
- the total number of steps in this formhandler
-
isFormStepClickable
public boolean isFormStepClickable()
Returns true if the form step are clickable.- Returns:
- true if the form step are clickable.
- Since:
- jcms-10.0.5
-
getFormStepPrefixProp
public java.lang.String getFormStepPrefixProp()
- Returns:
- the prefix prop for the steps
- Since:
- jcms-9.0.0
-
getFormStepFinishLabel
public java.lang.String getFormStepFinishLabel()
- Returns:
- the label of the Finish button
- Since:
- jcms-9.0.0
-
getFormStepLabels
public java.lang.String[] getFormStepLabels(java.lang.String userLang)
Returns the label array for the steps.- Parameters:
userLang- the language- Returns:
- the label array for the steps.
- Since:
- jcms-9.0.0
-
getFormStepHiddenFields
public java.lang.String getFormStepHiddenFields()
-
getFormStep
public int getFormStep()
Retrieve the current step of edition when invoking this form handler.See jcore/doSteps.jspf for use of this method.
- Returns:
- the current steps in this formhandler (starting at 0 and ending at
)getFormStepCount()- 1
-
setFormStep
public void setFormStep(int step)
Set the current step of edition when invoking this form handler.- Parameters:
step- the current step (0 being the first one andbeing the last one)getFormStepCount()- 1
-
validatePrevious
protected boolean validatePrevious() throws java.io.IOException- Throws:
java.io.IOException
-
performPrevious
protected boolean performPrevious() throws java.io.IOException- Throws:
java.io.IOException
-
validateNext
protected boolean validateNext() throws java.io.IOException- Throws:
java.io.IOException
-
performNext
protected boolean performNext() throws java.io.IOException- Throws:
java.io.IOException
-
validateFinish
protected boolean validateFinish() throws java.io.IOException- Throws:
java.io.IOException
-
performFinish
protected boolean performFinish() throws java.io.IOException- Throws:
java.io.IOException
-
getWorkspace
public Workspace getWorkspace()
Description copied from class:JcmsContextRetrieve the current Workspace variable for this context either from request if inFO or from session if in back office. Fast: this method is cached using initDone (it is recomputed only on forceUpdate() or setRequest()).- Overrides:
getWorkspacein classJcmsContext- Returns:
- the workspace (the one set by doInitPage.jsp)
-
isWorkspaceForced
public boolean isWorkspaceForced()
-
setWorkspace
public void setWorkspace(Workspace wspc)
-
setWs
public void setWs(java.lang.String v)
-
sendRedirect
public void sendRedirect(java.lang.String url, boolean checkRedirect) throws java.io.IOExceptionSet the redirect in the response. If noRedirect has been set, this method set no redirection. If noSendRedirect has been set, put the request attribute "redirect" but do not call response.sendRedirect(). This may be useful when redirecting from a dynamically included JSP in the front-office (some AppServer throw an exception when setting/getting request attribute once the redirect has been put.)- Parameters:
url- the url to redirect to.checkRedirect- if true and if redirect attribute has been set, redirect on this url- Throws:
java.io.IOException- IO Exception- Since:
- jcms-4.0
-
getClosePopupUrl
protected java.lang.String getClosePopupUrl()
-
sendRedirect
public void sendRedirect(java.lang.String url) throws java.io.IOExceptionRedirect current request to given URL.
OverridesJcmsContext.sendRedirect(String)to use behavior provided bysendRedirect(String, boolean).- Overrides:
sendRedirectin classJcmsContext- Parameters:
url- the url to redirect to.- Throws:
java.io.IOException- if an error occured while writing in response headers- Since:
- jcms-4.0
- See Also:
JcmsContext.sendRedirect(String, HttpServletRequest, HttpServletResponse)
-
getRedirect
public java.lang.String getRedirect()
Get the value of redirect.- Returns:
- Value of redirect.
-
setRedirect
public void setRedirect(java.lang.String url)
Set the value of redirect.- Parameters:
url- Value to assign to redirect.
-
getModalRedirect
public java.lang.String getModalRedirect()
Get the redirect value to be used in the modals with modalRedirect.jspf and the request attribute 'modal.redirect'.- Returns:
- redirect value
- Since:
- jcms-9.0.4
-
setNoRedirect
public void setNoRedirect(boolean noRedirect)
Set the value of noRedirect.- Parameters:
noRedirect- Value to assign to noRedirect.- Since:
- jcms-4.0
-
setNoSendRedirect
public void setNoSendRedirect(boolean noSendRedirect)
Set the value of noSendRedirect.- Parameters:
noSendRedirect- Value to assign to noSendRedirect.- Since:
- jcms-4.0
-
setRedirectOnClosePopup
public final void setRedirectOnClosePopup(boolean redirectOnClosePopup)
Set whether the redirect value should be applied to the opener when closing the popup edition.
The value set by this method will be used only when using popup edition (setPopupEdition(boolean)).- Parameters:
redirectOnClosePopup- if true, the redirect value (setRedirect(String)) will be provided to closePopup.jsp to redirect the opener. if false, the popup will simply be closed and the opener refreshed.- Since:
- jcms-5.7
-
getRedirectOnClosePopup
public final boolean getRedirectOnClosePopup()
Return the value indicating whether the redirect value should be applied to the opener when closing the popup edition.- Returns:
- true, when redirect value (
setRedirect(String)) will be provided to closePopup.jsp to redirect the opener. false, if the popup will simply be closed and the opener refreshed. - Since:
- jcms-5.7
-
processStatus
protected boolean processStatus(ControllerStatus status) throws java.io.IOException
Process the ControllerStatus: do nothing if OK, or send on forbidden, or put a warning message in the request.- Parameters:
status- the ControllerStatus to be processed- Returns:
- true when status is OK, false if status was a failure (forbidden or anything else)
- Throws:
java.io.IOException- if an error occurs- Since:
- jcms-5.0.0
-
getControllerContext
protected java.util.HashMap<java.lang.String,java.lang.Object> getControllerContext()
Build a controller context. I.E. add request, response and loggedMember.- Returns:
- the HashMap which contains the context
- Since:
- jcms-5.0.0
-
isFieldMissing
protected boolean isFieldMissing(java.lang.String field)
Check if the given parameter is present in the query parameters- Parameters:
field- the field to be checked- Returns:
- true if this field is present in the query parameters
- Since:
- jcms-5.0.0
-
setPopupEdition
public void setPopupEdition(boolean v)
Set where this form handler is being invoked in a popup.- Parameters:
v- true if handler is invoked in popup, false otherwise- Since:
- jcms-5.0.0
-
isPopupEdition
public boolean isPopupEdition()
- Returns:
- true if this form handler is invoked through a popup
- Since:
- jcms-5.0.0
-
setEditField
public void setEditField(java.lang.String[] v)
- Parameters:
v- a set of field names to edit- Since:
- jcms-5.0.0
-
getEditFieldSet
public java.util.HashSet<java.lang.String> getEditFieldSet()
- Returns:
- a set of field names being edited
- Since:
- jcms-5.0.0
-
isFieldEdition
public boolean isFieldEdition(java.lang.String field)
- Parameters:
field- field name- Returns:
- true if this handler is invoked to edit only some fields of the data
- Since:
- jcms-5.0.0
- See Also:
getEditFieldSet()
-
isPartialFieldEdition
public boolean isPartialFieldEdition()
Returns true if this is a partial field edition (i.e. front edition)- Returns:
- true if this is a partial field edition.
- Since:
- jcms-5.5.0
-
updateUploadedFields
protected void updateUploadedFields(java.lang.String fieldName, java.lang.String[] values, FileUploadOptions options)Perform upload then, replace all values with value MultipartRequest.MULTIPART_UPLOAD with the real File realtive path.- Parameters:
fieldName- the field namevalues- the field fake valuesoptions- upload options- Since:
- jcms-10.0.6 / JCMS-8317
-
updateUploadedField
@Deprecated protected java.lang.String updateUploadedField(java.lang.String fieldName, java.lang.String value, boolean isFileDocument, boolean override)Deprecated.Perform upload then, return value of the real File realtive path. if value is equal to MultipartRequest.MULTIPART_UPLOAD- Parameters:
fieldName- the field namevalue- the field fake valueisFileDocument- is file documentoverride- IGNORED- Returns:
- String
- Since:
- jcms-5.7.0
-
updateUploadedFields
protected void updateUploadedFields(java.lang.String fieldName, java.lang.String[] values, boolean isFileDocument, boolean override)Deprecated.Perform upload then, replace all values with value MultipartRequest.MULTIPART_UPLOAD with the real File realtive path.- Parameters:
fieldName- the field namevalues- the field fake valuesisFileDocument- is file documentoverride- IGNORED- Since:
- jcms-5.7.0
-
getMainLangValue
protected java.lang.String getMainLangValue(java.lang.String[] array, boolean trim, boolean escape)Deprecated.Returns the first value (i.e. the main language value) from the given array (monovalued ML fields).- Parameters:
array- the arraytrim- if true trim the valueescape- if true escape the value- Returns:
- the first value from the array.
- Since:
- jcms-6.0.0
-
getMLMap
protected java.util.HashMap<java.lang.String,java.lang.String> getMLMap(java.lang.String[] array, boolean trim, boolean escape)Deprecated.Returns the ML map (i.e. the additionnal languages) filled with the values contained in the given array (monovalued ML fields).- Parameters:
array- the arraytrim- if true trim the valuesescape- if true escape the values- Returns:
- the ML map filled with the values contained in the given array.
- Since:
- jcms-6.0.0
-
getMainLangValueArray
protected java.lang.String[] getMainLangValueArray(java.lang.String[] array, boolean trim, boolean escape)Deprecated.Returns the first values (i.e. the main language value) from the given array (multivalued ML fields).- Parameters:
array- the arraytrim- if true trim the valuesescape- if true escape the values- Returns:
- the first values from the array (i.e. the main language value) from the given array.
- Since:
- jcms-6.0.0
-
getMLMapArray
protected java.util.HashMap<java.lang.String,java.lang.String[]> getMLMapArray(java.lang.String[] array, boolean trim, boolean escape)Deprecated.Returns the ML map (i.e. the additionnal languages) filled with the values contained in the given array (multivalued ML fields).- Parameters:
array- the arraytrim- if true trim the valuesescape- if true escape the values- Returns:
- the ML map filled with the values contained in the given array.
- Since:
- jcms-6.0.0
-
sanitize
public static final java.lang.String[] sanitize(TypeFieldEntry tfe, java.lang.String[] unsafeInput)
Sanitize the specified input strings for the usage of the specified field.Current implementation is as follow :
- content of wysiwyg fields is always cleaned through
- content of (legacy) wiki fields is either :
- cleaned using
WysiwygManager.cleanHtml(String, Map)if it contains HTML (as detected byJHTMLUtils.isJHTML(TypeFieldEntry, String) - escaped using
JcmsUtil.escapeHtml(String)othewise
- cleaned using
- content any other field are escaped using
JcmsUtil.escapeHtml(String)
- Parameters:
tfe- the TypeFieldEntry of the data field for which input is being read. Set to null when working with field of non generated type.unsafeInput- the unsafe input strings to be sanitized- Returns:
- an array of safe strings
- Since:
- jcms-10.0.0
-
sanitize
public static final java.lang.String sanitize(TypeFieldEntry tfe, java.lang.String unsafeInput)
Sanitize the specified input string for the usage of the specified field.Current implementation is as follow :
- content of wysiwyg fields is always cleaned through
WysiwygManager.cleanHtml(String, Map) - content of (legacy) wiki fields and unknown field (null TypeFieldEntry) is either :
- cleaned using
WysiwygManager.cleanHtml(String, Map)if it contains HTML (as detected byJHTMLUtils.isJHTML(TypeFieldEntry, String) - escaped using
JcmsUtil.escapeHtml(String)othewise
- cleaned using
- content of other fields (with valid TypeFieldEntry) for which HTML has been authorized are left unmodified (not escaped and not cleaned)
- content any other field are escaped using
JcmsUtil.escapeHtml(String)
- Parameters:
tfe- the TypeFieldEntry of the data field for which input is being read. Set to null when working with field of non generated type.unsafeInput- the unsafe input string to be sanitized- Returns:
- a safe string
- Since:
- jcms-10.0.0
- content of wysiwyg fields is always cleaned through
-
getMonolingualValue
protected static java.lang.String getMonolingualValue(TypeFieldEntry tfe, java.lang.String[] array)
Return the first value from the given array, properly sanitized for usage in the specified field.This method must only be used for monolingual and monovalued field.
Example :
TypeFieldEntry myfieldTFE = channel.getTypeFieldEntry(MyType.class, "myfield", true); String myfield; public void setMyMonolingualAndMonovaluedField(String[] input) { myfield = getMonolingualValue(myfieldTFE, input); }- Parameters:
tfe- the TypeFieldEntry of the data field for which input is being read. Set to null when working with field of non generated type.array- the array- Returns:
- the first value from the array, properly sanitized. May return null if specified array was null.
- Since:
- jcms-10.0.0
- See Also:
getMonolingualValueArray(TypeFieldEntry, String[]),getMultilingualMainValue(TypeFieldEntry, String[]),getMultilingualMainValueArray(TypeFieldEntry, String[])
-
getMonolingualValueArray
protected static java.lang.String[] getMonolingualValueArray(TypeFieldEntry tfe, java.lang.String[] array)
Return the values from the given array, properly sanitized for usage in the specified field.Traling empty or null values are removed from array.
This method must only be used for monolingual and monovalued field.
Example :
TypeFieldEntry myfieldTFE = channel.getTypeFieldEntry(MyType.class, "myfield", true); String[] myfield; public void setMyMonolingualAndMultivaluedField(String[] input) { myfield = getMonolingualValueArray(myfieldTFE, input); }- Parameters:
tfe- the TypeFieldEntry of the data field for which input is being read. Set to null when working with field of non generated type.array- the array- Returns:
- the values from the array, properly sanitized. May return null if specified array was null.
- Since:
- jcms-10.0.0
- See Also:
getMonolingualValue(TypeFieldEntry, String[]),getMultilingualMainValue(TypeFieldEntry, String[]),getMultilingualMainValueArray(TypeFieldEntry, String[])
-
getMultilingualMainValue
public static java.lang.String getMultilingualMainValue(TypeFieldEntry tfe, java.lang.String[] array)
Return the main value (ie: value of main site language) from the given array, properly sanitized for usage in the specified multilingual field.This method must only be used for multilingual and monovalued field.
It must be used along with
getMultilingualMLMap(TypeFieldEntry, String[]).Example :
TypeFieldEntry myfieldTFE = channel.getTypeFieldEntry(MyType.class, "myfield", true); String myfield; // main value Map<String,String> myfieldMLMap; // ISO-639 language code to value public void setMyMultilingualAndMonovaluedField(String[] input) { myfield = getMultilingualMainValue(myfieldTFE, input); myfieldMLMap = getMultilingualMLMap(myfieldTFE, input); }- Parameters:
tfe- the TypeFieldEntry of the data field for which input is being read. Set to null when working with field of non generated type.array- the string array input received from the end user- Returns:
- the first value from the array, properly sanitized. May return null if specified array was null.
- Since:
- jcms-10.0.0
- See Also:
getMonolingualValue(TypeFieldEntry, String[]),getMonolingualValueArray(TypeFieldEntry, String[]),getMultilingualMainValueArray(TypeFieldEntry, String[])
-
getMultilingualMLMap
public static java.util.HashMap<java.lang.String,java.lang.String> getMultilingualMLMap(TypeFieldEntry tfe, java.lang.String[] array)
Return a language map (ISO-639 language code to value) of all values but the value corresponding main site language, extracted from the specified array, and properly sanitized for usage in the specified multilingual field.This method must only be used for multilingual and monovalued field.
See complete example in
getMultilingualMainValue(TypeFieldEntry, String[])- Parameters:
tfe- the TypeFieldEntry of the data field for which input is being read. Set to null when working with field of non generated type.array- the string array input received from the end user- Returns:
- a language map (ISO-639 language code to value).
- Since:
- jcms-10.0.0
- See Also:
getMultilingualMainValue(TypeFieldEntry, String[])
-
getMultilingualMainValueArray
protected static java.lang.String[] getMultilingualMainValueArray(TypeFieldEntry tfe, java.lang.String[] array)
Return the main values (ie: values of main site language) from the given array, properly sanitized for usage in the specified multilingual field.This method must only be used for multilingual and multivalued field.
It must be used along with
getMultilingualMLMapArray(TypeFieldEntry, String[]).Example :
TypeFieldEntry myfieldTFE = channel.getTypeFieldEntry(MyType.class, "myfield", true); String[] myfield; // main values Map<String,String[]> myfieldMLMap; // ISO-639 language code to values public void setMyMultilingualAndMultivaluedField(String[] input) { myfield = getMultilingualMainValueArray(myfieldTFE, input); myfieldMLMap = getMultilingualMLMapArray(myfieldTFE, input); }- Parameters:
tfe- the TypeFieldEntry of the data field for which input is being read. Set to null when working with field of non generated type.array- the string array input received from the end user- Returns:
- the main values from the array, properly sanitized.
- Since:
- jcms-10.0.0
- See Also:
getMonolingualValue(TypeFieldEntry, String[]),getMonolingualValueArray(TypeFieldEntry, String[]),getMultilingualMainValue(TypeFieldEntry, String[])
-
getMultilingualMLMapArray
protected static java.util.HashMap<java.lang.String,java.lang.String[]> getMultilingualMLMapArray(TypeFieldEntry tfe, java.lang.String[] array)
Return a language map (ISO-639 language code to values) of all values but the value corresponding main site language, extracted from the specified array, and properly sanitized for usage in the specified multilingual field.This method must only be used for multilingual and monovalued field.
See complete example in
getMultilingualMainValueArray(TypeFieldEntry, String[])- Parameters:
tfe- the TypeFieldEntry of the data field for which input is being read. Set to null when working with field of non generated type.array- the string array input received from the end user- Returns:
- a language map (ISO-639 language code to values).
- Since:
- jcms-10.0.0
- See Also:
getMultilingualMainValueArray(TypeFieldEntry, String[])
-
mapStringArrayToMapStringList
protected static java.util.HashMap<java.lang.String,java.util.List<java.lang.String>> mapStringArrayToMapStringList(java.util.Map<java.lang.String,java.lang.String[]> map)
Convert a map contaning Array of String, into to a map containg List of String.- Parameters:
map- to convert- Returns:
- the converted Map
- Since:
- jcms-10.0.0
-
mapStringListToMapStringArray
protected static java.util.HashMap<java.lang.String,java.lang.String[]> mapStringListToMapStringArray(java.util.Map<java.lang.String,java.util.List<java.lang.String>> map)
Convert a map contaning List of String, into to a map containg Array of String.- Parameters:
map- to convert- Returns:
- the converted Map
- Since:
- jcms-10.0.0
-
getHiddenField
public java.lang.String getHiddenField(java.lang.String name, java.lang.String value)
-
getHiddenFieldML
public java.lang.String getHiddenFieldML(java.lang.String name, java.util.HashMap<java.lang.String,java.lang.String> map)
-
getHiddenField
public java.lang.String getHiddenField(java.lang.String name, Data value)
-
getHiddenField
public java.lang.String getHiddenField(java.lang.String name, boolean value)
-
getHiddenField
public java.lang.String getHiddenField(java.lang.String name, int value)
-
getHiddenField
public java.lang.String getHiddenField(java.lang.String name, double value)
-
getHiddenField
public java.lang.String getHiddenField(java.lang.String name, long value)
-
getHiddenField
public java.lang.String getHiddenField(java.lang.String name, java.util.Date value)
-
getHiddenField
public java.lang.String getHiddenField(java.lang.String name, Data[] array)
-
getHiddenField
public java.lang.String getHiddenField(java.lang.String name, boolean[] array)
-
getHiddenField
public java.lang.String getHiddenField(java.lang.String name, int[] array)
-
getHiddenField
public java.lang.String getHiddenField(java.lang.String name, long[] array)
-
getHiddenField
public java.lang.String getHiddenField(java.lang.String name, double[] array)
-
getHiddenField
public java.lang.String getHiddenField(java.lang.String name, java.lang.String[] array)
-
getHiddenField
public java.lang.String getHiddenField(java.lang.String name, java.util.Date[] array)
-
getHiddenField
public <T extends Data> java.lang.String getHiddenField(java.lang.String name, java.util.Set<T> set)
-
checkMissingField
protected boolean checkMissingField(java.lang.Object obj, java.lang.String prop)
-
setOpPrevious
public void setOpPrevious(java.lang.String v)
-
setOpNext
public void setOpNext(java.lang.String v)
-
setOpFinish
public void setOpFinish(java.lang.String v)
-
canStartProcess
protected ControllerStatus canStartProcess(BackgroundProcess process)
- Parameters:
process- the process to check if loggedMember can start it- Returns:
- true if loggedMember can starts this process
- Since:
- jcms-10.0.8 / JCMS-9179
-
startProcess
protected java.util.concurrent.CompletableFuture<java.lang.Void> startProcess(BackgroundProcess process)
- Parameters:
process- the process to start- Returns:
- a CompletableFuture
- Since:
- jcms-10.0.8 / JCMS-9179
-
getBackgroundProcess
public BackgroundProcess getBackgroundProcess()
- Returns:
- the backgroundProcess in request attribute
- Since:
- jcms-10.0.8 / JCMS-9179
-
-