Interface IAppHistoryBackward


  • public interface IAppHistoryBackward
    Interface used to perform specialized backward operations for the application session history.
    Author:
    Christopher Mindus
    • Method Detail

      • isBackwardEnabled

        default java.lang.String isBackwardEnabled​(IAppHistoryEntry entry,
                                                   IClientSessionGyro clientGyro)
        Returns if the backward operation is enabled or not.

        If a null String is returned, the operation is enabled, otherwise the string is the reason why to operation is disabled. This reason is used typically for developers, logging and debugging.

        If an operation is not enabled or allowed, it will not be performed. This method can be called multiple times and should be quick and efficient.

        Override this method to handle other processing than to return true.

        If the operation requires some processing of the history entries focus, use the method IAppHistoryEntry.isBackwardEnabled(IClientSessionGyro) to test if the focus operation can be performed.

        Parameters:
        entry - The history entry.
        clientGyro - The client session requesting the backward operation enabled state.
        Returns:
        Default null meaning enabled, otherwise the reason string for being disabled.
      • performBackward

        java.lang.String performBackward​(IAppHistoryEntry entry,
                                         IClientSessionGyro clientGyro,
                                         IAppHistoryOperationCompleted completedCallback)
                                  throws PropException,
                                         TXPException
        Performs the backward operation for the client session in question.

        If a null String is returned, the operation is enabled, otherwise the string is the reason why to operation is disabled. This reason is used typically for developers, logging and debugging.

        If the operation requires some processing of the history entries focus, use the method IAppHistoryEntry.setBackwardFocus(IClientSessionGyro).

        NOTE 1: This method must complete a call to the callback runnable when it has completed the operation completes with or without errors.

        NOTE 2: The completedCallback function SHOULD NOT be called if an exception is thrown. It should be the last call done in the routine that performs the operation, regardless of execution thread.

        Parameters:
        entry - The history entry.
        clientGyro - The client session requesting the backward operation execution.
        completedCallback - The callback to call when operation has completed.
        Returns:
        Default null meaning enabled and the operation has begun (perhaps not completed yet), otherwise the reason string for being disabled.
        Throws:
        PropException - Property exceptions for property or focus errors or problems.
        TXPException - For transaction exceptions.
      • equalsOperation

        default boolean equalsOperation​(IAppHistoryBackward backwardOp)
        Called to perform comparison with other backward history operation for equality when adding new entries to the history.

        Override to return an other value than this.equals(backwardOp).

        Parameters:
        backwardOp - The backward operation to compare with, never null.
        Returns:
        true for equality, false if not equal (default).