- /**
- * DO NOT implement or invoke this method. It is deprecated in favor of
- * {@link #canCommit(Object, Collection, SchemaContext)} and only exists for backwards compatibility. The
- * default implementation returns {@link PostCanCommitStep#NOOP_SUCCESS_FUTURE} and is invoked by the
- * default implementation of {@link #canCommit(Object, Collection, SchemaContext)}.
- *
- * @deprecated Implement and invoke {@link #canCommit(Object, Collection, SchemaContext)} instead.
- */
- @Deprecated
- @Nonnull
- default CheckedFuture<PostCanCommitStep, DataValidationFailedException> canCommit(@Nonnull final Object txId,
- @Nonnull final DOMDataTreeCandidate candidate, @Nonnull final SchemaContext ctx) {
- LoggerFactory.getLogger(getClass()).error(
- "The default implementation of DOMDataTreeCommitCohort#canCommit(Object, DOMDataTreeCandidate, "
- + "SchemaContext) was invoked on {}", getClass());
- return PostCanCommitStep.NOOP_SUCCESS_FUTURE;
- }
-
- /**
- * DO NOT implement or invoke this method. It is deprecated in favor of
- * {@link #canCommit(Object, SchemaContext, Collection)} which returns a {@link FluentFuture} instead of the
- * deprecated {@link CheckedFuture} which is scheduled for remkoval in a future guava release. The
- * default implementation calls {@link #canCommit(Object, SchemaContext, Collection)}.
- *
- * @deprecated Implement and invoke {@link #canCommit(Object, SchemaContext, Collection)} instead.
- */
- @Deprecated
- @Nonnull
- default CheckedFuture<PostCanCommitStep, DataValidationFailedException> canCommit(@Nonnull final Object txId,
- @Nonnull final Collection<DOMDataTreeCandidate> candidates, @Nonnull final SchemaContext ctx) {
- LoggerFactory.getLogger(getClass()).error(
- "The default implementation of DOMDataTreeCommitCohort#canCommit(Object, Collection, "
- + "SchemaContext) was invoked on {}", getClass());
-
- return MappingCheckedFuture.create(canCommit(txId, ctx, candidates), new DataValidationFailedExceptionMapper(
- "canCommit", Iterables.getLast(candidates).getRootPath()));
- }
-