3d27de3a883aea0f723ce07e24e56a1129638daf
[sdc.git] /
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.facade;
22
23 import org.openecomp.sdc.common.errors.ErrorCode;
24 import org.openecomp.sdc.vendorlicense.dao.types.EntitlementPoolEntity;
25 import org.openecomp.sdc.vendorlicense.dao.types.FeatureGroupEntity;
26 import org.openecomp.sdc.vendorlicense.dao.types.FeatureGroupModel;
27 import org.openecomp.sdc.vendorlicense.dao.types.LicenseAgreementEntity;
28 import org.openecomp.sdc.vendorlicense.dao.types.LicenseAgreementModel;
29 import org.openecomp.sdc.vendorlicense.dao.types.LicenseKeyGroupEntity;
30 import org.openecomp.sdc.vendorlicense.dao.types.LimitEntity;
31 import org.openecomp.sdc.vendorlicense.dao.types.VendorLicenseModelEntity;
32 import org.openecomp.sdc.vendorlicense.types.VersionedVendorLicenseModel;
33 import org.openecomp.sdc.versioning.dao.types.Version;
34 import org.openecomp.sdc.versioning.types.VersionInfo;
35 import org.openecomp.sdc.versioning.types.VersionableEntityAction;
36
37 import java.util.Collection;
38
39 public interface VendorLicenseFacade {
40
41   Version checkin(String vendorLicenseModelId, String user);
42
43   Version submit(String vendorLicenseModelId, String user);
44
45   FeatureGroupEntity getFeatureGroup(FeatureGroupEntity featureGroup, String user);
46
47   FeatureGroupModel getFeatureGroupModel(FeatureGroupEntity featureGroup, String user);
48
49   LicenseAgreementEntity getLicenseAgreement(String vlmId, Version version,
50                                              String licenseAgreementId, String user);
51
52   LicenseAgreementModel getLicenseAgreementModel(String vlmId, Version version,
53                                                  String licenseAgreementId, String user);
54
55   EntitlementPoolEntity createEntitlementPool(EntitlementPoolEntity entitlementPool, String user);
56
57   void updateEntitlementPool(EntitlementPoolEntity entitlementPool, String user);
58
59   Collection<LicenseKeyGroupEntity> listLicenseKeyGroups(String vlmId, Version version,
60                                                          String user);
61
62   Collection<EntitlementPoolEntity> listEntitlementPools(String vlmId, Version version,
63                                                          String user);
64
65   void updateLicenseKeyGroup(LicenseKeyGroupEntity licenseKeyGroup, String user);
66
67   LicenseKeyGroupEntity createLicenseKeyGroup(LicenseKeyGroupEntity licenseKeyGroup, String user);
68
69
70   VersionedVendorLicenseModel getVendorLicenseModel(String vlmId, Version version, String user);
71
72   VendorLicenseModelEntity createVendorLicenseModel(
73       VendorLicenseModelEntity vendorLicenseModelEntity, String user);
74
75
76   LicenseAgreementEntity createLicenseAgreement(LicenseAgreementEntity licenseAgreement,
77                                                 String user);
78
79   Collection<FeatureGroupEntity> listFeatureGroups(String vlmId, Version version,
80                                                          String user);
81
82   FeatureGroupEntity createFeatureGroup(FeatureGroupEntity featureGroup, String user);
83
84
85   Collection<ErrorCode> validateLicensingData(String vlmId, Version vlmVersion,
86                                               String licenseAgreementId,
87                                               Collection<String> featureGroupIds);
88
89   VersionInfo getVersionInfo(String vendorLicenseModelId, VersionableEntityAction action,
90                              String user);
91
92   void updateVlmLastModificationTime(String vendorLicenseModelId, Version version);
93
94   LimitEntity createLimit(LimitEntity limit, String user);
95
96   Collection<LimitEntity> listLimits(String vlmId, Version version, String epLkgId
97                                                ,String user);
98
99   void updateLimit(LimitEntity limit, String user);
100 }