com.ibm.portal.resolver.friendly
Interface FriendlyURL

All Superinterfaces:
Disposable, DisposableURL, Identifiable, URL

public interface FriendlyURL
extends DisposableURL, Identifiable

Generates 'friendly' URLs if possible and otherwise default EngineURL that only contain the given selection node.

The only piece of state information that can be modified on a friendly URL is the target selection.

Since:
6.1.0

Method Summary
 ObjectID getObjectID()
          Returns the object ID of the selection represented by this URL.
 java.lang.String getPathInfo()
          Returns the extra path information after the friendly name.
 ObjectID getSelection()
          Returns the ObjectID of the navigation node which is currently selected.
 void setPathInfo(java.lang.String aPathInfo)
          Assigns extra path info to the friendly URL that will be appended to the friendly URL.
 void setProtected(java.lang.Boolean bFlag)
          Defines if the URL points to the private area or to the public area .
 void setSecure(java.lang.Boolean bFlag)
          Defines the security setting for this URL.
 void setSelection(ObjectID nodeID)
          Sets the currently selected node into the state holder.
 void setSelection(java.lang.String uniqueNameID)
          Sets the currently selected node into the state holder.
 
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
 

Method Detail

getObjectID

ObjectID getObjectID()
Returns the object ID of the selection represented by this URL.

Specified by:
getObjectID in interface Identifiable
Returns:
the ObjectID of this resource, this can never be null
See Also:
Identifiable

getPathInfo

java.lang.String getPathInfo()
Returns the extra path information after the friendly name.

Returns:
the extra path info, either null or starts with a slash
Since:
8.0

getSelection

ObjectID getSelection()
                      throws InvalidSelectionNodeIdException
Returns the ObjectID of the navigation node which is currently selected. Returns null if no selection information is available.

Returns:
The ObjectID of the currently selected navigation node or null.
Throws:
InvalidSelectionNodeIdException - If at least one of the specified node identifiers is invalid.

setPathInfo

void setPathInfo(java.lang.String aPathInfo)
Assigns extra path info to the friendly URL that will be appended to the friendly URL. The path info must either be null or must start with a slash but must NOT end with a slash. The path info string must be a syntactically valid path (i.e. properly URL escaped).

Parameters:
aPathInfo - the extra path info, either null or starts with a slash
Since:
8.0

setProtected

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

Parameters:
bFlag - Boolean.TRUE, if the URL should point to the private area, Boolean.FALSE if the URL should point to the public area or null if the URL should stay in the context of the current request

setSecure

void setSecure(java.lang.Boolean bFlag)
Defines 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.

setSelection

void setSelection(ObjectID nodeID)
                  throws CannotInsertSelectionNodeException
Sets the currently selected node into the state holder. The ObjectID of the previous selected node will be overridden. Passing in null removes the selection information from the state holder.

Parameters:
nodeID - The ObjectID of the navigation node which has been selected. May be null.
Throws:
CannotInsertSelectionNodeException - If the given ObjectID cannot be inserted into the state holder.

setSelection

void setSelection(java.lang.String uniqueNameID)
                  throws CannotInsertSelectionNodeException,
                         MissingUniqueNameException,
                         UnknownUniqueNameException
Sets the currently selected node into the state holder. The ObjectID of the previous selected node will be overridden.

Parameters:
uniqueNameID - The unique name of the navigation node which has been selected. Must not be null.
Throws:
UnknownUniqueNameException - If the unique name could not be mapped to an ObjectID.
MissingUniqueNameException - If the unique name was null or empty.
CannotInsertSelectionNodeException - If the given ObjectID cannot be inserted into the state holder.