remove xml data adaptor

revert-70aa11f8
manoj 10 years ago
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,31 +71,30 @@ public class License {
this.language = language;
}
@XmlJavaTypeAdapter(DateAdapter.class)
public Date getValidFrom() {
@XmlElement(name = "license")
public String getLicense() {
return license;
}
public void setLicense(String license) {
this.license = license;
}
@XmlElement(name = "validFrom")
public String getValidFrom() {
return validFrom;
}
public void setValidFrom(Date validFrom) {
public void setValidFrom(String validFrom) {
this.validFrom = validFrom;
}
@XmlJavaTypeAdapter(DateAdapter.class)
public Date getValidTo() {
@XmlElement(name = "validTo")
public String getValidTo() {
return validTo;
}
public void setValidTo(Date validTo) {
public void setValidTo(String validTo) {
this.validTo = validTo;
}
@XmlElement(name = "license")
public String getLicense() {
return license;
}
public void setLicense(String license) {
this.license = license;
}
}

@ -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…
Cancel
Save