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 |
ATTRIBUTE_RESPONSE_ITERATION_NUMBER, 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_INVALID_SQL_QUERY, 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_EDITABLE_BACK, PARAMETER_ENTRY_CODE, PARAMETER_ERROR_MESSAGE, PARAMETER_FIELD_CODE, PARAMETER_FIELD_IN_LINE, PARAMETER_HEIGHT, PARAMETER_HELP_MESSAGE, PARAMETER_IMAGE_TYPE, PARAMETER_MANDATORY, PARAMETER_MAX_IMAGE_SIZE, PARAMETER_MAX_SIZE_ENTER, PARAMETER_NUMBER_COLUMNS, PARAMETER_NUMBER_ROWS, PARAMETER_ONLY_DISPLAY_IN_BACK, PARAMETER_ROLE_ASSOCIATED, PARAMETER_TITLE, PARAMETER_UNIQUE, PARAMETER_VALUE, PARAMETER_WIDTH, PREFIX_ATTRIBUTE, PREFIX_ITERATION_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 String |
getAttributeName(Entry entry,
javax.servlet.http.HttpServletRequest request)
Gives the attribute name
|
protected List<org.apache.commons.fileupload.FileItem> |
getFileSources(javax.servlet.http.HttpServletRequest request,
String strAttributeName)
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 . |
getResponseData, getResponseIterationValue, getTemplateEntryReadOnly, getTemplateEntryReadOnly
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getTemplateCreate, getTemplateHtmlForm, getTemplateModify
protected 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 IEntryTypeService
canUploadFiles
in class EntryTypeService
entry
- 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 IEntryTypeService
getResponseValueForExport
in class EntryTypeService
entry
- 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(javax.servlet.http.HttpServletRequest request, String strAttributeName)
request
- the HttpServletRequeststrAttributeName
- the attribute nameprotected String getAttributeName(Entry entry, javax.servlet.http.HttpServletRequest request)
entry
- the entryrequest
- the requestprotected 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 IEntryTypeService
getRequestData
in class EntryTypeService
entry
- The entryrequest
- HttpRequestlocale
- the localepublic fr.paris.lutece.util.ReferenceList getReferenceListRegularExpression(Entry entry, fr.paris.lutece.portal.service.plugin.Plugin plugin)
getReferenceListRegularExpression
in interface IEntryTypeService
getReferenceListRegularExpression
in class EntryTypeService
entry
- the entryplugin
- the pluginpublic void setResponseToStringValue(Entry entry, Response response, Locale locale)
null
.setResponseToStringValue
in interface IEntryTypeService
setResponseToStringValue
in class EntryTypeService
entry
- 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 IEntryTypeService
getResponseValueForRecap
in class EntryTypeService
entry
- 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 © 2018 City of Paris. All rights reserved.