aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/backend/openecomp-sdc-vendor-license-manager/src/main/java/org/openecomp/sdc/vendorlicense/VendorLicenseManager.java
blob: dbe786a44b8374883c43be21554e8a6398265992 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
/*-
 * ============LICENSE_START=======================================================
 * SDC
 * ================================================================================
 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
 * ================================================================================
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * ============LICENSE_END=========================================================
 */

package org.openecomp.sdc.vendorlicense;

import org.openecomp.sdc.vendorlicense.dao.types.EntitlementPoolEntity;
import org.openecomp.sdc.vendorlicense.dao.types.FeatureGroupModel;
import org.openecomp.sdc.vendorlicense.dao.types.LicenseAgreementEntity;
import org.openecomp.sdc.vendorlicense.dao.types.LicenseAgreementModel;
import org.openecomp.sdc.vendorlicense.dao.types.LicenseKeyGroupEntity;
import org.openecomp.sdc.vendorlicense.dao.types.VendorLicenseModelEntity;
import org.openecomp.sdc.vendorlicense.types.VersionedVendorLicenseModel;
import org.openecomp.sdc.versioning.dao.types.Version;

import java.util.Collection;
import java.util.Set;

public interface VendorLicenseManager {

  void checkout(String vendorLicenseModelId, String user);

  void undoCheckout(String vendorLicenseModelId, String user);

  void checkin(String vendorLicenseModelId, String user);

  void submit(String vendorLicenseModelId, String user);

  Collection<VersionedVendorLicenseModel> listVendorLicenseModels(String versionFilter,
                                                                  String user);

  VendorLicenseModelEntity createVendorLicenseModel(VendorLicenseModelEntity licenseModel,
                                                    String user);

  void updateVendorLicenseModel(VendorLicenseModelEntity licenseModel, String user);

  VersionedVendorLicenseModel getVendorLicenseModel(String vlmId, Version version, String user);

  void deleteVendorLicenseModel(String vlmId, String user);


  Collection<LicenseAgreementEntity> listLicenseAgreements(String vlmId, Version version,
                                                           String user);

  LicenseAgreementEntity createLicenseAgreement(LicenseAgreementEntity licenseAgreement,
                                                String user);

  void updateLicenseAgreement(LicenseAgreementEntity licenseAgreement,
                              Set<String> addedFeatureGroupIds, Set<String> removedFeatureGroupIds,
                              String user);

  LicenseAgreementModel getLicenseAgreementModel(String vlmId, Version version,
                                                 String licenseAgreementId, String user);

  void deleteLicenseAgreement(String vlmId, String licenseAgreementId, String user);


  Collection<org.openecomp.sdc.vendorlicense.dao.types.FeatureGroupEntity> listFeatureGroups(
      String vlmId, Version version, String user);

  org.openecomp.sdc.vendorlicense.dao.types.FeatureGroupEntity createFeatureGroup(
      org.openecomp.sdc.vendorlicense.dao.types.FeatureGroupEntity fg, String user);

  void updateFeatureGroup(org.openecomp.sdc.vendorlicense.dao.types.FeatureGroupEntity featureGroup,
                          Set<String> addedLicenseKeyGroups, Set<String> removedLicenseKeyGroups,
                          Set<String> addedEntitlementPools, Set<String> removedEntitlementPools,
                          String user);

  FeatureGroupModel getFeatureGroupModel(
      org.openecomp.sdc.vendorlicense.dao.types.FeatureGroupEntity featureGroup, String user);

  void deleteFeatureGroup(org.openecomp.sdc.vendorlicense.dao.types.FeatureGroupEntity featureGroup,
                          String user);


  Collection<EntitlementPoolEntity> listEntitlementPools(String vlmId, Version version,
                                                         String user);

  EntitlementPoolEntity createEntitlementPool(EntitlementPoolEntity entitlementPool, String user);

  void updateEntitlementPool(EntitlementPoolEntity entitlementPool, String user);

  EntitlementPoolEntity getEntitlementPool(EntitlementPoolEntity entitlementPool, String user);

  void deleteEntitlementPool(EntitlementPoolEntity entitlementPool, String user);


  Collection<LicenseKeyGroupEntity> listLicenseKeyGroups(String vlmId, Version version,
                                                         String user);

  LicenseKeyGroupEntity createLicenseKeyGroup(LicenseKeyGroupEntity licenseKeyGroup, String user);

  void updateLicenseKeyGroup(LicenseKeyGroupEntity licenseKeyGroup, String user);

  LicenseKeyGroupEntity getLicenseKeyGroup(LicenseKeyGroupEntity licenseKeyGroup, String user);

  void deleteLicenseKeyGroup(LicenseKeyGroupEntity licenseKeyGroup, String user);

}