java.lang.Object
fr.paris.lutece.plugins.genericattributes.service.entrytype.EntryTypeService
All Implemented Interfaces:
IEntryTypeService
Direct Known Subclasses:
AbstractEntryTypeArray, AbstractEntryTypeCartography, AbstractEntryTypeChoice, AbstractEntryTypeComment, AbstractEntryTypeDate, AbstractEntryTypeGalleryImage, AbstractEntryTypeGeolocation, AbstractEntryTypeGroup, AbstractEntryTypeMyLuteceUser, AbstractEntryTypeNumber, AbstractEntryTypeNumbering, AbstractEntryTypeSelectSQL, AbstractEntryTypeSession, AbstractEntryTypeSlot, AbstractEntryTypeTelephoneNumber, AbstractEntryTypeText, AbstractEntryTypeTextArea, AbstractEntryTypeUpload

public abstract class EntryTypeService extends Object implements IEntryTypeService
Abstract implementation of IEntryTypeService
  • Constructor Details

    • EntryTypeService

      public EntryTypeService()
  • Method Details

    • getRequestData

      public String getRequestData(Entry entry, jakarta.servlet.http.HttpServletRequest request, Locale locale)
      Get the request data
      Specified by:
      getRequestData in interface IEntryTypeService
      Parameters:
      entry - The entry
      request - HttpRequest
      locale - the locale
      Returns:
      null if all data required are in the request else the url of jsp error
    • getRequestData

      public String getRequestData(Entry entry, jakarta.servlet.http.HttpServletRequest request, Locale locale, String errorReturnUrl)
      Get the request data
      Specified by:
      getRequestData in interface IEntryTypeService
      Parameters:
      entry - The entry
      request - HttpRequest
      locale - the locale
      errorReturnUrl - url to go to after displaying a message when an error occurs
      Returns:
      null if all data required are in the request else the url of jsp error
    • getResponseData

      public GenericAttributeError getResponseData(Entry entry, jakarta.servlet.http.HttpServletRequest request, List<Response> listResponse, Locale locale)
      Generate the list of responses associated with the given entry from the request, and saved it into the Entry object.
      Specified by:
      getResponseData in interface IEntryTypeService
      Parameters:
      entry - The entry
      request - HttpRequest
      listResponse - the list of response associate to the entry. Newly created response will be inserted in this list.
      locale - the locale
      Returns:
      a GenericAttributeError object if there is an error in the response
    • getResponseValueForExport

      public String getResponseValueForExport(Entry entry, jakarta.servlet.http.HttpServletRequest request, Response response, Locale locale)
      Get the response value associate to the entry to export in the file export
      Specified by:
      getResponseValueForExport in interface IEntryTypeService
      Parameters:
      entry - The entry
      request - the request
      response - the response associate to the entry
      locale - the locale
      Returns:
      the response value associate to the entry to export in the file export
    • getResponseValueForRecap

      public String getResponseValueForRecap(Entry entry, jakarta.servlet.http.HttpServletRequest request, Response response, Locale locale)
      Get the response value associate to the entry to write in the recap
      Specified by:
      getResponseValueForRecap in interface IEntryTypeService
      Parameters:
      entry - The entry
      request - the request
      response - the response associate to the entry
      locale - the locale
      Returns:
      the response value associate to the entry to write in the recap
    • getReferenceListRegularExpression

      public 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
      Specified by:
      getReferenceListRegularExpression in interface IEntryTypeService
      Parameters:
      entry - the entry
      plugin - the plugin
      Returns:
      the regular expression list who is use in the template modify of the entry
    • setResponseToStringValue

      public void setResponseToStringValue(Entry entry, Response response, Locale locale)
      Sets the string value of the response
      Specified by:
      setResponseToStringValue in interface IEntryTypeService
      Parameters:
      entry - The entry
      response - the response
      locale - the locale - will use a default one if not specified
    • canUploadFiles

      public GenericAttributeError canUploadFiles(Entry entry, List<fr.paris.lutece.portal.service.upload.MultipartItem> listUploadedFileItems, List<fr.paris.lutece.portal.service.upload.MultipartItem> listFileItemsToUpload, Locale locale)
      Check if the file can be uploaded or not. This method will check the size of each file and the number max of files that can be uploaded.
      Specified by:
      canUploadFiles in interface IEntryTypeService
      Parameters:
      entry - The entry
      listUploadedFileItems - the list of uploaded files
      listFileItemsToUpload - the list of files to upload
      locale - the locale
      Returns:
      The error if there is any
    • getResponseIterationValue

      public int getResponseIterationValue(jakarta.servlet.http.HttpServletRequest request)
      Return the iteration number for a response from the request
      Specified by:
      getResponseIterationValue in interface IEntryTypeService
      Parameters:
      request - the request to retrieve the iteration number of the response from
      Returns:
      the value of the iteration number
    • getTemplateEntryReadOnly

      public String getTemplateEntryReadOnly()
      Return the template associated to an EntryType for read only uses
      Specified by:
      getTemplateEntryReadOnly in interface IEntryTypeService
      Returns:
      the template associated to an EntryType for read only uses
    • getTemplateEntryReadOnly

      public String getTemplateEntryReadOnly(boolean bIsDisplayFront)
      Return the template associated to an EntryType for read only uses
      Specified by:
      getTemplateEntryReadOnly in interface IEntryTypeService
      Parameters:
      bIsDisplayFront - true
      Returns:
      the template associated to an EntryType for read only uses
    • setAnonymizationTypes

      public void setAnonymizationTypes(List<IEntryAnonymizationType> anonymizationTypes)
      Parameters:
      anonymizationTypes - the anonymizationTypes to set
    • getValidWildcards

      public List<IEntryAnonymizationType> getValidWildcards()
      Description copied from interface: IEntryTypeService
      get the list of valids wildcard for the entry
      Specified by:
      getValidWildcards in interface IEntryTypeService
      Returns:
    • getAnonymizationHelpMessage

      public String getAnonymizationHelpMessage(Locale locale)
      Description copied from interface: IEntryTypeService
      Creates the help message for the enrty anonymisation config.
      Specified by:
      getAnonymizationHelpMessage in interface IEntryTypeService
      Returns: