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
Modifier and TypeInterfaceDescriptionstatic class
Additional state of a log entry to the flag `failed` or `completed`. -
Method Summary
Modifier and TypeMethodDescriptionvoid
complete()
This callscomplete(State)
withLogEntry.State.EMPTY
.void
complete
(LogEntry.State state) Set the status of the entry to "completed".void
fail()
This callsfail(State)
withLogEntry.State.EMPTY
.void
fail
(LogEntry.State state) Set the status of the entry to "failed".@Nullable org.joda.time.DateTime
Get the end date of the log entry.org.joda.time.DateTime
Get 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).boolean
boolean
-
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.
-