Package com.jalios.jcms.handler
Class EditDataHandler
java.lang.Object
com.jalios.jcms.context.JcmsContext
com.jalios.jcms.context.JcmsJspContext
com.jalios.jcms.handler.JcmsFormHandler
com.jalios.jcms.handler.EditDataHandler
- All Implemented Interfaces:
JcmsConstants,JaliosConstants
- Direct Known Subclasses:
AbstractEditWorkspaceHandler,AttachPublicationHandler,AttachWorkspaceHandler,EditAccessTokenHandler,EditAclHandler,EditCatHandler,EditDataIdHandler,EditExtraDataHandler,EditGroupHandler,EditMemberHandler,EditNotificationCriteriaHandler,EditNotificationHandler,EditPublicationHandler,EditPublicLinkHandler,EditThemeHandler,EditWorkflowInstanceHandler,EditWSTypeEntryHandler,ImportCategoriesHandler,ImportThemeModalHandler,MemberCsvImportHandler
This class is the super class of all FormHandler which manage
stored data.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanFields inherited from class com.jalios.jcms.handler.JcmsFormHandler
contextMap, csrfValidationEnabled, editFieldSet, formStep, noRedirect, noSendRedirect, op, openTabId, opFinish, opNext, opPrevious, popupEdition, redirect, redirectOnClosePopup, workspaceForcedFields 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_MODULE_SET_ATTRIBUTE, JAVASCRIPT_SET_ATTRIBUTE, jsboSet, jsfoSet, out, pageContext, SHOW_EDIT_ICON, STYLE_HEADERFields 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, workspaceFields 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_YEARFields inherited from interface com.jalios.jcms.JcmsConstants
ADATE_SEARCH, 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, GENERATIONAL_STORE_DIRECTORY, 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, PHOTO_XLARGE, PHOTO_XLARGE_HEIGHT, PHOTO_XLARGE_PROP_PREFIX, PHOTO_XLARGE_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_XML, SUCCESS_MSG, SVG_ICON_PREFIX, SVGINLINE_ICON_PREFIX, SVGSPRITE_ICON_PREFIX, TEMPLATE_TAB, THEME_DIR, 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, TYPES_UNKNOWN_CLASS_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 -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanafterValidation(boolean result) protected booleancreateUploadedFileDocument(Data[] datas, Member author, Workspace ws) Performs create on given array of data if it is a FileDocument that have just been uploaded.protected booleancreateUploadedFileDocument(Data[] datas, Map dataML, Member author, Workspace ws) Performs create on given array of data if it is a FileDocument that have just been uploaded.protected booleancreateUploadedFileDocument(Data data, Member author, Workspace ws) Performs create on given data if it is a FileDocument that have just been uploaded.protected booleancreateUploadedFileDocument(Data data, Map dataML, Member author, Workspace ws) Performs create on given array of data if it is a FileDocument that have just been uploaded.Generic method to get available ML field for a given data in a given language.Data[]Generic method to get available ML field for a given array of data in a given language.Returns a Map of available extra data.Returns a Map of available extra db data.getAvailableField(String field) Get value of the given field calling getAvailable{field}().Build a controller context.static StringgetDeleteRedirect(Data data, Locale userLocale) Get the redirect value to be used by default in the ctx menus for delete action.getEnumLabels(String field, String userLang) Get enum values of the given field calling clazz.get{field}Labels().getEnumValues(String field) Get enum values of the given field calling clazz.get{field}Values().getId()Get the redirect value to be used in the modals with modalRedirect.jspf and the request attribute 'modal.redirect'.intgetTabGroupMaxCount(String tabGroupName) Returns the max value of the given tab group from the fields defining this tab group.protected voidbooleanisExtraDataHidden(String prop) Determines whether the specified extra data field must be rendered as hidden in the current form context.booleanReturns true if this is the first access to this form (no previous submission).booleanbooleanbooleanMethod to be implemented to check/validate action to be performed and process them.protected DataprocessDataId(String fieldName, String dataId, Class<? extends Data> clazz) Computes given dataid, trim and retrieve associated data.processDataIds(String fieldName, String[] ids, Class<T> clazz) Computes link array to retrieve Data of the given Class.processDataIds(String fieldName, String[] ids, Class<T> clazz, boolean trim) Computes link array to retrieve Data of the given Class.processMLData(String fieldName, Class clazz, String[] values, Map mlMap) Process the given ML values (data ids)processMLDataArray(String fieldName, Class<T> clazz, String[] values, Map mlMap) Process the given ML values (data ids)protected booleanrestValidation(boolean result) protected voidvoidsetExtraDBKeys(String[] extraDBKeys) Convenient methods to update ExtraDBDataMap from beanvoidsetExtraDBValues(String[] extraDBValues) Convenient methods to update ExtraDBDataMap from beanvoidsetExtraKeys(String[] extraKeys) Convenient methods to update ExtraDataMap from beanvoidsetExtraValues(String[] extraValues) Convenient methods to update ExtraDataMap from beanvoidSet the common (Data) fields.voidvoidvoidvoidvoidvoidvoidbooleanbooleanprotected booleanvalidateUploadedFileDocument(Data[] datas, Member author, Workspace ws) Performs validate on given array of data if it is a FileDocument that have just been uploaded.protected booleanvalidateUploadedFileDocument(Data[] datas, Map dataML, Member author, Workspace ws) Performs create on given data if it is a FileDocument that have just been uploaded.protected booleanvalidateUploadedFileDocument(Data data, Member author, Workspace ws) Performs create on given data if it is a FileDocument that have just been uploaded.protected booleanvalidateUploadedFileDocument(Data data, Map dataML, Member author, Workspace ws) Performs create on given data if it is a FileDocument that have just been uploaded.Methods inherited from class com.jalios.jcms.handler.JcmsFormHandler
canStartProcess, checkMissingField, getAvailableMainLanguage, getBackgroundProcess, getClosePopupUrl, getEditFieldSet, getFormStep, getFormStepCount, getFormStepFinishLabel, getFormStepHiddenFields, getFormStepLabels, getFormStepPrefixProp, getHiddenField, getHiddenField, getHiddenField, getHiddenField, getHiddenField, getHiddenField, getHiddenField, getHiddenField, getHiddenField, getHiddenField, getHiddenField, getHiddenField, getHiddenField, getHiddenField, getHiddenField, getHiddenField, getHiddenFieldML, getMainLangValue, getMainLangValueArray, getMLMap, getMLMapArray, getMonolingualValue, getMonolingualValueArray, getMultilingualMainValue, getMultilingualMainValueArray, getMultilingualMLMap, getMultilingualMLMapArray, getOpenTabId, getRedirect, getRedirectOnClosePopup, getWorkspace, init, isFieldEdition, isFieldMissing, isFormStepClickable, isPartialFieldEdition, isPopupEdition, isWorkspaceForced, mapStringArrayToMapStringList, mapStringListToMapStringArray, mustSendForbiddenOnCSRF, performFinish, performNext, performPrevious, processStatus, sanitize, sanitize, sendRedirect, sendRedirect, setEditField, setFormStep, setNoRedirect, setNoSendRedirect, setOpenTabId, setOpFinish, setOpNext, setOpPrevious, setPopupEdition, setRedirect, setRedirectOnClosePopup, setWorkspace, setWs, showCancelButton, showFinishButton, showNextButton, showPreviousButton, startProcess, updateUploadedFields, validate, validateCSRF, validateFinish, validateNext, validatePreviousMethods inherited from class com.jalios.jcms.context.JcmsJspContext
addAvoidanceLink, addBodyAttributes, addCSSHeader, addCSSHeader, addCSSHeader, addCSSHeader, addCustomHeader, addHandlebarTemplate, addHttpEquivHeader, addHttpNameHeader, addJavaScript, addJavaScript, addJavaScript, addJavaScriptCode, addJavaScriptModule, addPrefetchHeader, addStyleHeader, addStyleHeader, addSvgSpriteIcon, addWebAssets, canAccessAdminArea, checkAccess, checkAccess, checkCSRF, debugDisplayContext, disablePacker, forceEditIcon, forceUpdate, getAjaxRequestAttribute, getAjaxRequestId, getAllHeadersDiffMap, getAllHeadersMap, getAvoidanceLinks, getBackOfficeCSSHeader, getBackOfficeJavaScriptSet, getBodyAttributes, getContentForm, getCSSHeaders, getCtxCategories, getCurrentCategory, getCustomHeaders, getDocType, getFinalCSSFooterMap, getFinalCSSMap, getFinalJavaScriptModuleSet, getFinalJavaScriptSet, getFrontOfficeCSSHeader, getFrontOfficeJavaScriptSet, getHandlebarTemplates, getHttpEquivHeaders, getHttpNameHeaders, getJavaScriptCodeSet, getJavaScriptModuleSet, getJavaScriptSet, getPageContext, getPageTitle, getPageZone, getPortal, getPortalCategory, getPortlet, getPublication, getStyleHeaders, getSvgSprites, getSvgSpritesHtml, getTemplateUsage, internalSetupEmptyHeader, isEditIcon, isEditIcon, isEditIconForPublish, isEditIconForPublish, isPrintView, registerDisplayContext, removeAjaxRequestAttribute, setAjaxRequestAttribute, setAjaxRequestId, setAllHeadersDiffMap, setDocType, setEditIcon, setPageContext, setPageTitle, setPageZone, setShowEditIcon, setTemplateUsage, showEditIcon, showEditIcon, showEditIconMethods inherited from class com.jalios.jcms.context.JcmsContext
addMsg, addMsg, addMsgSession, addMsgSession, addToastr, addToastr, addToastrSession, addToastrSession, applySelector, canAccessAdminArea, 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, getUploadedFiles, getUploadedFiles, getUrlWithCommonUpdatedParams, getUserCountry, getUserLang, getUserLocale, getUserZoneId, getWarningMsg, getWarningMsgList, getWarningMsgSession, getWarningMsgSessionList, glp, isAdmin, isAdminZone, isAjaxRequest, isDBMember, isDebug, isDebugTemplate, isInFrontOffice, isLogged, isWorkZone, removeMessage, removeMessage, removeMsg, 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 Details
-
opCreate
protected boolean opCreate -
resultOpCreate
protected boolean resultOpCreate -
opUpdate
protected boolean opUpdate -
resultOpUpdate
protected boolean resultOpUpdate -
opDelete
protected boolean opDelete -
resultOpDelete
protected boolean resultOpDelete -
opCancel
protected boolean opCancel -
opRefresh
protected boolean opRefresh -
id
-
isDeleteForced
protected boolean isDeleteForced
-
-
Constructor Details
-
EditDataHandler
public EditDataHandler()
-
-
Method Details
-
sendRedirect
- Throws:
IOException
-
afterValidation
- Overrides:
afterValidationin classJcmsFormHandler- Throws:
IOException
-
processAction
Description copied from class:JcmsFormHandlerMethod 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.
- Overrides:
processActionin classJcmsFormHandler- Returns:
- false if no redirection is needed, true otherwise
- Throws:
IOException- IO Exception
-
getControllerContext
Description copied from class:JcmsFormHandlerBuild a controller context. I.E. add request, response and loggedMember.- Overrides:
getControllerContextin classJcmsFormHandler- Returns:
- the HashMap which contains the context
-
setFields
Set the common (Data) fields. This method is also a hook for sub-classed to fill some field (or do anything else) before a create or an update.- Parameters:
data- the publication to set the fields- Since:
- jcms-5.7.1
-
getDataClass
-
getAvailableField
Get value of the given field calling getAvailable{field}(). Called by widgets and meta templates See alsogetEnumValues(String)andgetEnumLabels(String, String)- Parameters:
field- the field name- Returns:
- Object return by getAvailable
- Since:
- jcms-9.0.0
-
getTabGroupMaxCount
Returns the max value of the given tab group from the fields defining this tab group.- Parameters:
tabGroupName- Tab group defined in the type- Returns:
- tab group count
-
getEnumValues
Get enum values of the given field calling clazz.get{field}Values(). Called by widgets and meta templates- Parameters:
field- the field name- Returns:
- Object return by getAvailable
- Since:
- jcms-9.0.0
-
getEnumLabels
Get enum values of the given field calling clazz.get{field}Labels(). Called by widgets and meta templates- Parameters:
field- the field nameuserLang- the userLang- Returns:
- Object return by getAvailable
- Since:
- jcms-9.0.0
-
validateCancel
public boolean validateCancel() -
performCancel
- Throws:
IOException
-
validateRefresh
public boolean validateRefresh() -
performRefresh
- Throws:
IOException
-
setOpCreate
-
setOpUpdate
-
setOpDelete
-
setOpCancel
-
setOpRefresh
-
getId
-
setId
-
setForceDelete
-
setExtraKeys
Convenient methods to update ExtraDataMap from bean- Parameters:
extraKeys- the extraKey- Since:
- jcms-5.7.1
-
setExtraValues
Convenient methods to update ExtraDataMap from bean- Parameters:
extraValues- the extraValues- Since:
- jcms-5.7.1
-
getAvailableExtraDataMap
Returns a Map of available extra data. A mix between:- Default extra data
- Previous extra data
- Submited extra data
- Returns:
- Map of extra data
-
isExtraDataHidden
Determines whether the specified extra data field must be rendered as hidden in the current form context.The hiding mechanism is context-aware and is enabled only if the current request defines the attribute
"extraData.ui-prefix". This prefix identifies the active UI context (JSP, handler, or form) and is used to resolve the corresponding configuration property.The extra data is considered hidden when the following property evaluates to
true:<ui-prefix>.<extraDataProperty>.hidden
Example:
- The member front-office edit form sets the request attribute
"extraData.ui-prefix"to"fo-member-edit". - A plugin defining the extra data
"extradb.Member.jcmsplugin.sampleplugin.matricule"can hide it in this context by declaring:fo-member-edit.extradb.Member.jcmsplugin.sampleplugin.matricule.hidden: true
- Parameters:
prop- the extra data property name (e.g."extradb.Member.jcmsplugin.sampleplugin.matricule")- Returns:
trueif the extra data must be included in the form as a hidden field,falseif it should be displayed to the user- Since:
- 11.0.0 (JCMS-11693)
- The member front-office edit form sets the request attribute
-
setExtraDBKeys
Convenient methods to update ExtraDBDataMap from bean- Parameters:
extraDBKeys- the extraDBKey- Since:
- jcms-6.0
-
setExtraDBValues
Convenient methods to update ExtraDBDataMap from bean- Parameters:
extraDBValues- the extraDBValues- Since:
- jcms-6.0
-
getAvailableExtraDBDataMap
Returns a Map of available extra db data. A mix between:- Default extra db data
- Previous extra db data
- Submited extra db data
- Returns:
- Map of extra db data
- Since:
- jcms-6.0
-
processDataIds
Computes link array to retrieve Data of the given Class. Trim end of the returned List. If link array contains value MultipartRequest.MULTIPART_UPLOAD then instanciate a new FileDocument but do NOT perform create. Handler.validate() should perform Create or Update. Underlaying files are never overrided.- Type Parameters:
T- The data type- Parameters:
fieldName- the field nameids- arrays of idsclazz- the class of links- Returns:
- List a list of Data
- Since:
- jcms-5.7.0
-
processDataIds
protected <T extends Data> List<T> processDataIds(String fieldName, String[] ids, Class<T> clazz, boolean trim) Computes link array to retrieve Data of the given Class. optionaly, trims the end of the returned List. If link array contains value MultipartRequest.MULTIPART_UPLOAD then instanciate a new FileDocument but do NOT perform create. Handler.validate() should perform Create or Update. Underlaying files are never overrided.- Type Parameters:
T- The data type- Parameters:
fieldName- the field nameids- arrays of idsclazz- the class of linkstrim- if true, trim the end of the returned list.- Returns:
- List a list of Data
- Since:
- jcms-6.0.0
-
processDataId
Computes given dataid, trim and retrieve associated data. If link contains value MultipartRequest.MULTIPART_UPLOAD then instanciate a new FileDocument but do NOT perform create. Handler.validate() should perform Create or Update. Underlaying files are never overrided. Check the data match the given class.- Parameters:
fieldName- The field namedataId- the id of the dataclazz- the class of the data- Returns:
- Data the updated data
- Since:
- jcms-5.7.0
-
validateUploadedFileDocument
Performs create on given data if it is a FileDocument that have just been uploaded. This method should be called byEditPublicationHandler#validateBeforeOp()- Parameters:
data- the data to work withauthor- the author of the dataws- the workspace of the data- Returns:
- true if ControllerStatus is ok
- Since:
- jcms-5.7.0
- See Also:
-
validateUploadedFileDocument
Performs create on given data if it is a FileDocument that have just been uploaded. This method should be called byEditPublicationHandler#validateBeforeOp()- Parameters:
data- the data to work withdataML- the other languagesauthor- the author of the dataws- the workspace of the data- Returns:
- true if ControllerStatus is ok
- Since:
- jcms-6.1.3
- See Also:
-
validateUploadedFileDocument
Performs validate on given array of data if it is a FileDocument that have just been uploaded. This method should be called byEditPublicationHandler#validateBeforeOp()- Parameters:
datas- an array of data to work withauthor- the author of the dataws- the workspace of the data- Returns:
- true if ControllerStatus is ok
- Since:
- jcms-5.7.0
- See Also:
-
validateUploadedFileDocument
protected boolean validateUploadedFileDocument(Data[] datas, Map dataML, Member author, Workspace ws) Performs create on given data if it is a FileDocument that have just been uploaded. This method should be called byEditPublicationHandler#validateBeforeOp()- Parameters:
datas- an array of data to work withdataML- the other languagesauthor- the author of the dataws- the workspace of the data- Returns:
- true if ControllerStatus is ok
- Since:
- jcms-6.1.3
- See Also:
-
createUploadedFileDocument
Performs create on given data if it is a FileDocument that have just been uploaded. This method should be called byEditPublicationHandler#validateBeforeOp()- Parameters:
data- the data to work withauthor- the author of the dataws- the workspace of the data- Returns:
- true if ControllerStatus is ok
- Since:
- jcms-5.7.0
- See Also:
-
createUploadedFileDocument
Performs create on given array of data if it is a FileDocument that have just been uploaded. This method should be called byEditPublicationHandler#validateBeforeOp()- Parameters:
data- the data to work with (main languagedataML- the other languagesauthor- the author of the dataws- the workspace of the data- Returns:
- true if ControllerStatus is ok
- Since:
- jcms-6.1.3
- See Also:
-
createUploadedFileDocument
Performs create on given array of data if it is a FileDocument that have just been uploaded. This method should be called byEditPublicationHandler#validateBeforeOp()- Parameters:
datas- an array of data to work withauthor- the author of the dataws- the workspace of the data- Returns:
- true if ControllerStatus is ok
- Since:
- jcms-6.1.2
- See Also:
-
createUploadedFileDocument
Performs create on given array of data if it is a FileDocument that have just been uploaded. This method should be called byEditPublicationHandler#validateBeforeOp()- Parameters:
datas- an array of data to work withdataML- the other languagesauthor- the author of the dataws- the workspace of the data- Returns:
- true if ControllerStatus is ok
- Since:
- jcms-6.1.3
- See Also:
-
processMLData
Process the given ML values (data ids)- Parameters:
fieldName- the field nameclazz- the classvalues- the idsmlMap- the mlMap- Returns:
- the data in the main language
- Since:
- jcms-5.7.0
-
processMLDataArray
public <T extends Data> Data[] processMLDataArray(String fieldName, Class<T> clazz, String[] values, Map mlMap) Process the given ML values (data ids)- Type Parameters:
T- The data type- Parameters:
fieldName- the field nameclazz- the classvalues- the idsmlMap- the mlMap- Returns:
- the data array in the main language
- Since:
- jcms-5.7.0
-
getAvailableData
Generic method to get available ML field for a given data in a given language.- Parameters:
data- the object (eg a Publication)dataField- the current value of the field (may be null)field- the proposed value for this fieldmlMap- the ML maplang- the langugage value- Returns:
- the value for the field of the object in the given language
- Since:
- jcms-5.7.0
-
getAvailableDataArray
public Data[] getAvailableDataArray(Data data, Data[] dataField, Data[] field, Map mlMap, String lang) Generic method to get available ML field for a given array of data in a given language.- Parameters:
data- the object (eg a Publication)dataField- the current value of the field (may be null)field- the proposed value for this fieldmlMap- the ML maplang- the langugage value- Returns:
- the value for the field of the object in the given language
- Since:
- jcms-5.7.0
-
isFirstAccess
public boolean isFirstAccess()Returns true if this is the first access to this form (no previous submission).- Returns:
- true if this is the first access to this form (no previous submission).
- Since:
- jcms-5.7.0
-
handleRestResponse
- Throws:
IOException
-
restValidation
- Throws:
IOException
-
getModalRedirect
Description copied from class:JcmsFormHandlerGet the redirect value to be used in the modals with modalRedirect.jspf and the request attribute 'modal.redirect'.- Overrides:
getModalRedirectin classJcmsFormHandler- Returns:
- redirect value
-
getDeleteRedirect
Get the redirect value to be used by default in the ctx menus for delete action.Returns publication workspace home url if data is a Publication, else returns null.
- Parameters:
data- the data to be deleteduserLocale- the user context- Returns:
- redirect value
- Since:
- jcms-10.0.6
-