Start page / Plug-In Development / Server Plug-Ins / Schedule Tasks / Data Object

Data Object

Interface: de.espirit.firstspirit.scheduling.ScheduleTaskData
FirstSpirit Access API: ScheduleTaskData

The data object contains custom data required during the run-time of a task instance.

Implementations of ScheduleTaskData must implement the clone() method, which provides a separate object instance containing the same data as the current object. Also, data object implementations must ensure that data stored in the object can be serialized.

/**
* Custom data object which may be used to store run-time data while a task is being executed.
*/
public class MyScheduleTaskData implements ScheduleTaskData {

private static final long serialVersionUID = 17L;

private final String _text;

@Override
public ScheduleTaskData clone() {
final MyScheduleTaskData clonedData = new MyScheduleTaskData();
clonedData.setText(_text);
return clonedData;
}

@Nullable
public String getText() {
return _text;
}

public void setText(@Nullable final String text) {
_text = text;
}
}

© 2005 - 2024 Crownpeak Technology GmbH | All rights reserved. | FirstSpirit 2024.13 | Data privacy