Interface FormFields

  • All Superinterfaces:
    HttpFields<FormFields>, java.util.Map<java.lang.String,java.util.List<java.lang.String>>
    All Known Implementing Classes:
    FormFieldsImpl, OauthFieldsImpl

    public interface FormFields
    extends HttpFields<FormFields>
    The FormFields represent the URL's Query-String by the notation originally used by the GET request of the ancient web forms (see "https://en.wikipedia.org/wiki/Query_string#Web_forms"). Therefore the name FormFields, as them web forms provided fields with values (see "https://en.wikipedia.org/wiki/Form_(HTML)")
    See Also:
    "https://en.wikipedia.org/wiki/Query_string"
    • Method Detail

      • toFormFields

        static FormFields toFormFields​(java.lang.String aFormFields)
        Creates a new FormFields instance.
        Parameters:
        aFormFields - The Form-Fields' String representation from which to construct the FormFields instance.
        Returns:
        The newly created FormFields instance.
      • fromUrlQueryString

        default void fromUrlQueryString​(java.lang.String aQueryString)
        Processes the HTTP Query-String and retrieves the therein defined Form-Fields and adds them to the FormFields instance.
        Parameters:
        aQueryString - The HTTP Query-String from which to extract the form being added to the FormFields instance.
      • fromBodyFormFields

        default void fromBodyFormFields​(java.lang.String aHttpFormFields)
        Processes the HTTP Form-Fields body String and retrieves the therein defined Form-Fields and adds them to the FormFields instance.
        Parameters:
        aHttpFormFields - The HTTP Form-Fields String from which to extract the form being added to the FormFields instance.
      • toUrlQueryString

        default java.lang.String toUrlQueryString()
        Produces an HTTP Query-String form the herein contain HTTP query fields.
        Returns:
        The HTTP Query-String representation of this FormFields instance or null if this instance is empty.
      • toBodyFormFields

        default java.lang.String toBodyFormFields()
        Produces an HTTP Form-Fields body String form the herein contain HTTP query fields.
        Returns:
        The HTTP Form-Fields String representation of this FormFields instance or null if this instance is empty.
      • fromUrl

        default void fromUrl​(java.lang.String aUrl)
        Extracts the HTTP Query-String from the provided URL by identifying the first question mark ("?") and retrieves the therein defined Form-Fields and adds them to the FormFields instance.
        Parameters:
        aUrl - The URL from which to extract the HTTP Query-String which's Form-Fields are to be added to the FormFields instance.