public Builder schema(final String schema) { instance.setSchema(schema); return this; }
@PreAuthorize("hasRole('" + StandardEntitlement.CONFIGURATION_GET + "')") @Transactional(readOnly = true) public AttrTO get(final String schema) { AttrTO result; Optional<? extends CPlainAttr> conf = confDAO.find(schema); if (conf.isPresent()) { result = binder.getAttrTO(conf.get()); } else { PlainSchema plainSchema = plainSchemaDAO.find(schema); if (plainSchema == null) { throw new NotFoundException("Configuration schema " + schema); } result = new AttrTO(); result.setSchema(schema); } return result; }
private AttrTO evaluateAttr(final AttrTO template, final MapContext jexlContext) { AttrTO result = new AttrTO(); result.setSchema(template.getSchema()); if (template.getValues() != null && !template.getValues().isEmpty()) { template.getValues().forEach(value -> { String evaluated = JexlUtils.evaluate(value, jexlContext); if (StringUtils.isNotBlank(evaluated)) { result.getValues().add(evaluated); } }); } return result; }
/** * Builds {@link ConnObjectTO} out of a collection of {@link Attribute} instances. * * @param attrs attributes * @return transfer object */ public static ConnObjectTO getConnObjectTO(final Set<Attribute> attrs) { final ConnObjectTO connObjectTO = new ConnObjectTO(); if (attrs != null) { connObjectTO.getAttrs().addAll(attrs.stream().map(attr -> { AttrTO attrTO = new AttrTO(); attrTO.setSchema(attr.getName()); if (attr.getValue() != null) { attr.getValue().stream().filter(value -> value != null).forEachOrdered(value -> { if (value instanceof GuardedString || value instanceof GuardedByteArray) { attrTO.getValues().add(getPassword(value)); } else if (value instanceof byte[]) { attrTO.getValues().add(Base64.getEncoder().encodeToString((byte[]) value)); } else if (value != null) { attrTO.getValues().add(value.toString()); } }); } return attrTO; }).collect(Collectors.toList())); } return connObjectTO; }
String groupName = membership.getGroupName(); membership.getPlainAttrs().stream().map(attr -> { attr.setSchema(groupName.concat(SyncopeEnduserConstants.MEMBERSHIP_ATTR_SEPARATOR). concat(attr.getSchema())); return attr; membership.getPlainAttrs().clear(); membership.getDerAttrs().stream().map(attr -> { attr.setSchema(groupName.concat(SyncopeEnduserConstants.MEMBERSHIP_ATTR_SEPARATOR). concat(attr.getSchema())); return attr; membership.getDerAttrs().clear(); membership.getVirAttrs().stream().map((attr) -> { attr.setSchema(groupName.concat(SyncopeEnduserConstants.MEMBERSHIP_ATTR_SEPARATOR). concat(attr.getSchema())); return attr;
attrTO.setSchema(StringUtils.EMPTY); if (values.isEmpty() || values.get(0) == null) { attrTO.getValues().add(StringUtils.EMPTY); case PLAIN: AttrTO attrTO = new AttrTO(); attrTO.setSchema(intAttrName.getSchemaName()); attrTO.setSchema(intAttrName.getSchemaName()); attrTO.setSchema(intAttrName.getSchemaName());
attrTO.setSchema(attrName); attr.getAttributeValues().stream(). filter(value -> value.getDOM() != null).
for (OIDCProviderItem item : op.getItems()) { AttrTO attrTO = new AttrTO(); attrTO.setSchema(item.getExtAttrName()); switch (item.getExtAttrName()) { case UserInfo.PREFERRED_USERNAME_CLAIM: