|
|
@ -267,14 +267,20 @@ public class MonitoringManagerImpl implements MonitoringManager {
|
|
|
|
int enrollmentId;
|
|
|
|
int enrollmentId;
|
|
|
|
for (Device device : devices) {
|
|
|
|
for (Device device : devices) {
|
|
|
|
enrollmentId = device.getEnrolmentInfo().getId();
|
|
|
|
enrollmentId = device.getEnrolmentInfo().getId();
|
|
|
|
if (persistedComplianceData.containsKey(enrollmentId)) {
|
|
|
|
/*
|
|
|
|
notifiableDeviceEnrollments.put(enrollmentId, device);
|
|
|
|
When a policy has applied to the device, and the first monitoring operation runs on the policy, then it
|
|
|
|
} else if (appliedPolicyIds.containsKey(enrollmentId)){
|
|
|
|
is considered as a compliance policy and adds monitoring operation on the applied policy.
|
|
|
|
PolicyDeviceWrapper policyDeviceWrapper = new PolicyDeviceWrapper();
|
|
|
|
If the device has identified the applied policy as either compliance or non-compliance policy then
|
|
|
|
policyDeviceWrapper.setDeviceId(device.getId());
|
|
|
|
adds monitoring operation on the applied policy.
|
|
|
|
policyDeviceWrapper.setEnrolmentId(device.getEnrolmentInfo().getId());
|
|
|
|
.*/
|
|
|
|
policyDeviceWrapper.setPolicyId(appliedPolicyIds.get(enrollmentId));
|
|
|
|
if (appliedPolicyIds.containsKey(enrollmentId)) {
|
|
|
|
firstTimeComplianceData.add(policyDeviceWrapper);
|
|
|
|
if (!persistedComplianceData.containsKey(enrollmentId)) {
|
|
|
|
|
|
|
|
PolicyDeviceWrapper policyDeviceWrapper = new PolicyDeviceWrapper();
|
|
|
|
|
|
|
|
policyDeviceWrapper.setDeviceId(device.getId());
|
|
|
|
|
|
|
|
policyDeviceWrapper.setEnrolmentId(device.getEnrolmentInfo().getId());
|
|
|
|
|
|
|
|
policyDeviceWrapper.setPolicyId(appliedPolicyIds.get(enrollmentId));
|
|
|
|
|
|
|
|
firstTimeComplianceData.add(policyDeviceWrapper);
|
|
|
|
|
|
|
|
}
|
|
|
|
notifiableDeviceEnrollments.put(enrollmentId, device);
|
|
|
|
notifiableDeviceEnrollments.put(enrollmentId, device);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|