added file to test ApiRunttimeException.java
[policy/api.git] / main / src / main / java / org / onap / policy / api / main / rest / provider / PolicyTypeProvider.java
1 /*-\r
2  * ============LICENSE_START=======================================================\r
3  * ONAP Policy API\r
4  * ================================================================================\r
5  * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.\r
6  * ================================================================================\r
7  * Licensed under the Apache License, Version 2.0 (the "License");\r
8  * you may not use this file except in compliance with the License.\r
9  * You may obtain a copy of the License at\r
10  *\r
11  *      http://www.apache.org/licenses/LICENSE-2.0\r
12  *\r
13  * Unless required by applicable law or agreed to in writing, software\r
14  * distributed under the License is distributed on an "AS IS" BASIS,\r
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
16  * See the License for the specific language governing permissions and\r
17  * limitations under the License.\r
18  *\r
19  * SPDX-License-Identifier: Apache-2.0\r
20  * ============LICENSE_END=========================================================\r
21  */\r
22 \r
23 package org.onap.policy.api.main.rest.provider;\r
24 \r
25 import org.onap.policy.models.tosca.simple.concepts.ToscaServiceTemplate;\r
26 \r
27 /**\r
28  * Class to provide all kinds of policy type operations.\r
29  *\r
30  * @author Chenfei Gao (cgao@research.att.com)\r
31  */\r
32 public class PolicyTypeProvider {\r
33 \r
34     private static final String DELETE_OK = "Successfully deleted";\r
35 \r
36     /**\r
37      * Retrieves a list of policy types matching specified policy type ID and version.\r
38      *\r
39      * @param policyTypeId the ID of policy type\r
40      * @param policyTypeVersion the version of policy type\r
41      *\r
42      * @return the ToscaServiceTemplate object\r
43      */\r
44     public ToscaServiceTemplate fetchPolicyTypes(String policyTypeId, String policyTypeVersion) {\r
45         // placeholder\r
46         return new ToscaServiceTemplate();\r
47     }\r
48 \r
49     /**\r
50      * Creates a new policy type.\r
51      *\r
52      * @param body the entity body of policy type\r
53      *\r
54      * @return the ToscaServiceTemplate objects\r
55      */\r
56     public ToscaServiceTemplate createPolicyType(ToscaServiceTemplate body) {\r
57         // placeholder\r
58         return new ToscaServiceTemplate();\r
59     }\r
60 \r
61     /**\r
62      * Delete the policy types matching specified policy type ID and version.\r
63      *\r
64      * @param policyTypeId the ID of policy type\r
65      * @param policyTypeVersion the version of policy type\r
66      *\r
67      * @return a string message indicating the operation results\r
68      */\r
69     public String deletePolicyTypes(String policyTypeId, String policyTypeVersion) {\r
70         // placeholder\r
71         return DELETE_OK;\r
72     }\r
73 }\r