| java.lang.Object org.apache.beehive.netui.core.urls.MutableURI org.apache.beehive.netui.core.urls.FreezableMutableURI
FreezableMutableURI | public class FreezableMutableURI extends MutableURI (Code) | | A mutable class for creating URIs that can be set to "frozen" such
that it becomes immutable. After this class is frozen, any calls to
methods to set the data components of the URI will throw
|
Method Summary | |
public void | addParameter(String name, String value, boolean encoded) Add a parameter for the query string.
If the encoded flag is true then this method assumes that
the name and value do not need encoding or are already encoded
correctly. | public void | addParameters(Map newParams, boolean encoded) Add a parameter to the query string.
If the encoded flag is true then this method assumes that
the name and value do not need encoding or are already encoded
correctly. | public boolean | equals(Object o) | public int | hashCode() | final public boolean | isFrozen() | public void | removeParameter(String name) Removes the given parameter. | public void | setEncoding(String encoding) Set the encoding used when adding unencoded parameters. | public void | setFragment(String fragment) Sets the fragment. | public void | setFrozen(boolean frozen) Sets a flag indicating that the URI is immutable (or not). | public void | setHost(String host) Sets the host. | public void | setOpaque(String scheme, String schemeSpecificPart) Sets the URI to be opaque using the given scheme and
schemeSpecificPart.
From
URI : "A URI is opaque if, and only
if, it is absolute and its scheme-specific part does not begin with
a slash character ('/'). | public void | setPath(String path) Sets the path. | public void | setPort(int port) Sets the port. | public void | setQuery(String query) Sets (and resets) the query string. | public void | setScheme(String scheme) Sets the protocol/scheme. | public void | setURI(String uriString, boolean encoded) Reset the value of the FreezableMutableURI . | public void | setUserInfo(String userInfo) Sets the userInfo. |
FreezableMutableURI | public FreezableMutableURI()(Code) | | Constructs a FreezableMutableURI .
|
FreezableMutableURI | public FreezableMutableURI(String uriString, boolean encoded) throws URISyntaxException(Code) | | Constructs a FreezableMutableURI .
Parameters: uriString - the string to be parsed into a URI Parameters: encoded - Flag indicating whether the string isalready encoded. |
FreezableMutableURI | public FreezableMutableURI(String scheme, String userInfo, String host, int port, String path, String query, String fragment)(Code) | | Constructs a FreezableMutableURI .
Parameters: scheme - the name of the protocol to use Parameters: userInfo - the username and password Parameters: host - the name of the host Parameters: port - the port number on the host Parameters: path - the file on the host Parameters: query - the query part of this URI Parameters: fragment - the fragment part of this URI (internal reference in the URL) |
FreezableMutableURI | public FreezableMutableURI(URI uri)(Code) | | Constructs a FreezableMutableURI .
Parameters: uri - the initial value for this mutable URI |
addParameter | public void addParameter(String name, String value, boolean encoded)(Code) | | Add a parameter for the query string.
If the encoded flag is true then this method assumes that
the name and value do not need encoding or are already encoded
correctly. Otherwise, it translates the name and value with the
character encoding of this URI and adds them to the set of
parameters for the query. If the encoding for this URI has
not been set, then the default encoding used is "UTF-8".
Multiple values for the same parameter can be set by
calling this method multiple times with the same name.
Parameters: name - name Parameters: value - value Parameters: encoded - Flag indicating whether the names and values arealready encoded. |
addParameters | public void addParameters(Map newParams, boolean encoded)(Code) | | Add a parameter to the query string.
If the encoded flag is true then this method assumes that
the name and value do not need encoding or are already encoded
correctly. Otherwise, it translates the name and value with the
character encoding of this URI and adds them to the set of
parameters for the query. If the encoding for this URI has
not been set, then the default encoding used is "UTF-8".
Parameters: newParams - the map of new parameters to add to the URI Parameters: encoded - Flag indicating whether the names and values arealready encoded. |
hashCode | public int hashCode()(Code) | | |
isFrozen | final public boolean isFrozen()(Code) | | |
removeParameter | public void removeParameter(String name)(Code) | | Removes the given parameter.
Parameters: name - name |
setEncoding | public void setEncoding(String encoding)(Code) | | Set the encoding used when adding unencoded parameters.
Parameters: encoding - |
setFragment | public void setFragment(String fragment)(Code) | | Sets the fragment.
Parameters: fragment - fragment |
setFrozen | public void setFrozen(boolean frozen)(Code) | | Sets a flag indicating that the URI is immutable (or not).
Parameters: frozen - flag to indicate if the URI is now immutable or not. |
setHost | public void setHost(String host)(Code) | | Sets the host.
Parameters: host - host |
setOpaque | public void setOpaque(String scheme, String schemeSpecificPart)(Code) | | Sets the URI to be opaque using the given scheme and
schemeSpecificPart.
From
URI : "A URI is opaque if, and only
if, it is absolute and its scheme-specific part does not begin with
a slash character ('/'). An opaque URI has a scheme, a
scheme-specific part, and possibly a fragment; all other components
are undefined."
Parameters: scheme - the scheme component of this URI Parameters: schemeSpecificPart - the scheme-specific part of this URI |
setPath | public void setPath(String path)(Code) | | Sets the path.
Parameters: path - path |
setPort | public void setPort(int port)(Code) | | Sets the port.
Parameters: port - port |
setQuery | public void setQuery(String query)(Code) | | Sets (and resets) the query string.
This method assumes that the query is already encoded and
the parameter delimiter is the '&' character.
Parameters: query - Query string |
setScheme | public void setScheme(String scheme)(Code) | | Sets the protocol/scheme.
Parameters: scheme - protocol/scheme |
setURI | public void setURI(String uriString, boolean encoded) throws URISyntaxException(Code) | | Reset the value of the FreezableMutableURI .
This method can also be used to clear the FreezableMutableURI .
Parameters: uriString - the string to be parsed into a URI Parameters: encoded - Flag indicating whether the string isalready encoded. |
setUserInfo | public void setUserInfo(String userInfo)(Code) | | Sets the userInfo.
Parameters: userInfo - userInfo |
|
|