@Override public void patch(DocumentDescriptor desc, DocumentPatchHandle patch, Transaction transaction) throws ForbiddenUserException, FailedRequestException { if (logger.isInfoEnabled()) logger.info("Patching document"); DocumentPatchHandleImpl builtPatch = (patch instanceof DocumentPatchHandleImpl) ? (DocumentPatchHandleImpl) patch : null; services.patchDocument(requestLogger, desc, transaction, (builtPatch != null) ? builtPatch.getMetadata() : processedMetadata, (builtPatch != null) ? builtPatch.isOnContent() : true, patch); }
@Override public void patch(String uri, String temporalDocumentURI, String temporalCollection, String sourceDocumentURI, DocumentPatchHandle patch, Transaction transaction) { if (uri == null) { throw new IllegalArgumentException("Document URI cannot be null"); } if (temporalCollection == null) { throw new IllegalArgumentException("Need temporal collection to patch a temporal document"); } if (logger.isInfoEnabled()) logger.info("Patching document"); RequestParameters extraParams = null; extraParams = addTemporalParams(extraParams, temporalCollection, temporalDocumentURI, null); DocumentPatchHandleImpl builtPatch = (patch instanceof DocumentPatchHandleImpl) ? (DocumentPatchHandleImpl) patch : null; services.patchDocument(requestLogger, new DocumentDescriptorImpl(uri, true), transaction, (builtPatch != null) ? builtPatch.getMetadata() : processedMetadata, (builtPatch != null) ? builtPatch.isOnContent() : true, extraParams, sourceDocumentURI, patch); }
@Override public void patch(DocumentDescriptor desc, DocumentPatchHandle patch, Transaction transaction) throws ForbiddenUserException, FailedRequestException { if (logger.isInfoEnabled()) logger.info("Patching document"); DocumentPatchHandleImpl builtPatch = (patch instanceof DocumentPatchHandleImpl) ? (DocumentPatchHandleImpl) patch : null; services.patchDocument( requestLogger, desc, (transaction == null) ? null : transaction.getTransactionId(), (builtPatch != null) ? builtPatch.getMetadata() : processedMetadata, (builtPatch != null) ? builtPatch.isOnContent() : true, patch ); }