\r
package org.onap.policy.api.main.rest.provider;\r
\r
-import org.onap.policy.models.tosca.concepts.ToscaServiceTemplate;\r
+import org.onap.policy.models.tosca.simple.concepts.ToscaServiceTemplate;\r
\r
/**\r
* Class to provide all kinds of policy operations.\r
+ *\r
+ * @author Chenfei Gao (cgao@research.att.com)\r
*/\r
public class PolicyProvider {\r
\r
- private static final String POST_OK = "Successfully created";\r
private static final String DELETE_OK = "Successfully deleted";\r
\r
/**\r
* @param policyId the ID of policy\r
* @param policyVersion the version of policy\r
*\r
- * @return the ToscaPolicyList object containing a list of policies matching specified fields\r
+ * @return the ToscaServiceTemplate object\r
*/\r
public ToscaServiceTemplate fetchPolicies(String policyTypeId, String policyTypeVersion,\r
String policyId, String policyVersion) {\r
// placeholder\r
- // something like return new PolicyModelProvider().getPolicies(<blah>);\r
return new ToscaServiceTemplate();\r
}\r
\r
* @param policyTypeVersion the version of policy type\r
* @param body the entity body of policy\r
*\r
- * @return a string message indicating the operation results\r
+ * @return the ToscaServiceTemplate object\r
*/\r
- public String createPolicy(String policyTypeId, String policyTypeVersion, ToscaServiceTemplate body) {\r
+ public ToscaServiceTemplate createPolicy(String policyTypeId, String policyTypeVersion,\r
+ ToscaServiceTemplate body) {\r
// placeholder\r
- // something like return new PolicyModelProvider().createPolicies(<blah>);\r
- return POST_OK;\r
+ return new ToscaServiceTemplate();\r
}\r
\r
/**\r
public String deletePolicies(String policyTypeId, String policyTypeVersion,\r
String policyId, String policyVersion) {\r
// placeholder\r
- // something like return new PolicyModelProvider().deletePolicies(<blah>);\r
return DELETE_OK;\r
}\r
}
\ No newline at end of file