Adding the activate method when policies are added.

revert-70aa11f8
geethkokila 9 years ago
parent b391681438
commit 044995ed97

@ -226,8 +226,6 @@ public class MonitoringManagerImpl implements MonitoringManager {
@Override
public void addMonitoringOperation(List<Device> devices) throws PolicyComplianceException {
ComplianceDecisionPoint decisionPoint = new ComplianceDecisionPointImpl();
//int tenantId = PolicyManagerUtil.getTenantId();
Map<Integer, Device> deviceIds = new HashMap<>();
List<ComplianceData> complianceDatas;
@ -327,10 +325,11 @@ public class MonitoringManagerImpl implements MonitoringManager {
}
}
// TODO : This should be uncommented, this is to mark the device as unreachable, But given the current implementation
// we are not able to do so.
// TODO : This should be uncommented, this is to mark the device as unreachable, But given the current
// implementation we are not able to do so.
// if(!deviceToMarkUnreachable.isEmpty()) {
// ComplianceDecisionPoint decisionPoint = new ComplianceDecisionPointImpl();
// decisionPoint.setDevicesAsUnreachable(this.getDeviceIdentifiersFromDevices(
// new ArrayList<>(deviceToMarkUnreachable.values())));
// }

@ -46,7 +46,6 @@ public class PolicyManagerImpl implements PolicyManager {
private ProfileDAO profileDAO;
private FeatureDAO featureDAO;
private ProfileManager profileManager;
private PolicyCacheManager policyCacheManager;
private static Log log = LogFactory.getLog(PolicyManagerImpl.class);
public PolicyManagerImpl() {
@ -105,6 +104,9 @@ public class PolicyManagerImpl implements PolicyManager {
policyDAO.addPolicyCriteriaProperties(policy.getPolicyCriterias());
}
if(policy.isActive()){
policyDAO.activatePolicy(policy.getId());
}
PolicyManagementDAOFactory.commitTransaction();
} catch (PolicyManagerDAOException e) {

Loading…
Cancel
Save