|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.vaadin.terminal.gwt.server.AbstractWebApplicationContext
com.vaadin.terminal.gwt.server.PortletApplicationContext2
public class PortletApplicationContext2
TODO Write documentation, fix JavaDoc tags.
This is automatically registered as a HttpSessionBindingListener
when
PortletSession#setAttribute()
is called with the context as value.
Nested Class Summary | |
---|---|
static interface |
PortletApplicationContext2.PortletListener
|
Nested classes/interfaces inherited from interface com.vaadin.service.ApplicationContext |
---|
ApplicationContext.TransactionListener |
Field Summary | |
---|---|
protected javax.portlet.PortletConfig |
portletConfig
|
protected Map<Application,Set<PortletApplicationContext2.PortletListener>> |
portletListeners
|
protected HashMap<String,Application> |
portletWindowIdToApplicationMap
|
protected javax.portlet.PortletSession |
session
|
Fields inherited from class com.vaadin.terminal.gwt.server.AbstractWebApplicationContext |
---|
applications, applicationToAjaxAppMgrMap, browser, listeners |
Constructor Summary | |
---|---|
PortletApplicationContext2()
|
Method Summary | |
---|---|
protected void |
addApplication(Application application,
String portletWindowId)
|
void |
addPortletListener(Application app,
PortletApplicationContext2.PortletListener listener)
|
protected PortletCommunicationManager |
createPortletCommunicationManager(Application application)
|
void |
firePortletActionRequest(Application app,
Window window,
javax.portlet.ActionRequest request,
javax.portlet.ActionResponse response)
|
void |
firePortletEventRequest(Application app,
Window window,
javax.portlet.EventRequest request,
javax.portlet.EventResponse response)
|
void |
firePortletRenderRequest(Application app,
Window window,
javax.portlet.RenderRequest request,
javax.portlet.RenderResponse response)
|
void |
firePortletResourceRequest(Application app,
Window window,
javax.portlet.ResourceRequest request,
javax.portlet.ResourceResponse response)
|
javax.portlet.PortletURL |
generateActionURL(String action)
Creates a new action URL. |
String |
generateApplicationResourceURL(ApplicationResource resource,
String mapKey)
Generate a URL that can be used as the relative location of e.g. |
static PortletApplicationContext2 |
getApplicationContext(javax.portlet.PortletSession session)
|
Application |
getApplicationForWindowId(String portletWindowId)
|
protected PortletCommunicationManager |
getApplicationManager(Application application)
|
File |
getBaseDirectory()
Returns application context base directory. |
javax.portlet.PortletConfig |
getPortletConfig()
|
javax.portlet.PortletSession |
getPortletSession()
|
boolean |
isProductionMode()
|
protected void |
removeApplication(Application application)
|
void |
removePortletListener(Application app,
PortletApplicationContext2.PortletListener listener)
|
void |
sendPortletEvent(Window window,
QName name,
Serializable value)
Sends a portlet event to the indicated destination. |
void |
setPortletConfig(javax.portlet.PortletConfig config)
|
void |
setPortletMode(Window window,
javax.portlet.PortletMode portletMode)
Sets the portlet mode. |
void |
setProductionMode(boolean productionMode)
|
void |
setSharedRenderParameter(Window window,
String name,
String value)
Sets a shared portlet parameter. |
Methods inherited from class com.vaadin.terminal.gwt.server.AbstractWebApplicationContext |
---|
addTransactionListener, endTransaction, getApplications, getBrowser, getLastRequestTime, getTotalSessionTime, getURLKey, isApplicationResourceURL, removeTransactionListener, setLastRequestTime, startTransaction, valueBound, valueUnbound |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Map<Application,Set<PortletApplicationContext2.PortletListener>> portletListeners
protected transient javax.portlet.PortletSession session
protected transient javax.portlet.PortletConfig portletConfig
protected HashMap<String,Application> portletWindowIdToApplicationMap
Constructor Detail |
---|
public PortletApplicationContext2()
Method Detail |
---|
public File getBaseDirectory()
ApplicationContext
protected PortletCommunicationManager getApplicationManager(Application application)
protected PortletCommunicationManager createPortletCommunicationManager(Application application)
public static PortletApplicationContext2 getApplicationContext(javax.portlet.PortletSession session)
protected void removeApplication(Application application)
removeApplication
in class AbstractWebApplicationContext
protected void addApplication(Application application, String portletWindowId)
public Application getApplicationForWindowId(String portletWindowId)
public javax.portlet.PortletSession getPortletSession()
public javax.portlet.PortletConfig getPortletConfig()
public void setPortletConfig(javax.portlet.PortletConfig config)
public void addPortletListener(Application app, PortletApplicationContext2.PortletListener listener)
public void removePortletListener(Application app, PortletApplicationContext2.PortletListener listener)
public void firePortletRenderRequest(Application app, Window window, javax.portlet.RenderRequest request, javax.portlet.RenderResponse response)
public void firePortletActionRequest(Application app, Window window, javax.portlet.ActionRequest request, javax.portlet.ActionResponse response)
public void firePortletEventRequest(Application app, Window window, javax.portlet.EventRequest request, javax.portlet.EventResponse response)
public void firePortletResourceRequest(Application app, Window window, javax.portlet.ResourceRequest request, javax.portlet.ResourceResponse response)
public String generateApplicationResourceURL(ApplicationResource resource, String mapKey)
ApplicationContext
ApplicationResource
.
This method should only be called from the processing of a UIDL request,
not from a background thread. The return value is null if used outside a
suitable request.
generateApplicationResourceURL
in interface ApplicationContext
generateApplicationResourceURL
in class AbstractWebApplicationContext
mapKey
- a key for the resource that can later be extracted from a URL
with ApplicationContext.getURLKey(URL, String)
public javax.portlet.PortletURL generateActionURL(String action)
action
-
public void sendPortletEvent(Window window, QName name, Serializable value) throws IllegalStateException
window
- a window in which a temporary action URL can be opened if
necessaryname
- event namevalue
- event value object that is Serializable and, if appropriate,
has a valid JAXB annotation
IllegalStateException
public void setSharedRenderParameter(Window window, String name, String value) throws IllegalStateException
window
- a window in which a temporary action URL can be opened if
necessaryname
- parameter identifiervalue
- parameter value
IllegalStateException
public void setPortletMode(Window window, javax.portlet.PortletMode portletMode) throws IllegalStateException, javax.portlet.PortletModeException
window
- a window in which the render URL can be opened if necessaryportletMode
- the portlet mode to switch to
javax.portlet.PortletModeException
- if the portlet mode is not allowed for some reason
(configuration, permissions etc.)
IllegalStateException
public boolean isProductionMode()
public void setProductionMode(boolean productionMode)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |