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;
23 import org.openecomp.sdc.vendorlicense.dao.types.*;
24 import org.openecomp.sdc.versioning.dao.types.Version;
26 import java.util.Collection;
29 public interface VendorLicenseManager {
31 void validate(String vendorLicenseModelId, Version version);
33 VendorLicenseModelEntity createVendorLicenseModel(VendorLicenseModelEntity licenseModel);
35 void updateVendorLicenseModel(VendorLicenseModelEntity licenseModel);
37 VendorLicenseModelEntity getVendorLicenseModel(String vlmId, Version version);
39 void deleteVendorLicenseModel(String vlmId, Version version);
42 Collection<LicenseAgreementEntity> listLicenseAgreements(String vlmId, Version version);
44 LicenseAgreementEntity createLicenseAgreement(LicenseAgreementEntity licenseAgreement);
46 void updateLicenseAgreement(LicenseAgreementEntity licenseAgreement,
47 Set<String> addedFeatureGroupIds, Set<String> removedFeatureGroupIds);
49 LicenseAgreementModel getLicenseAgreementModel(String vlmId, Version version,
50 String licenseAgreementId);
52 void deleteLicenseAgreement(String vlmId, Version version, String licenseAgreementId);
55 Collection<FeatureGroupEntity> listFeatureGroups(String vlmId, Version version);
57 FeatureGroupEntity createFeatureGroup(FeatureGroupEntity fg);
59 void updateFeatureGroup(FeatureGroupEntity featureGroup,
60 Set<String> addedLicenseKeyGroups, Set<String> removedLicenseKeyGroups,
61 Set<String> addedEntitlementPools, Set<String> removedEntitlementPools);
63 FeatureGroupModel getFeatureGroupModel(FeatureGroupEntity featureGroup);
65 void deleteFeatureGroup(FeatureGroupEntity featureGroup);
68 Collection<EntitlementPoolEntity> listEntitlementPools(String vlmId, Version version);
70 EntitlementPoolEntity createEntitlementPool(EntitlementPoolEntity entitlementPool);
72 void updateEntitlementPool(EntitlementPoolEntity entitlementPool);
74 EntitlementPoolEntity getEntitlementPool(EntitlementPoolEntity entitlementPool);
76 void deleteEntitlementPool(EntitlementPoolEntity entitlementPool);
79 Collection<LicenseKeyGroupEntity> listLicenseKeyGroups(String vlmId, Version version);
81 LicenseKeyGroupEntity createLicenseKeyGroup(LicenseKeyGroupEntity licenseKeyGroup);
83 void updateLicenseKeyGroup(LicenseKeyGroupEntity licenseKeyGroup);
85 LicenseKeyGroupEntity getLicenseKeyGroup(LicenseKeyGroupEntity licenseKeyGroup);
87 void deleteLicenseKeyGroup(LicenseKeyGroupEntity licenseKeyGroup);
89 LimitEntity createLimit(LimitEntity limitEntity);
91 Collection<LimitEntity> listLimits(String vlmId, Version version, String epLkgId);
93 void deleteLimit(LimitEntity limitEntity);
95 void updateLimit(LimitEntity limitEntity);
97 LimitEntity getLimit(LimitEntity entitlementPool);