validator: integrate validator-config for data validation

Change-Id: I782964f8d6ce9134b2b849425a13b82aef741e2f
refs #1479
diff --git a/src/handles/write-handle.hpp b/src/handles/write-handle.hpp
index 1fe147a..8638a23 100644
--- a/src/handles/write-handle.hpp
+++ b/src/handles/write-handle.hpp
@@ -128,6 +128,10 @@
   void
   onData(const Interest& interest, Data& data, ProcessId processId);
 
+  void
+  onDataValidated(const Interest& interest, const shared_ptr<const Data>& data,
+                  ProcessId processId);
+
   /**
    * @brief handle when fetching one data timeout
    */
@@ -144,6 +148,10 @@
   void
   onSegmentData(const Interest& interest, Data& data, ProcessId processId);
 
+  void
+  onSegmentDataValidated(const Interest& interest, const shared_ptr<const Data>& data,
+                         ProcessId processId);
+
   /**
    * @brief Timeout when fetching segmented data. Data can be fetched RETRY_TIMEOUT times.
    */
@@ -171,6 +179,13 @@
   void
   processSegmentedInsertCommand(const Interest& interest, RepoCommandParameter& parameter);
 
+private:
+  /**
+   * @brief failure of validation for both one or segmented data
+   */
+  void
+  onDataValidationFailed(const shared_ptr<const Data>& data, const std::string& reason);
+
   /**
    * @brief extends noEndTime of process if not noEndTimeout, set StatusCode 405
    *
@@ -197,7 +212,7 @@
   onCheckValidated(const shared_ptr<const Interest>& interest, const Name& prefix);
 
   void
-  onCheckValidationFailed(const shared_ptr<const Interest>& interest);
+  onCheckValidationFailed(const shared_ptr<const Interest>& interest, const std::string& reason);
 
 private:
   void