summaryrefslogtreecommitdiffstats
path: root/cps-service/src/main/java/org/onap/cps/api/CpService.java
diff options
context:
space:
mode:
Diffstat (limited to 'cps-service/src/main/java/org/onap/cps/api/CpService.java')
-rwxr-xr-x[-rw-r--r--]cps-service/src/main/java/org/onap/cps/api/CpService.java25
1 files changed, 17 insertions, 8 deletions
diff --git a/cps-service/src/main/java/org/onap/cps/api/CpService.java b/cps-service/src/main/java/org/onap/cps/api/CpService.java
index 4d94a4654..6b59949ca 100644..100755
--- a/cps-service/src/main/java/org/onap/cps/api/CpService.java
+++ b/cps-service/src/main/java/org/onap/cps/api/CpService.java
@@ -21,9 +21,9 @@
package org.onap.cps.api;
import java.io.File;
-import java.io.IOException;
+import org.onap.cps.api.model.AnchorDetails;
+import org.onap.cps.exceptions.CpsValidationException;
import org.opendaylight.yangtools.yang.model.api.SchemaContext;
-import org.opendaylight.yangtools.yang.model.parser.api.YangParserException;
/**
* Configuration and persistency service interface which holds methods for parsing and storing yang models and data.
@@ -36,7 +36,7 @@ public interface CpService {
* @param yangModelContent the input stream
* @return the schema context
*/
- SchemaContext parseAndValidateModel(final String yangModelContent);
+ SchemaContext parseAndValidateModel(String yangModelContent);
/**
* Parse and validate a file representing a yang model to generate a schema context.
@@ -44,7 +44,7 @@ public interface CpService {
* @param yangModelFile the yang file
* @return the schema context
*/
- SchemaContext parseAndValidateModel(final File yangModelFile);
+ SchemaContext parseAndValidateModel(File yangModelFile);
/**
* Store schema context for a yang model.
@@ -52,7 +52,7 @@ public interface CpService {
* @param schemaContext the schema context
* @param dataspaceName the dataspace name
*/
- void storeSchemaContext(final SchemaContext schemaContext, final String dataspaceName);
+ void storeSchemaContext(SchemaContext schemaContext, String dataspaceName);
/**
* Store the JSON structure in the database.
@@ -60,7 +60,7 @@ public interface CpService {
* @param jsonStructure the JSON structure.
* @return entity ID.
*/
- Integer storeJsonStructure(final String jsonStructure);
+ Integer storeJsonStructure(String jsonStructure);
/**
* Read a JSON Object using the object identifier.
@@ -68,12 +68,21 @@ public interface CpService {
* @param jsonObjectId the JSON object identifier.
* @return the JSON structure.
*/
- String getJsonById(final int jsonObjectId);
+ String getJsonById(int jsonObjectId);
/**
* Delete a JSON Object using the object identifier.
*
* @param jsonObjectId the JSON object identifier.
*/
- void deleteJsonById(final int jsonObjectId);
+ void deleteJsonById(int jsonObjectId);
+
+ /**
+ * Create an anchor using provided anchorDetails object.
+ *
+ * @param anchorDetails the anchor details object.
+ * @return the anchor name.
+ * @throws CpsValidationException if input data is invalid.
+ */
+ String createAnchor(AnchorDetails anchorDetails);
}