com.ibm.portal.state.accessors.portlet
Interface PortletTargetAccessorFactory

All Superinterfaces:
AccessorFactory

public interface PortletTargetAccessorFactory
extends AccessorFactory

Factory providing methods to obtain write accessors that allow for including portlet target information into the state holder. These accessors should be used to declare a portlet as the target of an action or render link by writing the necessary information into the state holder.
Note that only one portlet may be the target of a link, i.e. the state holder only stores portlet target information for at most one portlet. Requesting multiple accessors operating on the same state document or using the same accessor instance a multiple times implies that the target information will be overridden each time one of these accessors is called. NOTE: This API may only be used in the scope of an HTTP request in WebSphere Portal, i.e. within a theme. The API can not be invoked directly by a custom servlet.

Since:
5.1

Method Summary
 LegacyPortletTargetAccessorController getLegacyPortletTargetAccessorController(javax.servlet.http.HttpServletRequest req)
          Returns a controller which allows for declaring a legacy portlet as the target of an action link in the request-specific state document.
 LegacyPortletTargetAccessorController getLegacyPortletTargetAccessorController(javax.servlet.http.HttpServletRequest req, Node root, DocumentController model)
          Returns a controller which allows for declaring a legacy portlet as the target of an action link.
 LegacyPortletTargetAccessorController getLegacyPortletTargetAccessorController(javax.servlet.http.HttpServletRequest req, StateHolderController state)
          Returns a controller which allows for declaring a legacy portlet as the target of an action link in the given state document.
 LegacyPortletTargetAccessorController getLegacyPortletTargetAccessorController(Node root, DocumentController model)
          Returns a controller which allows for declaring a legacy portlet as the target of an action link.
 LegacyPortletTargetAccessorController getLegacyPortletTargetAccessorController(StateHolderController state)
          Returns a controller which allows for declaring a legacy portlet as the target of an action link in the given state document.
 LegacyPortletTargetAccessorController getLegacyPortletTargetController(javax.servlet.http.HttpServletRequest req)
          Deprecated. since 6.0, use method getLegacyPortletTargetAccessorController(HttpServletRequest) instead
 LegacyPortletTargetAccessorController getLegacyPortletTargetController(javax.servlet.http.HttpServletRequest req, Node root, DocumentController model)
          Deprecated. since 6.0, use method getLegacyPortletTargetAccessorController(HttpServletRequest, Node, DocumentController) instead
 LegacyPortletTargetAccessorController getLegacyPortletTargetController(javax.servlet.http.HttpServletRequest req, StateHolderController state)
          Deprecated. since 6.0, use method getLegacyPortletTargetAccessorController(HttpServletRequest, StateHolderController) instead
 LegacyPortletTargetAccessorController getLegacyPortletTargetController(Node root, DocumentController model)
          Deprecated. Use the method getLegacyPortletTargetAccessorController(Node, DocumentController) instead. Returns a controller which allows for declaring a legacy portlet as the target of an action link. The returned controller operates on the given node representing the root of portlet target information.
 LegacyPortletTargetAccessorController getLegacyPortletTargetController(StateHolderController state)
          Deprecated. since 6.0, use method getLegacyPortletTargetAccessorController(StateHolderController) instead
 PortletTargetAccessorController getPortletTargetAccessorController(javax.servlet.http.HttpServletRequest req)
          Returns a controller which allows for declaring a portlet as the target of an action or render link in the request-specific state.
 PortletTargetAccessorController getPortletTargetAccessorController(javax.servlet.http.HttpServletRequest req, Node root, DocumentController model)
          Returns a controller which allows for declaring a portlet as the target of an action or render link.
 PortletTargetAccessorController getPortletTargetAccessorController(javax.servlet.http.HttpServletRequest req, StateHolderController state)
          Returns a controller which allows for declaring a portlet as the target of an action or render link in the given state document.
 PortletTargetAccessorController getPortletTargetAccessorController(Node root, DocumentController model)
          Returns a controller which allows for declaring a portlet as the target of an action or render link.
 PortletTargetAccessorController getPortletTargetAccessorController(StateHolderController state)
          Returns a controller which allows for declaring a portlet as the target of an action or render link in the given state document.
 PortletTargetAccessorController getPortletTargetController(javax.servlet.http.HttpServletRequest req)
          Deprecated. since 6.0, use method getPortletTargetAccessorController(HttpServletRequest) instead.
 PortletTargetAccessorController getPortletTargetController(javax.servlet.http.HttpServletRequest req, Node root, DocumentController model)
          Deprecated. since 6.0, use method getPortletTargetAccessorController(HttpServletRequest) instead
 PortletTargetAccessorController getPortletTargetController(javax.servlet.http.HttpServletRequest req, StateHolderController state)
          Deprecated. since 6.0, use method getPortletTargetAccessorController(HttpServletRequest, StateHolderController) instead
 PortletTargetAccessorController getPortletTargetController(Node root, DocumentController model)
          Deprecated. since 6.0, use method getPortletTargetAccessorController(Node, DocumentController) instead
 PortletTargetAccessorController getPortletTargetController(StateHolderController state)
          Deprecated. since 6.0, use method getPortletTargetAccessorController(StateHolderController) instead
 boolean removePortletTarget(javax.servlet.http.HttpServletRequest req)
          Removes the target information from the request-specific state.
 boolean removePortletTarget(StateHolderController state)
          Removes the target information from the given state.
 
