com.ibm.portal.state.accessors
Interface StateAccessor
- All Superinterfaces:
- Accessor, Disposable
- All Known Subinterfaces:
- StateAccessorController
-
public interface StateAccessor
- extends Accessor
Provides read access to the state holder based on a given request.
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
createSource
javax.xml.transform.Source createSource(javax.servlet.http.HttpServletRequest req)
throws StateNotInRequestException
- Returns the StateHolder of the request in xml format
- Parameters:
- req - servlet request (must not be null)
- Returns:
- state holder that is associated with the request. The state
holder does not need to be disposed if retrieved via this method.
- Throws:
- StateNotInRequestException - - if no state could be associated with the request
- Since:
- 8.0.0.1
createSource
javax.xml.transform.Source createSource(StateHolder state)
- Returns an XML representation of the StateHolder.
- Parameters:
- state - the state holder, not null
- Returns:
- the XML representation
- Since:
- 8.0.0.1
getStateHolder
StateHolder getStateHolder(javax.servlet.http.HttpServletRequest req)
throws StateNotInRequestException
- Retrieves the read-only state holder from the request
- Parameters:
- req - servlet request (must not be null)
- Returns:
- state holder that is associated with the request. The state
holder does not need to be disposed if retrieved via this method.
- Throws:
- StateNotInRequestException - - if no state could be associated with the request