Interface LogEntry
- All Known Implementing Classes:
LogEntryImpl
public interface LogEntry
Represents a log entry.
A log entry can have 3 states:
- running: The sub task that the log entry describes is in progress.
- completed: The sub task that the log entry describes is completed.
- failed: The sub task that the log entry describes has failed.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classAdditional state of a log entry to the flag `failed` or `completed`. -
Method Summary
Modifier and TypeMethodDescriptionvoidcomplete()This callscomplete(State)withLogEntry.State.EMPTY.voidcomplete(LogEntry.State state) Set the status of the entry to "completed".voidfail()This callsfail(State)withLogEntry.State.EMPTY.voidfail(LogEntry.State state) Set the status of the entry to "failed".@Nullable org.joda.time.DateTimeGet the end date of the log entry.org.joda.time.DateTimeGet the start date of the log entry.getState()Return the additional state of this log entry.Get the id of the task.Get the textresources key of the log entry.getVars()Get the variables (parameters for the placeholders in the label).booleanboolean
-
Method Details
-
isCompleted
boolean isCompleted()- Returns:
- true if the status is "completed", false otherwise
-
complete
Set the status of the entry to "completed". -
complete
void complete()This callscomplete(State)withLogEntry.State.EMPTY. -
hasFailed
boolean hasFailed()- Returns:
- true if the status is "failed", false otherwise
-
fail
Set the status of the entry to "failed". -
fail
void fail()This callsfail(State)withLogEntry.State.EMPTY. -
getState
LogEntry.State getState()Return the additional state of this log entry. -
getTextKey
String getTextKey()Get the textresources key of the log entry.- Returns:
- the textressources key
-
getVars
Get the variables (parameters for the placeholders in the label).- Returns:
- the variables
-
getTaskId
String getTaskId()Get the id of the task.- Returns:
- the id of the task
-
getStartDate
org.joda.time.DateTime getStartDate()Get the start date of the log entry.- Returns:
- the start date of the log entry.
-
getEndDate
@Nullable @Nullable org.joda.time.DateTime getEndDate()Get the end date of the log entry.- Returns:
- the end date of the log entry.
-