@Override
public List<DriftDefinition> getAddedDefinitions(int resourceId, Set<DriftDefinition> definitionsFromServer) {
log.debug("Checking for drift definitions that need to be added for resource id " + resourceId);
ScheduleQueue queue = driftMgr.getSchedulesQueue();
DriftDefinitionComparator comparator = new DriftDefinitionComparator(
BOTH_BASE_INFO_AND_DIRECTORY_SPECIFICATIONS);
List<DriftDefinition> added = new LinkedList<DriftDefinition>();
for (DriftDefinition c : definitionsFromServer) {
if (!queue.contains(resourceId, c, comparator)) {
if (log.isDebugEnabled()) {
log.debug("Detected new drift definition that needs to be added to local inventory - "
+ toString(resourceId, c));
}
added.add(c);