com.ibm.portal.state
Interface EngineURL

All Superinterfaces:
Disposable, DisposableURL, URL
All Known Subinterfaces:
CheckedEngineURL

public interface EngineURL
extends DisposableURL

The EngineURL is a URL that may contain navigational state of the portal engine and all portlets on the page.

Via the writeCopy and writeRelease methods the URL can be written to a stream. writeRelease should be used wherever possible as this methods has a smaller performance impact than writeCopy. The EngineURL should be disposed if it is no longer used by calling the dispose() method. The writeRelease however writes the URL to a stream and disposes it in one single step, so if writeRelease is called, the object must not be disposed additionally.

Since:
5.1

Method Summary
 void addFragmentID(java.lang.String value)
          Sets a fragment identifier for this engine URL.
 StateHolderController getState()
          Returns the state represented by this URL object in a modifiable way.
 void setProtected(java.lang.Boolean bFlag)
          Indicates if the URL points to the private pages in WP or to the public page.
 void setSecure(java.lang.Boolean bFlag)
          Indicates the security setting for this URL.
 java.lang.String toString()
          Creates a URL representation of the URL.
 java.io.Writer writeCopy(java.io.Writer out)
          Streams the state represented by this URL object to a writer and invokes the postprocessors first on the content of the engine URL.
 java.io.Writer writeCopy(java.io.Writer out, boolean bEscapeXML)
          Streams the state represented by this URL object to a writer and invokes the postprocessors first on the content of the engine URL.
 java.io.Writer writeDispose(java.io.Writer out)
          Streams the state represented by this URL object to a writer and invokes the postprocessors first on the content of the engine URL.
 java.io.Writer writeDispose(java.io.Writer out, boolean bEscapeXML)
          Streams the state represented by this URL object to a writer and invokes the postprocessors first on the content of the engine URL.
 
Methods inherited from interface com.ibm.portal.URL
write
 
Methods inherited from interface com.ibm.portal.Disposable
dispose
 

Method Detail

addFragmentID

void addFragmentID(java.lang.String value)
Sets a fragment identifier for this engine URL. The identifier will be appended to the engine URL when streaming it to a writer by means of the writeCopy() or writeRelease() method.

Parameters:
value - The name of the anchor we are referencing with this generated URL

getState

StateHolderController getState()
Returns the state represented by this URL object in a modifiable way.

Returns:
Controller to the state

setProtected

void setProtected(java.lang.Boolean bFlag)
Indicates if the URL points to the private pages in WP or to the public page.

Parameters:
bFlag - true, if the URL should point to the private area

setSecure

void setSecure(java.lang.Boolean bFlag)
Indicates the security setting for this URL. 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 will stay the same as the current request.

Parameters:
bFlag - 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.

toString

java.lang.String toString()
Creates a URL representation of the URL. Be aware that this is an expensive operation. Use one of the streaming methods instead.

Specified by:
toString in interface DisposableURL
Overrides:
toString in class java.lang.Object
Returns:
string representation of the URL

writeCopy

java.io.Writer writeCopy(java.io.Writer out)
                         throws java.io.IOException,
                                OutputMediatorException,
                                PostProcessorException,
                                DocumentModelException
Streams the state represented by this URL object to a writer and invokes the postprocessors first on the content of the engine URL. The engine URL's state however is not modified, the write method may be used multiple times on the same object without side effects. From a performance perspective a call to this method is more expensive than calling the writeRelease method. If a called only needs to generate one single URL, the writeRelease method should be used instead.

Specified by:
writeCopy in interface DisposableURL
Parameters:
out - Destination stream that receives the character representation of the URL (must not be null)
Returns:
Reference to the writer
Throws:
java.io.IOException - - error on the underlying streams
OutputMediatorException - - error during the serialization operation
DocumentModelException - - if the temporary copy of the state could not be created
PostProcessorException - - if the post processing step failed

writeCopy

java.io.Writer writeCopy(java.io.Writer out,
                         boolean bEscapeXML)
                         throws java.io.IOException,
                                OutputMediatorException,
                                PostProcessorException,
                                DocumentModelException
Streams the state represented by this URL object to a writer and invokes the postprocessors first on the content of the engine URL. The engine URL's state however is not modified, the write method may be used multiple times on the same object without side effects. From a performance perspective a call to this method is more expensive than calling the writeRelease method. If a called only needs to generate one single URL, the writeRelease method should be used instead.

Parameters:
out - Destination stream that receives the character representation of the URL (must not be null)
bEscapeXML - if true the URL will be written as if it was XML markup (e.g. & signs will be written as &), if false the URL will be written as URL
Returns:
Reference to the writer
Throws:
java.io.IOException - - error on the underlying streams
OutputMediatorException - - error during the serialization operation
DocumentModelException - - if the temporary copy of the state could not be created
PostProcessorException - - if the post processing step failed
Since:
6.1.0.3

writeDispose

java.io.Writer writeDispose(java.io.Writer out)
                            throws java.io.IOException,
                                   OutputMediatorException,
                                   PostProcessorException
Streams the state represented by this URL object to a writer and invokes the postprocessors first on the content of the engine URL. It is invalid to access the engine URL object after invoking this method.

Specified by:
writeDispose in interface DisposableURL
Parameters:
out - Destination stream that receives the character representation of the URL (must not be null)
Returns:
Reference to the writer
Throws:
java.io.IOException - - error on the underlying streams
OutputMediatorException - - error during the serialization operation
PostProcessorException - - if the post processing step failed

writeDispose

java.io.Writer writeDispose(java.io.Writer out,
                            boolean bEscapeXML)
                            throws java.io.IOException,
                                   OutputMediatorException,
                                   PostProcessorException
Streams the state represented by this URL object to a writer and invokes the postprocessors first on the content of the engine URL. It is invalid to access the engine URL object after invoking this method.

Parameters:
out - Destination stream that receives the character representation of the URL (must not be null)
bEscapeXML - if true the URL will be written as if it was XML markup (e.g. & signs will be written as &), if false the URL will be written as URL
Returns:
Reference to the writer
Throws:
java.io.IOException - - error on the underlying streams
OutputMediatorException - - error during the serialization operation
PostProcessorException - - if the post processing step failed
Since:
6.1.0.3