/*
 * Copyright © 2015 Cask Data, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */

package co.cask.cdap.config;

import java.util.List;

/**
 * Configuration Store.
 */
public interface ConfigStore {

  /**
   * Create a Configuration.
   * @param namespace Namespace.
   * @param type Configuration Type.
   * @param config Configuration Object.
   * @throws Exception
   */
  void create(String namespace, String type, Config config) throws Exception;

  /**
   * Delete a Configuration.
   * @param namespace Namespace.
   * @param type Configuration Type.
   * @param id Name of the Configuration.
   * @throws Exception
   */
  void delete(String namespace, String type, String id) throws Exception;

  /**
   * List all Configurations which are of a specific type.
   * @param namespace Namespace.
   * @param type Configuration Type.
   * @return List of {@link Config} objects.
   * @throws Exception
   */
  List<Config> list(String namespace, String type) throws Exception;

  /**
   * Read a Configuration.
   * @param namespace Namespace.
   * @param type Configuration Type.
   * @param id Name of the Configuration.
   * @return {@link Config}
   * @throws Exception
   */
  Config get(String namespace, String type, String id) throws Exception;

  /**
   * Update a Configuration.
   * @param namespace Namespace.
   * @param type Configuration Type.
   * @param config {@link Config}
   * @throws Exception
   */
  void update(String namespace, String type, Config config) throws Exception;
}

@@ -762,33 +762,33 @@
 m namespace 
-N
+n
 amespace
 .%0A   * @para
@@ -767,33 +767,32 @@
 espace namespace
-.
 %0A   * @param typ
@@ -785,33 +785,33 @@
   * @param type 
-C
+c
 onfiguration Typ
@@ -799,37 +799,36 @@
 e configuration 
-T
+t
 ype
-.
 %0A   * @param con
@@ -831,17 +831,17 @@
  config 
-C
+c
 onfigura
@@ -849,15 +849,14 @@
 ion 
-O
+o
 bject
-.
 %0A   
@@ -1013,33 +1013,33 @@
 m namespace 
-N
+n
 amespace
 .%0A   * @para
@@ -1018,33 +1018,32 @@
 espace namespace
-.
 %0A   * @param typ
@@ -1036,33 +1036,33 @@
   * @param type 
-C
+c
 onfiguration Typ
@@ -1050,37 +1050,36 @@
 e configuration 
-T
+t
 ype
-.
 %0A   * @param id 
@@ -1070,33 +1070,33 @@
 %0A   * @param id 
-N
+n
 ame of the Confi
@@ -1082,33 +1082,33 @@
  id name of the 
-C
+c
 onfiguration.%0A  
@@ -1099,25 +1099,24 @@
 onfiguration
-.
 %0A   * @throw
@@ -1291,33 +1291,33 @@
 m namespace 
-N
+n
 amespace
 .%0A   * @para
@@ -1296,33 +1296,32 @@
 espace namespace
-.
 %0A   * @param typ
@@ -1314,33 +1314,33 @@
   * @param type 
-C
+c
 onfiguration Typ
@@ -1332,29 +1332,28 @@
 nfiguration 
-T
+t
 ype
-.
 %0A   * @retur
@@ -1354,17 +1354,17 @@
 @return 
-L
+l
 ist of %7B
@@ -1384,17 +1384,16 @@
  objects
-.
 %0A   * @t
@@ -1535,33 +1535,33 @@
 m namespace 
-N
+n
 amespace
 .%0A   * @para
@@ -1540,33 +1540,32 @@
 espace namespace
-.
 %0A   * @param typ
@@ -1558,33 +1558,33 @@
   * @param type 
-C
+c
 onfiguration Typ
@@ -1572,37 +1572,36 @@
 e configuration 
-T
+t
 ype
-.
 %0A   * @param id 
@@ -1600,17 +1600,17 @@
 aram id 
-N
+n
 ame of t
@@ -1612,17 +1612,17 @@
  of the 
-C
+c
 onfigura
@@ -1621,25 +1621,24 @@
 onfiguration
-.
 %0A   * @retur
@@ -1818,17 +1818,17 @@
 ace 
-N
+n
 amespace
 .%0A  
@@ -1823,17 +1823,16 @@
 amespace
-.
 %0A   * @p
@@ -1841,17 +1841,17 @@
 am type 
-C
+c
 onfigura
@@ -1859,13 +1859,12 @@
 ion 
-T
+t
 ype
-.
 %0A   

Fix javadoc formatting