Tree PREV CLASS NEXT CLASS SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD com.ibm.portal.state.service.parameters
Interface PortletWindowStateParameterService
- All Superinterfaces:
- BaseStateParameterService, Disposable, Identifiable
public interface PortletWindowStateParameterService- extends BaseStateParameterService, Identifiable, Disposable
Service for easily obtaining, setting and removing parameters for a portlet window in respect of a navigational state. Through using this service a caller does not have to check for the context the navigational state and the portlet window are in. Typically this service obtains, sets or removes the parameters in respect of (multiple items may be applicable at once):
- The portlet window is the target of the URL
- The URL represents an action URL
- The URL represents a resource URL
- The portlet window has defined public render parameters
- Since:
- 6.1.0
Method Summary ContentPage getContentPage()
Method that can be used to obtain the content page this service operates on.ObjectID getObjectID()
Return the object ID of the portlet window object this service operates on.java.util.Map<java.lang.String,java.lang.String[]> getParameters()
Method for obtaining the parameters for the current (implied) portlet window and the navigation state this service operates on.java.util.Map<java.lang.String,java.lang.String[]> getParameters(StateHolder state)
Method for obtaining the parameters for the portlet window this service operates on.PortletWindow getPortletWindow()
Return the current portlet windowjava.util.Set<javax.xml.namespace.QName> getPublicParameterNames()
Return a set of the name of the public render parameters for the current portlet window.java.util.Map<java.lang.String,java.lang.String[]> getRenderParameters(StateHolder state)
Method for obtaining the parameters for the portlet window this service operates on.StateHolder getStateHolder()
Method that can be used to obtain the state holder this service operates on.boolean removeParameters(StateHolderController state, java.util.Collection<java.lang.String> keys)
Removes the given parameters from the given state.void setParameters(StateHolderController state, java.util.Map<java.lang.String,java.lang.String[]> parameters)
Sets the given parameters to the state for the portlet window this service operates on.void setRenderParameters(StateHolderController state, java.util.Map<java.lang.String,java.lang.String[]> parameters)
Sets the given parameters to the state ( as private or public render parameters) for the portlet window this service operates on.
Methods inherited from interface com.ibm.portal.state.service.parameters.BaseStateParameterService getPublicParameters, getPublicParameters, getPublicParameters, getPublicParameters, getPublicRenderParameterResolver, removePublicParameters, setPublicParameters
Methods inherited from interface com.ibm.portal.Disposable dispose
Method Detail getContentPage
ContentPage getContentPage()
- Method that can be used to obtain the content page this service operates on.
- Returns:
- the content page, not null
getObjectID
ObjectID getObjectID()
- Returns the object ID of the portlet window object this service operates on. interface.
- Specified by:
- getObjectID in interface Identifiable
- Returns:
- the ObjectID of the portlet window, never null
- See Also:
- Identifiable.getObjectID()
getParameters
java.util.Map<java.lang.String,java.lang.String[]> getParameters() throws StateParameterException
- Method for obtaining the parameters for the current (implied) portlet window and the navigation state this service operates on. This method will return the parameters that would be returned by PortletRequest.getParameterMap() if the portlet window would call this method within the portlet methods (e. g. GenericPortlet.render(javax.portlet.RenderRequest, javax.portlet.RenderResponse) ).
- Returns:
- A map containing all parameters the given portlet has access to. The parameters may consist of private render, public render and resource parameters
- Throws:
- StateParameterException
getParameters
java.util.Map<java.lang.String,java.lang.String[]> getParameters(StateHolder state) throws StateParameterException
- Method for obtaining the parameters for the portlet window this service operates on. This method will return the parameters that would be returned by PortletRequest.getParameterMap() if the given portlet window would call this method within the portlet methods (e. g. GenericPortlet.render(javax.portlet.RenderRequest, javax.portlet.RenderResponse) ).
- Parameters:
- state - The state the parameters should be read from. Must not be null.
- Returns:
- A map containing all parameters the given portlet has access to. The parameters may consist of private render, public render, action and resource parameters
- Throws:
- StateParameterException - If an exception occured while manipulating the parameters
getPortletWindow
PortletWindow getPortletWindow()
- Returns the current portlet window
- Returns:
- the portlet window, not null
- Since:
- 8.0
getPublicParameterNames
java.util.Set<javax.xml.namespace.QName> getPublicParameterNames()
- Returns a set of the name of the public render parameters for the current portlet window.
- Returns:
- the parameter names, not null but may be empty
- Since:
- 8.0
getRenderParameters
java.util.Map<java.lang.String,java.lang.String[]> getRenderParameters(StateHolder state) throws StateParameterException
- Method for obtaining the parameters for the portlet window this service operates on. This method will return the parameters that would be returned by PortletRequest.getParameterMap() if the given portlet window would call this method within the portlet methods (e. g. GenericPortlet.render(javax.portlet.RenderRequest, javax.portlet.RenderResponse) ).
- Parameters:
- state - The state the parameters should be read from. Must not be null.
- Returns:
- A map containing all parameters the given portlet has access to. The parameters may consist of private render, public render, action and resource parameters
- Throws:
- StateParameterException - If an exception occured while manipulating the parameters
- Since:
- 8.0
getStateHolder
StateHolder getStateHolder()
- Method that can be used to obtain the state holder this service operates on.
- Specified by:
- getStateHolder in interface BaseStateParameterService
- Returns:
- The state holder.
removeParameters
boolean removeParameters(StateHolderController state, java.util.Collection<java.lang.String> keys) throws StateParameterException
- Removes the given parameters from the given state. This service will take care to remove the given parameters appropriately. In particular the parameters will be removed from the portlet window's render parameters, the window's defined public render parameters or the window's resource or action parameters.
- Parameters:
- state - The state to modify, i. e. the state where the parameters have to be removed. Must not be null.
- keys - A Collection of Strings representing the parameter keys which should be removed by this service. Must not be null.
- Returns:
- true if the state changed as a result of the call
- Throws:
- StateParameterException - If an exception occured while manipulating the parameters
setParameters
void setParameters(StateHolderController state, java.util.Map<java.lang.String,java.lang.String[]> parameters) throws StateParameterException
- Sets the given parameters to the state for the portlet window this service operates on. The parameters will be added to the state taking into account if the portlet defines public render parameter with the given key(s) and / or if the portlet window is declared as an action or resource target.
- Parameters:
- state - The state to modify, i. e. the state where the parameters have to be added. Must not be null.
- parameters - The parameters which have to be added to the state. Must not be null. The map must not contain null keys. However null values are allowed and indicate that this parameter has to be deleted.
- Throws:
- StateParameterException - If an exception occured while manipulating the parameters
setRenderParameters
void setRenderParameters(StateHolderController state, java.util.Map<java.lang.String,java.lang.String[]> parameters) throws StateParameterException
- Sets the given parameters to the state ( as private or public render parameters) for the portlet window this service operates on. The parameters will be added to the state taking into account if the portlet defines public render parameter with the given key(s). This method does not take care whether the portlet window is declared as an action or resource target.
- Parameters:
- state - The state to modify, i. e. the state where the parameters have to be added. Must not be null.
- parameters - The render parameters which have to be added to the state. Must not be null. The map must not contain null keys. However null values are allowed and indicate that this parameter has to be deleted.
- Throws:
- StateParameterException - If an exception occured while manipulating the parameters
Tree PREV CLASS NEXT CLASS SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD