Merge "Add persistence test for all policy examples"
[policy/models.git] / models-tosca / src / main / java / org / onap / policy / models / tosca / legacy / provider / LegacyToscaProvider.java
1 /*-
2  * ============LICENSE_START=======================================================
3  *  Copyright (C) 2019 Nordix Foundation.
4  * ================================================================================
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *      http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  * SPDX-License-Identifier: Apache-2.0
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.onap.policy.models.tosca.legacy.provider;
22
23 import lombok.NonNull;
24
25 import org.onap.policy.models.base.PfModelException;
26 import org.onap.policy.models.dao.PfDao;
27 import org.onap.policy.models.tosca.legacy.concepts.LegacyGuardPolicy;
28 import org.onap.policy.models.tosca.legacy.concepts.LegacyOperationalPolicy;
29
30 /**
31  * This class provides the provision of information on TOSCA concepts in the database to callers in legacy formats.
32  *
33  * @author Liam Fallon (liam.fallon@est.tech)
34  */
35 public class LegacyToscaProvider {
36     /**
37      * Get legacy operational policy.
38      *
39      * @param dao the DAO to use to access the database
40      * @param policyId ID of the policy.
41      * @return the policies found
42      * @throws PfModelException on errors getting policies
43      */
44     public LegacyOperationalPolicy getOperationalPolicy(@NonNull final PfDao dao, @NonNull final String policyId)
45             throws PfModelException {
46         return null;
47     }
48
49     /**
50      * Create legacy operational policy.
51      *
52      * @param dao the DAO to use to access the database
53      * @param legacyOperationalPolicy the definition of the policy to be created.
54      * @return the created policy
55      * @throws PfModelException on errors creating policies
56      */
57     public LegacyOperationalPolicy createOperationalPolicy(@NonNull final PfDao dao,
58             @NonNull final LegacyOperationalPolicy legacyOperationalPolicy) throws PfModelException {
59         return null;
60     }
61
62     /**
63      * Update legacy operational policy.
64      *
65      * @param dao the DAO to use to access the database
66      * @param legacyOperationalPolicy the definition of the policy to be updated
67      * @return the updated policy
68      * @throws PfModelException on errors updating policies
69      */
70     public LegacyOperationalPolicy updateOperationalPolicy(@NonNull final PfDao dao,
71             @NonNull final LegacyOperationalPolicy legacyOperationalPolicy) throws PfModelException {
72         return null;
73     }
74
75     /**
76      * Delete legacy operational policy.
77      *
78      * @param dao the DAO to use to access the database
79      * @param policyId ID of the policy.
80      * @return the deleted policy
81      * @throws PfModelException on errors deleting policies
82      */
83     public LegacyOperationalPolicy deleteOperationalPolicy(@NonNull final PfDao dao, @NonNull final String policyId)
84             throws PfModelException {
85         return null;
86     }
87
88     /**
89      * Get legacy guard policy.
90      *
91      * @param dao the DAO to use to access the database
92      * @param policyId ID of the policy.
93      * @return the policies found
94      * @throws PfModelException on errors getting policies
95      */
96     public LegacyGuardPolicy getGuardPolicy(@NonNull final PfDao dao, @NonNull final String policyId)
97             throws PfModelException {
98         return null;
99     }
100
101     /**
102      * Create legacy guard policy.
103      *
104      * @param dao the DAO to use to access the database
105      * @param legacyGuardPolicy the definition of the policy to be created.
106      * @return the created policy
107      * @throws PfModelException on errors creating policies
108      */
109     public LegacyGuardPolicy createGuardPolicy(@NonNull final PfDao dao,
110             @NonNull final LegacyGuardPolicy legacyGuardPolicy) throws PfModelException {
111         return null;
112     }
113
114     /**
115      * Update legacy guard policy.
116      *
117      * @param dao the DAO to use to access the database
118      * @param legacyGuardPolicy the definition of the policy to be updated
119      * @return the updated policy
120      * @throws PfModelException on errors updating policies
121      */
122     public LegacyGuardPolicy updateGuardPolicy(@NonNull final PfDao dao,
123             @NonNull final LegacyGuardPolicy legacyGuardPolicy) throws PfModelException {
124         return null;
125     }
126
127     /**
128      * Delete legacy guard policy.
129      *
130      * @param dao the DAO to use to access the database
131      * @param policyId ID of the policy.
132      * @return the deleted policy
133      * @throws PfModelException on errors deleting policies
134      */
135     public LegacyGuardPolicy deleteGuardPolicy(@NonNull final PfDao dao, @NonNull final String policyId)
136             throws PfModelException {
137         return null;
138     }
139 }