Interface JournalService

  • All Implemented Interfaces:

    
    public interface JournalService
    
                        

    Submit/Commit the operation with a Journal. If a Journal exists in the context, then reuse it, otherwise create a new one in the context.

    Since:

    2019-06-05

    Author:

    trydofor

    • Constructor Detail

    • Method Detail

      • submit

        @NotNull() abstract <R> R submit(@NotNull() String eventName, @Nullable() String loginInfo, @Nullable() String targetKey, @Nullable() String otherInfo, @NotNull() Function<JournalService.Journal, R> commitSet)

        Submit the operation (event) with journal and return some result

        Parameters:
        eventName - event name
        loginInfo - login info ,eg.
        targetKey - key/id of target
        otherInfo - other info of operation
        commitSet - operations
        Returns:

        the result

      • commit

         JournalService.Journal commit(@NotNull() String eventName, @Nullable() String loginInfo, @Nullable() String targetKey, @Nullable() String otherInfo, @NotNull() Consumer<JournalService.Journal> commitSet)

        Commit the operation (event) with journal and return the journal.

        Parameters:
        eventName - event name
        loginInfo - login info ,eg.
        targetKey - key/id of target
        otherInfo - other info of operation
        commitSet - operations
        Returns:

        the journal

      • submit

        @NotNull() <R> R submit(@NotNull() Class<out Object> eventClass, @Nullable() String loginInfo, @Nullable() Object targetKey, @Nullable() Object otherInfo, @NotNull() Function<JournalService.Journal, R> commitSet)

        Submit the operation (event) with journal and return some result. It is recommended to `Override` to create targetKey/OtherInfo in Json

        Parameters:
        eventClass - use Class.
        loginInfo - login info ,eg.
        targetKey - key/id of target
        otherInfo - other info of operation
        commitSet - operations
        Returns:

        the result

      • commit

         JournalService.Journal commit(@NotNull() Class<out Object> eventClass, @Nullable() String loginInfo, @Nullable() Object targetKey, @Nullable() Object otherInfo, @NotNull() Consumer<JournalService.Journal> commitSet)

        Commit the operation (event) with journal and return the journal. It is recommended to `Override` to create targetKey/OtherInfo in Json

        Parameters:
        eventClass - use Class.
        loginInfo - login info ,eg.
        targetKey - key/id of target
        otherInfo - other info of operation
        commitSet - operations
        Returns:

        the journal

      • submit

        @NotNull() <R> R submit(@NotNull() Class<out Object> eventClass, @Nullable() Object targetKey, @Nullable() Object otherInfo, @NotNull() Function<JournalService.Journal, R> commitSet)

        Submit the operation (event) with journal and return some result. It is recommended to `Override` to get loginInfo in TerminalContext/SecurityContext

        Parameters:
        eventClass - use Class.
        targetKey - key/id of target
        otherInfo - other info of operation
        commitSet - operations
        Returns:

        the result

      • commit

         JournalService.Journal commit(@NotNull() Class<out Object> eventClass, @Nullable() Object targetKey, @Nullable() Object otherInfo, @NotNull() Consumer<JournalService.Journal> commitSet)

        Commit the operation (event) with journal and return the journal. It is recommended to `Override` to get loginInfo in TerminalContext/SecurityContext

        Parameters:
        eventClass - use Class.
        targetKey - key/id of target
        otherInfo - other info of operation
        commitSet - operations
        Returns:

        the journal

      • submit

        @NotNull() <R> R submit(@NotNull() Class<out Object> eventClass, @Nullable() Object targetKey, @NotNull() Function<JournalService.Journal, R> commitSet)

        Submit the operation (event) with journal and return some result. It is recommended to `Override` to get loginInfo in TerminalContext/SecurityContext

        Parameters:
        eventClass - use Class.
        targetKey - key/id of target
        commitSet - operations
        Returns:

        the result

      • commit

         JournalService.Journal commit(@NotNull() Class<out Object> eventClass, @Nullable() Object targetKey, @NotNull() Consumer<JournalService.Journal> commitSet)

        Commit the operation (event) with journal and return the journal. It is recommended to `Override` to get loginInfo in TerminalContext/SecurityContext

        Parameters:
        eventClass - use Class.
        targetKey - key/id of target
        commitSet - operations
        Returns:

        the journal

      • submit

        @NotNull() <R> R submit(@NotNull() Class<out Object> eventClass, @NotNull() Function<JournalService.Journal, R> commitSet)

        Submit the operation (event) with journal and return some result. It is recommended to `Override` to get loginInfo in TerminalContext/SecurityContext

        Parameters:
        eventClass - use Class.
        commitSet - operations
        Returns:

        the result

      • commit

         JournalService.Journal commit(@NotNull() Class<out Object> eventClass, @NotNull() Consumer<JournalService.Journal> commitSet)

        Commit the operation (event) with journal and return the journal. It is recommended to `Override` to get loginInfo in TerminalContext/SecurityContext

        Parameters:
        eventClass - use Class.
        commitSet - operations
        Returns:

        the journal

      • submit

        @NotNull() <R> R submit(@NotNull() Enum<out Object> eventEnum, @Nullable() String loginInfo, @Nullable() Object targetKey, @Nullable() Object otherInfo, @NotNull() Function<JournalService.Journal, R> commitSet)

        Submit the operation (event) with journal and return some result. It is recommended to `Override` to create targetKey/OtherInfo in Json

        Parameters:
        eventEnum - convert enum with EnumConvertor
        loginInfo - login info ,eg.
        targetKey - key/id of target
        otherInfo - other info of operation
        commitSet - operations
        Returns:

        the result

      • commit

         JournalService.Journal commit(@NotNull() Enum<out Object> eventEnum, @Nullable() String loginInfo, @Nullable() Object targetKey, @Nullable() Object otherInfo, @NotNull() Consumer<JournalService.Journal> commitSet)

        Commit the operation (event) with journal and return the journal. It is recommended to `Override` to create targetKey/OtherInfo in Json

        Parameters:
        eventEnum - convert enum with EnumConvertor
        loginInfo - login info ,eg.
        targetKey - key/id of target
        otherInfo - other info of operation
        commitSet - operations
        Returns:

        the journal

      • submit

        @NotNull() <R> R submit(@NotNull() Enum<out Object> eventEnum, @Nullable() Object targetKey, @Nullable() Object otherInfo, @NotNull() Function<JournalService.Journal, R> commitSet)

        Submit the operation (event) with journal and return some result. It is recommended to `Override` to get loginInfo in TerminalContext/SecurityContext

        Parameters:
        eventEnum - convert enum with EnumConvertor
        targetKey - key/id of target
        otherInfo - other info of operation
        commitSet - operations
        Returns:

        the result

      • commit

         JournalService.Journal commit(@NotNull() Enum<out Object> eventEnum, @Nullable() Object targetKey, @Nullable() Object otherInfo, @NotNull() Consumer<JournalService.Journal> commitSet)

        Commit the operation (event) with journal and return the journal. It is recommended to `Override` to get loginInfo in TerminalContext/SecurityContext

        Parameters:
        eventEnum - convert enum with EnumConvertor
        targetKey - key/id of target
        otherInfo - other info of operation
        commitSet - operations
        Returns:

        the journal

      • submit

        @NotNull() <R> R submit(@NotNull() Enum<out Object> eventEnum, @Nullable() Object targetKey, @NotNull() Function<JournalService.Journal, R> commitSet)

        Submit the operation (event) with journal and return some result. It is recommended to `Override` to get loginInfo in TerminalContext/SecurityContext

        Parameters:
        eventEnum - convert enum with EnumConvertor
        targetKey - key/id of target
        commitSet - operations
        Returns:

        the result

      • commit

         JournalService.Journal commit(@NotNull() Enum<out Object> eventEnum, @Nullable() Object targetKey, @NotNull() Consumer<JournalService.Journal> commitSet)

        Commit the operation (event) with journal and return the journal. It is recommended to `Override` to get loginInfo in TerminalContext/SecurityContext

        Parameters:
        eventEnum - convert enum with EnumConvertor
        targetKey - key/id of target
        commitSet - operations
        Returns:

        the journal

      • submit

        @NotNull() <R> R submit(@NotNull() Enum<out Object> eventEnum, @NotNull() Function<JournalService.Journal, R> commitSet)

        Submit the operation (event) with journal and return some result. It is recommended to `Override` to get loginInfo in TerminalContext/SecurityContext

        Parameters:
        eventEnum - convert enum with EnumConvertor
        commitSet - operations
        Returns:

        the result

      • commit

         JournalService.Journal commit(@NotNull() Enum<out Object> eventEnum, @NotNull() Consumer<JournalService.Journal> commitSet)

        Commit the operation (event) with journal and return the journal. It is recommended to `Override` to get loginInfo in TerminalContext/SecurityContext

        Parameters:
        eventEnum - convert enum with EnumConvertor
        commitSet - operations
        Returns:

        the journal