mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Fixing issues in adding license configs
This commit is contained in:
parent
69ba3e83ea
commit
c74e27102f
@ -107,15 +107,8 @@ public class RegistryBasedLicenseManager implements LicenseManager {
|
|||||||
@Override
|
@Override
|
||||||
public void addLicense(final String deviceType, final License license) throws LicenseManagementException {
|
public void addLicense(final String deviceType, final License license) throws LicenseManagementException {
|
||||||
try {
|
try {
|
||||||
GenericArtifact artifact = this.getGenericArtifact(deviceType, license.getLanguage());
|
GenericArtifact artifact =
|
||||||
if (artifact != null) {
|
artifactManager.newGovernanceArtifact(new QName("http://www.wso2.com", deviceType));
|
||||||
if (log.isDebugEnabled()) {
|
|
||||||
log.debug("Generic artifact is null for '" + deviceType + "' device type. Hence license does not " +
|
|
||||||
"have content");
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
artifact = artifactManager.newGovernanceArtifact(new QName("http://www.wso2.com", deviceType));
|
|
||||||
artifact.setAttribute(DeviceManagementConstants.LicenseProperties.NAME, license.getName());
|
artifact.setAttribute(DeviceManagementConstants.LicenseProperties.NAME, license.getName());
|
||||||
artifact.setAttribute(DeviceManagementConstants.LicenseProperties.VERSION, license.getVersion());
|
artifact.setAttribute(DeviceManagementConstants.LicenseProperties.VERSION, license.getVersion());
|
||||||
artifact.setAttribute(DeviceManagementConstants.LicenseProperties.PROVIDER, license.getProvider());
|
artifact.setAttribute(DeviceManagementConstants.LicenseProperties.PROVIDER, license.getProvider());
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user