Interface EntityLogRegistry

    • Method Detail

      • getHandler

        <E extends BaseEntity,​DTO extends EntityDTOEntityLogHandler<E,​DTO> getHandler​(Class<E> entityClass)
        Returns:
        the handler associated to the given entity class or null if the log is not enabled for that entity type.
      • isLogEnabled

        <E extends BaseEntity> boolean isLogEnabled​(E entity)
        Returns true if log should be generated for this specific entity instance.
        IMPORTANT: This method must be used to know if log is generated for an entity instead of the {@link #getHandler(Class))} method.
        This allow manage cases like generate log for all users (i.e a handler for User entities was registered) but not for the imported ones (i.e those with BasicUser.getRegistrationType() equals to UserRegistration.IMPORT.