Skip to content
This repository was archived by the owner on Nov 12, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,24 @@ public Effector<Void> newSuspendEffector() {
* Calls {@link #start(Collection)} in this class.
*/
public EffectorBody<Void> newStartEffectorTask() {
// TODO included anonymous inner class for backwards compatibility with persisted state.
new EffectorBody<Void>() {
@Override
public Void call(ConfigBag parameters) {
Collection<? extends Location> locations = null;

Object locationsRaw = parameters.getStringKey(LOCATIONS.getName());
locations = Locations.coerceToCollection(entity().getManagementContext(), locationsRaw);

if (locations==null) {
// null/empty will mean to inherit from parent
locations = Collections.emptyList();
}

start(locations);
return null;
}
};
return new StartEffectorBody();
}

Expand Down Expand Up @@ -199,6 +217,14 @@ public Void call(ConfigBag parameters) {
* @see {@link #newStartEffectorTask()}
*/
public EffectorBody<Void> newRestartEffectorTask() {
// TODO included anonymous inner class for backwards compatibility with persisted state.
new EffectorBody<Void>() {
@Override
public Void call(ConfigBag parameters) {
restart(parameters);
return null;
}
};
return new RestartEffectorBody();
}

Expand All @@ -216,6 +242,14 @@ public Void call(ConfigBag parameters) {
* @see {@link #newStartEffectorTask()}
*/
public EffectorBody<Void> newStopEffectorTask() {
// TODO included anonymous inner class for backwards compatibility with persisted state.
new EffectorBody<Void>() {
@Override
public Void call(ConfigBag parameters) {
stop(parameters);
return null;
}
};
return new StopEffectorBody();
}

Expand Down