| java.lang.Object com.caucho.portal.generic.context.ConnectionContext
ConnectionContext | public class ConnectionContext (Code) | | ConnectionContext tracks the state of a PortletConnection and provides
methods for all operations that affect the connection.
InterfaceImpl classes implement interfaces and delegate all operations to
the ConnectionContext.
Some of the state of the connection depends on the "current window". The
ConnectionContext maintains a stack of
WindowContext .
|
Method Summary | |
public void | addProperty(String key, String value) | public boolean | canGuaranteeConfidentiality() | public boolean | canGuaranteeIntegrity() | protected void | checkAlwaysWriteOrStream() | protected void | checkConstraints() Check for constraint failures and if any are encountered
set the _windowContext appropriately. | protected void | checkWindowMutable(String namespace) | protected PortalURL | createActionURL(Invocation invocation, boolean keepParameters) | public PortalURL | createActionURL() | public PortalURL | createActionURL(String namespace, boolean keepParameters) | protected PortalURL | createRenderURL(Invocation invocation, boolean keepParameters) | public PortalURL | createRenderURL() | public PortalURL | createRenderURL(String namespace, boolean keepParameters) | protected PortalURL | createURL(InvocationURL url) | public String | encodeURL(String path) | public void | finish() | void | finishAction() | void | finishRender() | public void | flushBuffer(boolean flushToClient) | protected void | forbidRedirectIfInActionStage() | public Action | getAction(Window window, String namespace) | public String | getActionParameter(String name) | public Map<String, String[]> | getActionParameterMap() | public Enumeration | getActionParameterNames() | public String[] | getActionParameterValues(String name) | public ActionRequest | getActionRequest() | public ActionResponse | getActionResponse() | public Object | getAttribute(String name) | public Enumeration | getAttributeNames() | public String | getAuthType() | public int | getBufferSize() | public String | getCharacterEncoding() | protected PortletConnection | getConnection() | public int | getConnectionExpirationCache() | public String | getContentType() | public String | getContextPath() | public Action | getCurrentAction() | public Render | getCurrentRender() | protected Invocation | getInvocation() | protected Invocation | getInvocation(String namespace) | protected InvocationFactory | getInvocationFactory() | public Locale | getLocale() | protected String | getNamespace() | protected String | getParameter(Map<String, String[]> map, String name) | protected Enumeration | getParameterNames(Map<String, String[]> map) | protected String[] | getParameterValues(Map<String, String[]> map, String name) | public Portal | getPortal() | public PortalContext | getPortalContext() | public PortalRequest | getPortalRequest() | public PortalResponse | getPortalResponse() | public PortletMode | getPortletMode() | public PortletMode | getPortletMode(String namespace) | public Set<PortletMode> | getPortletModesUsed() | public OutputStream | getPortletOutputStream() | public PortletRequest | getPortletRequest() | public PortletResponse | getPortletResponse() | public PortletSession | getPortletSession() | public PortletSession | getPortletSession(boolean create) | public PortletPreferences | getPreferences() | protected PreferencesStore | getPreferencesStore() | public Enumeration | getProperties(String name) | public String | getProperty(String name) | public Enumeration | getPropertyNames() | public String | getRemoteUser() | public Render | getRender(Window window, String namespace) | public String | getRenderParameter(String name) | public String | getRenderParameter(String namespace, String name) | public Map<String, String[]> | getRenderParameterMap() | public Map<String, String[]> | getRenderParameterMap(String namespace) | public Enumeration | getRenderParameterNames() | public Enumeration | getRenderParameterNames(String namespace) | public String[] | getRenderParameterValues(String name) | public String[] | getRenderParameterValues(String namespace, String name) | public RenderRequest | getRenderRequest() | public RenderResponse | getRenderResponse() | protected Renderer | getRenderer() | protected Renderer | getRenderer(String namespace) | public String | getRequestedSessionId() | public String | getResponseCharacterEncoding() Get the character encoding already established or get the most preferred
character encoding. | public Set<String> | getResponseCharacterEncodingsSet() Get an ordered set containing all possible character encodings, the most
preferred Locale occurring first. | public String | getResponseContentType() | public Set<String> | getResponseContentTypesSet() | public Locale | getResponseLocale() Get the locale already established or get the most preferred locale. | public Set<Locale> | getResponseLocalesSet() Get an ordered set containing all possible locales, the most preferred
Locale occurring first. | public String | getScheme() | public String | getServerName() | public int | getServerPort() | public String | getSubmitCharacterEncoding() | public int | getSubmitContentLength() | public String | getSubmitContentType() | public InputStream | getSubmitInputStream() | public BufferedReader | getSubmitReader() | public Map<String, String> | getUserAttributeMap() | protected UserAttributeStore | getUserAttributeStore() | public java.security.Principal | getUserPrincipal() | protected Window | getWindow() | protected Window | getWindow(String namespace) | public WindowState | getWindowState() | public WindowState | getWindowState(String namespace) | public Set<WindowState> | getWindowStatesUsed() | public PrintWriter | getWriter() | protected boolean | handleConstraintFailure() See if the Window can handle the constraint. | protected void | handleException() See if the Window can handle the exception. | public boolean | isCommitted() | protected boolean | isConnectionFailed() | public boolean | isConnectionPrivate() | protected boolean | isForbidRedirect() | protected boolean | isPortletModeAllowed(Window window, PortletMode portletMode) | public boolean | isPortletModeAllowed(PortletMode portletMode) | public boolean | isPortletModeAllowed(String namespace, PortletMode portletMode) | public boolean | isRequestedSessionIdValid() | public boolean | isSecure() | public boolean | isTarget() | public boolean | isUserInRole(String role) | protected boolean | isWindowStateAllowed(Window window, WindowState windowState) | public boolean | isWindowStateAllowed(WindowState windowState) | public boolean | isWindowStateAllowed(String namespace, WindowState windowState) | protected void | log(Level level, String message) | protected void | log(Level level, String message, Exception ex) | protected void | log(String namespace, Level level, String message) | protected void | log(String namespace, Level level, String message, Exception ex) | public void | processAction(Portlet portlet) | public void | removeAttribute(String name) | public void | render(Portlet portlet) | public void | reset(boolean resetRenderer) Parameters: resetRenderer - if true, reset all of the buffers for the currentwindow. | public void | resetBuffer(boolean resetRenderer) | public String | resolveURL(String path) | public String | resolveURL(String path, boolean isSecure) | public void | sendRedirect(String location) | public void | setAttribute(String name, Object o) | public void | setBufferSize(int size) | protected void | setConnectionFailed(Exception ex) | protected void | setConnectionFailed() | protected void | setConnectionPrivate() | public void | setContentType(String contentType) | protected void | setForbidRedirect() | protected void | setParameter(Map<String, String[]> map, String name, String value) | protected void | setParameter(Map<String, String[]> map, String name, String[] values) | protected void | setParameters(Map<String, String[]> destMap, Map<String, String[]> srcMap) | protected void | setPortletMode(Window window, String namespace, Invocation invocation, PortletMode portletMode) | public void | setPortletMode(PortletMode portletMode) | public void | setPortletMode(String namespace, PortletMode portletMode) | public void | setProperty(String key, String value) | public void | setRenderParameter(String name, String value) | public void | setRenderParameter(String name, String[] values) | public void | setRenderParameter(String namespace, String name, String value) | public void | setRenderParameter(String namespace, String name, String[] values) | public void | setRenderParameters(Map<String, String[]> srcMap) | public void | setRenderParameters(String namespace, Map<String, String[]> srcMap) | public void | setSubmitCharacterEncoding(String enc) | public void | setTitle(String title) | protected void | setWindowState(Window window, String namespace, Invocation invocation, WindowState windowState) | public void | setWindowState(WindowState windowState) | public void | setWindowState(String namespace, WindowState windowState) | public void | start(InvocationFactory invocationFactory) | protected void | updateConnectionExpirationCache(int expirationCache) |
STAGE_ACTION | final static int STAGE_ACTION(Code) | | |
STAGE_DONE | final static int STAGE_DONE(Code) | | |
STAGE_DONEACTION | final static int STAGE_DONEACTION(Code) | | |
STAGE_RENDER | final static int STAGE_RENDER(Code) | | |
STAGE_START | final static int STAGE_START(Code) | | |
_connectionExpirationCache | int _connectionExpirationCache(Code) | | |
_connectionIsPrivate | boolean _connectionIsPrivate(Code) | | |
canGuaranteeConfidentiality | public boolean canGuaranteeConfidentiality()(Code) | | |
canGuaranteeIntegrity | public boolean canGuaranteeIntegrity()(Code) | | |
checkAlwaysWriteOrStream | protected void checkAlwaysWriteOrStream() throws IOException(Code) | | If the current window has a renderer that is always-write or
always-stream, call getWriter() or getOutputStream()
|
checkConstraints | protected void checkConstraints()(Code) | | Check for constraint failures and if any are encountered
set the _windowContext appropriately.
|
finish | public void finish()(Code) | | |
flushBuffer | public void flushBuffer(boolean flushToClient) throws IOException(Code) | | Parameters: flushToClient - true flush all buffers through to the client.If false, flush only the buffers for the current window |
forbidRedirectIfInActionStage | protected void forbidRedirectIfInActionStage()(Code) | | |
getActionRequest | public ActionRequest getActionRequest()(Code) | | |
getActionResponse | public ActionResponse getActionResponse()(Code) | | |
getBufferSize | public int getBufferSize()(Code) | | |
getCharacterEncoding | public String getCharacterEncoding()(Code) | | |
getConnectionExpirationCache | public int getConnectionExpirationCache()(Code) | | |
getPortalContext | public PortalContext getPortalContext()(Code) | | |
getPortletMode | public PortletMode getPortletMode()(Code) | | |
getPortletMode | public PortletMode getPortletMode(String namespace)(Code) | | |
getPortletModesUsed | public Set<PortletMode> getPortletModesUsed()(Code) | | |
getPortletRequest | public PortletRequest getPortletRequest()(Code) | | |
getPortletResponse | public PortletResponse getPortletResponse()(Code) | | |
getPortletSession | public PortletSession getPortletSession()(Code) | | |
getPortletSession | public PortletSession getPortletSession(boolean create)(Code) | | |
getPreferences | public PortletPreferences getPreferences()(Code) | | |
getRenderRequest | public RenderRequest getRenderRequest()(Code) | | |
getRenderResponse | public RenderResponse getRenderResponse()(Code) | | |
getRequestedSessionId | public String getRequestedSessionId()(Code) | | |
getResponseCharacterEncoding | public String getResponseCharacterEncoding()(Code) | | Get the character encoding already established or get the most preferred
character encoding.
|
getResponseCharacterEncodingsSet | public Set<String> getResponseCharacterEncodingsSet()(Code) | | Get an ordered set containing all possible character encodings, the most
preferred Locale occurring first. If the character encoding is already
established a Set containing only the established character encoding is
returned, if the established character encoding is not one of the
supported character encodings specified in the configuration an empty set
is returned.
|
getResponseContentType | public String getResponseContentType()(Code) | | |
getResponseContentTypesSet | public Set<String> getResponseContentTypesSet()(Code) | | |
getResponseLocale | public Locale getResponseLocale()(Code) | | Get the locale already established or get the most preferred locale.
|
getResponseLocalesSet | public Set<Locale> getResponseLocalesSet()(Code) | | Get an ordered set containing all possible locales, the most preferred
Locale occurring first. If the locale is already established a Set
containing only the established locale is returned, if the established
locale is not one of the supported locales specified in the configuration
an empty set is returned.
|
getServerPort | public int getServerPort()(Code) | | |
getSubmitCharacterEncoding | public String getSubmitCharacterEncoding()(Code) | | |
getSubmitContentLength | public int getSubmitContentLength()(Code) | | |
getSubmitContentType | public String getSubmitContentType()(Code) | | |
getWindowState | public WindowState getWindowState()(Code) | | |
getWindowState | public WindowState getWindowState(String namespace)(Code) | | |
getWindowStatesUsed | public Set<WindowState> getWindowStatesUsed()(Code) | | |
handleConstraintFailure | protected boolean handleConstraintFailure() throws PortletException, IOException(Code) | | See if the Window can handle the constraint. Return true
if the constraint has been handled in some way.
Side-effect: might set isExcluded to true
|
handleException | protected void handleException() throws PortletException, IOException(Code) | | See if the Window can handle the exception. Return true
if the exception has been handled in some way.
Side-effect: might set windows.isExcluded to true
might set window.setException to null if it is handled
|
isCommitted | public boolean isCommitted()(Code) | | |
isConnectionFailed | protected boolean isConnectionFailed()(Code) | | |
isConnectionPrivate | public boolean isConnectionPrivate()(Code) | | |
isForbidRedirect | protected boolean isForbidRedirect()(Code) | | |
isPortletModeAllowed | protected boolean isPortletModeAllowed(Window window, PortletMode portletMode)(Code) | | |
isPortletModeAllowed | public boolean isPortletModeAllowed(PortletMode portletMode)(Code) | | |
isPortletModeAllowed | public boolean isPortletModeAllowed(String namespace, PortletMode portletMode)(Code) | | |
isRequestedSessionIdValid | public boolean isRequestedSessionIdValid()(Code) | | |
isSecure | public boolean isSecure()(Code) | | |
isTarget | public boolean isTarget()(Code) | | |
isWindowStateAllowed | protected boolean isWindowStateAllowed(Window window, WindowState windowState)(Code) | | |
isWindowStateAllowed | public boolean isWindowStateAllowed(WindowState windowState)(Code) | | |
isWindowStateAllowed | public boolean isWindowStateAllowed(String namespace, WindowState windowState)(Code) | | |
processAction | public void processAction(Portlet portlet)(Code) | | |
removeAttribute | public void removeAttribute(String name)(Code) | | |
reset | public void reset(boolean resetRenderer)(Code) | | Parameters: resetRenderer - if true, reset all of the buffers for the currentwindow. If false, reset all of the buffers until theRendererResponseHandler, reset that too but in such a waythat it will write the decorations again. |
resetBuffer | public void resetBuffer(boolean resetRenderer)(Code) | | |
resolveURL | public String resolveURL(String path, boolean isSecure) throws PortletSecurityException(Code) | | |
setBufferSize | public void setBufferSize(int size)(Code) | | |
setConnectionFailed | protected void setConnectionFailed()(Code) | | |
setConnectionPrivate | protected void setConnectionPrivate()(Code) | | |
setContentType | public void setContentType(String contentType)(Code) | | |
setForbidRedirect | protected void setForbidRedirect()(Code) | | |
setPortletMode | protected void setPortletMode(Window window, String namespace, Invocation invocation, PortletMode portletMode) throws PortletModeException(Code) | | |
setPortletMode | public void setPortletMode(PortletMode portletMode) throws PortletModeException(Code) | | |
setPortletMode | public void setPortletMode(String namespace, PortletMode portletMode) throws PortletModeException(Code) | | |
setWindowState | protected void setWindowState(Window window, String namespace, Invocation invocation, WindowState windowState) throws WindowStateException(Code) | | |
setWindowState | public void setWindowState(WindowState windowState) throws WindowStateException(Code) | | |
setWindowState | public void setWindowState(String namespace, WindowState windowState) throws WindowStateException(Code) | | |
updateConnectionExpirationCache | protected void updateConnectionExpirationCache(int expirationCache)(Code) | | |
|
|