|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.portlet.GenericPortlet
com.vaadin.terminal.gwt.server.AbstractApplicationPortlet
public abstract class AbstractApplicationPortlet
Portlet 2.0 base class. This replaces the servlet in servlet/portlet 1.0 deployments and handles various portlet requests from the browser. TODO Document me!
Nested Class Summary | |
---|---|
class |
AbstractApplicationPortlet.RequestError
|
protected static class |
AbstractApplicationPortlet.RequestType
|
Field Summary | |
---|---|
static String |
PORTLET_PARAMETER_STYLE
This portlet parameter is used to add styles to the main element. |
Constructor Summary | |
---|---|
AbstractApplicationPortlet()
|
Method Summary | |
---|---|
protected void |
doDispatch(javax.portlet.RenderRequest request,
javax.portlet.RenderResponse response)
|
protected abstract Class<? extends Application> |
getApplicationClass()
|
protected String |
getApplicationOrSystemProperty(String parameterName,
String defaultValue)
Gets an application or system property value. |
protected String |
getApplicationProperty(String parameterName)
Gets an application property value. |
protected ClassLoader |
getClassLoader()
|
protected Application |
getNewApplication(javax.portlet.PortletRequest request)
|
protected String |
getNoScriptMessage()
Returns a message printed for browsers without scripting support or if browsers scripting support is disabled. |
protected static String |
getPortalProperty(String name,
javax.portlet.PortalContext context)
Returns a portal configuration property. |
protected AbstractApplicationPortlet.RequestType |
getRequestType(javax.portlet.PortletRequest request)
|
protected String |
getStaticFilesLocation(javax.portlet.PortletRequest request)
Return the URL from where static files, e.g. |
protected Application.SystemMessages |
getSystemMessages()
Get system messages from the current application class |
protected String |
getSystemProperty(String parameterName)
Gets an system property value. |
protected String |
getThemeForWindow(javax.portlet.PortletRequest request,
Window window)
Returns the theme for given request/window |
protected String |
getThemeURI(String themeName,
javax.portlet.PortletRequest request)
Returns the theme URI for the named theme on the portal. |
protected Map<String,String> |
getVaadinConfigurationMap(javax.portlet.RenderRequest request,
javax.portlet.RenderResponse response,
Application application,
String themeURI)
Returns the configuration parameters to pass to the client. |
protected String |
getWidgetsetURL(String widgetset,
javax.portlet.PortletRequest request)
Returns the URL from which the widgetset is served on the portal. |
protected void |
handleRequest(javax.portlet.PortletRequest request,
javax.portlet.PortletResponse response)
|
void |
init(javax.portlet.PortletConfig config)
|
boolean |
isProductionMode()
Returns true if the servlet is running in production mode. |
void |
processAction(javax.portlet.ActionRequest request,
javax.portlet.ActionResponse response)
|
void |
processEvent(javax.portlet.EventRequest request,
javax.portlet.EventResponse response)
|
void |
serveResource(javax.portlet.ResourceRequest request,
javax.portlet.ResourceResponse response)
|
protected void |
writeAjaxPage(javax.portlet.RenderRequest request,
javax.portlet.RenderResponse response,
Window window,
Application application)
Writes the html host page (aka kickstart page) that starts the actual Vaadin application. |
protected void |
writeAjaxPageHtmlMainDiv(javax.portlet.RenderRequest request,
javax.portlet.RenderResponse response,
BufferedWriter writer,
String id,
String classNames,
String divStyle)
Method to write the div element into which that actual Vaadin application is rendered. |
protected void |
writeAjaxPageHtmlTheme(javax.portlet.RenderRequest request,
BufferedWriter writer,
String themeName,
String themeURI,
String portalTheme)
Writes the Vaadin theme loading section of the portlet HTML. |
protected void |
writeAjaxPageHtmlVaadinScripts(javax.portlet.RenderRequest request,
javax.portlet.RenderResponse response,
BufferedWriter writer,
Application application,
String themeName)
This method writes the scripts to load the widgetset and the themes as well as define Vaadin configuration parameters on the HTML fragment that starts the actual Vaadin application. |
protected void |
writeAjaxPageScriptConfigurations(javax.portlet.RenderRequest request,
javax.portlet.RenderResponse response,
BufferedWriter writer,
Map<String,String> config)
Constructs the Vaadin configuration section for ApplicationConnection and ApplicationConfiguration . |
protected void |
writeAjaxPageScriptWidgetset(javax.portlet.RenderRequest request,
javax.portlet.RenderResponse response,
BufferedWriter writer)
Writes the script to load the widgetset on the HTML fragment created by the portlet. |
Methods inherited from class javax.portlet.GenericPortlet |
---|
destroy, doEdit, doHeaders, doHelp, doView, getContainerRuntimeOptions, getDefaultNamespace, getInitParameter, getInitParameterNames, getNextPossiblePortletModes, getPortletConfig, getPortletContext, getPortletName, getProcessingEventQNames, getPublicRenderParameterNames, getPublishingEventQNames, getResourceBundle, getSupportedLocales, getTitle, init, render |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String PORTLET_PARAMETER_STYLE
Constructor Detail |
---|
public AbstractApplicationPortlet()
Method Detail |
---|
public void init(javax.portlet.PortletConfig config) throws javax.portlet.PortletException
init
in interface javax.portlet.Portlet
init
in class javax.portlet.GenericPortlet
javax.portlet.PortletException
protected String getApplicationProperty(String parameterName)
parameterName
- the Name or the parameter.
protected String getSystemProperty(String parameterName)
parameterName
- the Name or the parameter.
protected String getApplicationOrSystemProperty(String parameterName, String defaultValue)
parameterName
- the Name or the parameter.defaultValue
- the Default to be used.
protected String getStaticFilesLocation(javax.portlet.PortletRequest request)
request
-
protected AbstractApplicationPortlet.RequestType getRequestType(javax.portlet.PortletRequest request)
public boolean isProductionMode()
protected void handleRequest(javax.portlet.PortletRequest request, javax.portlet.PortletResponse response) throws javax.portlet.PortletException, IOException
javax.portlet.PortletException
IOException
public void processEvent(javax.portlet.EventRequest request, javax.portlet.EventResponse response) throws javax.portlet.PortletException, IOException
processEvent
in interface javax.portlet.EventPortlet
processEvent
in class javax.portlet.GenericPortlet
javax.portlet.PortletException
IOException
public void processAction(javax.portlet.ActionRequest request, javax.portlet.ActionResponse response) throws javax.portlet.PortletException, IOException
processAction
in interface javax.portlet.Portlet
processAction
in class javax.portlet.GenericPortlet
javax.portlet.PortletException
IOException
protected void doDispatch(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response) throws javax.portlet.PortletException, IOException
doDispatch
in class javax.portlet.GenericPortlet
javax.portlet.PortletException
IOException
public void serveResource(javax.portlet.ResourceRequest request, javax.portlet.ResourceResponse response) throws javax.portlet.PortletException, IOException
serveResource
in interface javax.portlet.ResourceServingPortlet
serveResource
in class javax.portlet.GenericPortlet
javax.portlet.PortletException
IOException
protected String getWidgetsetURL(String widgetset, javax.portlet.PortletRequest request)
widgetset
- request
-
protected String getThemeURI(String themeName, javax.portlet.PortletRequest request)
themeName
- request
-
protected void writeAjaxPage(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response, Window window, Application application) throws IOException, MalformedURLException, javax.portlet.PortletException
#writeAjaxPageHtmlMainDiv(RenderRequest, RenderResponse, BufferedWriter, String)
getVaadinConfigurationMap(RenderRequest, RenderResponse, Application, String)
writeAjaxPageHtmlVaadinScripts(RenderRequest, RenderResponse, BufferedWriter, Application, String)
request
- the portlet request.response
- the portlet response to write to.window
- application
-
IOException
- if the writing failed due to input/output error.
MalformedURLException
- if the application is denied access the persistent data store
represented by the given URL.
javax.portlet.PortletException
protected void writeAjaxPageHtmlVaadinScripts(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response, BufferedWriter writer, Application application, String themeName) throws IOException, javax.portlet.PortletException
request
- response
- writer
- application
- themeName
-
IOException
javax.portlet.PortletException
protected void writeAjaxPageScriptWidgetset(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response, BufferedWriter writer) throws IOException
request
- response
- writer
-
IOException
protected Map<String,String> getVaadinConfigurationMap(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response, Application application, String themeURI) throws javax.portlet.PortletException
ApplicationConnection
and
ApplicationConfiguration
.
Note that this method must escape and quote the values when appropriate.
The map returned is typically a LinkedHashMap
to preserve
insertion order, but it is not guaranteed to be one.
request
- response
- application
- themeURI
-
javax.portlet.PortletException
protected void writeAjaxPageScriptConfigurations(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response, BufferedWriter writer, Map<String,String> config) throws IOException, javax.portlet.PortletException
ApplicationConnection
and ApplicationConfiguration
.
Typically this method should not be overridden. Instead, modify
getVaadinConfigurationMap(RenderRequest, RenderResponse, Application, String)
.
request
- response
- writer
- config
-
IOException
javax.portlet.PortletException
protected void writeAjaxPageHtmlTheme(javax.portlet.RenderRequest request, BufferedWriter writer, String themeName, String themeURI, String portalTheme) throws IOException
request
- writer
- themeName
- themeURI
- portalTheme
-
IOException
protected void writeAjaxPageHtmlMainDiv(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response, BufferedWriter writer, String id, String classNames, String divStyle) throws IOException
Override this method if you want to add some custom html around around the div element into which the actual Vaadin application will be rendered.
request
- response
- writer
- id
- classNames
- divStyle
-
IOException
protected String getNoScriptMessage()
protected String getThemeForWindow(javax.portlet.PortletRequest request, Window window)
request
- window
-
protected abstract Class<? extends Application> getApplicationClass() throws ClassNotFoundException
ClassNotFoundException
protected Application getNewApplication(javax.portlet.PortletRequest request) throws javax.portlet.PortletException
javax.portlet.PortletException
protected ClassLoader getClassLoader() throws javax.portlet.PortletException
javax.portlet.PortletException
protected Application.SystemMessages getSystemMessages()
protected static String getPortalProperty(String name, javax.portlet.PortalContext context)
PortalContext.getProperty(String)
does not return portal
properties from e.g. portal-ext.properties .
name
- context
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |