|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.2) E14255-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface BaseURL
The BaseURL
defines the basic capabilities of a portlet URL pointing back to the portlet.
Method Summary | |
---|---|
void |
addProperty(String key, String value) Adds a String property to an existing key on the URL. |
Map<String,String[]> |
getParameterMap() Returns a Map of the parameters currently set on this portlet URL via the setParameter or setParameters methods. |
void |
setParameter(String name, String value) Sets the given String parameter to this URL. |
void |
setParameter(String name, String[] values) Sets the given String array parameter to this URL. |
void |
setParameters(Map<String,String[]> parameters) Sets a parameter map for this URL. |
void |
setProperty(String key, String value) Sets a String property on the URL. |
void |
setSecure(boolean secure) Indicated the security setting for this URL. |
String |
toString() Returns the portlet URL string representation to be embedded in the markup. Note that the returned String may not be a valid URL, as it may be rewritten by the portal/portlet-container before returning the markup to the client. |
void |
write(Writer out) Writes the portlet URL to the output stream using the provided writer. |
void |
write(Writer out, boolean escapeXML) Writes the portlet URL to the output stream using the provided writer. |
Method Detail |
---|
void setParameter(String name, String value)
This method replaces all parameters with the given key.
The PortletURL
implementation 'x-www-form-urlencoded' encodes all parameter names and values. Developers should not encode them.
A portlet container may prefix the attribute names internally in order to preserve a unique namespace for the portlet.
A parameter value of null
indicates that this parameter should be removed.
name
- the parameter namevalue
- the parameter valueIllegalArgumentException
- if name is null
.void setParameter(String name, String[] values)
This method replaces all parameters with the given key.
The PortletURL
implementation 'x-www-form-urlencoded' encodes all parameter names and values. Developers should not encode them.
A portlet container may prefix the attribute names internally in order to preserve a unique namespace for the portlet.
name
- the parameter namevalues
- the parameter valuesIllegalArgumentException
- if name is null
.void setParameters(Map<String,String[]> parameters)
All previously set parameters are cleared.
The PortletURL
implementation 'x-www-form-urlencoded' encodes all parameter names and values. Developers should not encode them.
A portlet container may prefix the attribute names internally, in order to preserve a unique namespace for the portlet.
parameters
- 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. The values in the parameter map must be of type String array (String[]
).IllegalArgumentException
- if parameters is null
, if any of the keys in the Map are null
, if any of the keys is not a String, or if any of the values is not a String array.void setSecure(boolean secure) throws PortletSecurityException
Secure set to true
indicates that the portlet requests a secure connection between the client and the portlet window for this URL. Secure set to false
indicates that the portlet does not need a secure connection for this URL. If the security is not set for a URL, it should stay the same as the current request.
secure
- 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.PortletSecurityException
- if the run-time environment does not support the indicated settingString toString()
The returned URL is not XML escaped.
For writing URLs to an output stream the write(java.io.Writer)
or write(java.io.Writer, boolean)
method should be used as these are more efficient.
toString
in class Object
Map<String,String[]> getParameterMap()
Map
of the parameters currently set on this portlet URL via the setParameter
or setParameters
methods.
The values in the returned Map
are from type String array (String[]
).
If no parameters exist this method returns an empty Map
.
Map
containing parameter names as keys and parameter values as map values, or an empty Map
if no parameters exist. The keys in the parameter map are of type String. The values in the parameter map are of type String array (String[]
).void write(Writer out) throws IOException
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(java.io.Writer, boolean)
.
out
- the writer to write the portlet URL toIOException
- if an I/O error occured while writing the URLvoid write(Writer out, boolean escapeXML) throws IOException
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.
out
- the writer to write the portlet URL toescapeXML
- denotes if the URL should be XML escaped before written to the output stream or notIOException
- if an I/O error occurred while writing the URLvoid addProperty(String key, String value)
This method allows URL properties to have multiple values.
Properties can be used by portlets to provide vendor specific information to the URL.
key
- the key of the propertyvalue
- the value of the propertyIllegalArgumentException
- if key is null
.void setProperty(String key, String value)
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.
key
- the key of the propertyvalue
- the value of the propertyIllegalArgumentException
- if key is null
.
|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.2) E14255-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2010, Oracle. All rights reserved.