connObjects = statusUtils.getConnectorObjects(subject);
final List<StatusBean> statusBeans = new ArrayList<StatusBean>(connObjects.size() + 1);
initialStatusBeanMap = new LinkedHashMap<String, StatusBean>(connObjects.size() + 1);
final StatusBean syncope = new StatusBean(subject, "syncope");
if (subject instanceof UserTO) {
syncope.setAccountLink(((UserTO) subject).getUsername());
Status syncopeStatus = Status.UNDEFINED;
if (((UserTO) subject).getStatus() != null) {
try {
syncopeStatus = Status.valueOf(((UserTO) subject).getStatus().toUpperCase());
} catch (IllegalArgumentException e) {
LOG.warn("Unexpected status found: {}", ((UserTO) subject).getStatus(), e);
}
}
syncope.setStatus(syncopeStatus);
} else if (subject instanceof RoleTO) {
syncope.setAccountLink(((RoleTO) subject).getDisplayName());
syncope.setStatus(Status.ACTIVE);
}
statusBeans.add(syncope);
initialStatusBeanMap.put(syncope.getResourceName(), syncope);
for (ConnObjectWrapper entry : connObjects) {
final StatusBean statusBean = statusUtils.getStatusBean(
entry.getAttributable(),
entry.getResourceName(),
entry.getConnObjectTO(),
subject instanceof RoleTO);