BaseURLWrapper provides a convenient
implementation of the BaseURL interface
that can be subclassed by developers.
This class implements the Wrapper or Decorator pattern.
Methods default to calling through to the wrapped object.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addProperty(String
the key of the property key, String the value of the property value)Implements javax. |
| public Appendable | append(Appendable
the object to receive the URL out)Implements javax.
Appends the portlet URL to the appendable object.
|
| public Appendable | append(Appendable
the object to receive the URL out, boolean escapeXML)Implements javax.
Appends the portlet URL to the appendable object.
|
| public Map | getParameterMap()
Implements javax.
Deprecated
Returns a
Map of the parameters currently set on this portlet
URL.
|
| public BaseURL | Returns: the wrapped object.Overrides javax. |
| public void | setParameter(String
the parameter name name, String the parameter value value)Implements javax.
Deprecated
Sets
the given String parameter on this URL.
|
| public void | setParameter(String
the parameter name name, String... the parameter values values)Implements javax.
Deprecated
Sets
a multi-valued String parameter on this URL.
|
| public void | setParameters(Map<String, String[]>
Map containing parameter names for the render phase as keys and
parameter values as map values. The keys in the parameter map must be of type
String and may not be null or the empty string (""). The values in the parameter
map must be of type String array ( parameters)String[]).
Neither the values array nor any of
its elements may be null; however, the empty string ("") is allowed as an array element.
Implements javax.
Deprecated
Sets
a parameter map for this URL.
|
| public void | setProperty(String
the key of the property key, String the value of the property value)Implements javax. |
| public void | setSecure(boolean
true, if portlet requests to have a secure connection
between its portlet window and the client; false, if
the portlet does not require a secure connection. secure)Implements javax. |
| public void | |
| public String | toString()
Overrides java. Implements javax. |
| public void | write(Writer
the writer to write the portlet URL to out)Implements javax. |
| public void | write(Writer
the writer to write the portlet URL to out, boolean denotes if the URL should be XML escaped before written to the output
stream or not escapeXML)Implements javax. |
| BaseURLWrapper | back to summary |
|---|---|
public BaseURLWrapper(BaseURL wrapped)
| |
| addProperty | back to summary |
|---|---|
| public void addProperty(String key, String value) Implements javax. Doc from javax. Adds a String property to an existing key on the URL. This method allows URL properties to have multiple values. Properties can be used by portlets to provide vendor specific information to the URL. | |
| append | back to summary |
|---|---|
| public Appendable append(Appendable out) throws IOException Implements javax. Doc from javax.
Appends the portlet URL to the appendable object.
Note that the appended URL may not be a valid URL, as it may be rewritten by the portal/portlet-container before returning the markup to the client.
The appended URL is always XML escaped. For appending
non-escaped URLs use
| |
| append | back to summary |
|---|---|
| public Appendable append(Appendable out, boolean escapeXML) throws IOException Implements javax. Doc from javax.
Appends the portlet URL to the appendable object.
If the parameter escapeXML is set to Note that the appended URL may not be a valid URL, as it may be rewritten by the portal/portlet-container before returning the markup to the client.
| |
| getParameterMap | back to summary |
|---|---|
| public Map Implements javax. Doc from javax. Deprecated
Returns a
The values in the returned
The contents of the returned map are immutable in the sense that modifying the map
does not directly affect the render parameters. In order to set the
parameters using the modified map,
the
If no parameters exist this method returns an empty | |
| getWrapped | back to summary |
|---|---|
| public BaseURL getWrapped() Overrides javax. Gets the wrapped object. | |
| setParameter | back to summary |
|---|---|
| public void setParameter(String name, String value) Implements javax. Doc from javax. Deprecated
Sets the given String parameter on this URL. This method replaces all parameter values with the given key, as allowed according to the rules for the URL.
The A portlet container may prefix the attribute names internally in order to preserve a unique namespace for the portlet.
A parameter value of
A public render parameter cannot be removed by
setting its value to
| |
| setParameter | back to summary |
|---|---|
| public void setParameter(String name, String... values) Implements javax. Doc from javax. Deprecated
Sets a multi-valued String parameter on this URL. This method replaces all parameter values with the given key according to the rules for the URL.
The A portlet container may prefix the attribute names internally in order to preserve a unique namespace for the portlet.
A values parameter of If the values parameter is not null, no element of the values array may be null. However, an empty string value ("") is allowed.
| |
| setParameters | back to summary |
|---|---|
| public void setParameters(Map<String, String[]> parameters) Implements javax. Doc from javax. Deprecated
Sets a parameter map for this URL. All previously set parameters are cleared. This method can be used to set both public and private render parameters according to the rules for the URL.
These parameters will be accessible through the portlet request initiated through the URL. Any previously set private render parameter that is not contained in the new map is removed. However, public render parameters cannot be removed by excluding them from the map. Public render parameters that are not included in the map remain unchanged.
The A portlet container may prefix the attribute names internally, in order to preserve a unique namespace for the portlet.
| |
| setProperty | back to summary |
|---|---|
| public void setProperty(String key, String value) Implements javax. Doc from javax. Sets a String property on the URL. Properties can be used by portlets to provide vendor specific information to the URL. This method resets all properties previously added with the same key. | |
| setSecure | back to summary |
|---|---|
| public void setSecure(boolean secure) throws PortletSecurityException Implements javax. Doc from javax. Indicates the security setting for this URL.
Secure set to
| |
| setWrapped | back to summary |
|---|---|
| public void setWrapped(BaseURL wrapped) Sets the wrapped object.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Implements javax. Doc from javax. Returns the portlet URL string representation to be embedded in the
markup. The returned URL is not XML escaped.
For writing URLs to an output stream the | |
| write | back to summary |
|---|---|
| public void write(Writer out) throws IOException Implements javax. Doc from javax. Writes the portlet URL to the output stream using the provided writer. Note that the URL written to the output stream may not be a valid URL, as it may be rewritten by the portal/portlet-container before returning the markup to the client.
The URL written to the output stream is always XML escaped. For writing
non-escaped URLs use
| |
| write | back to summary |
|---|---|
| public void write(Writer out, boolean escapeXML) throws IOException Implements javax. Doc from javax. Writes the portlet URL to the output stream using the provided writer.
If the parameter escapeXML is set to true the URL will be escaped to be
valid XML characters, i.e. <, >, &,
', " will get converted
into their corresponding character entity codes (< to &<, > to &>,
& to &&, ' to &', " to &").
If escapeXML is set to false no escaping will be done.
The manner in which escaping is performed is
implementation specific.
If Note that the URL written to the output stream may not be a valid URL, as it may be rewritten by the portal/portlet-container before returning the markup to the client.
| |