public abstract class AbstractEntryTypeUpload extends EntryTypeService
| Modifier and Type | Field and Description |
|---|---|
protected static String |
ALL |
protected static String |
COMMA |
protected static String |
CONSTANT_EXPORT_BINARY |
protected static String |
CONSTANT_FILE_MAX_SIZE |
protected static String |
CONSTANT_MAX_FILES |
protected static String |
PARAMETER_EXPORT_BINARY |
protected static String |
PARAMETER_FILE_MAX_SIZE |
protected static String |
PARAMETER_ID_RESPONSE |
protected static String |
PARAMETER_MAX_FILES |
FIELD_COMMENT, FIELD_CONFIRM_FIELD_TITLE, FIELD_HEIGHT, FIELD_INSERT_GROUP, FIELD_MAX_SIZE_ENTER, FIELD_NUMBER_COLUMNS, FIELD_NUMBER_ROWS, FIELD_TITLE, FIELD_WIDTH, MESSAGE_CONFIRM_FIELD, MESSAGE_MANDATORY_FIELD, MESSAGE_MAXLENGTH, MESSAGE_MYLUTECE_AUTHENTIFICATION_REQUIRED, MESSAGE_NUMERIC_FIELD, MESSAGE_UNIQUE_FIELD, MESSAGE_XSS_FIELD, PARAMETER_COMMENT, PARAMETER_CONFIRM_FIELD, PARAMETER_CONFIRM_FIELD_TITLE, PARAMETER_CSS_CLASS, PARAMETER_ERROR_MESSAGE, PARAMETER_FIELD_IN_LINE, PARAMETER_HEIGHT, PARAMETER_HELP_MESSAGE, PARAMETER_MANDATORY, PARAMETER_MAX_SIZE_ENTER, PARAMETER_NUMBER_COLUMNS, PARAMETER_NUMBER_ROWS, PARAMETER_TITLE, PARAMETER_UNIQUE, PARAMETER_VALUE, PARAMETER_WIDTH, PREFIX_ATTRIBUTE, SUFFIX_CONFIRM_FIELD| Constructor and Description |
|---|
AbstractEntryTypeUpload() |
| Modifier and Type | Method and Description |
|---|---|
GenericAttributeError |
canUploadFiles(Entry entry,
List<org.apache.commons.fileupload.FileItem> listUploadedFileItems,
List<org.apache.commons.fileupload.FileItem> listFileItemsToUpload,
Locale locale)
Check if the file can be uploaded or not.
|
protected String |
checkEntryData(javax.servlet.http.HttpServletRequest request,
Locale locale)
Check the entry data
|
protected abstract boolean |
checkForImages()
Check whether this entry type allows only images or every file type
|
protected GenericAttributeError |
checkResponseData(Entry entry,
List<org.apache.commons.fileupload.FileItem> listFilesSource,
Locale locale,
javax.servlet.http.HttpServletRequest request)
Check the record field data
|
GenericAttributeError |
doCheckforImages(org.apache.commons.fileupload.FileItem fileItem,
Entry entry,
Locale locale)
Do check that an uploaded file is an image
|
abstract fr.paris.lutece.plugins.asynchronousupload.service.IAsyncUploadHandler |
getAsynchronousUploadHandler()
Get the asynchronous upload handler to use for entries of this type
|
protected List<org.apache.commons.fileupload.FileItem> |
getFileSources(Entry entry,
javax.servlet.http.HttpServletRequest request)
Get the file source from the session
|
fr.paris.lutece.util.ReferenceList |
getReferenceListRegularExpression(Entry entry,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the list of regular expression who is use in the template modify of
the entry
|
String |
getRequestData(Entry entry,
javax.servlet.http.HttpServletRequest request,
Locale locale)
Get the request data
|
String |
getResponseValueForExport(Entry entry,
javax.servlet.http.HttpServletRequest request,
Response response,
Locale locale)
Get the response value associate to the entry to export in the file
export
|
String |
getResponseValueForRecap(Entry entry,
javax.servlet.http.HttpServletRequest request,
Response response,
Locale locale)
Get the response value associate to the entry to write in the recap
|
abstract String |
getUrlDownloadFile(int nResponseId,
String strBaseUrl)
Get the URL to download the file of a response
|
protected String |
getUrlDownloadImage(int nResponseId,
String strBaseUrl)
Get the URL to download a file of a response throw the image servlet.
|
protected void |
setFields(Entry entry,
javax.servlet.http.HttpServletRequest request)
Set the list of fields
|
void |
setResponseToStringValue(Entry entry,
Response response,
Locale locale)
toStringValue should stay
null. |
getResponseDataclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetTemplateCreate, getTemplateHtmlForm, getTemplateModifyprotected static final String PARAMETER_ID_RESPONSE
protected static final String PARAMETER_MAX_FILES
protected static final String PARAMETER_FILE_MAX_SIZE
protected static final String PARAMETER_EXPORT_BINARY
protected static final String CONSTANT_MAX_FILES
protected static final String CONSTANT_FILE_MAX_SIZE
protected static final String CONSTANT_EXPORT_BINARY
protected static final String ALL
protected static final String COMMA
public abstract fr.paris.lutece.plugins.asynchronousupload.service.IAsyncUploadHandler getAsynchronousUploadHandler()
public abstract String getUrlDownloadFile(int nResponseId, String strBaseUrl)
nResponseId - The id of the response to download the file ofstrBaseUrl - The base URLprotected abstract boolean checkForImages()
protected String getUrlDownloadImage(int nResponseId, String strBaseUrl)
nResponseId - The id of the responsestrBaseUrl - The base URLpublic GenericAttributeError canUploadFiles(Entry entry, List<org.apache.commons.fileupload.FileItem> listUploadedFileItems, List<org.apache.commons.fileupload.FileItem> listFileItemsToUpload, Locale locale)
canUploadFiles in interface IEntryTypeServicecanUploadFiles in class EntryTypeServiceentry - The entrylistUploadedFileItems - the list of uploaded fileslistFileItemsToUpload - the list of files to uploadlocale - the localepublic String getResponseValueForExport(Entry entry, javax.servlet.http.HttpServletRequest request, Response response, Locale locale)
getResponseValueForExport in interface IEntryTypeServicegetResponseValueForExport in class EntryTypeServiceentry - The entryrequest - the requestresponse - the response associate to the entrylocale - the localeprotected String checkEntryData(javax.servlet.http.HttpServletRequest request, Locale locale)
request - the HTTP requestlocale - the localeprotected GenericAttributeError checkResponseData(Entry entry, List<org.apache.commons.fileupload.FileItem> listFilesSource, Locale locale, javax.servlet.http.HttpServletRequest request)
entry - The entrylistFilesSource - the list of source files to uploadlocale - the localerequest - the HTTP requestprotected List<org.apache.commons.fileupload.FileItem> getFileSources(Entry entry, javax.servlet.http.HttpServletRequest request)
entry - The entryrequest - the HttpServletRequestprotected void setFields(Entry entry, javax.servlet.http.HttpServletRequest request)
entry - The entryrequest - the HTTP requestpublic String getRequestData(Entry entry, javax.servlet.http.HttpServletRequest request, Locale locale)
getRequestData in interface IEntryTypeServicegetRequestData in class EntryTypeServiceentry - The entryrequest - HttpRequestlocale - the localepublic fr.paris.lutece.util.ReferenceList getReferenceListRegularExpression(Entry entry, fr.paris.lutece.portal.service.plugin.Plugin plugin)
getReferenceListRegularExpression in interface IEntryTypeServicegetReferenceListRegularExpression in class EntryTypeServiceentry - the entryplugin - the pluginpublic void setResponseToStringValue(Entry entry, Response response, Locale locale)
null.setResponseToStringValue in interface IEntryTypeServicesetResponseToStringValue in class EntryTypeServiceentry - The entryresponse - The responselocale - the locale - will use a default one if not specifiedpublic String getResponseValueForRecap(Entry entry, javax.servlet.http.HttpServletRequest request, Response response, Locale locale)
getResponseValueForRecap in interface IEntryTypeServicegetResponseValueForRecap in class EntryTypeServiceentry - The entryrequest - the requestresponse - the response associate to the entrylocale - the localepublic GenericAttributeError doCheckforImages(org.apache.commons.fileupload.FileItem fileItem, Entry entry, Locale locale)
fileItem - The file itementry - the entrylocale - The localeCopyright © 2015 Mairie de Paris. All rights reserved.