com.jalios.jcms.handler
Class EditDataHandler

java.lang.Object
  extended by com.jalios.jcms.context.JcmsContext
      extended by com.jalios.jcms.context.JcmsJspContext
          extended by com.jalios.jcms.handler.JcmsFormHandler
              extended by com.jalios.jcms.handler.EditDataHandler
All Implemented Interfaces:
JcmsConstants, JaliosConstants
Direct Known Subclasses:
AbstractEditWorkspaceHandler, EditAclHandler, EditCatHandler, EditExtraDataHandler, EditGroupHandler, EditMemberHandler, EditNotificationHandler, EditPublicationHandler, EditTypeExtensionHandler, EditWSTypeEntryHandler

public abstract class EditDataHandler
extends JcmsFormHandler

This class is the super class of all FormHandler which manage stored data.

Version:
$Revision: 28427 $
See Also:
Data

Field Summary
protected  EditTypeExtensionHandler extFormHandler
           
protected  int formStep
           
protected  String id
           
protected  boolean isDeleteForced
           
protected  boolean op
           
protected  boolean opCancel
           
protected  boolean opCreate
           
protected  boolean opDelete
           
protected  boolean opFinish
           
protected  boolean opNext
           
protected  boolean opPrevious
           
protected  boolean opRefresh
           
protected  boolean opUpdate
           
protected  boolean resultOpCreate
           
protected  boolean resultOpDelete
           
protected  boolean resultOpUpdate
           
static String REVISION
           
 
Fields inherited from class com.jalios.jcms.handler.JcmsFormHandler
contextMap, editFieldSet, noRedirect, noSendRedirect, popupEdition, redirect, redirectOnClosePopup, workspaceForced
 
Fields inherited from class com.jalios.jcms.context.JcmsJspContext
AJAX_REQUEST_ATTRIBUTES, BODY_HEADER, CSS_HEADER, cssboMap, cssfoMap, CUSTOM_HEADER, editIcon, HTTPEQUIV_HEADER, httpequivMap, HTTPNAME_HEADER, httpnameMap, initEditIcon, JAVASCRIPT_CODE_SET_ATTRIBUTE, JAVASCRIPT_SET_ATTRIBUTE, JS_HEADER, jsboMap, jsboSet, jsfoMap, 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, isLogged, loggedMember, request, response, userLang, userLocale, workspace
 
