|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jalios.jcms.context.JcmsContext
com.jalios.jcms.context.JcmsJspContext
com.jalios.jcms.handler.JcmsFormHandler
com.jalios.jcms.handler.EditDataHandler
public abstract class EditDataHandler
This class is the super class of all FormHandler which manage stored data.
Data
Field Summary | |
---|---|
protected EditTypeExtensionHandler |
extFormHandler
|
protected String |
id
|
protected boolean |
isDeleteForced
|
protected boolean |
op
|
protected boolean |
opCancel
|
protected boolean |
opCreate
|
protected boolean |
opDelete
|
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.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)
|
|
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()
|
|
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()
|
|
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
|
processDataIds(String fieldName,
String[] ids,
Class<T> clazz)
Computes link array to retrieve Data of the given Class. |
|
protected
|
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) |
|
|
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 |
setId(String id)
|
|
void |
setOpCancel(String v)
|
|
void |
setOpCreate(String v)
|
|
void |
setOpDelete(String v)
|
|
void |
setOpRefresh(String v)
|
|
void |
setOpUpdate(String v)
|
|
boolean |
validate()
|
|
boolean |
validateCancel()
|
|
protected boolean |
validateCreateExtension(Data extendedData)
|
|
boolean |
validateRefresh()
|
|
protected boolean |
validateUpdateExtension(DataExtension extension,
Data extendedData)
|
|
protected boolean |
validateUploadedFileDocument(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 |
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 |
---|
getEditFieldSet, 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 java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String REVISION
protected boolean op
protected boolean opCreate
protected boolean resultOpCreate
protected boolean opUpdate
protected boolean resultOpUpdate
protected boolean opDelete
protected boolean resultOpDelete
protected boolean opCancel
protected boolean opRefresh
protected String id
protected EditTypeExtensionHandler extFormHandler
protected boolean isDeleteForced
Constructor Detail |
---|
public EditDataHandler()
Method Detail |
---|
protected void sendRedirect() throws IOException
IOException
public final boolean validate() throws IOException
IOException
protected boolean afterValidation(boolean result) throws IOException
IOException
public boolean processAction() throws IOException
IOException
protected HashMap<String,Object> getControllerContext()
JcmsFormHandler
getControllerContext
in class JcmsFormHandler
public void setFields(Data data)
data
- the publication to set the fieldspublic abstract Class<? extends Data> getDataClass()
protected boolean validateCreateExtension(Data extendedData) throws IOException
IOException
protected DataExtension performCreateExtension() throws IOException
IOException
protected boolean validateUpdateExtension(DataExtension extension, Data extendedData) throws IOException
IOException
protected DataExtension performUpdateExtension(DataExtension extension) throws IOException
IOException
public boolean validateCancel()
public boolean performCancel() throws IOException
IOException
public boolean validateRefresh()
public boolean performRefresh() throws IOException
IOException
public void setOpCreate(String v)
public void setOpUpdate(String v)
public void setOpDelete(String v)
public void setOpCancel(String v)
public void setOpRefresh(String v)
public String getId()
public void setId(String id)
public void setForceDelete(String v)
public EditTypeExtensionHandler getExtFormHandler()
public void setExtFormHandler(EditTypeExtensionHandler handler)
public void setExtraKeys(String[] extraKeys)
extraKeys
- the extraKeypublic void setExtraValues(String[] extraValues)
extraValues
- the extraValuespublic Map<String,String> getAvailableExtraDataMap()
public void setExtraDBKeys(String[] extraDBKeys)
extraDBKeys
- the extraDBKeypublic void setExtraDBValues(String[] extraDBValues)
extraDBValues
- the extraDBValuespublic Map<String,String> getAvailableExtraDBDataMap()
protected <T extends Data> List<T> processDataIds(String fieldName, String[] ids, Class<T> clazz)
fieldName
- the field nameids
- arrays of idsclazz
- the class of links
protected <T extends Data> List<T> processDataIds(String fieldName, String[] ids, Class<T> clazz, boolean trim)
fieldName
- the field nameids
- arrays of idsclazz
- the class of linkstrim
- if true, trim the end of the returned list.
protected Data processDataId(String fieldName, String dataId, Class<? extends Data> clazz)
fieldName
- The field namedataId
- the id of the dataclazz
- the class of the data
protected boolean validateUploadedFileDocument(Data data, Member author, Workspace ws)
EditPublicationHandler#validateBeforeOp()
data
- the data to work withauthor
- the author of the dataws
- the workspace of the data
EditPublicationHandler.validateBeforeOp()
protected boolean validateUploadedFileDocument(Data[] datas, Member author, Workspace ws)
EditPublicationHandler#validateBeforeOp()
datas
- an array of data to work withauthor
- the author of the dataws
- the workspace of the data
EditPublicationHandler.validateBeforeOp()
public Data processMLData(String fieldName, Class clazz, String[] values, Map mlMap)
fieldName
- the field nameclazz
- the classvalues
- the idsmlMap
- the mlMap
public <T extends Data> Data[] processMLDataArray(String fieldName, Class<T> clazz, String[] values, Map mlMap)
fieldName
- the field nameclazz
- the classvalues
- the idsmlMap
- the mlMap
public Data getAvailableData(Data data, Data dataField, Data field, Map mlMap, String lang)
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
public Data[] getAvailableDataArray(Data data, Data[] dataField, Data[] field, Map mlMap, String lang)
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
public boolean isFirstAccess()
protected void handleRestResponse() throws IOException
IOException
protected boolean restValidation(boolean result) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |