mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
remove xml data adaptor
This commit is contained in:
parent
1736d5db3e
commit
4d87e3f605
@ -20,12 +20,8 @@
|
||||
|
||||
package org.wso2.carbon.device.mgt.core.config.license;
|
||||
|
||||
import org.wso2.carbon.device.mgt.core.util.DateAdapter;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
|
||||
import java.util.Date;
|
||||
|
||||
@XmlRootElement(name = "License")
|
||||
public class License {
|
||||
@ -34,8 +30,9 @@ public class License {
|
||||
private String name;
|
||||
private String version;
|
||||
private String language;
|
||||
private Date validFrom;
|
||||
private Date validTo;
|
||||
|
||||
private String validFrom;
|
||||
private String validTo;
|
||||
private String license;
|
||||
|
||||
@XmlElement(name = "provider")
|
||||
@ -74,24 +71,6 @@ public class License {
|
||||
this.language = language;
|
||||
}
|
||||
|
||||
@XmlJavaTypeAdapter(DateAdapter.class)
|
||||
public Date getValidFrom() {
|
||||
return validFrom;
|
||||
}
|
||||
|
||||
public void setValidFrom(Date validFrom) {
|
||||
this.validFrom = validFrom;
|
||||
}
|
||||
|
||||
@XmlJavaTypeAdapter(DateAdapter.class)
|
||||
public Date getValidTo() {
|
||||
return validTo;
|
||||
}
|
||||
|
||||
public void setValidTo(Date validTo) {
|
||||
this.validTo = validTo;
|
||||
}
|
||||
|
||||
@XmlElement(name = "license")
|
||||
public String getLicense() {
|
||||
return license;
|
||||
@ -101,4 +80,21 @@ public class License {
|
||||
this.license = license;
|
||||
}
|
||||
|
||||
@XmlElement(name = "validFrom")
|
||||
public String getValidFrom() {
|
||||
return validFrom;
|
||||
}
|
||||
|
||||
public void setValidFrom(String validFrom) {
|
||||
this.validFrom = validFrom;
|
||||
}
|
||||
|
||||
@XmlElement(name = "validTo")
|
||||
public String getValidTo() {
|
||||
return validTo;
|
||||
}
|
||||
|
||||
public void setValidTo(String validTo) {
|
||||
this.validTo = validTo;
|
||||
}
|
||||
}
|
||||
|
||||
@ -124,9 +124,9 @@ public class LicenseManagementServiceComponent {
|
||||
artifact.setAttribute(DeviceManagementConstants.LicenseProperties.OVERVIEW_PROVIDER,
|
||||
license.getProvider());
|
||||
artifact.setAttribute(DeviceManagementConstants.LicenseProperties.VALID_TO,
|
||||
license.getValidTo().toString());
|
||||
license.getValidTo());
|
||||
artifact.setAttribute(DeviceManagementConstants.LicenseProperties.VALID_FROM,
|
||||
license.getValidFrom().toString());
|
||||
license.getValidFrom());
|
||||
artifact.setAttribute(DeviceManagementConstants.LicenseProperties.LICENSE,license.getLicense());
|
||||
artifactManager.addGenericArtifact(artifact);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user