Fields inherited from interface com.jalios.jcms.JcmsConstants
ADATE_SEARCH, ADMIN_NOTES_PROP, ADVANCED_TAB, ARCHIVES_DIR, ASCII_WIDTH, CATEGORY_TAB, CDATE_SEARCH, COMMON_ALARM, CONTENT_TAB, COOKIE_MAX_AGE, CRYPT_MD5, CRYPT_UNDEFINED, CRYPT_UNIX, CTRL_TOPIC_INTERNAL, CTRL_TOPIC_REF, CTRL_TOPIC_VALUE, CTRL_TOPIC_WRITE, CUSTOM_PROP, DOCCHOOSER_HEIGHT, DOCCHOOSER_WIDTH, DOCS_DIR, EDATE_SEARCH, EMAIL_REGEXP, ERROR_MSG, FORBIDDEN_FILE_ACCESS, FORBIDDEN_REDIRECT, FORCE_REDIRECT, ICON_ARCHIVE, ICON_LOCK, ICON_LOCK_STRONG, ICON_WARN, ICON_WH_BOOK_CLOSED, ICON_WH_BOOK_OPEN, INFORMATION_MSG, JALIOS_JUNIT_PROP, JCMS_CADDY, JCMS_MSG_LIST, JSYNC_DOWNLOAD_DIR, JSYNC_SYNC_ALARM, LOG_FILE, LOG_TOPIC_SECURITY, LOGGER_PROP, LOGGER_XMLPROP, MBR_PHOTO_DIR, MDATE_SEARCH, MONITOR_XML, OP_CREATE, OP_DEEP_COPY, OP_DEEP_DELETE, OP_DELETE, OP_MERGE, OP_UPDATE, PDATE_SEARCH, PHOTO_DIR, PHOTO_ICON, PHOTO_ICON_HEIGHT, PHOTO_ICON_WIDTH, PHOTO_LARGE, PHOTO_LARGE_HEIGHT, PHOTO_LARGE_WIDTH, PHOTO_NORMAL, PHOTO_NORMAL_HEIGHT, PHOTO_NORMAL_WIDTH, PHOTO_SMALL, PHOTO_SMALL_HEIGHT, PHOTO_SMALL_WIDTH, PHOTO_TINY, PHOTO_TINY_HEIGHT, PHOTO_TINY_WIDTH, PREVIOUS_TAB, PRINT_VIEW, PRIVATE_FILE_ACCESS, PUBLIC_FILE_ACCESS, READ_RIGHT_TAB, SDATE_SEARCH, SEARCHENGINE_ALARM, SESSION_AUTHORIZED_FILENAMES_SET, STATS_REPORT_DIR, STATUS_PROP, STORE_XML, TEMPLATE_TAB, THUMBNAIL_LARGE_HEIGHT, THUMBNAIL_LARGE_WIDTH, THUMBNAIL_SMALL_HEIGHT, THUMBNAIL_SMALL_WIDTH, UDATE_SEARCH, UPDATE_RIGHT_TAB, UPLOAD_DIR, URL_REGEXP, WARNING_MSG, WEBAPP_PROP, WFEXPRESS_ALARM, WFREMINDER_ALARM, WORKFLOW_TAB, WORKFLOW_XML
 
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
 
Constructor Summary
EditDataHandler()
           
 
Method Summary
protected  boolean afterValidation(boolean result)
           
