Fixing formating issues

revert-70aa11f8
geethkokila 8 years ago
parent 07357124b0
commit 5f71313af1

@ -66,11 +66,9 @@ public class DeviceDetailsRetrieverTask implements Task {
if(executeForTenants){ if(executeForTenants){
this.executeForAllTenants(); this.executeForAllTenants();
} else { } else {
if (log.isDebugEnabled()) { if (log.isDebugEnabled()) {
log.debug("Device details retrieving task started to run."); log.debug("Device details retrieving task started to run.");
} }
DeviceTaskManager deviceTaskManager = new DeviceTaskManagerImpl(deviceType, DeviceTaskManager deviceTaskManager = new DeviceTaskManagerImpl(deviceType,
operationMonitoringTaskConfig); operationMonitoringTaskConfig);
//pass the configurations also from here, monitoring tasks //pass the configurations also from here, monitoring tasks
@ -78,13 +76,11 @@ public class DeviceDetailsRetrieverTask implements Task {
deviceTaskManager.addOperations(); deviceTaskManager.addOperations();
} catch (DeviceMgtTaskException e) { } catch (DeviceMgtTaskException e) {
log.error( log.error(
"Error occurred while trying to add the operations to device to retrieve device details.", "Error occurred while trying to add the operations to device to retrieve device details.", e);
e);
} }
} }
} }
private void executeForAllTenants() { private void executeForAllTenants() {
if (log.isDebugEnabled()) { if (log.isDebugEnabled()) {
@ -119,7 +115,6 @@ public class DeviceDetailsRetrieverTask implements Task {
log.error("Error occurred while trying to get the available tenants " + log.error("Error occurred while trying to get the available tenants " +
"from device manager provider service.", e); "from device manager provider service.", e);
} }
} }
} }

@ -88,7 +88,6 @@ public class MonitoringTask implements Task {
return false; return false;
} }
private void executeforAllTenants() { private void executeforAllTenants() {
if (log.isDebugEnabled()) { if (log.isDebugEnabled()) {
@ -104,9 +103,7 @@ public class MonitoringTask implements Task {
PrivilegedCarbonContext.startTenantFlow(); PrivilegedCarbonContext.startTenantFlow();
PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(tenantDomain); PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(tenantDomain);
PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantId(tenant); PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantId(tenant);
this.executeTask(); this.executeTask();
} finally { } finally {
PrivilegedCarbonContext.endTenantFlow(); PrivilegedCarbonContext.endTenantFlow();
} }
@ -116,10 +113,8 @@ public class MonitoringTask implements Task {
} catch (DeviceManagementException e) { } catch (DeviceManagementException e) {
log.error("Error occurred while trying to get the available tenants from device manager service ", e); log.error("Error occurred while trying to get the available tenants from device manager service ", e);
} }
} }
private void executeTask(){ private void executeTask(){
MonitoringManager monitoringManager = PolicyManagementDataHolder.getInstance().getMonitoringManager(); MonitoringManager monitoringManager = PolicyManagementDataHolder.getInstance().getMonitoringManager();

Loading…
Cancel
Save