Class EntryTypeAutomaticFileReading
java.lang.Object
fr.paris.lutece.plugins.genericattributes.service.entrytype.EntryTypeService
fr.paris.lutece.plugins.genericattributes.service.entrytype.AbstractEntryTypeUpload
fr.paris.lutece.plugins.genericattributes.service.entrytype.AbstractEntryTypeFile
fr.paris.lutece.plugins.forms.service.entrytype.EntryTypeAutomaticFileReading
- All Implemented Interfaces:
IResponseComparator,fr.paris.lutece.plugins.genericattributes.service.entrytype.IEntryTypeService
@ApplicationScoped
@Named("forms.entryTypeAutomaticFileReading")
public class EntryTypeAutomaticFileReading
extends fr.paris.lutece.plugins.genericattributes.service.entrytype.AbstractEntryTypeFile
implements IResponseComparator
This class is a service for the entry type Automatic File Reading
-
Field Summary
Fields inherited from class fr.paris.lutece.plugins.genericattributes.service.entrytype.AbstractEntryTypeFile
ENTRY_TYPE_KEYNAMEFields inherited from interface fr.paris.lutece.plugins.genericattributes.service.entrytype.IEntryTypeService
ATTRIBUTE_RESPONSE_ITERATION_NUMBER, ERROR_FIELD_FILE_MAX_SIZE, ERROR_FIELD_FILE_TYPE, ERROR_FIELD_HEIGHT, ERROR_FIELD_MAX_FILES, ERROR_FIELD_REF_LIST, ERROR_FIELD_TITLE, ERROR_FIELD_WIDTH, FIELD_ADDITIONAL_ADDRESS, FIELD_ADDRESS, FIELD_ANONYMIZABLE, FIELD_ANSWER_CHOICE, FIELD_ARRAY_CELL, FIELD_ARRAY_COLUMN, FIELD_ARRAY_ROW, FIELD_ATTRIBUTE_NAME, FIELD_AUTOCOMPLETE, FIELD_COMMENT, FIELD_CONFIRM, FIELD_CONFIRM_FIELD_TITLE, FIELD_DATE_VALUE, FIELD_DISABLED, FIELD_DISPLAY_BO, FIELD_DOWNLOADABLE_FILE, FIELD_EDIT_MODE, FIELD_EXPORTABLE, FIELD_EXPORTABLE_PDF, FIELD_FILE_BINARY, FIELD_FILE_CONFIG, FIELD_FILE_MAX_SIZE, FIELD_FILE_TYPE, FIELD_GEOJSON, FIELD_GEOMETRY, FIELD_HEIGHT, FIELD_ID_ADDRESS, FIELD_ID_LAYER, FIELD_ILLUSTRATION_IMAGE, FIELD_IMAGE_TYPE, FIELD_INSERT_GROUP, FIELD_IS_UPDATABLE, FIELD_MAX, FIELD_MAX_FILES, FIELD_MAX_SIZE, FIELD_MAX_SIZE_ENTER, FIELD_MIN, FIELD_MYLUTECE_ATTRIBUTE_NAME_CODE, FIELD_NUMBER_COLUMNS, FIELD_NUMBER_ROWS, FIELD_PLACEHOLDER, FIELD_PREFIX, FIELD_PROVIDER, FIELD_PUBLISHED, FIELD_RICHTEXT, FIELD_SORTABLE_LIST_TYPE, FIELD_SUFFIX, FIELD_TEXT_CONF, FIELD_USE_REF_LIST, FIELD_VIEW_NUMBER, FIELD_WIDTH, FIELD_X, FIELD_Y, MESSAGE_CONFIRM_FIELD, MESSAGE_ERROR_IMPOSSIBLE_SLOT, MESSAGE_ERROR_SLOT, MESSAGE_INVALID_SQL_QUERY, MESSAGE_MANDATORY_FIELD, MESSAGE_MAXLENGTH, MESSAGE_MYLUTECE_AUTHENTIFICATION_REQUIRED, MESSAGE_NUMERIC_FIELD, MESSAGE_NUMERIC_MAX, MESSAGE_NUMERIC_MIN, MESSAGE_UNIQUE_FIELD, MESSAGE_XSS_FIELD, PARAMETER_ANONYMIZABLE, PARAMETER_ANONYMIZE_PATTERN, PARAMETER_AUTOCOMPLETE, PARAMETER_COMMENT, PARAMETER_CONFIRM_FIELD, PARAMETER_CONFIRM_FIELD_TITLE, PARAMETER_CSS_CLASS, PARAMETER_DISABLED, PARAMETER_DISPLAY_BO, PARAMETER_ENTRY_CODE, PARAMETER_ERROR_MESSAGE, PARAMETER_EXPORTABLE, PARAMETER_EXPORTABLE_PDF, PARAMETER_FIELD_IN_LINE, PARAMETER_FILE, PARAMETER_HEIGHT, PARAMETER_HELP_MESSAGE, PARAMETER_ILLUSTRATION_IMAGE, PARAMETER_IMAGE_TYPE, PARAMETER_INDEXED, PARAMETER_MANDATORY, PARAMETER_MAX, PARAMETER_MAX_IMAGE_SIZE, PARAMETER_MAX_SIZE_ENTER, PARAMETER_MIN, PARAMETER_NUMBER_COLUMNS, PARAMETER_NUMBER_ROWS, PARAMETER_ONLY_DISPLAY_IN_BACK, PARAMETER_PLACEHOLDER, PARAMETER_PUBLISHED, PARAMETER_REF_LIST_SELECT, PARAMETER_SORTABLE_LIST_TYPE, PARAMETER_TITLE, PARAMETER_TODAY_DATE, PARAMETER_UNIQUE, PARAMETER_USE_REF_LIST, PARAMETER_VALUE, PARAMETER_WIDTH, PREFIX_ATTRIBUTE, PREFIX_ITERATION_ATTRIBUTE, SUFFIX_CONFIRM_FIELD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAnonymizationTypes(fr.paris.lutece.plugins.genericattributes.service.anonymization.IEntryAnonymizationType fileDeleteAnonymizationType, fr.paris.lutece.plugins.genericattributes.service.anonymization.IEntryAnonymizationType fileReplaceAnonymizationType) static booleanfill(List<Question> listQuestionStep, List<FormQuestionResponse> listFormsQuestionResponse, jakarta.servlet.http.HttpServletRequest request) Fill form question response with ocr values readedfr.paris.lutece.plugins.genericattributes.service.upload.AbstractGenAttUploadHandlerfr.paris.lutece.util.ReferenceListBuilds theReferenceListof all available files typefr.paris.lutece.util.ReferenceListgetListField(String strKey) Gets the list field.getOcrConfigTemplate(int nIdStep, int nIdQuestion, int nIdEntryQuestion, String strOcrKey) Get the config html codefr.paris.lutece.plugins.genericattributes.business.IOcrProvidergetOcrProvider(String strKey) Gets the ocr provider.getTemplateCreate(fr.paris.lutece.plugins.genericattributes.business.Entry entry, boolean bDisplayFront) getTemplateEntryReadOnly(boolean bDisplayFront) getTemplateHtmlForm(fr.paris.lutece.plugins.genericattributes.business.Entry entry, boolean bDisplayFront) getTemplateModify(fr.paris.lutece.plugins.genericattributes.business.Entry entry, boolean bDisplayFront) getUrlDownloadFile(int nResponseId, String strBaseUrl) booleanisResponseChanged(List<fr.paris.lutece.plugins.genericattributes.business.Response> listResponseReference, List<fr.paris.lutece.plugins.genericattributes.business.Response> listResponseNew) Tests if the response has changed for anEntryMethods inherited from class fr.paris.lutece.plugins.genericattributes.service.entrytype.AbstractEntryTypeFile
getResponseDataMethods inherited from class fr.paris.lutece.plugins.genericattributes.service.entrytype.AbstractEntryTypeUpload
canUploadFiles, doCheckforImages, getReferenceListRegularExpression, getRequestData, getRequestData, getResponseValueForExport, getResponseValueForRecap, setResponseToStringValueMethods inherited from class fr.paris.lutece.plugins.genericattributes.service.entrytype.EntryTypeService
getAnonymizationHelpMessage, getResponseIterationValue, getTemplateEntryReadOnly, getValidWildcards, setAnonymizationTypes
-
Constructor Details
-
EntryTypeAutomaticFileReading
public EntryTypeAutomaticFileReading()
-
-
Method Details
-
addAnonymizationTypes
@Inject public void addAnonymizationTypes(@Named("genericattributes.fileDeleteAnonymizationType") fr.paris.lutece.plugins.genericattributes.service.anonymization.IEntryAnonymizationType fileDeleteAnonymizationType, @Named("genericattributes.fileReplaceAnonymizationType") fr.paris.lutece.plugins.genericattributes.service.anonymization.IEntryAnonymizationType fileReplaceAnonymizationType) -
getTemplateHtmlForm
public String getTemplateHtmlForm(fr.paris.lutece.plugins.genericattributes.business.Entry entry, boolean bDisplayFront) - Specified by:
getTemplateHtmlFormin interfacefr.paris.lutece.plugins.genericattributes.service.entrytype.IEntryTypeService
-
getTemplateCreate
public String getTemplateCreate(fr.paris.lutece.plugins.genericattributes.business.Entry entry, boolean bDisplayFront) - Specified by:
getTemplateCreatein interfacefr.paris.lutece.plugins.genericattributes.service.entrytype.IEntryTypeService
-
getTemplateModify
public String getTemplateModify(fr.paris.lutece.plugins.genericattributes.business.Entry entry, boolean bDisplayFront) - Specified by:
getTemplateModifyin interfacefr.paris.lutece.plugins.genericattributes.service.entrytype.IEntryTypeService
-
getAsynchronousUploadHandler
public fr.paris.lutece.plugins.genericattributes.service.upload.AbstractGenAttUploadHandler getAsynchronousUploadHandler()- Specified by:
getAsynchronousUploadHandlerin classfr.paris.lutece.plugins.genericattributes.service.entrytype.AbstractEntryTypeFile
-
getUrlDownloadFile
- Specified by:
getUrlDownloadFilein classfr.paris.lutece.plugins.genericattributes.service.entrytype.AbstractEntryTypeUpload
-
getTemplateEntryReadOnly
- Specified by:
getTemplateEntryReadOnlyin interfacefr.paris.lutece.plugins.genericattributes.service.entrytype.IEntryTypeService- Overrides:
getTemplateEntryReadOnlyin classfr.paris.lutece.plugins.genericattributes.service.entrytype.EntryTypeService
-
isResponseChanged
public boolean isResponseChanged(List<fr.paris.lutece.plugins.genericattributes.business.Response> listResponseReference, List<fr.paris.lutece.plugins.genericattributes.business.Response> listResponseNew) Tests if the response has changed for anEntry- Specified by:
isResponseChangedin interfaceIResponseComparator- Parameters:
listResponseReference- the list of reference responses for theEntrylistResponseNew- the list of new responses for theEntry- Returns:
trueif the response has changed,falseotherwise
-
getFileTypeRefList
public fr.paris.lutece.util.ReferenceList getFileTypeRefList()Builds theReferenceListof all available files type- Returns:
- the
ReferenceList
-
getOcrConfigTemplate
public String getOcrConfigTemplate(int nIdStep, int nIdQuestion, int nIdEntryQuestion, String strOcrKey) Get the config html code- Parameters:
nIdStep- the Id stepnIdQuestion- the question idnIdEntryQuestion- the id entrystrOcrKey- the ocr provider- Returns:
- the config html code
-
getOcrProvider
public fr.paris.lutece.plugins.genericattributes.business.IOcrProvider getOcrProvider(String strKey) Gets the ocr provider.- Parameters:
strKey- the str key- Returns:
- the type document provider
-
getListField
Gets the list field.- Parameters:
strKey- the str key- Returns:
- the list field
-
fill
public static boolean fill(List<Question> listQuestionStep, List<FormQuestionResponse> listFormsQuestionResponse, jakarta.servlet.http.HttpServletRequest request) Fill form question response with ocr values readed- Parameters:
listQuestionStep- the questuin listlistFormsQuestionResponse- the form response listrequest- the HttpServletRequest request
-