Class LogEntryImpl
java.lang.Object
ch.tocco.nice2.tasks.impl.progress.LogEntryImpl
- All Implemented Interfaces:
LogEntry
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface LogEntry
LogEntry.State -
Constructor Summary
ConstructorsConstructorDescriptionLogEntryImpl(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 TypeMethodDescriptionvoidcomplete()This callsLogEntry.complete(State)withLogEntry.State.EMPTY.voidcomplete(LogEntry.State state) Set the status of the entry to "completed".voidfail()This callsLogEntry.fail(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.@Nullable Entityorg.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).booleanbooleanvoidtoString()
-
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:
isCompletedin interfaceLogEntry- Returns:
- true if the status is "completed", false otherwise
-
complete
Description copied from interface:LogEntrySet the status of the entry to "completed". -
complete
public void complete()Description copied from interface:LogEntryThis callsLogEntry.complete(State)withLogEntry.State.EMPTY. -
hasFailed
-
fail
Description copied from interface:LogEntrySet the status of the entry to "failed". -
fail
public void fail()Description copied from interface:LogEntryThis callsLogEntry.fail(State)withLogEntry.State.EMPTY. -
getTaskId
-
getTextKey
Description copied from interface:LogEntryGet the textresources key of the log entry.- Specified by:
getTextKeyin interfaceLogEntry- Returns:
- the textressources key
-
getVars
-
getStatus
-
getStartDate
public org.joda.time.DateTime getStartDate()Description copied from interface:LogEntryGet the start date of the log entry.- Specified by:
getStartDatein interfaceLogEntry- Returns:
- the start date of the log entry.
-
getEndDate
@Nullable public @Nullable org.joda.time.DateTime getEndDate()Description copied from interface:LogEntryGet the end date of the log entry.- Specified by:
getEndDatein interfaceLogEntry- Returns:
- the end date of the log entry.
-
getState
Description copied from interface:LogEntryReturn the additional state of this log entry. -
setEntity
-
getEntity
-
toString
-