fixing the build issue due to removing the method in platform manager.

feature/appm-store/pbac
sinthuja 8 years ago
parent 59f43886cf
commit a7569456ce

@ -18,6 +18,7 @@
*/ */
package org.wso2.carbon.device.application.mgt.core.impl; package org.wso2.carbon.device.application.mgt.core.impl;
import org.wso2.carbon.context.PrivilegedCarbonContext;
import org.wso2.carbon.device.application.mgt.common.*; import org.wso2.carbon.device.application.mgt.common.*;
import org.wso2.carbon.device.application.mgt.common.exception.ApplicationManagementException; import org.wso2.carbon.device.application.mgt.common.exception.ApplicationManagementException;
import org.wso2.carbon.device.application.mgt.common.exception.DBConnectionException; import org.wso2.carbon.device.application.mgt.common.exception.DBConnectionException;
@ -66,7 +67,8 @@ public class ApplicationManagerImpl implements ApplicationManager {
application.setCurrentLifecycle(lifecycle); application.setCurrentLifecycle(lifecycle);
PlatformDAO platformDAO = DAOFactory.getPlatformDAO(); PlatformDAO platformDAO = DAOFactory.getPlatformDAO();
Platform platform = platformDAO.getPlatformByIdentifier(application.getPlatform().getIdentifier()); Platform platform = platformDAO.getPlatform(PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain(true),
application.getPlatform().getIdentifier());
if (platform == null) { if (platform == null) {
throw new NotFoundException("Invalid platform"); throw new NotFoundException("Invalid platform");
} }
@ -110,7 +112,7 @@ public class ApplicationManagerImpl implements ApplicationManager {
ConnectionManagerUtil.openConnection(); ConnectionManagerUtil.openConnection();
ApplicationDAO applicationDAO = DAOFactory.getApplicationDAO(); ApplicationDAO applicationDAO = DAOFactory.getApplicationDAO();
return applicationDAO.getApplications(filter); return applicationDAO.getApplications(filter);
} finally { } finally {
ConnectionManagerUtil.closeConnection(); ConnectionManagerUtil.closeConnection();
} }

Loading…
Cancel
Save