public Response propPatch ( Session session , String path , HierarchicalProperty body , List < String > tokens , String baseURI ) { try { lockHolder . checkLock ( session , path , tokens ) ; Node node = ( Node ) session . getItem ( path ) ; WebDavNamespaceContext nsContext = new WebDavNamespaceContext ( session ) ; URI uri = new URI ( TextUtil . escape ( baseURI + node . getPath ( ) , ' ' , true ) ) ; List < HierarchicalProperty > setList = Collections . emptyList ( ) ; if ( body . getChild ( new QName ( "DAV:" , "set" ) ) != null ) { setList = setList ( body ) ; } List < HierarchicalProperty > removeList = Collections . emptyList ( ) ; if ( body . getChild ( new QName ( "DAV:" , "remove" ) ) != null ) { removeList = removeList ( body ) ; } PropPatchResponseEntity entity = new PropPatchResponseEntity ( nsContext , node , uri , setList , removeList ) ; return Response . status ( HTTPStatus . MULTISTATUS ) . entity ( entity ) . type ( MediaType . TEXT_XML ) . 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 Proppatch method method implementation .