Interface IMapHandler

All Known Implementing Classes:
MapHandlerBase

public interface IMapHandler
  • Method Details

    • setLocale

      IMapHandler setLocale(Locale locale)
      set locale for mapping. else session contentLocale is used
    • getLocale

      Locale getLocale()
    • setValidate

      IMapHandler setValidate(boolean validate)
    • reportChange

      void reportChange(IBaseEntity entity, Consumer<VersionReport> consumer)
    • getFromKey

      <T extends IBaseEntity> T getFromKey(Class<T> entityClass, Object key) throws EntityNotFoundException, NotUniqueResultException
      Throws:
      EntityNotFoundException
      NotUniqueResultException
    • newWriter

      <T extends IBaseEntity> BaseWriter<T> newWriter(T entity)
    • newWriter

      <T extends IBaseEntity, R extends BaseWriter<T>> R newWriter(Class<R> writerClass, T entity)
    • writeResource

      void writeResource(IBaseEntity entity, PropertyDescriptor desc, TextValueTO textValueTO, Locale masterLocale, boolean writeVersionReport, String textSetTypeDefault) throws ApplicationException
      method to write content of newResource to resource given by PropertyDescription desc. If the entity is a TextSet starts workflow to write changes also to resources of referencing entities.
      Parameters:
      entity - mandatory, the entity that has the resource
      desc - mandatory PropertyDescription of a Resource property, the Resource itself may be null
      textData - TextSetTO containing text, type etc
      masterLocale - optional, must be given for complex entities
      Throws:
      ApplicationException
    • copyResource

      void copyResource(IBaseEntity entity, IEntityField entityField, Resource source)
      copies all not empty resource versions from the source resource onto the target resource. Removes any empty ResourceVersions from target. Sets master of target to masterLocale if given, otherwise keeps existing master. If no master exists master is set from source if present, or first resourceVersion is set to master
      Parameters:
      entity - TODO
      entityField - TODO
      source - mandatory
      overwrite - if true also removes ResourceVersions for locales that are not present in source resource