Example: Use resource facades

WARNING - TOPIC NOT WRITTEN - TOPIC ID: 1801

This topic has not yet been written. The content below is from the topic description.
Here is an example of such a resource facade for a collection of Comments: @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) public class ScrollableCollection implements ResourceFacade { private String bookId; @XmlAttribute private int start; @XmlAttribute private int totalRecords; @XmlElement private List comments = new ArrayList(); @XmlElementRef private RESTServiceDiscovery rest; public Class facadeFor() { return Comment.class; } public Map pathParameters() { HashMap map = new HashMap(); map.put("id", bookId); return map; } } This will produce such an XML collection: great book terrible book