Remove RestconfDataServiceConstant.DeleteData
[netconf.git] / restconf / restconf-nb-rfc8040 / src / main / java / org / opendaylight / restconf / nb / rfc8040 / rests / utils / DeleteDataTransactionUtil.java
index 35e09be0d6c847afc820729f75bb9a86adb6c17c..6b3f0a014608d6a5c4dd7c9f48b1d8ed2e13ef1d 100644 (file)
@@ -25,6 +25,7 @@ import org.slf4j.LoggerFactory;
  */
 public final class DeleteDataTransactionUtil {
     private static final Logger LOG = LoggerFactory.getLogger(DeleteDataTransactionUtil.class);
+    private static final String DELETE_TX_TYPE = "DELETE";
 
     private DeleteDataTransactionUtil() {
         throw new UnsupportedOperationException("Util class.");
@@ -38,18 +39,15 @@ public final class DeleteDataTransactionUtil {
      */
     public static Response deleteData(final RestconfStrategy strategy, final YangInstanceIdentifier path) {
         strategy.prepareReadWriteExecution();
-        checkItemExists(strategy, LogicalDatastoreType.CONFIGURATION, path,
-                RestconfDataServiceConstant.DeleteData.DELETE_TX_TYPE);
+        checkItemExists(strategy, LogicalDatastoreType.CONFIGURATION, path, DELETE_TX_TYPE);
         strategy.delete(LogicalDatastoreType.CONFIGURATION, path);
         final FluentFuture<? extends CommitInfo> future = strategy.commit();
         final ResponseFactory response = new ResponseFactory(Status.NO_CONTENT);
         //This method will close transactionChain if any
-        FutureCallbackTx.addCallback(future, RestconfDataServiceConstant.DeleteData.DELETE_TX_TYPE, response,
-                strategy.getTransactionChain());
+        FutureCallbackTx.addCallback(future, DELETE_TX_TYPE, response, strategy.getTransactionChain());
         return response.build();
     }
 
-
     /**
      * Check if items already exists at specified {@code path}. Throws {@link RestconfDocumentedException} if
      * data does NOT already exists.