From 66efd5d301c49b72de8679bf2cd3c9163811c75f Mon Sep 17 00:00:00 2001 From: manoj Date: Tue, 27 Jan 2015 23:45:45 +0530 Subject: [PATCH] License Management Refactor --- .../org/wso2/carbon/device/mgt/core/LicenseManagerImpl.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/LicenseManagerImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/LicenseManagerImpl.java index ca1cfa4cf7..413e1fe12b 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/LicenseManagerImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/LicenseManagerImpl.java @@ -73,8 +73,10 @@ public class LicenseManagerImpl implements LicenseManager { filteredArtifacts = artifactManager.findGenericArtifacts( new GenericArtifactFilter() { public boolean matches(GenericArtifact artifact) throws GovernanceException { - String attributeNameVal = artifact.getAttribute("overview_name"); - String attributeLangVal = artifact.getAttribute("overview_language"); + String attributeNameVal = artifact.getAttribute( + DeviceManagementConstants.LicenseProperties.OVERVIEW_NAME); + String attributeLangVal = artifact.getAttribute( + DeviceManagementConstants.LicenseProperties.OVERVIEW_LANGUAGE); return (attributeNameVal != null && attributeLangVal != null && attributeNameVal.equals (deviceType) && attributeLangVal.equals(languageCodes)); }