2 * ============LICENSE_START=======================================================
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
21 package org.openecomp.sdc.vendorlicense.facade;
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;
37 import java.util.Collection;
39 public interface VendorLicenseFacade {
41 Version checkin(String vendorLicenseModelId, String user);
43 Version submit(String vendorLicenseModelId, String user);
45 FeatureGroupEntity getFeatureGroup(FeatureGroupEntity featureGroup, String user);
47 FeatureGroupModel getFeatureGroupModel(FeatureGroupEntity featureGroup, String user);
49 LicenseAgreementEntity getLicenseAgreement(String vlmId, Version version,
50 String licenseAgreementId, String user);
52 LicenseAgreementModel getLicenseAgreementModel(String vlmId, Version version,
53 String licenseAgreementId, String user);
55 EntitlementPoolEntity createEntitlementPool(EntitlementPoolEntity entitlementPool, String user);
57 void updateEntitlementPool(EntitlementPoolEntity entitlementPool, String user);
59 Collection<LicenseKeyGroupEntity> listLicenseKeyGroups(String vlmId, Version version,
62 Collection<EntitlementPoolEntity> listEntitlementPools(String vlmId, Version version,
65 void updateLicenseKeyGroup(LicenseKeyGroupEntity licenseKeyGroup, String user);
67 LicenseKeyGroupEntity createLicenseKeyGroup(LicenseKeyGroupEntity licenseKeyGroup, String user);
70 VersionedVendorLicenseModel getVendorLicenseModel(String vlmId, Version version, String user);
72 VendorLicenseModelEntity createVendorLicenseModel(
73 VendorLicenseModelEntity vendorLicenseModelEntity, String user);
76 LicenseAgreementEntity createLicenseAgreement(LicenseAgreementEntity licenseAgreement,
79 FeatureGroupEntity createFeatureGroup(FeatureGroupEntity featureGroup, String user);
82 Collection<ErrorCode> validateLicensingData(String vlmId, Version vlmVersion,
83 String licenseAgreementId,
84 Collection<String> featureGroupIds);
86 VersionInfo getVersionInfo(String vendorLicenseModelId, VersionableEntityAction action,
89 void updateVlmLastModificationTime(String vendorLicenseModelId, Version version);
91 LimitEntity createLimit(LimitEntity limit, String user);
93 Collection<LimitEntity> listLimits(String vlmId, Version version, String epLkgId
96 void updateLimit(LimitEntity limit, String user);