mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Adding the activate method when policies are added.
This commit is contained in:
parent
b391681438
commit
044995ed97
@ -226,8 +226,6 @@ public class MonitoringManagerImpl implements MonitoringManager {
|
|||||||
@Override
|
@Override
|
||||||
public void addMonitoringOperation(List<Device> devices) throws PolicyComplianceException {
|
public void addMonitoringOperation(List<Device> devices) throws PolicyComplianceException {
|
||||||
|
|
||||||
ComplianceDecisionPoint decisionPoint = new ComplianceDecisionPointImpl();
|
|
||||||
|
|
||||||
//int tenantId = PolicyManagerUtil.getTenantId();
|
//int tenantId = PolicyManagerUtil.getTenantId();
|
||||||
Map<Integer, Device> deviceIds = new HashMap<>();
|
Map<Integer, Device> deviceIds = new HashMap<>();
|
||||||
List<ComplianceData> complianceDatas;
|
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
|
// TODO : This should be uncommented, this is to mark the device as unreachable, But given the current
|
||||||
// we are not able to do so.
|
// implementation we are not able to do so.
|
||||||
|
|
||||||
// if(!deviceToMarkUnreachable.isEmpty()) {
|
// if(!deviceToMarkUnreachable.isEmpty()) {
|
||||||
|
// ComplianceDecisionPoint decisionPoint = new ComplianceDecisionPointImpl();
|
||||||
// decisionPoint.setDevicesAsUnreachable(this.getDeviceIdentifiersFromDevices(
|
// decisionPoint.setDevicesAsUnreachable(this.getDeviceIdentifiersFromDevices(
|
||||||
// new ArrayList<>(deviceToMarkUnreachable.values())));
|
// new ArrayList<>(deviceToMarkUnreachable.values())));
|
||||||
// }
|
// }
|
||||||
|
|||||||
@ -46,7 +46,6 @@ public class PolicyManagerImpl implements PolicyManager {
|
|||||||
private ProfileDAO profileDAO;
|
private ProfileDAO profileDAO;
|
||||||
private FeatureDAO featureDAO;
|
private FeatureDAO featureDAO;
|
||||||
private ProfileManager profileManager;
|
private ProfileManager profileManager;
|
||||||
private PolicyCacheManager policyCacheManager;
|
|
||||||
private static Log log = LogFactory.getLog(PolicyManagerImpl.class);
|
private static Log log = LogFactory.getLog(PolicyManagerImpl.class);
|
||||||
|
|
||||||
public PolicyManagerImpl() {
|
public PolicyManagerImpl() {
|
||||||
@ -105,6 +104,9 @@ public class PolicyManagerImpl implements PolicyManager {
|
|||||||
policyDAO.addPolicyCriteriaProperties(policy.getPolicyCriterias());
|
policyDAO.addPolicyCriteriaProperties(policy.getPolicyCriterias());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(policy.isActive()){
|
||||||
|
policyDAO.activatePolicy(policy.getId());
|
||||||
|
}
|
||||||
PolicyManagementDAOFactory.commitTransaction();
|
PolicyManagementDAOFactory.commitTransaction();
|
||||||
|
|
||||||
} catch (PolicyManagerDAOException e) {
|
} catch (PolicyManagerDAOException e) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user