@JsonIgnore public Optional<ConnConfProperty> getConf(final String schemaName) { return conf.stream().filter(property -> property.getSchema().getName().equals(schemaName)).findFirst(); }
@JsonIgnore public Optional<ConnConfProperty> getConf(final String schemaName) { return conf.stream().filter(property -> property.getSchema().getName().equals(schemaName)).findFirst(); }
private String getCipherAlgorithm(final ConnInstance connInstance) { Optional<ConnConfProperty> cipherAlgorithm = connInstance.getConf().stream(). filter(property -> "cipherAlgorithm".equals(property.getSchema().getName()) && property.getValues() != null && !property.getValues().isEmpty()).findFirst(); return cipherAlgorithm.isPresent() ? (String) cipherAlgorithm.get().getValues().get(0) : CLEARTEXT; }
private String getCipherAlgorithm(final ConnInstance connInstance) { Optional<ConnConfProperty> cipherAlgorithm = connInstance.getConf().stream(). filter(property -> "passwordHashAlgorithm".equals(property.getSchema().getName()) && property.getValues() != null && !property.getValues().isEmpty()).findFirst(); return cipherAlgorithm.isPresent() ? (String) cipherAlgorithm.get().getValues().get(0) : CLEARTEXT; }
private String getCipherAlgorithm(final ConnInstance connInstance) { Optional<ConnConfProperty> cipherAlgorithm = connInstance.getConf().stream(). filter(property -> "cipherAlgorithm".equals(property.getSchema().getName()) && property.getValues() != null && !property.getValues().isEmpty()).findFirst(); return cipherAlgorithm.isPresent() ? (String) cipherAlgorithm.get().getValues().get(0) : CLEARTEXT; }
/** * Allows easy subclassing for the ConnId AD connector bundle. * * @param connector A Connector instance to query for the groupMemberAttribute property name * @return the name of the attribute used to keep track of group memberships */ protected String getGroupMembershipAttrName(final Connector connector) { Optional<ConnConfProperty> groupMembership = connector.getConnInstance().getConf().stream(). filter(property -> "groupMemberAttribute".equals(property.getSchema().getName()) && !property.getValues().isEmpty()). findFirst(); return groupMembership.isPresent() ? (String) groupMembership.get().getValues().get(0) : "uniquemember"; }
/** * Allows easy subclassing for the ConnId AD connector bundle. * * @param connector A Connector instance to query for the groupMemberAttribute property name * @return the name of the attribute used to keep track of group memberships */ @Override protected String getGroupMembershipAttrName(final Connector connector) { Optional<ConnConfProperty> groupMembership = connector.getConnInstance().getConf().stream(). filter(property -> "groupMemberReferenceAttribute".equals(property.getSchema().getName()) && !property.getValues().isEmpty()). findFirst(); return groupMembership.isPresent() ? (String) groupMembership.get().getValues().get(0) : "member"; }
/** * Get available configuration properties. * * @param instance connector instance. * @return configuration properties. */ @Override protected final List<ConnConfProperty> getConnProperties(final ConnInstanceTO instance) { return ConnectorWizardBuilder.getBundle(instance, bundles).getProperties().stream(). map(key -> { ConnConfProperty property = new ConnConfProperty(); property.setSchema(key); instance.getConf(key.getName()).ifPresent(conf -> { if (conf.getValues() != null) { property.getValues().addAll(conf.getValues()); property.setOverridable(conf.isOverridable()); } }); if (property.getValues().isEmpty() && !key.getDefaultValues().isEmpty()) { property.getValues().addAll(key.getDefaultValues()); } return property; }).collect(Collectors.toList()); } }
filter(property -> (property.getValues() != null && !property.getValues().isEmpty())). forEachOrdered(property -> { properties.setPropertyValue(property.getSchema().getName(), getPropertyValue(property.getSchema().getType(), property.getValues())); });
? property.getSchema().getName() : property.getSchema().getDisplayName();