Class UrlBuilder

    • Method Detail

      • fromURL

        public void fromURL​(URL aUrl)
        Uses the given URL to set the Url's state.
        Overrides:
        fromURL in class Url
        Parameters:
        aUrl - The URL from which to determine the state.
      • withScheme

        public UrlBuilder withScheme​(org.refcodes.data.Scheme aScheme)
        Sets the UrlScheme for the URL scheme.
        Specified by:
        withScheme in interface SchemeAccessor.SchemeBuilder<UrlBuilder>
        Parameters:
        aScheme - The UrlScheme to be stored by the URL scheme.
        Returns:
        The builder for applying multiple build operations.
      • withIpAddress

        public UrlBuilder withIpAddress​(int[] aIpAddress)
        Specified by:
        withIpAddress in interface org.refcodes.net.IpAddressAccessor.IpAddressBuilder<UrlBuilder>
      • withCidrNotation

        public UrlBuilder withCidrNotation​(String aCidrNotation)
        Specified by:
        withCidrNotation in interface org.refcodes.net.IpAddressAccessor.IpAddressBuilder<UrlBuilder>
      • withPort

        public UrlBuilder withPort​(int aPort)
        Specified by:
        withPort in interface org.refcodes.mixin.PortAccessor.PortBuilder<UrlBuilder>
      • withPath

        public UrlBuilder withPath​(String aPath)
        Specified by:
        withPath in interface org.refcodes.mixin.PathAccessor.PathBuilder<UrlBuilder>
      • appendToPath

        public void appendToPath​(String aPathElement)
        Appends a path element to the path.
        Parameters:
        aPathElement - The path element to be appended.
      • appendToPath

        public void appendToPath​(String... aPathElements)
        Appends multiple path elements to the path, automatically adding the path separator "/" as required.
        Parameters:
        aPathElements - The path elements to be appended.
      • withAppendToPath

        public UrlBuilder withAppendToPath​(String aPath)
        Appends a path element to the path as of the Builder-Pattern.
        Parameters:
        aPath - The path element to be appended.
        Returns:
        This UrlBuilder instance to continue configuration.
      • withAppendToPath

        public UrlBuilder withAppendToPath​(String... aPathElements)
        Appends multiple path elements to the path, automatically adding the path separator "/" as required as of the Builder-Pattern.
        Parameters:
        aPathElements - The path elements to be appended.
        Returns:
        This UrlBuilder instance to continue configuration.
      • addToQueryFields

        public void addToQueryFields​(String aField,
                                     String aValue)
        Adds a value to the list of values associated with the given Query-Field (key).
        Parameters:
        aField - The Query-Field (key) of which's list of values a value is to be added.
        aValue - The value to be added to the list of values associated to the given Query-Field (key).
      • addToQueryFields

        public void addToQueryFields​(String aField,
                                     String... aValues)
        Adds values to the list of values associated with the given Query-Field (key).
        Parameters:
        aField - The Query-Field (key) of which's list of values the values are to be added.
        aValues - The values to be added to the list of values associated to the given Query-Field (key).
      • withAddToQueryFields

        public UrlBuilder withAddToQueryFields​(String aField,
                                               String aValue)
        Adds a value to the list of values associated with the given Query-Field (key) and returns this builder as of the Builder-Pattern.
        Parameters:
        aField - The Query-Field (key) of which's list of values a value is to be added.
        aValue - The value to be added to the list of values associated to the given Query-Field (key).
        Returns:
        This UrlBuilder instance to continue configuration.
      • withAddToQueryFields

        public UrlBuilder withAddToQueryFields​(String aField,
                                               String... aValues)
        Adds values to the list of values associated with the given Query-Field (key) and returns this builder as of the Builder-Pattern.
        Parameters:
        aField - The Query-Field (key) of which's list of values the values are to be added.
        aValues - The values to be added to the list of values associated to the given Query-Field (key).
        Returns:
        This UrlBuilder instance to continue configuration.
      • withIdentity

        public UrlBuilder withIdentity​(String aIdentity)
        Specified by:
        withIdentity in interface org.refcodes.mixin.IdentityAccessor.IdentityBuilder<UrlBuilder>
      • withSecret

        public UrlBuilder withSecret​(String aSecret)
        Specified by:
        withSecret in interface org.refcodes.mixin.SecretAccessor.SecretBuilder<UrlBuilder>
      • setScheme

        public void setScheme​(org.refcodes.data.Scheme aScheme)
        Sets the UrlScheme for the URL scheme.
        Specified by:
        setScheme in interface SchemeAccessor.SchemeMutator
        Overrides:
        setScheme in class Url
        Parameters:
        aScheme - The UrlScheme to be stored by the URL scheme.
      • setProtocol

        public void setProtocol​(String aProtocol)
        Sets the protocol String representation for the scheme property. You must provide the scheme's specific part as well. In case of HTTP, provide "http://". In case your provided protocol is unknown by the Scheme enumeration, then the scheme property will not be set, though the SchemeAccessor.toProtocol() still returns your protocol.
        Specified by:
        setProtocol in interface SchemeAccessor.SchemeMutator
        Overrides:
        setProtocol in class Url
        Parameters:
        aProtocol - The UrlScheme's String representation to be stored by the URL scheme.
      • setHost

        public void setHost​(String aHost)
        Sets the host for the host property.
        Specified by:
        setHost in interface HostAccessor.HostMutator
        Overrides:
        setHost in class Url
        Parameters:
        aHost - The host to be stored by the host property.
      • setIpAddress

        public void setIpAddress​(int[] aIpAddress)
        Specified by:
        setIpAddress in interface org.refcodes.net.IpAddressAccessor.IpAddressMutator
        Overrides:
        setIpAddress in class Url
      • setPort

        public void setPort​(int aPort)
        Specified by:
        setPort in interface org.refcodes.mixin.PortAccessor.PortMutator
        Overrides:
        setPort in class Url
      • setPath

        public void setPath​(String aPath)
        Specified by:
        setPath in interface org.refcodes.mixin.PathAccessor.PathMutator
        Overrides:
        setPath in class Url
      • setQueryFields

        public void setQueryFields​(FormFields aQueryFields)
        Sets the request Query-Fields for the request Query-Fields property.
        Specified by:
        setQueryFields in interface QueryFieldsAccessor.QueryFieldsMutator
        Parameters:
        aQueryFields - The request Query-Fields to be stored by the form fields property.
      • setFragment

        public void setFragment​(String aFragment)
        Sets the fragment for the fragment property.
        Specified by:
        setFragment in interface FragmentAccessor.FragmentMutator
        Parameters:
        aFragment - The fragment to be stored by the fragment property.
      • setIdentity

        public void setIdentity​(String aIdentity)
        Specified by:
        setIdentity in interface org.refcodes.mixin.IdentityAccessor.IdentityMutator
      • setSecret

        public void setSecret​(String aSecret)
        Specified by:
        setSecret in interface org.refcodes.mixin.SecretAccessor.SecretMutator