com.ibm.portal.resolver
Interface PocURL

All Superinterfaces:
Addressable, Constants, DigestProvider, Disposable, DisposableURL, ParameterAccessor, ParameterAccessorController, URL

public interface PocURL
extends ParameterAccessorController, DigestProvider, DisposableURL, Addressable, Constants

The PocURL is a URL that addresses a piece of content (POC). Depending on the way the actual URL instance has been achieved, such a URL might represent the view of a resource or its binary representation. The binding to the actual resource might happen early (i.e. at URL generation time) or late (only when the URL is invoked).

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

Since:
6.0.1
See Also:
EngineURL

Field Summary
 
Fields inherited from interface com.ibm.portal.resolver.data.Addressable
EMPTY_PARAMETERS
 
Fields inherited from interface com.ibm.portal.resolver.Constants
ALL_BINDING_SET, ALL_BINDINGS, CREATE_DATA_SINK_FACTORY_EXTENSION_POINT, DATA_SINK_FACTORY_EXTENSION_POINT, DATA_SOURCE_FACTORY_EXTENSION_POINT, DEFAULT_BINDING_SET, DEFAULT_BINDINGS, DEFAULT_BUFFER_SIZE, DEFAULT_POST_BINDING_SET, DEFAULT_POST_BINDINGS, DELETE_DATA_SINK_FACTORY_EXTENSION_POINT, HTTP_BINDING, HTTP_DELETE_BINDING, HTTP_GET_BINDING, HTTP_MULTIPART_POST_BINDING, HTTP_POST_BINDING, KEY_ASPECT, KEY_CACHE_CONTROL, KEY_CACHE_POLICY, KEY_CACHE_SCOPE, KEY_CALENDAR, KEY_DIGEST, KEY_LOCALE, KEY_MAX_AGE, KEY_MIME_TYPE, KEY_MODE, KEY_POCURI_PARAM, KEY_PRAGMA, KEY_PROJECT_CONTEXT, KEY_REPRESENTATION_COMPACT, KEY_REPRESENTATION_EMPTY, KEY_REPRESENTATION_FULL, KEY_REPRESENTATION_MEDIUM, KEY_REPRESENTATION_MODE, KEY_STATE_URL, KEY_TIME_ZONE, KEY_UNENCODED_URI, KEY_URI, KEY_USER_CONTEXT, KEY_VARY, KEY_VERB, KEY_VIRTUAL_PORTAL_CONTEXT, PORTLET_CONTENT_LOCATION_TYPE, RESOLVER_EXTENSION_POINT, SCHEME_PORTLET, SCHEME_REDIRECT, UPDATE_DATA_SINK_FACTORY_EXTENSION_POINT, VALUE_CACHE, VALUE_DELETE, VALUE_DOWNLOAD, VALUE_DROP, VALUE_LOOKUP, VALUE_MERGE, VALUE_MUST_REVALIDATE, VALUE_NO_CACHE, VALUE_NO_STORE, VALUE_NONE, VALUE_PRIVATE, VALUE_PUBLIC, VALUE_REFRESH, VALUE_REPLACE, VALUE_REPRESENTATION_COMPACT, VALUE_REPRESENTATION_EMPTY, VALUE_REPRESENTATION_FULL, VALUE_REPRESENTATION_MEDIUM, VALUE_UNDEFINED, VALUE_UPDATE, VALUE_UPLOAD, VALUE_VIEW, WP_SELECTION_BINDING
 
Method Summary
 java.lang.String getDigest()
          Returns a string that represents a hash over the request headers that might influence the responses (independent of the request URL).
 java.lang.String getMode()
          Returns the mode that is currently associated with the resouce
 java.util.Map<java.lang.String,java.lang.String[]> getParameters()
          Returns a modifiable version of the parameters used to address the object, never null, but potentially the empty map.
 void setAddressable(Addressable aAddr)
          Associates the URI and parameters of the addressable object
 void setDigest(java.lang.String aDigest)
          Associates a digest with the POC URL.
 void setMode(java.lang.String aMode)
          Associates a mode with the URI.
 void setProtected(java.lang.Boolean bFlag)
          Indicates if the URL points to the private area or to the public area .
 void setSecure(java.lang.Boolean bFlag)
          Indicates the security setting for this URL.
 void setURI(java.net.URI aURI)
          Associates a POC URI with the URL object.
 java.io.Writer writeCopy(java.io.Writer out, boolean bEscapeXML)
          Streams the state represented by this URL object to a writer.
 java.io.Writer writeDispose(java.io.Writer out, boolean bEscapeXML)
          Streams the state represented by this URL object to a writer.
 
Methods inherited from interface com.ibm.portal.resolver.accessors.url.ParameterAccessorController
addParameter, addParameters, removeParameter, setParameter, setParameters
 
Methods inherited from interface com.ibm.portal.resolver.accessors.url.ParameterAccessor
getParameter, getParameter, getParameters, getParameters
 
Methods inherited from interface com.ibm.portal.state.DisposableURL
toString, writeCopy, writeDispose
 
Methods inherited from interface com.ibm.portal.URL
write
 
Methods inherited from interface com.ibm.portal.Disposable
dispose
 
Methods inherited from interface com.ibm.portal.resolver.data.Addressable
getURI
 

Method Detail

getDigest

java.lang.String getDigest()
Returns a string that represents a hash over the request headers that might influence the responses (independent of the request URL). The digest string will only contain characters that are URL safe.

Specified by:
getDigest in interface DigestProvider
Returns:
the hash string for this request, can be null if the digest could not be computed

getMode

java.lang.String getMode()
Returns the mode that is currently associated with the resouce

Returns:
mode identifier, might return null

getParameters

java.util.Map<java.lang.String,java.lang.String[]> getParameters()
Returns a modifiable version of the parameters used to address the object, never null, but potentially the empty map. The key is of type String, the values of type String[]. Clients may modify this map to associate parameters with the PocURL

Specified by:
getParameters in interface Addressable
Specified by:
getParameters in interface ParameterAccessor
Specified by:
getParameters in interface ParameterAccessorController
Returns:
the modifiable parameter map

setAddressable

void setAddressable(Addressable aAddr)
                    throws StateException,
                           java.net.URISyntaxException
Associates the URI and parameters of the addressable object

Parameters:
aAddr - the combination of uri and parameter map
Throws:
StateException
java.net.URISyntaxException

setDigest

void setDigest(java.lang.String aDigest)
Associates a digest with the POC URL. Per default the digest is computed based on the request headers. Pass null as the digest to create a POC URL without a digest.

Parameters:
aDigest - the new digest or null to create a URL without a digest.
Since:
6.1.0.3

setMode

void setMode(java.lang.String aMode)
Associates a mode with the URI. The mode identifies the way the client intends to interact with the resource, e.g. VIEW or DOWNLOAD.

Parameters:
aMode - mode identifier, may be null to represent the default mode.

setProtected

void setProtected(java.lang.Boolean bFlag)
Indicates if the URL points to the private area or to the public area .

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.

setURI

void setURI(java.net.URI aURI)
            throws StateException
Associates a POC URI with the URL object.

Parameters:
aURI - URI that identifies the target resource, not null
Throws:
StateException - - if the association could not be performed

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. The URL's state however is not modified by calling this method, 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 writeDispose(Writer, boolean) method should be used instead.

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 an optional temporary copy of the state could not be created
PostProcessorException - - if an optional post processing step failed
Since:
6.1.0.3

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. It is invalid to access the engine URL object after invoking this method, calling dispose() is no longer required.

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 an optional post processing step failed
Since:
6.1.0.3