Interface Attributes

All Known Subinterfaces:
Application, Directory, GroupWithAttributes, GroupWithAttributes, GroupWithMembers, InternalRemoteDirectory, LDAPDirectory, LDAPDirectoryEntity, RemoteDirectory, SynchronisableDirectory, UserWithAttributes, UserWithAttributes
All Known Implementing Classes:
AbstractDelegatingEntityWithAttributes, AbstractForwardingDirectory, AbstractInternalDirectory, ApacheDS, ApacheDS15, AppleOpenDirectory, ApplicationImpl, AttributeValuesHolder, AuditingDirectoryDecorator, AzureAdDirectory, CachingDirectory, DbCachingRemoteDirectory, DelegatedAuthenticationDirectory, DelegatingGroupWithAttributes, DelegatingGroupWithAttributes, DelegatingUserWithAttributes, DelegatingUserWithAttributes, DirectoryImpl, DirectoryWrapper, EntityWithAttributes, FedoraDS, GenericLDAP, GroupEntity, GroupTemplateWithAttributes, ImmutableApplication, ImmutableAttributes, ImmutableDirectory, ImmutableDirectory, ImmutableDirectoryGroupWithAttributes, ImmutableGroupWithAttributes, ImmutableTimestampedUserWithAttributes, ImmutableUserWithAttributes, InternalDirectory, InternalDirectoryForDelegation, InternalGroupWithAttributes, InternalUserWithAttributes, LazyAttributesEvaluationDirectory, LDAPGroupWithAttributes, LDAPUserWithAttributes, MicrosoftActiveDirectory, MockSimpleRemoteDirectory, MultiValuedAttributeEntityList, MultiValuedAttributeValuesHolder, NovelleDirectory, OpenDS, OpenLDAP, OpenLDAPRfc2307, RecoveryModeDirectory, RecoveryModeRemoteDirectory, RemoteCrowdDirectory, Rfc2307, RFC2307Directory, RFC4519Directory, SpringLDAPConnector, SunONE, UserEntity, UserTemplateWithAttributes, UserTemplateWithCredentialAndAttributes

public interface Attributes
Represents attributes that can be associated to users and groups. One attribute key can have multiple values associated to it.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets all the keys of the attributes.
    Returns any value associated with the given key, returns null if there is no value.
    Get all the values associated with a given key.
    boolean
     
  • Method Details

    • getValues

      @Nullable Set<String> getValues(String key)
      Get all the values associated with a given key. Duplicate values are not allowed, and this should be enforced case-insensitively to match the behaviour of LDAP servers. Will return null if the key does not exist.
      Parameters:
      key - the key to retrieve the values for
      Returns:
      the values associated with the given key. It may return null or empty set if the key does not exist.
    • getValue

      @Nullable String getValue(String key)
      Returns any value associated with the given key, returns null if there is no value.
      Parameters:
      key - the key to retrieve the value for
      Returns:
      any value associated with the given key, or null if there is no value
    • getKeys

      Set<String> getKeys()
      Gets all the keys of the attributes. Warning: case-insensitive keys are currently no enforced, however this is the case for LDAP, so this may be implemented in the future.
      Returns:
      a set of all the keys.
    • isEmpty

      boolean isEmpty()
      Returns:
      true if there are no attributes