public Response orderPatch ( Session session , String path , HierarchicalProperty body , String baseURI ) { try { Node node = ( Node ) session . getItem ( path ) ; List < OrderMember > members = getMembers ( body ) ; WebDavNamespaceContext nsContext = new WebDavNamespaceContext ( session ) ; URI uri = new URI ( TextUtil . escape ( baseURI + node . getPath ( ) , ' ' , true ) ) ; if ( doOrder ( node , members ) ) { return Response . ok ( ) . build ( ) ; } OrderPatchResponseEntity orderPatchEntity = new OrderPatchResponseEntity ( nsContext , uri , node , members ) ; return Response . status ( HTTPStatus . MULTISTATUS ) . entity ( orderPatchEntity ) . build ( ) ; } catch ( PathNotFoundException exc ) { return Response . status ( HTTPStatus . NOT_FOUND ) . entity ( exc . getMessage ( ) ) . build ( ) ; } catch ( LockException exc ) { return Response . status ( HTTPStatus . LOCKED ) . entity ( exc . getMessage ( ) ) . build ( ) ; } catch ( Exception exc ) { LOG . error ( exc . getMessage ( ) , exc ) ; return Response . serverError ( ) . entity ( exc . getMessage ( ) ) . build ( ) ; } }
Webdav OrderPatch method implementation .