|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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 PortletConfig |
portletConfig
|
protected Map<Application,Set<PortletApplicationContext2.PortletListener>> |
portletListeners
|
protected HashMap<String,Application> |
portletWindowIdToApplicationMap
|
protected 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,
Root root,
ActionRequest request,
ActionResponse response)
|
void |
firePortletEventRequest(Application app,
Root root,
EventRequest request,
EventResponse response)
|
void |
firePortletRenderRequest(Application app,
Root root,
RenderRequest request,
RenderResponse response)
|
void |
firePortletResourceRequest(Application app,
Root root,
ResourceRequest request,
ResourceResponse response)
|
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(PortletSession session)
|
Application |
getApplicationForWindowId(String portletWindowId)
|
protected PortletCommunicationManager |
getApplicationManager(Application application)
|
File |
getBaseDirectory()
Returns application context base directory. |
PortletConfig |
getPortletConfig()
|
PortletSession |
getPortletSession()
|
protected void |
removeApplication(Application application)
|
void |
removePortletListener(Application app,
PortletApplicationContext2.PortletListener listener)
|
void |
sendPortletEvent(Root root,
QName name,
Serializable value)
Sends a portlet event to the indicated destination. |
void |
setPortletConfig(PortletConfig config)
|
void |
setPortletMode(Root root,
PortletMode portletMode)
Sets the portlet mode. |
void |
setSharedRenderParameter(Root root,
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 PortletSession session
protected transient 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(PortletSession session)
protected void removeApplication(Application application)
removeApplication
in class AbstractWebApplicationContext
protected void addApplication(Application application, String portletWindowId)
public Application getApplicationForWindowId(String portletWindowId)
public PortletSession getPortletSession()
public PortletConfig getPortletConfig()
public void setPortletConfig(PortletConfig config)
public void addPortletListener(Application app, PortletApplicationContext2.PortletListener listener)
public void removePortletListener(Application app, PortletApplicationContext2.PortletListener listener)
public void firePortletRenderRequest(Application app, Root root, RenderRequest request, RenderResponse response)
public void firePortletActionRequest(Application app, Root root, ActionRequest request, ActionResponse response)
public void firePortletEventRequest(Application app, Root root, EventRequest request, EventResponse response)
public void firePortletResourceRequest(Application app, Root root, ResourceRequest request, 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 PortletURL generateActionURL(String action)
action
-
public void sendPortletEvent(Root root, QName name, Serializable value) throws IllegalStateException
root
- 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(Root root, String name, String value) throws IllegalStateException
root
- a window in which a temporary action URL can be opened if
necessaryname
- parameter identifiervalue
- parameter value
IllegalStateException
public void setPortletMode(Root root, PortletMode portletMode) throws IllegalStateException, PortletModeException
root
- a window in which the render URL can be opened if necessaryportletMode
- the portlet mode to switch to
PortletModeException
- if the portlet mode is not allowed for some reason
(configuration, permissions etc.)
IllegalStateException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |