Hey,
2) would be a command of type "set list containing these values",
whereas 3) needs commands add/remove/move for list manipulation.
Without a generated UUID for each entry each add/remove/move command
needs to have all fields of the value, or if you can let it have one
field which is the value itself that's fine too. Just more complicated
to serialize/deserialize to a form, as in REST all interactions are
done by submitting forms.
Example of 3) in my codebase might be:
public class AddSpeaker
extends Command
{
public String given_name;
public String family_name;
}
public class MoveSpeaker
extends
{
public String given_name;
public String family_name;
public int position;
}
public class RemoveSpeaker
extends Command
{
public String given_name;
public String family_name;
}
whereas 2) might be:
public class SetSpeakers
extends Command
{
public List<SpeakerModel> speakers;
}
with 1) it becomes:
public class AddSpeaker
extends Command
{
public String given_name;
public String family_name;
}
public class MoveSpeaker
extends
{
public String speaker_id;
public int position;
}
public class RemoveSpeaker
extends Command
{
public String speaker_id;
}
/Rickard