protected  boolean createUploadedFileDocument(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  boolean createUploadedFileDocument(Data[] datas, Member author, Workspace ws)
          Performs create on given array of data if it is a FileDocument that have just been uploaded.
protected  boolean createUploadedFileDocument(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.
protected  boolean createUploadedFileDocument(Data data, Member author, Workspace ws)
          Performs create on given data if it is a FileDocument that have just been uploaded.
 Data getAvailableData(Data data, Data dataField, Data field, Map mlMap, String lang)
          Generic method to get available ML field for a given data in a given language.
 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.
 Map<String,String> getAvailableExtraDataMap()
          Returns a Map of available extra data.
 Map<String,String> getAvailableExtraDBDataMap()
          Returns a Map of available extra db data.
protected  HashMap<String,Object> getControllerContext()
          Build a controller context.
abstract  Class<? extends Data> getDataClass()
           
 EditTypeExtensionHandler getExtFormHandler()
           
 int getFormStep()
           
 int getFormStepCount()
           
 String getId()
           
protected  void handleRestResponse()
           
 boolean isFirstAccess()
          Returns true if this is the first access to this form (no previous submission).
 boolean performCancel()
           
protected  DataExtension performCreateExtension()
           
protected  boolean performFinish()
           
protected  boolean performNext()
           
protected  boolean performPrevious()
           
 boolean performRefresh()
           
protected  DataExtension performUpdateExtension(DataExtension extension)
           
 boolean processAction()
           
protected  Data processDataId(String fieldName, String dataId, Class<? extends Data> clazz)
          Computes given dataid, trim and retrieve associated data.
protected
<T extends Data>
List<T>
processDataIds(String fieldName, String[] ids, Class<T> clazz)
          Computes link array to retrieve Data of the given Class.
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.
 Data processMLData(String fieldName, Class clazz, String[] values, Map mlMap)
          Process the given ML values (data ids)
<T extends Data>
Data[]
processMLDataArray(String fieldName, Class<T> clazz, String[] values, Map mlMap)
          Process the given ML values (data ids)
protected  boolean restValidation(boolean result)
           
protected  void sendRedirect()
           
 void setExtFormHandler(EditTypeExtensionHandler handler)
           
 void setExtraDBKeys(String[] extraDBKeys)
          Convenient methods to update ExtraDBDataMap from bean
 void setExtraDBValues(String[] extraDBValues)
          Convenient methods to update ExtraDBDataMap from bean
 void setExtraKeys(String[] extraKeys)
          Convenient methods to update ExtraDataMap from bean
 void setExtraValues(String[] extraValues)
          Convenient methods to update ExtraDataMap from bean
 void setFields(Data data)
          Set the common (Data) fields.
 void setForceDelete(String v)
           
 void setFormStep(int v)
           
 void setId(String id)
           
 void setOpCancel(String v)
           
 void setOpCreate(String v)
           
 void setOpDelete(String v)
           
 void setOpFinish(String v)
           
 void setOpNext(String v)
           
 void setOpPrevious(String v)
           
 void setOpRefresh(String v)
           
 void setOpUpdate(String v)
           
 boolean showFinishButton()
           
 boolean showNextButton()
           
 boolean showPreviousButton()
           
 boolean validate()
           
 boolean validateCancel()
           
protected  boolean validateCreateExtension(Data extendedData)
           
protected  boolean validateFinish()
           
protected  boolean validateNext()
           
protected  boolean validatePrevious()
           
 boolean validateRefresh()
           
protected  boolean validateUpdateExtension(DataExtension extension, Data extendedData)
           
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.
protected  boolean validateUploadedFileDocument(Data[] datas, Member author, Workspace ws)
          Performs validate on given array of data if it is a FileDocument that have just been uploaded.
protected  boolean validateUploadedFileDocument(Data data, Map dataML, Member author, Workspace ws)
          Performs create on given data if it is a FileDocument that have just been uploaded.
protected  boolean validateUploadedFileDocument(Data data, 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
checkMissingField, getEditFieldSet, getHiddenField, getHiddenField, getHiddenField, getHiddenField, getHiddenField, getHiddenField, getHiddenField, getHiddenField, getHiddenField, getHiddenField, getHiddenField, getHiddenField, getHiddenField, getHiddenField, getHiddenFieldML, getMainLangValue, getMainLangValueArray, getMLMap, getMLMapArray, getRedirect, getRedirectOnClosePopup, getWorkspace, isFieldEdition, isFieldMissing, isPartialFieldEdition, isPopupEdition, isWorkspaceForced, processStatus, sendRedirect, sendRedirect, setEditField, setNoRedirect, setNoSendRedirect, setPopupEdition, setRedirect, setRedirectOnClosePopup, setWorkspace, setWs, updateUploadedField, updateUploadedFields
 
Methods inherited from class com.jalios.jcms.context.JcmsJspContext
addBodyAttributes, addCSSHeader, addCSSHeader, addCSSHeader, addCSSHeader, addCustomHeader, addHttpEquivHeader, addHttpNameHeader, addJavaScript, addJavaScript, addJavaScript, addJavaScriptCode, addJSHeader, addJSHeader, addJSHeader, addJSHeader, addStyleHeader, addStyleHeader, checkAccess, checkAccess, debugDisplayContext, forceEditIcon, forceUpdate, getAjaxRequestAttribute, getAjaxRequestId, getAllHeadersDiffMap, getAllHeadersMap, getBackOfficeCSSHeader, getBackOfficeJavaScriptSet, getBackOfficeJSHeader, getBodyAttributes, getContentForm, getCSSHeaders, getCtxCategories, getCurrentCategory, getCustomHeaders, getDocType, getFinalCSSMap, getFinalJavaScriptSet, getFormElementCount, getFrontOfficeCSSHeader, getFrontOfficeJavaScriptSet, getFrontOfficeJSHeader, getHttpEquivHeaders, getHttpNameHeaders, getJavaScriptCodeSet, getJavaScriptSet, getJSHeaders, getJSONBridge, getPackVersion, getPageContext, getPageTitle, getPageZone, getPortal, getPortalCategory, getPortlet, getPublication, getStyleHeaders, getTemplateUsage, internalSetupEmptyHeader, isEditIcon, isPrintView, registerDisplayContext, removeAjaxRequestAttribute, setAjaxRequestAttribute, setAjaxRequestId, setAllHeadersDiffMap, setDocType, setEditIcon, setFormElementCount, setPageContext, setPageTitle, setPageZone, setShowEditIcon, setTemplateUsage, showEditIcon, workaroundBrowserBaseHrefBug
 
Methods inherited from class com.jalios.jcms.context.JcmsContext
addCookie, addMsg, addMsg, addMsgSession, applySelector, forceWorkspaceUpdate, getBaseUrl, getBrowser, getCaddy, getContextPath, getErrorMsg, getErrorMsgList, getErrorMsgSession, getErrorMsgSessionList, getInfoMsg, getInfoMsgList, getInfoMsgSession, getInfoMsgSessionList, getLoggedMember, getMsgList, getMsgSessionList, getRequest, getResponse, getSession, getUploadedFile, getUploadedFileList, getUrlWithCommonUpdatedParams, getUserLang, getUserLocale, getWarningMsg, getWarningMsgList, getWarningMsgSession, getWarningMsgSessionList, glp, isAdmin, isAjaxRequest, isDBMember, isDebug, isInFrontOffice, isLogged, isWebdavAccess, removeMessage, removeMessage, retrieveUploadedFile, select, sendForbidden, sendForbidden, sendRedirect, sendRedirect, setErrorMsg, setErrorMsg, setErrorMsgSession, setErrorMsgSession, setInfoMsg, setInfoMsg, setInfoMsgSession, setInfoMsgSession, setLoggedMember, setRequest, setResponse, setWarningMsg, setWarningMsg, setWarningMsgSession, setWarningMsgSession, validateRegexp, validateSchedule
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REVISION

public static final String REVISION
See Also:
Constant Field Values

op

protected boolean op

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

opPrevious

protected boolean opPrevious

opNext

protected boolean opNext

opFinish

protected boolean opFinish

id

protected String id

extFormHandler

protected EditTypeExtensionHandler extFormHandler

isDeleteForced

protected boolean isDeleteForced

formStep

protected int formStep
Constructor Detail

EditDataHandler

public EditDataHandler()
Method Detail

sendRedirect

protected void sendRedirect()
                     throws IOException
Throws:
IOException

validate

public final boolean validate()
                       throws IOException
Throws:
IOException

afterValidation

protected boolean afterValidation(boolean result)
                           throws IOException
Throws:
IOException

processAction

public boolean processAction()
                      throws IOException
Throws:
IOException

validatePrevious

protected boolean validatePrevious()
                            throws IOException
Throws:
IOException

performPrevious

protected boolean performPrevious()
                           throws IOException
Throws:
IOException

validateNext

protected boolean validateNext()
                        throws IOException
Throws:
IOException

performNext

protected boolean performNext()
                       throws IOException
Throws:
IOException

validateFinish

protected boolean validateFinish()
                          throws IOException
Throws:
IOException

performFinish

protected boolean performFinish()
                         throws IOException
Throws:
IOException

getControllerContext

protected HashMap<String,Object> getControllerContext()
Description copied from class: JcmsFormHandler
Build a controller context. I.E. add request, response and loggedMember.

Overrides:
getControllerContext in class JcmsFormHandler
Returns:
the HashMap which contains the context

setFields

public void setFields(Data data)
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

public abstract Class<? extends Data> getDataClass()

validateCreateExtension

protected boolean validateCreateExtension(Data extendedData)
                                   throws IOException
Throws:
IOException

performCreateExtension

protected DataExtension performCreateExtension()
                                        throws IOException
Throws:
IOException

validateUpdateExtension

protected boolean validateUpdateExtension(DataExtension extension,
                                          Data extendedData)
                                   throws IOException
Throws:
IOException

performUpdateExtension

protected DataExtension performUpdateExtension(DataExtension extension)
                                        throws IOException
Throws:
IOException

validateCancel

public boolean validateCancel()

performCancel

public boolean performCancel()
                      throws IOException
Throws:
IOException

validateRefresh

public boolean validateRefresh()

performRefresh

public boolean performRefresh()
                       throws IOException
Throws:
IOException

setOpCreate

public void setOpCreate(String v)

setOpUpdate

public void setOpUpdate(String v)

setOpDelete

public void setOpDelete(String v)

setOpCancel

public void setOpCancel(String v)

setOpRefresh

public void setOpRefresh(String v)

setOpPrevious

public void setOpPrevious(String v)

setOpNext

public void setOpNext(String v)

setOpFinish

public void setOpFinish(String v)

getId

public String getId()

setId

public void setId(String id)

setForceDelete

public void setForceDelete(String v)

getExtFormHandler

public EditTypeExtensionHandler getExtFormHandler()

setExtFormHandler

public void setExtFormHandler(EditTypeExtensionHandler handler)

showNextButton

public boolean showNextButton()

showPreviousButton

public boolean showPreviousButton()

showFinishButton

public boolean showFinishButton()

getFormStepCount

public int getFormStepCount()

getFormStep

public int getFormStep()

setFormStep

public void setFormStep(int v)

setExtraKeys

public void setExtraKeys(String[] extraKeys)
Convenient methods to update ExtraDataMap from bean

Parameters:
extraKeys - the extraKey
Since:
jcms-5.7.1

setExtraValues

public void setExtraValues(String[] extraValues)
Convenient methods to update ExtraDataMap from bean

Parameters:
extraValues - the extraValues
Since:
jcms-5.7.1

getAvailableExtraDataMap

public Map<String,String> getAvailableExtraDataMap()
Returns a Map of available extra data. A mix between:
  1. Default extra data
  2. Previous extra data
  3. Submited extra data

Returns:
Map of extra data

setExtraDBKeys

public void setExtraDBKeys(String[] extraDBKeys)
Convenient methods to update ExtraDBDataMap from bean

Parameters:
extraDBKeys - the extraDBKey
Since:
jcms-6.0

setExtraDBValues

public void setExtraDBValues(String[] extraDBValues)
Convenient methods to update ExtraDBDataMap from bean

Parameters:
extraDBValues - the extraDBValues
Since:
jcms-6.0

getAvailableExtraDBDataMap

public Map<String,String> getAvailableExtraDBDataMap()
Returns a Map of available extra db data. A mix between:
  1. Default extra db data
  2. Previous extra db data
  3. Submited extra db data

Returns:
Map of extra db data
Since:
jcms-6.0

processDataIds

protected <T extends Data> List<T> processDataIds(String fieldName,
                                                  String[] ids,
                                                  Class<T> clazz)
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.

Parameters:
fieldName - the field name
ids - arrays of ids
clazz - 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. Optionnaly, 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.

Parameters:
fieldName - the field name
ids - arrays of ids
clazz - the class of links
trim - if true, trim the end of the returned list.
Returns:
List a list of Data
Since:
jcms-6.0.0

processDataId

protected Data processDataId(String fieldName,
                             String dataId,
                             Class<? extends Data> clazz)
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 name
dataId - the id of the data
clazz - the class of the data
Returns:
Data the updated data
Since:
jcms-5.7.0

validateUploadedFileDocument

protected boolean validateUploadedFileDocument(Data data,
                                               Member author,
                                               Workspace ws)
Performs create on given data if it is a FileDocument that have just been uploaded. This method should be called by EditPublicationHandler#validateBeforeOp()

Parameters:
data - the data to work with
author - the author of the data
ws - the workspace of the data
Returns:
true if ControllerStatus is ok
Since:
jcms-5.7.0
See Also:
EditPublicationHandler.validateBeforeOp()

validateUploadedFileDocument

protected boolean validateUploadedFileDocument(Data data,
                                               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 by EditPublicationHandler#validateBeforeOp()

Parameters:
data - the data to work with
dataML - the other languages
author - the author of the data
ws - the workspace of the data
Returns:
true if ControllerStatus is ok
Since:
jcms-6.1.3
See Also:
EditPublicationHandler.validateBeforeOp()

validateUploadedFileDocument

protected boolean validateUploadedFileDocument(Data[] datas,
                                               Member author,
                                               Workspace ws)
Performs validate on given array of data if it is a FileDocument that have just been uploaded. This method should be called by EditPublicationHandler#validateBeforeOp()

Parameters:
datas - an array of data to work with
author - the author of the data
ws - the workspace of the data
Returns:
true if ControllerStatus is ok
Since:
jcms-5.7.0
See Also:
EditPublicationHandler.validateBeforeOp()

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 by EditPublicationHandler#validateBeforeOp()

Parameters:
datas - an array of data to work with
dataML - the other languages
author - the author of the data
ws - the workspace of the data
Returns:
true if ControllerStatus is ok
Since:
jcms-6.1.3
See Also:
EditPublicationHandler.validateBeforeOp()

createUploadedFileDocument

protected boolean createUploadedFileDocument(Data data,
                                             Member author,
                                             Workspace ws)
Performs create on given data if it is a FileDocument that have just been uploaded. This method should be called by EditPublicationHandler#validateBeforeOp()

Parameters:
data - the data to work with
author - the author of the data
ws - the workspace of the data
Returns:
true if ControllerStatus is ok
Since:
jcms-5.7.0
See Also:
EditPublicationHandler.validateBeforeOp()

createUploadedFileDocument

protected boolean createUploadedFileDocument(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. This method should be called by EditPublicationHandler#validateBeforeOp()

Parameters:
data - the data to work with (main language
dataML - the other languages
author - the author of the data
ws - the workspace of the data
Returns:
true if ControllerStatus is ok
Since:
jcms-6.1.3
See Also:
EditPublicationHandler.validateBeforeOp()

createUploadedFileDocument

protected boolean createUploadedFileDocument(Data[] datas,
                                             Member author,
                                             Workspace ws)
Performs create on given array of data if it is a FileDocument that have just been uploaded. This method should be called by EditPublicationHandler#validateBeforeOp()

Parameters:
datas - an array of data to work with
author - the author of the data
ws - the workspace of the data
Returns:
true if ControllerStatus is ok
Since:
jcms-6.1.2
See Also:
EditPublicationHandler.validateBeforeOp()

createUploadedFileDocument

protected boolean createUploadedFileDocument(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. This method should be called by EditPublicationHandler#validateBeforeOp()

Parameters:
datas - an array of data to work with
dataML - the other languages
author - the author of the data
ws - the workspace of the data
Returns:
true if ControllerStatus is ok
Since:
jcms-6.1.3
See Also:
EditPublicationHandler.validateBeforeOp()

processMLData

public Data processMLData(String fieldName,
                          Class clazz,
                          String[] values,
                          Map mlMap)
Process the given ML values (data ids)

Parameters:
fieldName - the field name
clazz - the class
values - the ids
mlMap - 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)

Parameters:
fieldName - the field name
clazz - the class
values - the ids
mlMap - the mlMap
Returns:
the data array in the main language
Since:
jcms-5.7.0

getAvailableData

public Data getAvailableData(Data data,
                             Data dataField,
                             Data field,
                             Map mlMap,
                             String lang)
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 field
mlMap - the ML map
lang - 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 field
mlMap - the ML map
lang - 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

protected void handleRestResponse()
                           throws IOException
Throws:
IOException

restValidation

protected boolean restValidation(boolean result)
                          throws IOException
Throws:
IOException


Copyright © 2001-2010 Jalios SA. All Rights Reserved.