Change Yaml to Json payload
[clamp.git] / src / main / java / org / onap / clamp / policy / Policy.java
index c104b13..fc097bd 100644 (file)
@@ -25,12 +25,31 @@ package org.onap.clamp.policy;
 
 import com.google.gson.JsonObject;
 
+import java.io.UnsupportedEncodingException;
+
 public interface Policy {
 
     String getName();
 
     JsonObject getJsonRepresentation();
 
+    String createPolicyPayload() throws UnsupportedEncodingException;
+
+    /**
+     * Generate the policy name.
+     *
+     * @param policyType
+     *        The policy type
+     * @param serviceName
+     *        The service name
+     * @param serviceVersion
+     *        The service version
+     * @param resourceName
+     *        The resource name
+     * @param blueprintFilename
+     *        The blueprint file name
+     * @return The generated policy name
+     */
     static String generatePolicyName(String policyType, String serviceName, String serviceVersion, String resourceName,
         String blueprintFilename) {
         StringBuilder buffer = new StringBuilder(policyType).append("_").append(serviceName).append("_v")