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