@Override public void patch(DocumentDescriptor desc, DocumentPatchHandle patch) throws ForbiddenUserException, FailedRequestException { patch(desc, patch, null); } @Override
@Override public void patch(String uri, DocumentPatchHandle patch) throws ForbiddenUserException, FailedRequestException { patch(uri, patch, null); } @Override
@Override public void patch(String uri, DocumentPatchHandle patch) throws ForbiddenUserException, FailedRequestException { patch(uri, patch, null); }
@Override public void patch(DocumentDescriptor desc, DocumentPatchHandle patch) throws ForbiddenUserException, FailedRequestException { patch(desc, patch, null); }
@Override public void patch(String uri, String temporalCollection, DocumentPatchHandle patch) { patch(uri, null, temporalCollection, null, patch, null); }
@Override public void patch(String uri, String temporalCollection, DocumentPatchHandle patch, Transaction transaction) { patch(uri, null, temporalCollection, null, patch, transaction); }
@Override public void patch(String uri, String temporalDocumentURI, String temporalCollection, String sourceDocumentURI, DocumentPatchHandle patch) { patch(uri, temporalDocumentURI, temporalCollection, sourceDocumentURI, patch, null); }
@Override public void patch(String uri, DocumentPatchHandle patch, Transaction transaction) throws ForbiddenUserException, FailedRequestException { patch(new DocumentDescriptorImpl(uri, true), patch, transaction); } @Override
@Override public void patch(String uri, DocumentPatchHandle patch, Transaction transaction) throws ForbiddenUserException, FailedRequestException { patch(new DocumentDescriptorImpl(uri, true), patch, transaction); }
@Override public void patchAs(String uri, Object patch) throws ForbiddenUserException, FailedRequestException { if (patch == null) { throw new IllegalArgumentException("no patch to apply"); } Class<?> as = patch.getClass(); DocumentPatchHandle patchHandle = null; if (DocumentPatchHandle.class.isAssignableFrom(as)) { patchHandle = (DocumentPatchHandle) patch; } else { ContentHandle<?> handle = getHandleRegistry().makeHandle(as); if (!DocumentPatchHandle.class.isAssignableFrom(handle.getClass())) { throw new IllegalArgumentException( "Handle "+handle.getClass().getName()+ " cannot be used to apply patch as "+as.getName() ); } Utilities.setHandleContent(handle, patch); patchHandle = (DocumentPatchHandle) handle; } patch(uri, patchHandle); }
@Override public void patchAs(String uri, Object patch) throws ForbiddenUserException, FailedRequestException { if (patch == null) { throw new IllegalArgumentException("no patch to apply"); } Class<?> as = patch.getClass(); DocumentPatchHandle patchHandle = null; if (DocumentPatchHandle.class.isAssignableFrom(as)) { patchHandle = (DocumentPatchHandle) patch; } else { ContentHandle<?> handle = getHandleRegistry().makeHandle(as); if (!DocumentPatchHandle.class.isAssignableFrom(handle.getClass())) { throw new IllegalArgumentException("Handle " + handle.getClass().getName() + " cannot be used to apply patch as " + as.getName()); } Utilities.setHandleContent(handle, patch); patchHandle = (DocumentPatchHandle) handle; } patch(uri, patchHandle); }