// when only a difference in state
if(sed.findEntryStateDelta() != null && keys.size() == 1)
{
sed.setDeltaStatus("notExpectedState");
sed.setDeltaStatusInfo(new SingleDeltaStatusInfo(sed.getExpectedEntryState() + "!=" +
sed.getCurrentEntryState()));
}
else
{
// handle it as a delta
sed.setDeltaStatus("delta");
keys = new TreeSet<String>(keys);
Collection<String> values = new ArrayList<String>(keys.size());
for(String key : keys)
{
SystemEntryValueWithDelta<Object> errorValue = sed.findErrorValue(key);
values.add(key + ":[" + errorValue.getExpectedValue() + "!=" +
errorValue.getCurrentValue() + "]");
}
sed.setDeltaStatusInfo(MultipleDeltaStatusInfo.create(values));
}
}
else
{
// when there is an error
if(sed.getError() != null)
{
sed.setDeltaState(SystemEntryDelta.DeltaState.ERROR);
sed.setDeltaStatus("error");
sed.setDeltaStatusInfo(new SingleDeltaStatusInfo(sed.getError().toString()));
}
else
{
// empty agent
if(sed.isEmptyAgent())
{
sed.setDeltaState(SystemEntryDelta.DeltaState.NA);
sed.setDeltaStatus("NA");
sed.setDeltaStatusInfo(new SingleDeltaStatusInfo("empty agent"));
}
else
{
// everything ok!
sed.setDeltaState(SystemEntryDelta.DeltaState.OK);
sed.setDeltaStatus("expectedState");
sed.setDeltaStatusInfo(new SingleDeltaStatusInfo(sed.getExpectedEntryState()));
}
}
}
}