Methods inherited from interface com.ibm.portal.state.accessors.AccessorFactory
compact
 

Method Detail

getPortletTargetAccessorController

PortletTargetAccessorController getPortletTargetAccessorController(StateHolderController state)
Returns a controller which allows for declaring a portlet as the target of an action or render link in the given state document.

Parameters:
state - Read-write interface to state. Must not be null.
Returns:
Read-write accessor to portlet target information.

getPortletTargetAccessorController

PortletTargetAccessorController getPortletTargetAccessorController(Node root,
                                                                   DocumentController model)
Returns a controller which allows for declaring a portlet as the target of an action or render link. The returned controller operates on the given node representing the root of portlet target information.

Parameters:
root - Root node for portlet target information. Must not be null.
model - Read-write state document model. Must contain the node root. Must not be null.
Returns:
Read-write accessor to the portlet's state.

getLegacyPortletTargetAccessorController

LegacyPortletTargetAccessorController getLegacyPortletTargetAccessorController(StateHolderController state)
Returns a controller which allows for declaring a legacy portlet as the target of an action link in the given state document.

Parameters:
state - Read-write interface to state. Must not be null.
Returns:
Read-write accessor to portlet target information.

getLegacyPortletTargetAccessorController

LegacyPortletTargetAccessorController getLegacyPortletTargetAccessorController(Node root,
                                                                               DocumentController model)
Returns a controller which allows for declaring a legacy portlet as the target of an action link. The returned controller operates on the given node representing the root of portlet target information.

Parameters:
root - Root node for portlet target information. Must not be null.
model - Read-write state document model. Must contain the node root. Must not be null.
Returns:
Read-write accessor to the portlet's state. Not null.

getPortletTargetAccessorController

PortletTargetAccessorController getPortletTargetAccessorController(javax.servlet.http.HttpServletRequest req)
                                                                   throws StateNotWriteableException,
                                                                          StateNotInRequestException
Returns a controller which allows for declaring a portlet as the target of an action or render link in the request-specific state.

Parameters:
request - The current servlet request. Must not be null.
Returns:
Read-write accessor to portlet target information. Not null.
Throws:
StateNotWriteableException - if a state holder could be associated with a request but the state is read-only
StateNotInRequestException - if no state could be associated with the request

getPortletTargetAccessorController

PortletTargetAccessorController getPortletTargetAccessorController(javax.servlet.http.HttpServletRequest req,
                                                                   StateHolderController state)
Returns a controller which allows for declaring a portlet as the target of an action or render link in the given state document.

Parameters:
request - The current servlet request. Must not be null.
state - Read-write interface to state. Must not be null.
Returns:
Read-write accessor to portlet target information. Not null.

getPortletTargetAccessorController

PortletTargetAccessorController getPortletTargetAccessorController(javax.servlet.http.HttpServletRequest req,
                                                                   Node root,
                                                                   DocumentController model)
Returns a controller which allows for declaring a portlet as the target of an action or render link. The returned controller operates on the given node representing the root of portlet target information.

Parameters:
request - The current servlet request. Must not be null.
root - Root node for portlet target information. Must not be null.
model - Read-write state document model. Must contain the node root. Must not be null.
Returns:
Read-write accessor to the portlet's state. Not null.

