/** * @see SubResource#create(java.lang.String, SimpleObject, RequestContext) */ @Override public Object create(String parentUniqueId, SimpleObject post, RequestContext context) throws ResponseException { PR parentResource = getParentResource(); P parent = parentResource.getByUniqueId(parentUniqueId); if (parent == null) throw new ObjectNotFoundException(); T delegate = newDelegate(); setParent(delegate, parent); DelegatingResourceDescription description = getBuildCreatableProperties(post); setConvertedProperties(delegate, post, description, true); delegate = save(delegate); return ConversionUtil.convertToRepresentation(delegate, Representation.DEFAULT); }