Class LogEntryImpl
java.lang.Object
ch.tocco.nice2.tasks.impl.progress.LogEntryImpl
- All Implemented Interfaces:
LogEntry
-
Nested Class Summary
Nested classes/interfaces inherited from interface ch.tocco.nice2.tasks.api.progress.LogEntry
LogEntry.State
-
Constructor Summary
ConstructorDescriptionLogEntryImpl
(ProgressPersistenceManager progressManager, String taskId, String textKey, @Nullable Map<String, String> vars, LogEntryImpl.Status status) LogEntryImpl
(ProgressPersistenceManager progressManager, String taskId, String textKey, Map<String, String> vars, LogEntryImpl.Status status, org.joda.time.DateTime startDate, org.joda.time.DateTime endDate, LogEntry.State state, Entity entity) -
Method Summary
Modifier and TypeMethodDescriptionvoid
complete()
This callsLogEntry.complete(State)
withLogEntry.State.EMPTY
.void
complete
(LogEntry.State state) Set the status of the entry to "completed".void
fail()
This callsLogEntry.fail(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.@Nullable Entity
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
void
toString()
-
Constructor Details
-
LogEntryImpl
public LogEntryImpl(ProgressPersistenceManager progressManager, String taskId, String textKey, @Nullable @Nullable Map<String, String> vars, LogEntryImpl.Status status) -
LogEntryImpl
public LogEntryImpl(ProgressPersistenceManager progressManager, String taskId, String textKey, Map<String, String> vars, LogEntryImpl.Status status, org.joda.time.DateTime startDate, org.joda.time.DateTime endDate, LogEntry.State state, Entity entity)
-
-
Method Details
-
isCompleted
public boolean isCompleted()- Specified by:
isCompleted
in interfaceLogEntry
- Returns:
- true if the status is "completed", false otherwise
-
complete
Description copied from interface:LogEntry
Set the status of the entry to "completed". -
complete
public void complete()Description copied from interface:LogEntry
This callsLogEntry.complete(State)
withLogEntry.State.EMPTY
. -
hasFailed
public boolean hasFailed() -
fail
Description copied from interface:LogEntry
Set the status of the entry to "failed". -
fail
public void fail()Description copied from interface:LogEntry
This callsLogEntry.fail(State)
withLogEntry.State.EMPTY
. -
getTaskId
Description copied from interface:LogEntry
Get the id of the task. -
getTextKey
Description copied from interface:LogEntry
Get the textresources key of the log entry.- Specified by:
getTextKey
in interfaceLogEntry
- Returns:
- the textressources key
-
getVars
Description copied from interface:LogEntry
Get the variables (parameters for the placeholders in the label). -
getStatus
-
getStartDate
public org.joda.time.DateTime getStartDate()Description copied from interface:LogEntry
Get the start date of the log entry.- Specified by:
getStartDate
in interfaceLogEntry
- Returns:
- the start date of the log entry.
-
getEndDate
@Nullable public @Nullable org.joda.time.DateTime getEndDate()Description copied from interface:LogEntry
Get the end date of the log entry.- Specified by:
getEndDate
in interfaceLogEntry
- Returns:
- the end date of the log entry.
-
getState
Description copied from interface:LogEntry
Return the additional state of this log entry. -
setEntity
-
getEntity
-
toString
-