push addional 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.EntitlementPoolEntity;
24 import org.openecomp.sdc.vendorlicense.dao.types.FeatureGroupModel;
25 import org.openecomp.sdc.vendorlicense.dao.types.LicenseAgreementEntity;
26 import org.openecomp.sdc.vendorlicense.dao.types.LicenseAgreementModel;
27 import org.openecomp.sdc.vendorlicense.dao.types.LicenseKeyGroupEntity;
28 import org.openecomp.sdc.vendorlicense.dao.types.VendorLicenseModelEntity;
29 import org.openecomp.sdc.vendorlicense.types.VersionedVendorLicenseModel;
30 import org.openecomp.sdc.versioning.dao.types.Version;
31
32 import java.util.Collection;
33 import java.util.Set;
34
35 public interface VendorLicenseManager {
36
37   void checkout(String vendorLicenseModelId, String user);
38
39   void undoCheckout(String vendorLicenseModelId, String user);
40
41   void checkin(String vendorLicenseModelId, String user);
42
43   void submit(String vendorLicenseModelId, String user);
44
45   Collection<VersionedVendorLicenseModel> listVendorLicenseModels(String versionFilter,
46                                                                   String user);
47
48   VendorLicenseModelEntity createVendorLicenseModel(VendorLicenseModelEntity licenseModel,
49                                                     String user);
50
51   void updateVendorLicenseModel(VendorLicenseModelEntity licenseModel, String user);
52
53   VersionedVendorLicenseModel getVendorLicenseModel(String vlmId, Version version, String user);
54
55   void deleteVendorLicenseModel(String vlmId, String user);
56
57
58   Collection<LicenseAgreementEntity> listLicenseAgreements(String vlmId, Version version,
59                                                            String user);
60
61   LicenseAgreementEntity createLicenseAgreement(LicenseAgreementEntity licenseAgreement,
62                                                 String user);
63
64   void updateLicenseAgreement(LicenseAgreementEntity licenseAgreement,
65                               Set<String> addedFeatureGroupIds, Set<String> removedFeatureGroupIds,
66                               String user);
67
68   LicenseAgreementModel getLicenseAgreementModel(String vlmId, Version version,
69                                                  String licenseAgreementId, String user);
70
71   void deleteLicenseAgreement(String vlmId, String licenseAgreementId, String user);
72
73
74   Collection<org.openecomp.sdc.vendorlicense.dao.types.FeatureGroupEntity> listFeatureGroups(
75       String vlmId, Version version, String user);
76
77   org.openecomp.sdc.vendorlicense.dao.types.FeatureGroupEntity createFeatureGroup(
78       org.openecomp.sdc.vendorlicense.dao.types.FeatureGroupEntity fg, String user);
79
80   void updateFeatureGroup(org.openecomp.sdc.vendorlicense.dao.types.FeatureGroupEntity featureGroup,
81                           Set<String> addedLicenseKeyGroups, Set<String> removedLicenseKeyGroups,
82                           Set<String> addedEntitlementPools, Set<String> removedEntitlementPools,
83                           String user);
84
85   FeatureGroupModel getFeatureGroupModel(
86       org.openecomp.sdc.vendorlicense.dao.types.FeatureGroupEntity featureGroup, String user);
87
88   void deleteFeatureGroup(org.openecomp.sdc.vendorlicense.dao.types.FeatureGroupEntity featureGroup,
89                           String user);
90
91
92   Collection<EntitlementPoolEntity> listEntitlementPools(String vlmId, Version version,
93                                                          String user);
94
95   EntitlementPoolEntity createEntitlementPool(EntitlementPoolEntity entitlementPool, String user);
96
97   void updateEntitlementPool(EntitlementPoolEntity entitlementPool, String user);
98
99   EntitlementPoolEntity getEntitlementPool(EntitlementPoolEntity entitlementPool, String user);
100
101   void deleteEntitlementPool(EntitlementPoolEntity entitlementPool, String user);
102
103
104   Collection<LicenseKeyGroupEntity> listLicenseKeyGroups(String vlmId, Version version,
105                                                          String user);
106
107   LicenseKeyGroupEntity createLicenseKeyGroup(LicenseKeyGroupEntity licenseKeyGroup, String user);
108
109   void updateLicenseKeyGroup(LicenseKeyGroupEntity licenseKeyGroup, String user);
110
111   LicenseKeyGroupEntity getLicenseKeyGroup(LicenseKeyGroupEntity licenseKeyGroup, String user);
112
113   void deleteLicenseKeyGroup(LicenseKeyGroupEntity licenseKeyGroup, String user);
114
115 }