Package mc.core.domain.base.map.handler
Interface IMapHandler
- All Known Implementing Classes:
MapHandlerBase
public interface IMapHandler
-
Method Summary
Modifier and TypeMethodDescriptionvoidcopyResource(IBaseEntity entity, IEntityField entityField, Resource source) copies all not empty resource versions from the source resource onto the target resource.<T extends IBaseEntity>
TgetFromKey(Class<T> entityClass, Object key) <T extends IBaseEntity,R extends BaseWriter<T>>
R<T extends IBaseEntity>
BaseWriter<T>newWriter(T entity) voidreportChange(IBaseEntity entity, Consumer<VersionReport> consumer) set locale for mapping.setValidate(boolean validate) voidwriteResource(IBaseEntity entity, PropertyDescriptor desc, TextValueTO textValueTO, Locale masterLocale, boolean writeVersionReport, String textSetTypeDefault) method to write content of newResource to resource given by PropertyDescription desc.
-
Method Details
-
setLocale
set locale for mapping. else session contentLocale is used -
getLocale
Locale getLocale() -
setValidate
-
reportChange
-
getFromKey
<T extends IBaseEntity> T getFromKey(Class<T> entityClass, Object key) throws EntityNotFoundException, NotUniqueResultException -
newWriter
-
newWriter
-
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 resourcedesc- mandatory PropertyDescription of a Resource property, the Resource itself may be nulltextData- TextSetTO containing text, type etcmasterLocale- optional, must be given for complex entities- Throws:
ApplicationException
-
copyResource
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- TODOentityField- TODOsource- mandatoryoverwrite- if true also removes ResourceVersions for locales that are not present in source resource
-