@Override protected String getName(final AnyTO anyTO) { return GroupTO.class.cast(anyTO).getName(); }
public StatusBean(final AnyTO any, final String resource) { this.key = any.getKey(); this.name = any instanceof UserTO ? ((UserTO) any).getUsername() : any instanceof GroupTO ? ((GroupTO) any).getName() : ((AnyObjectTO) any).getName(); this.resource = resource; }
GroupableRelatableTO.class.cast(anyTO).getMemberships().forEach(membership -> { if (assignedGroups.containsKey(membership.getGroupKey())) { membership.setGroupName(assignedGroups.get(membership.getGroupKey()).getName()); } else { toBeRemoved.add(membership);
@Override public String getObject() { if (groupWrapper.getInnerObject().getGroupOwner() == null) { return StringUtils.EMPTY; } else { GroupTO groupTO = groupRestClient.read(groupWrapper.getInnerObject().getGroupOwner()); if (groupTO == null) { return StringUtils.EMPTY; } else { return String.format("[%s] %s", groupTO.getKey(), groupTO.getName()); } } }
syncope.setConnObjectLink(((GroupTO) actual).getName()); break;
groupTO.getETagValue(), location), output(attributes, excludedAttributes, "displayName", groupTO.getName()));
/** * Calculate modifications needed by first in order to be equal to second. * * @param updated updated GroupTO * @param original original GroupTO * @param incremental perform incremental diff (without removing existing info) * @return GroupPatch containing differences */ public static GroupPatch diff(final GroupTO updated, final GroupTO original, final boolean incremental) { GroupPatch result = new GroupPatch(); diff(updated, original, result, incremental); // 1. name result.setName(replacePatchItem(updated.getName(), original.getName(), new StringReplacePatchItem())); // 2. ownership result.setUserOwner( replacePatchItem(updated.getUserOwner(), original.getUserOwner(), new StringReplacePatchItem())); result.setGroupOwner( replacePatchItem(updated.getGroupOwner(), original.getGroupOwner(), new StringReplacePatchItem())); // 3. dynamic membership result.setUDynMembershipCond(updated.getUDynMembershipCond()); result.getADynMembershipConds().putAll(updated.getADynMembershipConds()); // 4. type extensions result.getTypeExtensions().addAll(updated.getTypeExtensions()); return result; }
syncope.setConnObjectLink(((GroupTO) any).getName()); syncope.setStatus(Status.ACTIVE);
/** * Calculate modifications needed by first in order to be equal to second. * * @param updated updated GroupTO * @param original original GroupTO * @param incremental perform incremental diff (without removing existing info) * @return {@link GroupUR} containing differences */ public static GroupUR diff(final GroupTO updated, final GroupTO original, final boolean incremental) { GroupUR result = new GroupUR(); diff(updated, original, result, incremental); // 1. name result.setName(replacePatchItem(updated.getName(), original.getName(), new StringReplacePatchItem())); // 2. ownership result.setUserOwner( replacePatchItem(updated.getUserOwner(), original.getUserOwner(), new StringReplacePatchItem())); result.setGroupOwner( replacePatchItem(updated.getGroupOwner(), original.getGroupOwner(), new StringReplacePatchItem())); // 3. dynamic membership result.setUDynMembershipCond(updated.getUDynMembershipCond()); result.getADynMembershipConds().putAll(updated.getADynMembershipConds()); // 4. type extensions result.getTypeExtensions().addAll(updated.getTypeExtensions()); return result; }
((UserTO) anyTO).getRoles().addAll(((UserTO) template).getRoles()); } else if (template instanceof GroupTO) { if (StringUtils.isNotBlank(((GroupTO) template).getName())) { String evaluated = JexlUtils.evaluate(((GroupTO) template).getName(), jexlContext); if (StringUtils.isNotBlank(evaluated)) { ((GroupTO) anyTO).setName(evaluated);
fileKey = UserTO.class.cast(modelObject.getInnerObject()).getUsername(); } else if (modelObject.getInnerObject() instanceof GroupTO) { fileKey = GroupTO.class.cast(modelObject.getInnerObject()).getName(); } else if (modelObject.getInnerObject() instanceof AnyObjectTO) { fileKey = AnyObjectTO.class.cast(modelObject.getInnerObject()).getName();
GroupTO groupTO = (GroupTO) anyTO; groupCR.setName(groupTO.getName()); groupCR.setUserOwner(groupTO.getUserOwner()); groupCR.setGroupOwner(groupTO.getGroupOwner());
header = ((UserWrapper) modelObject).getInnerObject().getUsername(); } else if (modelObject instanceof GroupTO) { header = ((GroupTO) modelObject).getName(); } else if (modelObject instanceof GroupWrapper) { header = ((GroupWrapper) modelObject).getInnerObject().getName(); } else if (modelObject instanceof AnyObjectTO) { header = ((AnyObjectTO) modelObject).getName();