Class URLBuilder

java.lang.Object
org.ocpsoft.rewrite.servlet.util.URLBuilder

@Deprecated public class URLBuilder extends Object
Deprecated.
Use AddressBuilder instead. May be removed in subsequent releases.
Utility for building URL strings. Also manages the URL query string with the help of QueryStringBuilder.
Author:
Lincoln Baxter, III
  • Method Details

    • createNew

      public static URLBuilder createNew()
      Deprecated.
      Return a new instance of URLBuilder. Until modified. This URL will be blank.
    • createFrom

      public static URLBuilder createFrom(List<String> segments, Metadata metadata, QueryStringBuilder query)
      Deprecated.
      Create a new instance of URLBuilder from the given URL segments, Metadata, and QueryStringBuilder.
    • createFrom

      public static URLBuilder createFrom(List<String> segments, Metadata metadata)
      Deprecated.
      Create a new instance of URLBuilder from the given URL path segments and Metadata.
    • createFrom

      public static URLBuilder createFrom(String segments)
      Deprecated.
      Create a new instance of URLBuilder from the given URL path segments.
    • appendPathSegments

      public URLBuilder appendPathSegments(List<String> segments)
      Deprecated.
      Append additional path segments to the end of this URL. When called the first time, this method will also initialize the Metadata for this URLBuilder based on the parsed segments given.
    • appendPathSegments

      public URLBuilder appendPathSegments(String segments)
      Deprecated.
      Append additional path segments to the end of this URL. When called the first time, this method will also initialize the Metadata for this URLBuilder based on the parsed segments given.
    • addQueryParameters

      public URLBuilder addQueryParameters(String parameters)
      Deprecated.
      Parse and add more query parameters to this URLBuilder
    • decode

      public URLBuilder decode()
      Deprecated.
      Return this URLBuilder after path segments and query parameters have been decoded.
    • encode

      public URLBuilder encode()
      Deprecated.
      Return this URLBuilder after path segments and query parameters have been encoded.
    • getEncoding

      public String getEncoding()
      Deprecated.
      Get the character encoding of this URL (default UTF-8)
    • getMetadata

      public Metadata getMetadata()
      Deprecated.
      Get the Metadata object for this URL
    • getQueryStringBuilder

      public QueryStringBuilder getQueryStringBuilder()
      Deprecated.
      Get the QueryStringBuilder object for this URL
    • setQueryString

      public URLBuilder setQueryString(QueryStringBuilder query)
      Deprecated.
      Set the QueryStringBuilder object for this URL
    • getSegments

      public List<String> getSegments()
      Deprecated.
      Return all segments (separated by '/') in this URL
    • hasLeadingSlash

      public boolean hasLeadingSlash()
      Deprecated.
      Return true if this URL begins with '/'
    • hasTrailingSlash

      public boolean hasTrailingSlash()
      Deprecated.
      Return true if this URL ends with '/'
    • numSegments

      public int numSegments()
      Deprecated.
      Get the number of segments (separated by '/') in this URL
    • setEncoding

      public void setEncoding(String encoding)
      Deprecated.
      Set the character encoding of this URL (default UTF-8)
    • setMetadata

      public URLBuilder setMetadata(Metadata metadata)
      Deprecated.
      Set the Metadata object for this URL
    • toPath

      public String toPath()
      Deprecated.
      Return the portion of this URL representing the path.
    • toString

      public String toString()
      Deprecated.
      Return a String representation of this URL
      Overrides:
      toString in class Object
    • toURI

      public URI toURI()
      Deprecated.
      Return a URI representation of this URL including path and query string
    • toURL

      public String toURL()
      Deprecated.
      Return a String representation of this URL including path and query string