public Relationships(final AnyWrapper<?> modelObject, final PageReference pageRef) { super(); add(new Label("title", new ResourceModel("any.relationships"))); if (modelObject instanceof UserWrapper && UserWrapper.class.cast(modelObject).getPreviousUserTO() != null && !ListUtils.isEqualList( UserWrapper.class.cast(modelObject).getInnerObject().getRelationships(), UserWrapper.class.cast(modelObject).getPreviousUserTO().getRelationships())) { add(new LabelInfo("changed", StringUtils.EMPTY)); } else { add(new Label("changed", StringUtils.EMPTY)); } this.anyTO = modelObject.getInnerObject(); this.pageRef = pageRef; // ------------------------ // Existing relationships // ------------------------ add(getViewFragment().setRenderBodyOnly(true)); // ------------------------ }
LOG.warn("Invalid {} specified: {}", RelationshipPatch.class.getName(), relPatch); } else { result.getRelationships().remove(relPatch.getRelationshipTO()); if (relPatch.getOperation() == PatchOperation.ADD_REPLACE) { result.getRelationships().add(relPatch.getRelationshipTO());
virAttrs(userTO.getVirAttrs()). memberships(userTO.getMemberships()). relationships(userTO.getRelationships()). roles(userTO.getRoles()). resources(userTO.getResources()).
LOG.warn("Invalid {} specified: {}", RelationshipUR.class.getName(), relPatch); } else { result.getRelationships().remove(relPatch.getRelationshipTO()); if (relPatch.getOperation() == PatchOperation.ADD_REPLACE) { result.getRelationships().add(relPatch.getRelationshipTO());
handler.startElement("", "", "relationships", null); for (RelationshipTO rel : userTO.getRelationships()) { atts.clear();
userTO.getRelationships().addAll(user.getRelationships().stream(). map(relationship -> getRelationshipTO(relationship.getType().getKey(), relationship.getRightEnd())). collect(Collectors.toList()));
EntityTOUtils.buildRelationshipMap(updated.getRelationships()); Map<Pair<String, String>, RelationshipTO> originalRels = EntityTOUtils.buildRelationshipMap(original.getRelationships());
EntityTOUtils.buildRelationshipMap(updated.getRelationships()); Map<Pair<String, String>, RelationshipTO> originalRels = EntityTOUtils.buildRelationshipMap(original.getRelationships());
userCR.setSecurityAnswer(userTO.getSecurityAnswer()); userCR.setMustChangePassword(userTO.isMustChangePassword()); userCR.getRelationships().addAll(userTO.getRelationships()); userCR.getMemberships().addAll(userTO.getMemberships()); userCR.getRoles().addAll(userTO.getRoles());
userTO.setSecurityAnswer(userCR.getSecurityAnswer()); userTO.setMustChangePassword(userCR.isMustChangePassword()); userTO.getRelationships().addAll(userCR.getRelationships()); userTO.getMemberships().addAll(userCR.getMemberships()); userTO.getRoles().addAll(userCR.getRoles());
if (user.getRealm() != null) { userTO.getRelationships().forEach(relationshipTO -> { AnyObject otherEnd = anyObjectDAO.find(relationshipTO.getOtherEndKey()); if (otherEnd == null) {