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.VendorLicenseModelEntity;
31 import org.openecomp.sdc.vendorlicense.types.VersionedVendorLicenseModel;
32 import org.openecomp.sdc.versioning.dao.types.Version;
33 import org.openecomp.sdc.versioning.types.VersionInfo;
34 import org.openecomp.sdc.versioning.types.VersionableEntityAction;
36 import java.util.Collection;
38 public interface VendorLicenseFacade {
40 Version checkin(String vendorLicenseModelId, String user);
42 Version submit(String vendorLicenseModelId, String user);
44 FeatureGroupEntity getFeatureGroup(FeatureGroupEntity featureGroup, String user);
46 FeatureGroupModel getFeatureGroupModel(FeatureGroupEntity featureGroup, String user);
48 LicenseAgreementEntity getLicenseAgreement(String vlmId, Version version,
49 String licenseAgreementId, String user);
51 LicenseAgreementModel getLicenseAgreementModel(String vlmId, Version version,
52 String licenseAgreementId, String user);
54 EntitlementPoolEntity createEntitlementPool(EntitlementPoolEntity entitlementPool, String user);
56 void updateEntitlementPool(EntitlementPoolEntity entitlementPool, String user);
58 Collection<LicenseKeyGroupEntity> listLicenseKeyGroups(String vlmId, Version version,
61 Collection<EntitlementPoolEntity> listEntitlementPools(String vlmId, Version version,
64 void updateLicenseKeyGroup(LicenseKeyGroupEntity licenseKeyGroup, String user);
66 LicenseKeyGroupEntity createLicenseKeyGroup(LicenseKeyGroupEntity licenseKeyGroup, String user);
69 VersionedVendorLicenseModel getVendorLicenseModel(String vlmId, Version version, String user);
71 VendorLicenseModelEntity createVendorLicenseModel(
72 VendorLicenseModelEntity vendorLicenseModelEntity, String user);
75 LicenseAgreementEntity createLicenseAgreement(LicenseAgreementEntity licenseAgreement,
78 FeatureGroupEntity createFeatureGroup(FeatureGroupEntity featureGroup, String user);
81 Collection<ErrorCode> validateLicensingData(String vlmId, Version vlmVersion,
82 String licenseAgreementId,
83 Collection<String> featureGroupIds);
85 VersionInfo getVersionInfo(String vendorLicenseModelId, VersionableEntityAction action,
88 void updateVlmLastModificationTime(String vendorLicenseModelId, Version version);