Package org.ocpsoft.rewrite.servlet.util
Class URLBuilder
java.lang.Object
org.ocpsoft.rewrite.servlet.util.URLBuilder
Deprecated.
Utility for building URL strings. Also manages the URL query string with the help of
QueryStringBuilder.- Author:
- Lincoln Baxter, III
-
Method Summary
Modifier and TypeMethodDescriptionaddQueryParameters(String parameters) Deprecated.Parse and add more query parameters to thisURLBuilderappendPathSegments(String segments) Deprecated.Append additional path segments to the end of this URL.appendPathSegments(List<String> segments) Deprecated.Append additional path segments to the end of this URL.static URLBuildercreateFrom(String segments) Deprecated.Create a new instance ofURLBuilderfrom the given URL path segments.static URLBuildercreateFrom(List<String> segments, Metadata metadata) Deprecated.Create a new instance ofURLBuilderfrom the given URL path segments andMetadata.static URLBuildercreateFrom(List<String> segments, Metadata metadata, QueryStringBuilder query) Deprecated.static URLBuilderDeprecated.Return a new instance ofURLBuilder.decode()Deprecated.Return thisURLBuilderafter path segments and query parameters have been decoded.encode()Deprecated.Return thisURLBuilderafter path segments and query parameters have been encoded.Deprecated.Get the character encoding of this URL (default UTF-8)Deprecated.Get theMetadataobject for this URLDeprecated.Get theQueryStringBuilderobject for this URLDeprecated.Return all segments (separated by '/') in this URLbooleanDeprecated.Return true if this URL begins with '/'booleanDeprecated.Return true if this URL ends with '/'intDeprecated.Get the number of segments (separated by '/') in this URLvoidsetEncoding(String encoding) Deprecated.Set the character encoding of this URL (default UTF-8)setMetadata(Metadata metadata) Deprecated.Set theMetadataobject for this URLsetQueryString(QueryStringBuilder query) Deprecated.Set theQueryStringBuilderobject for this URLtoPath()Deprecated.Return the portion of this URL representing the path.toString()Deprecated.Return a String representation of this URLtoURI()Deprecated.Return a URI representation of this URL including path and query stringtoURL()Deprecated.Return a String representation of this URL including path and query string
-
Method Details
-
createNew
Deprecated.Return a new instance ofURLBuilder. Until modified. This URL will be blank. -
createFrom
public static URLBuilder createFrom(List<String> segments, Metadata metadata, QueryStringBuilder query) Deprecated. -
createFrom
Deprecated.Create a new instance ofURLBuilderfrom the given URL path segments andMetadata. -
createFrom
Deprecated.Create a new instance ofURLBuilderfrom the given URL path segments. -
appendPathSegments
Deprecated.Append additional path segments to the end of this URL. When called the first time, this method will also initialize theMetadatafor thisURLBuilderbased on the parsed segments given. -
appendPathSegments
Deprecated.Append additional path segments to the end of this URL. When called the first time, this method will also initialize theMetadatafor thisURLBuilderbased on the parsed segments given. -
addQueryParameters
Deprecated.Parse and add more query parameters to thisURLBuilder -
decode
Deprecated.Return thisURLBuilderafter path segments and query parameters have been decoded. -
encode
Deprecated.Return thisURLBuilderafter path segments and query parameters have been encoded. -
getEncoding
Deprecated.Get the character encoding of this URL (default UTF-8) -
getMetadata
Deprecated.Get theMetadataobject for this URL -
getQueryStringBuilder
Deprecated.Get theQueryStringBuilderobject for this URL -
setQueryString
Deprecated.Set theQueryStringBuilderobject for this URL -
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
Deprecated.Set the character encoding of this URL (default UTF-8) -
setMetadata
Deprecated.Set theMetadataobject for this URL -
toPath
Deprecated.Return the portion of this URL representing the path. -
toString
Deprecated.Return a String representation of this URL -
toURI
Deprecated.Return a URI representation of this URL including path and query string -
toURL
Deprecated.Return a String representation of this URL including path and query string
-
AddressBuilderinstead. May be removed in subsequent releases.