re base code
[sdc.git] / openecomp-be / backend / openecomp-sdc-vendor-license-manager / src / main / java / org / openecomp / sdc / vendorlicense / VendorLicenseManager.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * SDC
4  * ================================================================================
5  * Copyright (C) 2017 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  * ============LICENSE_END=========================================================
19  */
20
21 package org.openecomp.sdc.vendorlicense;
22
23 import org.openecomp.sdc.vendorlicense.dao.types.*;
24 import org.openecomp.sdc.versioning.dao.types.Version;
25
26 import java.util.Collection;
27 import java.util.Set;
28
29 public interface VendorLicenseManager {
30
31   void validate(String vendorLicenseModelId, Version version);
32
33   VendorLicenseModelEntity createVendorLicenseModel(VendorLicenseModelEntity licenseModel);
34
35   void updateVendorLicenseModel(VendorLicenseModelEntity licenseModel);
36
37   VendorLicenseModelEntity getVendorLicenseModel(String vlmId, Version version);
38
39   void deleteVendorLicenseModel(String vlmId, Version version);
40
41
42   Collection<LicenseAgreementEntity> listLicenseAgreements(String vlmId, Version version);
43
44   LicenseAgreementEntity createLicenseAgreement(LicenseAgreementEntity licenseAgreement);
45
46   void updateLicenseAgreement(LicenseAgreementEntity licenseAgreement,
47                               Set<String> addedFeatureGroupIds, Set<String> removedFeatureGroupIds);
48
49   LicenseAgreementModel getLicenseAgreementModel(String vlmId, Version version,
50                                                  String licenseAgreementId);
51
52   void deleteLicenseAgreement(String vlmId, Version version, String licenseAgreementId);
53
54
55   Collection<FeatureGroupEntity> listFeatureGroups(String vlmId, Version version);
56
57   FeatureGroupEntity createFeatureGroup(FeatureGroupEntity fg);
58
59   void updateFeatureGroup(FeatureGroupEntity featureGroup,
60                           Set<String> addedLicenseKeyGroups, Set<String> removedLicenseKeyGroups,
61                           Set<String> addedEntitlementPools, Set<String> removedEntitlementPools);
62
63   FeatureGroupModel getFeatureGroupModel(FeatureGroupEntity featureGroup);
64
65   void deleteFeatureGroup(FeatureGroupEntity featureGroup);
66
67
68   Collection<EntitlementPoolEntity> listEntitlementPools(String vlmId, Version version);
69
70   EntitlementPoolEntity createEntitlementPool(EntitlementPoolEntity entitlementPool);
71
72   void updateEntitlementPool(EntitlementPoolEntity entitlementPool);
73
74   EntitlementPoolEntity getEntitlementPool(EntitlementPoolEntity entitlementPool);
75
76   void deleteEntitlementPool(EntitlementPoolEntity entitlementPool);
77
78
79   Collection<LicenseKeyGroupEntity> listLicenseKeyGroups(String vlmId, Version version);
80
81   LicenseKeyGroupEntity createLicenseKeyGroup(LicenseKeyGroupEntity licenseKeyGroup);
82
83   void updateLicenseKeyGroup(LicenseKeyGroupEntity licenseKeyGroup);
84
85   LicenseKeyGroupEntity getLicenseKeyGroup(LicenseKeyGroupEntity licenseKeyGroup);
86
87   void deleteLicenseKeyGroup(LicenseKeyGroupEntity licenseKeyGroup);
88
89   LimitEntity createLimit(LimitEntity limitEntity);
90
91   Collection<LimitEntity> listLimits(String vlmId, Version version, String epLkgId);
92
93   void deleteLimit(LimitEntity limitEntity);
94
95   void updateLimit(LimitEntity limitEntity);
96
97   LimitEntity getLimit(LimitEntity entitlementPool);
98 }