Interface ActionLog


  • public interface ActionLog
    A log for all Actions.
    Author:
    Tim Neumann
    • Method Detail

      • getAllActions

        List<Action> getAllActions()
        Get all actions which were logged.

        Warning: No order is guaranteed.

        Returns:
        A list of all actions logged
      • getActionsOfType

        <T extends ActionList<T> getActionsOfType​(Class<? extends T> type,
                                                    boolean includeSubclasses)
        Get all actions which were logged of the given type.
        Type Parameters:
        T - The generic type to return the actions as
        Parameters:
        type - The type of the actions to get
        includeSubclasses - Whether to include the subclasses of the given type
        Returns:
        A list of all matching actions
      • getAllActionsOfEntity

        List<EntityAction> getAllActionsOfEntity​(Entity entity)
        Get all actions which were logged and were caused by the given entity.
        Parameters:
        entity - The entity to get actions for
        Returns:
        A list of all matching actions
      • getActionsOfTypeOfEntity

        <T extends EntityActionList<T> getActionsOfTypeOfEntity​(Entity entity,
                                                                  Class<? extends T> type,
                                                                  boolean includeSubclasses)
        Get all actions which were logged of the given type and were caused by the given entity.
        Type Parameters:
        T - The generic type to return the actions as
        Parameters:
        entity - The entity to get actions for
        type - The type of the actions to get
        includeSubclasses - Whether to include the subclasses of the given type
        Returns:
        A list of all matching actions
      • logAction

        void logAction​(Action actionToLog)
        Log an action.
        Parameters:
        actionToLog - The action to log