Description
The goal of this specification is to add the capability for GateIn to display a single application with no decoration around it in a browser window. So it is almost like a portal that would only show a single window without a concept of page. The first version of this specification will focus on displaying gadgets as standalone applications, but later we will provide a new version of this specification that will work for both gadgets and portlets.
Solution
Today we have a PortalRequestHandler that process a request and triggers the lifecycle of a UIPortalApplication. The UIPortalApplication class extends the UIApplication class, the component hierarchy contained by a UIPortalApplication is quite complex and it contains pages, each page contains a page structure finally containing UIPortlet.
We want to create a new UIApplication extension called UIStandaloneApplication that extends UIApplication and that has only one single component that is a viewport onto a portal page window. A window in GateIn has an unique identifier. When displaying a gadget, the gadget markup would have an attribute that would provide the associated standalone application URL. This application URL would provide interactions with the same window in the server which are render and process action defined in webui component framework.
The UIStandaloneApplication will be exposed as a StandaloneRequestHandler that will process an URL bound on /application (subject to change).
Specification
Configuration Change
Users must login before use StandaloneApplication for now. So, add it to security constraints
<security-constraint>
<web-resource-collection>
<web-resource-name>user authentication</web-resource-name>
<url-pattern>/private/*</url-pattern>
<url-pattern>/standalone/*</url-pattern>
<http-method>POST</http-method>
<http-method>GET</http-method>
</web-resource-collection>
.........................
</security-constraint>
WebRequestHandler in gatein like : PortalRequestHandler or StandaloneRequestHandler should be used as plugin, so we can add new handler by add new config (don't need to modify the PortalController any more), webui-configuration file can be set by using <init-params> element too
<external-component-plugins>
<target-component>org.exoplatform.web.WebAppController</target-component>
<component-plugin>
<name>StandaloneAppRequestHandler</name>
<set-method>register</set-method>
<type>org.exoplatform.portal.application.StandaloneAppRequestHandler</type>
<init-params>
<value-param>
<name>webui.configuration</name>
<value>app:/WEB-INF/standalone-webui-configuration.xml</value>
</value-param>
</init-params>
</component-plugin>
</external-component-plugins>
DataStorage
The DataStorage interface and its implementation requires a modification to be able to operate on objects of type org.exoplatform.portal.config.model.Application . Indeed until now it only cared about the notion of page and now we need a finer grained access to components of a page.
For the first step, we need methods retrieving Application model, site type and site owner
public <S> Application<S> getApplicationModel(String applicationStorageId) throws Exception;
|
Implementation of two newly declared methods in DataStorageImpl
public <S> Application<S> getApplicationModel(String applicationStorageId) throws Exception
|
Relevant changes in ModelDataStorage
public <S> ApplicationData getApplicationModel(String applicationStorageId) throws Exception;
|
Implementation of two newly declared methods in POMDataStorage
public <S> ApplicationData<S> getApplicationData(String applicationStorageId) throws Exception {
{
|
Comments