@ PROPPATCH @ Consumes ( { APPLICATION_XML } ) @ Produces ( { APPLICATION_XML } ) @ Timed public void updateProperties ( @ Suspended final AsyncResponse response , @ Context final Request request , @ Context final UriInfo uriInfo , @ Context final HttpHeaders headers , @ Context final SecurityContext security , final DavPropertyUpdate propertyUpdate ) throws ParserConfigurationException { final Document doc = getDocument ( ) ; final TrellisRequest req = new TrellisRequest ( request , uriInfo , headers , security ) ; final IRI identifier = rdf . createIRI ( TRELLIS_DATA_PREFIX + req . getPath ( ) ) ; final String baseUrl = getBaseUrl ( req ) ; final String location = fromUri ( baseUrl ) . path ( req . getPath ( ) ) . build ( ) . toString ( ) ; final Session session = getSession ( req . getPrincipalName ( ) ) ; services . getResourceService ( ) . get ( identifier ) . thenApply ( this :: checkResource ) . thenCompose ( resourceToMultiStatus ( doc , identifier , location , baseUrl , session , propertyUpdate ) ) . thenApply ( multistatus -> status ( MULTI_STATUS ) . entity ( multistatus ) . build ( ) ) . exceptionally ( this :: handleException ) . thenApply ( response :: resume ) ; }
Update properties on a resource .