DomainObjectList

The initial idea of DomainObjectList was to simplify restful clients.

In the original Restful Objects specification, invoking an action that returned a list meant that the RO client needed to handle this collection, which didn’t have any identity. That made for special case logic in the client.

Instead, if the RO client invokes the action but uses the Accept Header to request an object, then the RO viewer would automatically wrap the returned list in this DomainObjectList view model.

Thus, the RO client then only ever needs to know how to render an object, in all cases.

API

DomainObjectList.java
class DomainObjectList {
  public static final String LOGICAL_TYPE_NAME;
  DomainObjectList()
  DomainObjectList(String title, String elementTypeFqcn, String actionOwningFqcn, String actionId, String actionArguments)
  String title()
  String getActionId()
  String getActionArguments()
  List<Object> getObjects()
  void setObjects(List<Object> objects)
}