Interface ActionLog
-
public interface ActionLog
A log for allAction
s.- Author:
- Tim Neumann
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T extends Action>
List<T>getActionsOfType(Class<? extends T> type, boolean includeSubclasses)
Get all actions which were logged of the given type.<T extends EntityAction>
List<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.List<Action>
getAllActions()
Get all actions which were logged.List<EntityAction>
getAllActionsOfEntity(Entity entity)
Get all actions which were logged and were caused by the given entity.void
logAction(Action actionToLog)
Log an action.
-
-
-
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 Action> List<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 getincludeSubclasses
- 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 EntityAction> List<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 fortype
- The type of the actions to getincludeSubclasses
- 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
-
-