aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api
diff options
context:
space:
mode:
authortalig <talig@amdocs.com>2017-12-20 14:30:43 +0200
committerVitaly Emporopulo <Vitaliy.Emporopulo@amdocs.com>2017-12-21 11:12:33 +0000
commit8e9c0653dd6c6862123c9609ae34e1206d86456e (patch)
tree5eeef00ec0677133baa439ca8d7ffd7aca4804b6 /openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api
parent785ebcc95de3e064e843bec04ba7a209d854fc7c (diff)
Add collaboration feature
Issue-ID: SDC-767 Change-Id: I14fb4c1f54086ed03a56a7ff7fab9ecd40381795 Signed-off-by: talig <talig@amdocs.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api')
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/VendorLicenseUtil.java28
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/EntitlementPoolEntity.java61
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/LicenseKeyGroupEntity.java63
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/LimitEntity.java50
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/VendorLicenseModelEntity.java10
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/facade/VendorLicenseFacade.java60
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/healing/HealingService.java2
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/VendorLicenseArtifactsService.java2
8 files changed, 181 insertions, 95 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/VendorLicenseUtil.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/VendorLicenseUtil.java
new file mode 100644
index 0000000000..3ee326af4c
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/VendorLicenseUtil.java
@@ -0,0 +1,28 @@
+package org.openecomp.sdc.vendorlicense;
+
+import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+
+public class VendorLicenseUtil {
+
+ private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage();
+
+ public static String getIsoFormatDate(String inputDate) {
+ mdcDataDebugMessage.debugEntryMessage("inputDate date", inputDate);
+ String isoFormatDate = null;
+ SimpleDateFormat isoDateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
+ SimpleDateFormat inputDateFormat = new SimpleDateFormat("MM/dd/yyyy'T'HH:mm:ss'Z'");
+
+ try {
+ isoFormatDate = isoDateFormat.format(inputDateFormat.parse(inputDate));
+ } catch (ParseException e) {
+ mdcDataDebugMessage.debugExitMessage("parsing error", isoFormatDate);
+ isoFormatDate = null;
+ }
+
+ mdcDataDebugMessage.debugExitMessage("formatted date", isoFormatDate);
+ return isoFormatDate;
+ }
+}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/EntitlementPoolEntity.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/EntitlementPoolEntity.java
index 2b7b3a6ded..6c4ba90d96 100644
--- a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/EntitlementPoolEntity.java
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/EntitlementPoolEntity.java
@@ -26,6 +26,9 @@ import com.datastax.driver.mapping.annotations.Enumerated;
import com.datastax.driver.mapping.annotations.Frozen;
import com.datastax.driver.mapping.annotations.PartitionKey;
import com.datastax.driver.mapping.annotations.Table;
+import org.apache.commons.lang3.StringUtils;
+import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage;
+import org.openecomp.sdc.vendorlicense.VendorLicenseUtil;
import org.openecomp.sdc.vendorlicense.dao.types.xml.LimitForXml;
import org.openecomp.sdc.vendorlicense.dao.types.xml.LimitXml;
import org.openecomp.sdc.vendorlicense.dao.types.xml.OperationalScopeForXml;
@@ -40,6 +43,8 @@ import java.util.Set;
@Table(keyspace = "dox", name = "entitlement_pool")
public class EntitlementPoolEntity implements VersionableEntity {
+
+ private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage();
private static final String ENTITY_TYPE = "Entitlement Pool";
@PartitionKey
@@ -201,7 +206,7 @@ public class EntitlementPoolEntity implements VersionableEntity {
}
public void setOperationalScope(MultiChoiceOrOther<OperationalScope> operationalScope) {
- if(operationalScope != null) {
+ if (operationalScope != null) {
operationalScope.resolveEnum(OperationalScope.class);
}
this.operationalScope = operationalScope;
@@ -220,7 +225,8 @@ public class EntitlementPoolEntity implements VersionableEntity {
}
/**
- * Gets version for artifact.
+ * Gets version for artifact.
+ *
* @return version in format suitable for artifact
*/
public String getVersionForArtifact() {
@@ -251,17 +257,18 @@ public class EntitlementPoolEntity implements VersionableEntity {
this.limits = limits;
}
- public LimitForXml getSPLimits(){
- if(limits != null){
+ public LimitForXml getSPLimits() {
+ if (limits != null) {
Set<LimitXml> hs = new HashSet<>();
- for(LimitEntity obj : limits){
- if(obj.getType().equals(LimitType.ServiceProvider)){
+ for (LimitEntity obj : limits) {
+ if (obj.getType().equals(LimitType.ServiceProvider)) {
LimitXml xmlObj = new LimitXml();
xmlObj.setDescription(obj.getDescription());
xmlObj.setMetric(obj.getMetric());
xmlObj.setValues(obj.getValue());
xmlObj.setUnit(obj.getUnit());
- xmlObj.setAggregationFunction(obj.getAggregationFunction()!=null?obj.getAggregationFunction().name():null);
+ xmlObj.setAggregationFunction(
+ obj.getAggregationFunction() != null ? obj.getAggregationFunction().name() : null);
xmlObj.setTime(obj.getTime());
hs.add(xmlObj);
}
@@ -274,17 +281,18 @@ public class EntitlementPoolEntity implements VersionableEntity {
return null;
}
- public LimitForXml getVendorLimits(){
- if(limits != null){
+ public LimitForXml getVendorLimits() {
+ if (limits != null) {
Set<LimitXml> hs = new HashSet<>();
- for(LimitEntity obj : limits){
- if(obj.getType().equals(LimitType.Vendor)){
+ for (LimitEntity obj : limits) {
+ if (obj.getType().equals(LimitType.Vendor)) {
LimitXml xmlObj = new LimitXml();
xmlObj.setDescription(obj.getDescription());
xmlObj.setMetric(obj.getMetric());
xmlObj.setValues(obj.getValue());
xmlObj.setUnit(obj.getUnit());
- xmlObj.setAggregationFunction(obj.getAggregationFunction()!=null?obj.getAggregationFunction().name():null);
+ xmlObj.setAggregationFunction(
+ obj.getAggregationFunction() != null ? obj.getAggregationFunction().name() : null);
xmlObj.setTime(obj.getTime());
hs.add(xmlObj);
}
@@ -324,7 +332,9 @@ public class EntitlementPoolEntity implements VersionableEntity {
&& Objects.equals(operationalScope, that.operationalScope)
&& Objects.equals(referencingFeatureGroups, that.referencingFeatureGroups)
&& Objects.equals(startDate, that.startDate)
- && Objects.equals(expiryDate, that.expiryDate);
+ && Objects.equals(expiryDate, that.expiryDate)
+ && Objects.equals(manufacturerReferenceNumber, that.manufacturerReferenceNumber)
+ && Objects.equals(version, that.version);
}
@Override
@@ -354,7 +364,7 @@ public class EntitlementPoolEntity implements VersionableEntity {
public OperationalScopeForXml getOperationalScopeForArtifact() {
OperationalScopeForXml obj = new OperationalScopeForXml();
if (operationalScope != null) {
- if(operationalScope.getResults().size() > 0) {
+ if (operationalScope.getResults().size() > 0) {
obj.setValue(operationalScope.getResults());
}
}
@@ -369,4 +379,27 @@ public class EntitlementPoolEntity implements VersionableEntity {
public String getManufacturerReferenceNumber() {
return manufacturerReferenceNumber;
}
+
+ public String getIsoFormatStartDate() {
+ mdcDataDebugMessage.debugEntryMessage("start date", startDate);
+ String isoFormatStartDate = null;
+ if (!StringUtils.isEmpty(startDate)) {
+ isoFormatStartDate = VendorLicenseUtil.getIsoFormatDate(startDate);
+ mdcDataDebugMessage.debugExitMessage("start date", "iso format start date", startDate,
+ isoFormatStartDate);
+ }
+ return isoFormatStartDate;
+ }
+
+
+ public String getIsoFormatExpiryDate() {
+ mdcDataDebugMessage.debugEntryMessage("expiry date", expiryDate);
+ String isoFormatExpDate = null;
+ if (!StringUtils.isEmpty(expiryDate)) {
+ isoFormatExpDate = VendorLicenseUtil.getIsoFormatDate(expiryDate);
+ mdcDataDebugMessage.debugExitMessage("expiry date", "iso format expiry date", expiryDate,
+ isoFormatExpDate);
+ }
+ return isoFormatExpDate;
+ }
}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/LicenseKeyGroupEntity.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/LicenseKeyGroupEntity.java
index 364a240498..7794aaf275 100644
--- a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/LicenseKeyGroupEntity.java
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/LicenseKeyGroupEntity.java
@@ -26,9 +26,12 @@ import com.datastax.driver.mapping.annotations.Enumerated;
import com.datastax.driver.mapping.annotations.Frozen;
import com.datastax.driver.mapping.annotations.PartitionKey;
import com.datastax.driver.mapping.annotations.Table;
+import org.apache.commons.lang3.StringUtils;
+import org.openecomp.sdc.logging.context.impl.MdcDataDebugMessage;
+import org.openecomp.sdc.vendorlicense.VendorLicenseUtil;
import org.openecomp.sdc.vendorlicense.dao.types.xml.LicenseKeyTypeForXml;
-import org.openecomp.sdc.vendorlicense.dao.types.xml.LimitXml;
import org.openecomp.sdc.vendorlicense.dao.types.xml.LimitForXml;
+import org.openecomp.sdc.vendorlicense.dao.types.xml.LimitXml;
import org.openecomp.sdc.vendorlicense.dao.types.xml.OperationalScopeForXml;
import org.openecomp.sdc.vendorlicense.dao.types.xml.ThresholdForXml;
import org.openecomp.sdc.versioning.dao.types.Version;
@@ -41,6 +44,8 @@ import java.util.Set;
@Table(keyspace = "dox", name = "license_key_group")
public class LicenseKeyGroupEntity implements VersionableEntity {
+
+ private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage();
private static final String ENTITY_TYPE = "License Key Group";
@PartitionKey
@@ -164,7 +169,7 @@ public class LicenseKeyGroupEntity implements VersionableEntity {
}
public void setOperationalScope(MultiChoiceOrOther<OperationalScope> operationalScope) {
- if(operationalScope != null) {
+ if (operationalScope != null) {
operationalScope.resolveEnum(OperationalScope.class);
}
this.operationalScope = operationalScope;
@@ -217,17 +222,18 @@ public class LicenseKeyGroupEntity implements VersionableEntity {
this.limits = limits;
}
- public LimitForXml getSPLimits(){
- if(limits != null){
+ public LimitForXml getSPLimits() {
+ if (limits != null) {
Set<LimitXml> hs = new HashSet<>();
- for(LimitEntity obj : limits){
- if(obj.getType().equals(LimitType.ServiceProvider)){
+ for (LimitEntity obj : limits) {
+ if (obj.getType().equals(LimitType.ServiceProvider)) {
LimitXml xmlObj = new LimitXml();
xmlObj.setDescription(obj.getDescription());
xmlObj.setMetric(obj.getMetric());
xmlObj.setValues(obj.getValue());
xmlObj.setUnit(obj.getUnit());
- xmlObj.setAggregationFunction(obj.getAggregationFunction()!=null?obj.getAggregationFunction().name():null);
+ xmlObj.setAggregationFunction(
+ obj.getAggregationFunction() != null ? obj.getAggregationFunction().name() : null);
xmlObj.setTime(obj.getTime());
hs.add(xmlObj);
}
@@ -240,17 +246,18 @@ public class LicenseKeyGroupEntity implements VersionableEntity {
return null;
}
- public LimitForXml getVendorLimits(){
- if(limits != null){
+ public LimitForXml getVendorLimits() {
+ if (limits != null) {
Set<LimitXml> hs = new HashSet<>();
- for(LimitEntity obj : limits){
- if(obj.getType().equals(LimitType.Vendor)){
+ for (LimitEntity obj : limits) {
+ if (obj.getType().equals(LimitType.Vendor)) {
LimitXml xmlObj = new LimitXml();
xmlObj.setDescription(obj.getDescription());
xmlObj.setMetric(obj.getMetric());
xmlObj.setValues(obj.getValue());
xmlObj.setUnit(obj.getUnit());
- xmlObj.setAggregationFunction(obj.getAggregationFunction()!=null?obj.getAggregationFunction().name():null);
+ xmlObj.setAggregationFunction(
+ obj.getAggregationFunction() != null ? obj.getAggregationFunction().name() : null);
xmlObj.setTime(obj.getTime());
hs.add(xmlObj);
}
@@ -297,6 +304,7 @@ public class LicenseKeyGroupEntity implements VersionableEntity {
}
LicenseKeyGroupEntity that = (LicenseKeyGroupEntity) obj;
return Objects.equals(vendorLicenseModelId, that.vendorLicenseModelId)
+ && Objects.equals(version, that.version)
&& Objects.equals(id, that.id)
&& Objects.equals(name, that.name)
&& Objects.equals(description, that.description)
@@ -307,7 +315,8 @@ public class LicenseKeyGroupEntity implements VersionableEntity {
&& Objects.equals(expiryDate, that.expiryDate)
&& Objects.equals(thresholdValue, that.thresholdValue)
&& Objects.equals(thresholdUnits, that.thresholdUnits)
- && Objects.equals(increments, that.increments);
+ && Objects.equals(increments, that.increments)
+ && Objects.equals(manufacturerReferenceNumber, that.manufacturerReferenceNumber);
}
@Override
@@ -337,7 +346,7 @@ public class LicenseKeyGroupEntity implements VersionableEntity {
public OperationalScopeForXml getOperationalScopeForArtifact() {
OperationalScopeForXml obj = new OperationalScopeForXml();
if (operationalScope != null) {
- if(operationalScope.getResults().size() > 0) {
+ if (operationalScope.getResults().size() > 0) {
obj.setValue(operationalScope.getResults());
}
}
@@ -346,6 +355,7 @@ public class LicenseKeyGroupEntity implements VersionableEntity {
/**
* Gets version for artifact.
+ *
* @return version in format suitable for artifact
*/
public String getVersionForArtifact() {
@@ -375,4 +385,29 @@ public class LicenseKeyGroupEntity implements VersionableEntity {
public void setManufacturerReferenceNumber(String manufacturerReferenceNumber) {
this.manufacturerReferenceNumber = manufacturerReferenceNumber;
}
+
+ public String getIsoFormatStartDate() {
+ mdcDataDebugMessage.debugEntryMessage("start date", startDate);
+ String isoFormatStartDate = null;
+ if (!StringUtils.isEmpty(startDate)) {
+ isoFormatStartDate = VendorLicenseUtil.getIsoFormatDate(startDate);
+ mdcDataDebugMessage.debugExitMessage("start date", "iso format start date", startDate,
+ isoFormatStartDate);
+ }
+ return isoFormatStartDate;
+ }
+
+
+ public String getIsoFormatExpiryDate() {
+ mdcDataDebugMessage.debugEntryMessage("expiry date", expiryDate);
+ String isoFormatExpDate = null;
+ if (!StringUtils.isEmpty(expiryDate)) {
+ isoFormatExpDate = VendorLicenseUtil.getIsoFormatDate(expiryDate);
+ mdcDataDebugMessage.debugExitMessage("expiry date", "iso format expiry date", expiryDate,
+ isoFormatExpDate);
+ }
+ return isoFormatExpDate;
+ }
+
+
}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/LimitEntity.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/LimitEntity.java
index 58ccd5e608..0860c243b0 100644
--- a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/LimitEntity.java
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/LimitEntity.java
@@ -47,7 +47,7 @@ public class LimitEntity implements VersionableEntity {
}
public void setAggregationFunction(
- AggregationFunction aggregationFunction) {
+ AggregationFunction aggregationFunction) {
this.aggregationFunction = aggregationFunction;
}
@@ -159,7 +159,7 @@ public class LimitEntity implements VersionableEntity {
@Override
public int hashCode() {
return Objects.hash(vendorLicenseModelId, version, epLkgId, id, name, description, type,
- metric, unit, time, aggregationFunction, value);
+ metric, unit, time, aggregationFunction, value);
}
@Override
@@ -172,35 +172,35 @@ public class LimitEntity implements VersionableEntity {
}
LimitEntity that = (LimitEntity) obj;
return Objects.equals(that.unit, unit)
- && Objects.equals(that.value, value)
- && Objects.equals(vendorLicenseModelId, that.vendorLicenseModelId)
- && Objects.equals(epLkgId, that.epLkgId)
- && Objects.equals(id, that.id)
- && Objects.equals(name, that.name)
- && Objects.equals(description, that.description)
- && Objects.equals(type, that.type)
- && Objects.equals(metric, that.metric)
- && Objects.equals(aggregationFunction, that.aggregationFunction);
+ && Objects.equals(that.value, value)
+ && Objects.equals(vendorLicenseModelId, that.vendorLicenseModelId)
+ && Objects.equals(epLkgId, that.epLkgId)
+ && Objects.equals(id, that.id)
+ && Objects.equals(name, that.name)
+ && Objects.equals(description, that.description)
+ && Objects.equals(type, that.type)
+ && Objects.equals(metric, that.metric)
+ && Objects.equals(aggregationFunction, that.aggregationFunction);
}
@Override
public String toString() {
return "LimitEntity{"
- + "vendorLicenseModelId='" + vendorLicenseModelId + '\''
- + ", version=" + version
- + ", epLkgId=" + epLkgId
- + ", id='" + id + '\''
- + ", name='" + name + '\''
- + ", description='" + description + '\''
- + ", type=" + type
- + ", metric=" + metric
- + ", value='" + value + '\''
- + ", unit='" + unit + '\''
- + ", aggregationFunction=" + aggregationFunction
- + ", time=" + time
-
- + '}';
+ + "vendorLicenseModelId='" + vendorLicenseModelId + '\''
+ + ", version=" + version
+ + ", epLkgId=" + epLkgId
+ + ", id='" + id + '\''
+ + ", name='" + name + '\''
+ + ", description='" + description + '\''
+ + ", type=" + type
+ + ", metric=" + metric
+ + ", value='" + value + '\''
+ + ", unit='" + unit + '\''
+ + ", aggregationFunction=" + aggregationFunction
+ + ", time=" + time
+
+ + '}';
}
}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/VendorLicenseModelEntity.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/VendorLicenseModelEntity.java
index b57b850f60..05cc78f855 100644
--- a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/VendorLicenseModelEntity.java
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/dao/types/VendorLicenseModelEntity.java
@@ -45,6 +45,7 @@ public class VendorLicenseModelEntity implements VersionableEntity {
@Column(name = "vendor_name")
private String vendorName;
private String description;
+ private String oldVersion;
@Column(name = "icon")
private String iconRef;
@@ -111,6 +112,15 @@ public class VendorLicenseModelEntity implements VersionableEntity {
this.iconRef = iconRef;
}
+ public void setOldVersion(String oldVersion) {
+ this.oldVersion = oldVersion;
+ }
+
+ public String getOldVersion() {
+ return oldVersion;
+ }
+
+
@Override
public int hashCode() {
return Objects.hash(id, version, vendorName, description, iconRef);
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/facade/VendorLicenseFacade.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/facade/VendorLicenseFacade.java
index 3d27de3a88..dda42eeff3 100644
--- a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/facade/VendorLicenseFacade.java
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/facade/VendorLicenseFacade.java
@@ -29,72 +29,52 @@ import org.openecomp.sdc.vendorlicense.dao.types.LicenseAgreementModel;
import org.openecomp.sdc.vendorlicense.dao.types.LicenseKeyGroupEntity;
import org.openecomp.sdc.vendorlicense.dao.types.LimitEntity;
import org.openecomp.sdc.vendorlicense.dao.types.VendorLicenseModelEntity;
-import org.openecomp.sdc.vendorlicense.types.VersionedVendorLicenseModel;
import org.openecomp.sdc.versioning.dao.types.Version;
-import org.openecomp.sdc.versioning.types.VersionInfo;
-import org.openecomp.sdc.versioning.types.VersionableEntityAction;
import java.util.Collection;
public interface VendorLicenseFacade {
- Version checkin(String vendorLicenseModelId, String user);
-
- Version submit(String vendorLicenseModelId, String user);
-
- FeatureGroupEntity getFeatureGroup(FeatureGroupEntity featureGroup, String user);
-
- FeatureGroupModel getFeatureGroupModel(FeatureGroupEntity featureGroup, String user);
-
LicenseAgreementEntity getLicenseAgreement(String vlmId, Version version,
- String licenseAgreementId, String user);
+ String licenseAgreementId);
LicenseAgreementModel getLicenseAgreementModel(String vlmId, Version version,
- String licenseAgreementId, String user);
+ String licenseAgreementId);
+
+ LicenseAgreementEntity createLicenseAgreement(LicenseAgreementEntity licenseAgreement);
- EntitlementPoolEntity createEntitlementPool(EntitlementPoolEntity entitlementPool, String user);
+ Collection<FeatureGroupEntity> listFeatureGroups(String vlmId, Version version);
- void updateEntitlementPool(EntitlementPoolEntity entitlementPool, String user);
+ FeatureGroupEntity getFeatureGroup(FeatureGroupEntity featureGroup);
- Collection<LicenseKeyGroupEntity> listLicenseKeyGroups(String vlmId, Version version,
- String user);
+ FeatureGroupModel getFeatureGroupModel(FeatureGroupEntity featureGroup);
- Collection<EntitlementPoolEntity> listEntitlementPools(String vlmId, Version version,
- String user);
+ FeatureGroupEntity createFeatureGroup(FeatureGroupEntity featureGroup);
- void updateLicenseKeyGroup(LicenseKeyGroupEntity licenseKeyGroup, String user);
+ Collection<EntitlementPoolEntity> listEntitlementPools(String vlmId, Version version);
- LicenseKeyGroupEntity createLicenseKeyGroup(LicenseKeyGroupEntity licenseKeyGroup, String user);
+ EntitlementPoolEntity createEntitlementPool(EntitlementPoolEntity entitlementPool);
+ void updateEntitlementPool(EntitlementPoolEntity entitlementPool);
- VersionedVendorLicenseModel getVendorLicenseModel(String vlmId, Version version, String user);
+ Collection<LicenseKeyGroupEntity> listLicenseKeyGroups(String vlmId, Version version);
- VendorLicenseModelEntity createVendorLicenseModel(
- VendorLicenseModelEntity vendorLicenseModelEntity, String user);
+ LicenseKeyGroupEntity createLicenseKeyGroup(LicenseKeyGroupEntity licenseKeyGroup);
+ void updateLicenseKeyGroup(LicenseKeyGroupEntity licenseKeyGroup);
- LicenseAgreementEntity createLicenseAgreement(LicenseAgreementEntity licenseAgreement,
- String user);
+ Collection<LimitEntity> listLimits(String vlmId, Version version, String epLkgId);
- Collection<FeatureGroupEntity> listFeatureGroups(String vlmId, Version version,
- String user);
+ LimitEntity createLimit(LimitEntity limit);
- FeatureGroupEntity createFeatureGroup(FeatureGroupEntity featureGroup, String user);
+ void updateLimit(LimitEntity limit);
+
+ VendorLicenseModelEntity getVendorLicenseModel(String vlmId, Version version);
Collection<ErrorCode> validateLicensingData(String vlmId, Version vlmVersion,
String licenseAgreementId,
Collection<String> featureGroupIds);
- VersionInfo getVersionInfo(String vendorLicenseModelId, VersionableEntityAction action,
- String user);
-
- void updateVlmLastModificationTime(String vendorLicenseModelId, Version version);
-
- LimitEntity createLimit(LimitEntity limit, String user);
-
- Collection<LimitEntity> listLimits(String vlmId, Version version, String epLkgId
- ,String user);
-
- void updateLimit(LimitEntity limit, String user);
+ void validate(String vendorLicenseModelId, Version version);
}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/healing/HealingService.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/healing/HealingService.java
index 6ae2de1a63..a3a5b7263f 100644
--- a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/healing/HealingService.java
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/healing/HealingService.java
@@ -24,7 +24,7 @@ import org.openecomp.sdc.versioning.dao.types.VersionableEntity;
public interface HealingService {
- VersionableEntity heal(VersionableEntity toHeal, String user);
+ VersionableEntity heal(VersionableEntity toHeal);
void persistNoHealing(VersionableEntity alreadyHealed);
}
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/VendorLicenseArtifactsService.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/VendorLicenseArtifactsService.java
index c0610a99cd..66ac7ab33f 100644
--- a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/VendorLicenseArtifactsService.java
+++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-api/src/main/java/org/openecomp/sdc/vendorlicense/licenseartifacts/VendorLicenseArtifactsService.java
@@ -28,5 +28,5 @@ import java.util.List;
public interface VendorLicenseArtifactsService {
FileContentHandler createLicenseArtifacts(String vspId, String vlmId, Version vlmVersion,
- List<String> featureGroups, String user);
+ List<String> featureGroups);
}