getLegacyPortletTargetAccessorController

LegacyPortletTargetAccessorController getLegacyPortletTargetAccessorController(javax.servlet.http.HttpServletRequest req,
                                                                               StateHolderController state)
Returns a controller which allows for declaring a legacy portlet as the target of an action link in the given state document.

Parameters:
request - The current servlet request. Must not be null.
state - Read-write interface to state. Must not be null.
Returns:
Read-write accessor to portlet target information. Not null.

getLegacyPortletTargetAccessorController

LegacyPortletTargetAccessorController getLegacyPortletTargetAccessorController(javax.servlet.http.HttpServletRequest req)
                                                                               throws StateNotWriteableException,
                                                                                      StateNotInRequestException
Returns a controller which allows for declaring a legacy portlet as the target of an action link in the request-specific state document.

Parameters:
request - The current servlet request. Must not be null.
Returns:
Read-write accessor to portlet target information. Not null.
Throws:
StateNotWriteableException - If a state holder could be associated with a request but the state is read-only.
StateNotInRequestException - If no state could be associated with the request.

getLegacyPortletTargetAccessorController

LegacyPortletTargetAccessorController getLegacyPortletTargetAccessorController(javax.servlet.http.HttpServletRequest req,
                                                                               Node root,
                                                                               DocumentController model)
Returns a controller which allows for declaring a legacy portlet as the target of an action link. The returned controller operates on the given node representing the root of portlet target information.

Parameters:
request - The current servlet request. Must not be null.
root - Root node for portlet target information. Must not be null.
model - Read-write state document model. Must contain the node root. Must not be null.
Returns:
Read-write accessor to the portlet's state. Not null.

getPortletTargetController

PortletTargetAccessorController getPortletTargetController(StateHolderController state)
Deprecated. since 6.0, use method getPortletTargetAccessorController(StateHolderController) instead

Returns a controller which allows for declaring a portlet as the target of an action or render link in the given state document.

Parameters:
state - Read-write interface to state. Must not be null.
Returns:
Read-write accessor to portlet target information.

getPortletTargetController

PortletTargetAccessorController getPortletTargetController(Node root,
                                                           DocumentController model)
Deprecated. since 6.0, use method getPortletTargetAccessorController(Node, DocumentController) instead

Returns a controller which allows for declaring a portlet as the target of an action or render link. The returned controller operates on the given node representing the root of portlet target information.

Parameters:
root - Root node for portlet target information. Must not be null.
model - Read-write state document model. Must contain the node root. Must not be null.
Returns:
Read-write accessor to the portlet's state.

getLegacyPortletTargetController

LegacyPortletTargetAccessorController getLegacyPortletTargetController(StateHolderController state)
Deprecated. since 6.0, use method getLegacyPortletTargetAccessorController(StateHolderController) instead

Returns a controller which allows for declaring a legacy portlet as the target of an action link in the given state document.

Parameters:
state - Read-write interface to state. Must not be null.
Returns:
Read-write accessor to portlet target information.

getLegacyPortletTargetController

LegacyPortletTargetAccessorController getLegacyPortletTargetController(Node root,
                                                                       DocumentController model)
Deprecated. Use the method getLegacyPortletTargetAccessorController(Node, DocumentController) instead. Returns a controller which allows for declaring a legacy portlet as the target of an action link. The returned controller operates on the given node representing the root of portlet target information.

Parameters:
root - Root node for portlet target information. Must not be null.
model - Read-write state document model. Must contain the node root. Must not be null.
Returns:
Read-write accessor to the portlet's state. Not null.

getPortletTargetController

PortletTargetAccessorController getPortletTargetController(javax.servlet.http.HttpServletRequest req)
                                                           throws StateNotWriteableException,
                                                                  StateNotInRequestException
Deprecated. since 6.0, use method getPortletTargetAccessorController(HttpServletRequest) instead.

Returns a controller which allows for declaring a portlet as the target of an action or render link in the request-specific state.

Parameters:
request - The current servlet request. Must not be null.
Returns:
Read-write accessor to portlet target information. Not null.
Throws:
StateNotWriteableException - if a state holder could be associated with a request but the state is read-only
StateNotInRequestException - if no state could be associated with the request

