Package org.ldaptive

Class LdapURL.Entry

  • Enclosing class:
    LdapURL

    public static class LdapURL.Entry
    extends Object
    Represents a single LDAP URL entry.
    • Field Detail

      • DEFAULT_LDAP_PORT

        protected static final int DEFAULT_LDAP_PORT
        Default LDAP port, value is 389.
        See Also:
        Constant Field Values
      • DEFAULT_LDAPS_PORT

        protected static final int DEFAULT_LDAPS_PORT
        Default LDAPS port, value is 636.
        See Also:
        Constant Field Values
      • DEFAULT_FILTER

        protected static final SearchFilter DEFAULT_FILTER
        Default search filter value is '(objectClass=*)'.
      • DEFAULT_ATTRIBUTES

        protected static final String[] DEFAULT_ATTRIBUTES
        Default return attributes, value is none.
      • urlScheme

        private final String urlScheme
        Scheme of the ldap url.
      • urlHostname

        private final String urlHostname
        Hostname of the ldap url.
      • urlPort

        private final int urlPort
        Port of the ldap url.
      • urlBaseDn

        private final String urlBaseDn
        Base DN of the ldap url.
      • urlAttributes

        private final String[] urlAttributes
        Attributes of the ldap url.
      • urlScope

        private final SearchScope urlScope
        Search scope of the ldap url.
      • urlFilter

        private final SearchFilter urlFilter
        Search filter of the ldap url.
    • Constructor Detail

      • Entry

        public Entry​(String scheme,
                     String hostname,
                     int port,
                     String baseDn,
                     String[] attributes,
                     SearchScope scope,
                     SearchFilter filter)
        Creates a new entry.
        Parameters:
        scheme - entryScheme
        hostname - entryHostname
        port - entryPort
        baseDn - base DN
        attributes - attributes
        scope - search scope
        filter - search filter
    • Method Detail

      • getScheme

        public String getScheme()
        Returns the entryScheme.
        Returns:
        entryScheme
      • getHostname

        public String getHostname()
        Returns the entryHostname.
        Returns:
        entryHostname
      • getPort

        public int getPort()
        Returns the entryPort.
        Returns:
        entryPort
      • isDefaultPort

        public boolean isDefaultPort()
        Returns whether a port was supplied in this entry.
        Returns:
        whether a port was supplied in this entry
      • getBaseDn

        public String getBaseDn()
        Returns the base DN.
        Returns:
        baseDn
      • isDefaultBaseDn

        public boolean isDefaultBaseDn()
        Returns whether a base DN was supplied in this entry.
        Returns:
        whether a base DN was supplied in this entry
      • getAttributes

        public String[] getAttributes()
        Returns the attributes.
        Returns:
        attributes
      • isDefaultAttributes

        public boolean isDefaultAttributes()
        Returns whether attributes were supplied in this entry.
        Returns:
        whether a attributes were supplied in this entry
      • getScope

        public SearchScope getScope()
        Returns the scope.
        Returns:
        scope
      • isDefaultScope

        public boolean isDefaultScope()
        Returns whether a scope was supplied in this entry.
        Returns:
        whether a scope was supplied in this entry
      • getFilter

        public SearchFilter getFilter()
        Returns the filter.
        Returns:
        filter
      • isDefaultFilter

        public boolean isDefaultFilter()
        Returns whether a filter was supplied in this entry.
        Returns:
        whether a filter was supplied in this entry
      • getUrl

        public String getUrl()
        Returns the formatted URL as scheme://hostname:port/baseDn?attrs?scope?filter.
        Returns:
        url
      • getHostnameWithPort

        public String getHostnameWithPort()
        Returns the hostname:port.
        Returns:
        hostname:port
      • getHostnameWithSchemeAndPort

        public String getHostnameWithSchemeAndPort()
        Returns the scheme://hostname:port.
        Returns:
        scheme://hostname:port