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.EntitlementPoolEntity;
24 import org.openecomp.sdc.vendorlicense.dao.types.FeatureGroupEntity;
25 import org.openecomp.sdc.vendorlicense.dao.types.FeatureGroupModel;
26 import org.openecomp.sdc.vendorlicense.dao.types.LicenseAgreementEntity;
27 import org.openecomp.sdc.vendorlicense.dao.types.LicenseAgreementModel;
28 import org.openecomp.sdc.vendorlicense.dao.types.LicenseKeyGroupEntity;
29 import org.openecomp.sdc.vendorlicense.dao.types.VendorLicenseModelEntity;
30 import org.openecomp.sdc.vendorlicense.types.VersionedVendorLicenseModel;
31 import org.openecomp.sdc.versioning.dao.types.Version;
33 import java.util.Collection;
36 public interface VendorLicenseManager {
38 void checkout(String vendorLicenseModelId, String user);
40 void undoCheckout(String vendorLicenseModelId, String user);
42 void checkin(String vendorLicenseModelId, String user);
44 void submit(String vendorLicenseModelId, String user);
46 Collection<VersionedVendorLicenseModel> listVendorLicenseModels(String versionFilter,
49 VendorLicenseModelEntity createVendorLicenseModel(VendorLicenseModelEntity licenseModel,
52 void updateVendorLicenseModel(VendorLicenseModelEntity licenseModel, String user);
54 VersionedVendorLicenseModel getVendorLicenseModel(String vlmId, Version version, String user);
56 void deleteVendorLicenseModel(String vlmId, String user);
59 Collection<LicenseAgreementEntity> listLicenseAgreements(String vlmId, Version version,
62 LicenseAgreementEntity createLicenseAgreement(LicenseAgreementEntity licenseAgreement,
65 void updateLicenseAgreement(LicenseAgreementEntity licenseAgreement,
66 Set<String> addedFeatureGroupIds, Set<String> removedFeatureGroupIds,
69 LicenseAgreementModel getLicenseAgreementModel(String vlmId, Version version,
70 String licenseAgreementId, String user);
72 void deleteLicenseAgreement(String vlmId, Version version, String licenseAgreementId, String user);
75 Collection<FeatureGroupEntity> listFeatureGroups(String vlmId, Version version, String user);
77 FeatureGroupEntity createFeatureGroup(FeatureGroupEntity fg, String user);
79 void updateFeatureGroup(FeatureGroupEntity featureGroup,
80 Set<String> addedLicenseKeyGroups, Set<String> removedLicenseKeyGroups,
81 Set<String> addedEntitlementPools, Set<String> removedEntitlementPools,
84 FeatureGroupModel getFeatureGroupModel(FeatureGroupEntity featureGroup, String user);
86 void deleteFeatureGroup(FeatureGroupEntity featureGroup, String user);
89 Collection<EntitlementPoolEntity> listEntitlementPools(String vlmId, Version version,
92 EntitlementPoolEntity createEntitlementPool(EntitlementPoolEntity entitlementPool, String user);
94 void updateEntitlementPool(EntitlementPoolEntity entitlementPool, String user);
96 EntitlementPoolEntity getEntitlementPool(EntitlementPoolEntity entitlementPool, String user);
98 void deleteEntitlementPool(EntitlementPoolEntity entitlementPool, String user);
101 Collection<LicenseKeyGroupEntity> listLicenseKeyGroups(String vlmId, Version version,
104 LicenseKeyGroupEntity createLicenseKeyGroup(LicenseKeyGroupEntity licenseKeyGroup, String user);
106 void updateLicenseKeyGroup(LicenseKeyGroupEntity licenseKeyGroup, String user);
108 LicenseKeyGroupEntity getLicenseKeyGroup(LicenseKeyGroupEntity licenseKeyGroup, String user);
110 void deleteLicenseKeyGroup(LicenseKeyGroupEntity licenseKeyGroup, String user);