getPortletTargetController

PortletTargetAccessorController getPortletTargetController(javax.servlet.http.HttpServletRequest req,
                                                           StateHolderController state)
Deprecated. since 6.0, use method getPortletTargetAccessorController(HttpServletRequest, StateHolderController) instead

Returns a controller which allows for declaring a portlet as the target of an action or render link in the given state document.

Parameters:
request - The current servlet request. Must not be null.
state - Read-write interface to state. Must not be null.
Returns:
Read-write accessor to portlet target information. Not null.

getPortletTargetController

PortletTargetAccessorController getPortletTargetController(javax.servlet.http.HttpServletRequest req,
                                                           Node root,
                                                           DocumentController model)
Deprecated. since 6.0, use method getPortletTargetAccessorController(HttpServletRequest) instead

Returns a controller which allows for declaring a portlet as the target of an action or render link. The returned controller operates on the given node representing the root of portlet target information.

Parameters:
request - The current servlet request. Must not be null.
root - Root node for portlet target information. Must not be null.
model - Read-write state document model. Must contain the node root. Must not be null.
Returns:
Read-write accessor to the portlet's state. Not null.

getLegacyPortletTargetController

LegacyPortletTargetAccessorController getLegacyPortletTargetController(javax.servlet.http.HttpServletRequest req,
                                                                       StateHolderController state)
Deprecated. since 6.0, use method getLegacyPortletTargetAccessorController(HttpServletRequest, StateHolderController) instead

Returns a controller which allows for declaring a legacy portlet as the target of an action link in the given state document.

Parameters:
request - The current servlet request. Must not be null.
state - Read-write interface to state. Must not be null.
Returns:
Read-write accessor to portlet target information. Not null.

getLegacyPortletTargetController

LegacyPortletTargetAccessorController getLegacyPortletTargetController(javax.servlet.http.HttpServletRequest req)
                                                                       throws StateNotWriteableException,
                                                                              StateNotInRequestException
Deprecated. since 6.0, use method getLegacyPortletTargetAccessorController(HttpServletRequest) instead

Returns a controller which allows for declaring a legacy portlet as the target of an action link in the request-specific state document.

Parameters:
request - The current servlet request. Must not be null.
Returns:
Read-write accessor to portlet target information. Not null.
Throws:
StateNotWriteableException - If a state holder could be associated with a request but the state is read-only.
StateNotInRequestException - If no state could be associated with the request.

getLegacyPortletTargetController

LegacyPortletTargetAccessorController getLegacyPortletTargetController(javax.servlet.http.HttpServletRequest req,
                                                                       Node root,
                                                                       DocumentController model)
Deprecated. since 6.0, use method getLegacyPortletTargetAccessorController(HttpServletRequest, Node, DocumentController) instead

Returns a controller which allows for declaring a legacy portlet as the target of an action link. The returned controller operates on the given node representing the root of portlet target information.

Parameters:
request - The current servlet request. Must not be null.
root - Root node for portlet target information. Must not be null.
model - Read-write state document model. Must contain the node root. Must not be null.
Returns:
Read-write accessor to the portlet's state. Not null.

removePortletTarget

boolean removePortletTarget(StateHolderController state)
Removes the target information from the given state. This method should be called in cases where URLs are generated with the navigational state SPI within the action processing phase. Removing the target information is essential in this phase when creating new URLs based on the given state. As the given state contains potentially action information this action information would be copied to new URLs, i. e. following URLs would be action URLs, too.

Parameters:
state - Read-write interface to state. Must not be null.
Returns:
true if removed, false if not found.
Since:
6.1

removePortletTarget

boolean removePortletTarget(javax.servlet.http.HttpServletRequest req)
                            throws StateNotWriteableException,
                                   StateNotInRequestException
Removes the target information from the request-specific state. This method should be called in cases where URLs are generated with the navigational state SPI within the action processing phase. Removing the target information is essential in this phase when creating new URLs based on the given state. As the given state contains potentially action information this action information would be copied to new URLs, i. e. following URLs would be action URLs, too.

Parameters:
req - The current servlet request. Must not be null.
Returns:
true if removed, false if not found.
Throws:
StateNotWriteableException - if a state holder could be associated with a request but the state is read-only
StateNotInRequestException - if no state could be associated with the request
Since:
6.1