Interface LdaptiveAttribute<T>

Type Parameters:
T - the type parameter
All Known Implementing Classes:
LdaptiveAttribute.Specification

public interface LdaptiveAttribute<T>
The ldaptive attribute.
Author:
Christian Bremer
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    The ldaptive attribute specification.
  • Method Summary

    Modifier and Type
    Method
    Description
    default org.ldaptive.LdapAttribute
    Create attribute ldap attribute.
    default org.ldaptive.LdapAttribute
    Create attribute ldap attribute.
    default org.ldaptive.LdapAttribute
    Create attribute ldap attribute.
    define(String name)
    Define ldaptive attribute.
    static <T> LdaptiveAttribute<T>
    define(String name, boolean binary, org.ldaptive.transcode.ValueTranscoder<T> valueTranscoder)
    Define ldaptive attribute.
    default boolean
    exists(org.ldaptive.LdapEntry entry)
    Determines whether the attribute exists in the given ldap entry or not.
    Gets name.
    default Optional<T>
    getValue(org.ldaptive.LdapEntry entry)
    Gets value.
    default Optional<T>
    getValue(org.ldaptive.LdapEntry entry, T defaultValue)
    Gets value.
    default Stream<T>
    getValues(org.ldaptive.LdapEntry entry)
    Gets values.
    org.ldaptive.transcode.ValueTranscoder<T>
    Gets value transcoder.
    boolean
    Is binary.
    default Optional<org.ldaptive.AttributeModification>
    setValue(org.ldaptive.LdapEntry entry, T value)
    Sets value.
    default Optional<org.ldaptive.AttributeModification>
    setValue(org.ldaptive.LdapEntry entry, T value, BiPredicate<T,T> condition)
    Sets value.
    default Optional<org.ldaptive.AttributeModification>
    setValues(org.ldaptive.LdapEntry entry, Collection<T> values)
    Sets values.
  • Method Details

    • getName

      String getName()
      Gets name.
      Returns:
      the name
    • isBinary

      boolean isBinary()
      Is binary.
      Returns:
      the boolean
    • getValueTranscoder

      org.ldaptive.transcode.ValueTranscoder<T> getValueTranscoder()
      Gets value transcoder.
      Returns:
      the value transcoder
    • exists

      default boolean exists(org.ldaptive.LdapEntry entry)
      Determines whether the attribute exists in the given ldap entry or not.
      Parameters:
      entry - the entry
      Returns:
      true if the attribute exists, otherwise false
    • getValue

      default Optional<T> getValue(org.ldaptive.LdapEntry entry)
      Gets value.
      Parameters:
      entry - the entry
      Returns:
      the value
    • getValue

      default Optional<T> getValue(org.ldaptive.LdapEntry entry, T defaultValue)
      Gets value.
      Parameters:
      entry - the entry
      defaultValue - the default value
      Returns:
      the value
    • getValues

      default Stream<T> getValues(org.ldaptive.LdapEntry entry)
      Gets values.
      Parameters:
      entry - the entry
      Returns:
      the values
    • setValue

      default Optional<org.ldaptive.AttributeModification> setValue(org.ldaptive.LdapEntry entry, T value)
      Sets value.
      Parameters:
      entry - the entry
      value - the value
      Returns:
      the value
    • setValue

      default Optional<org.ldaptive.AttributeModification> setValue(org.ldaptive.LdapEntry entry, T value, BiPredicate<T,T> condition)
      Sets value.
      Parameters:
      entry - the entry
      value - the value
      condition - the condition
      Returns:
      the value
    • setValues

      default Optional<org.ldaptive.AttributeModification> setValues(org.ldaptive.LdapEntry entry, Collection<T> values)
      Sets values.
      Parameters:
      entry - the entry
      values - the values
      Returns:
      the values
    • createAttribute

      default org.ldaptive.LdapAttribute createAttribute()
      Create attribute ldap attribute.
      Returns:
      the ldap attribute
    • createAttribute

      default org.ldaptive.LdapAttribute createAttribute(T value)
      Create attribute ldap attribute.
      Parameters:
      value - the value
      Returns:
      the ldap attribute
    • createAttribute

      default org.ldaptive.LdapAttribute createAttribute(Collection<T> values)
      Create attribute ldap attribute.
      Parameters:
      values - the values
      Returns:
      the ldap attribute
    • define

      static LdaptiveAttribute<String> define(String name)
      Define ldaptive attribute.
      Parameters:
      name - the name
      Returns:
      the ldaptive attribute
    • define

      static <T> LdaptiveAttribute<T> define(String name, boolean binary, org.ldaptive.transcode.ValueTranscoder<T> valueTranscoder)
      Define ldaptive attribute.
      Type Parameters:
      T - the type parameter
      Parameters:
      name - the name
      binary - the binary
      valueTranscoder - the value transcoder
      Returns:
      the ldaptive attribute