return new ValidationResult.Builder().subject(subject).input(input).valid(true).build(); this.kerberosPrincipal = new PropertyDescriptor.Builder() .name("Kerberos Principal") .required(false) .description("Kerberos principal to authenticate as. Requires logisland.kerberos.krb5.file to be set in your logisland.properties") .addValidator(kerberosConfigValidator) .build(); this.kerberosKeytab = new PropertyDescriptor.Builder() .name("Kerberos Keytab").required(false) .description("Kerberos keytab associated with the principal. Requires logisland.kerberos.krb5.file to be set in your logisland.properties") .addValidator(StandardValidators.FILE_EXISTS_VALIDATOR) .addValidator(kerberosConfigValidator) .build();
private PropertyDescriptor getPropertyDescriptor(final PropertyDescriptor specDescriptor) { PropertyDescriptor descriptor = null; //check if property supported final List<PropertyDescriptor> supportedDescriptors = getSupportedPropertyDescriptors(); if (supportedDescriptors != null) { for (final PropertyDescriptor desc : supportedDescriptors) { //find actual descriptor if (specDescriptor.equals(desc)) { return desc; } } } descriptor = getSupportedDynamicPropertyDescriptor(specDescriptor.getName()); if (descriptor != null && !descriptor.isDynamic()) { descriptor = new PropertyDescriptor.Builder().fromPropertyDescriptor(descriptor).dynamic(true).build(); } if (descriptor == null) { descriptor = new PropertyDescriptor.Builder().fromPropertyDescriptor(specDescriptor).addValidator(Validator.INVALID).dynamic(true).build(); } return descriptor; }
@Override protected PropertyDescriptor getSupportedDynamicPropertyDescriptor(final String propertyDescriptorName) { return new PropertyDescriptor.Builder() .name(propertyDescriptorName) .expressionLanguageSupported(false) .addValidator(StandardValidators.NON_EMPTY_VALIDATOR) .required(false) .dynamic(true) .build(); }
/** * @param descriptorName to lookup the descriptor * @return a PropertyDescriptor for the name specified that is fully * populated */ @Override public final PropertyDescriptor getPropertyDescriptor(final String descriptorName) { final PropertyDescriptor specDescriptor = new PropertyDescriptor.Builder().name(descriptorName).build(); return getPropertyDescriptor(specDescriptor); }
@Override protected PropertyDescriptor getSupportedDynamicPropertyDescriptor(final String propertyDescriptorName) { return new PropertyDescriptor.Builder() .name(propertyDescriptorName) .expressionLanguageSupported(false) .addValidator(StandardValidators.NON_EMPTY_VALIDATOR) .required(false) .dynamic(true) .build(); }
@Override protected PropertyDescriptor getSupportedDynamicPropertyDescriptor(final String propertyDescriptorName) { return new PropertyDescriptor.Builder() .name(propertyDescriptorName) .expressionLanguageSupported(true) .addValidator(StandardValidators.COMMA_SEPARATED_LIST_VALIDATOR) .required(false) .dynamic(true) .build(); }
@Override protected PropertyDescriptor getSupportedDynamicPropertyDescriptor(final String propertyDescriptorName) { return new PropertyDescriptor.Builder().name(propertyDescriptorName).expressionLanguageSupported(false).addValidator(new JsonPathValidator() { @Override public void cacheComputedValue(String subject, String input, JsonPath computedJsonPath) { cachedJsonPathMap.put(input, computedJsonPath); } @Override public boolean isStale(String subject, String input) { return cachedJsonPathMap.get(input) == null; } }).required(false).dynamic(true).build(); }
@Override protected PropertyDescriptor getSupportedDynamicPropertyDescriptor(final String propertyDescriptorName) { return new PropertyDescriptor.Builder() .name(propertyDescriptorName) .expressionLanguageSupported(false) .addValidator(StandardValidators.NON_EMPTY_VALIDATOR) .required(false) .dynamic(true) .build(); }
@Override protected PropertyDescriptor getSupportedDynamicPropertyDescriptor(final String propertyDescriptorName) { return new PropertyDescriptor.Builder() .name(propertyDescriptorName) .expressionLanguageSupported(false) .addValidator(StandardValidators.COMMA_SEPARATED_LIST_VALIDATOR) .required(false) .dynamic(true) .build(); }
@Override protected PropertyDescriptor getSupportedDynamicPropertyDescriptor(final String propertyDescriptorName) { return new PropertyDescriptor.Builder() .name(propertyDescriptorName) .expressionLanguageSupported(false) .addValidator(StandardValidators.NON_EMPTY_VALIDATOR) .required(false) .dynamic(true) .build(); }
@Override protected PropertyDescriptor getSupportedDynamicPropertyDescriptor(final String propertyDescriptorName) { return new PropertyDescriptor.Builder() .name(propertyDescriptorName) .expressionLanguageSupported(false) .addValidator(StandardValidators.NON_EMPTY_VALIDATOR) .required(false) .dynamic(true) .build(); }
@Override protected PropertyDescriptor getSupportedDynamicPropertyDescriptor(final String propertyDescriptorName) { return new PropertyDescriptor.Builder() .name(propertyDescriptorName) .expressionLanguageSupported(false) .addValidator(StandardValidators.NON_EMPTY_VALIDATOR) .required(false) .dynamic(true) .build(); }
@Override protected PropertyDescriptor getSupportedDynamicPropertyDescriptor(final String propertyDescriptorName) { return new PropertyDescriptor.Builder() .name(propertyDescriptorName) .expressionLanguageSupported(false) .addValidator(StandardValidators.COMMA_SEPARATED_LIST_VALIDATOR) .required(false) .dynamic(true) .build(); }