JBoss Portal SVN: r8978 - branches/JBoss_Portal_Branch_2_6/core.
by portal-commits@lists.jboss.org
Author: sviluppatorefico
Date: 2007-11-16 17:46:16 -0500 (Fri, 16 Nov 2007)
New Revision: 8978
Modified:
branches/JBoss_Portal_Branch_2_6/core/.classpath
Log:
I remove xalan.jar. It is not more used into this version
Modified: branches/JBoss_Portal_Branch_2_6/core/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/.classpath 2007-11-16 18:53:28 UTC (rev 8977)
+++ branches/JBoss_Portal_Branch_2_6/core/.classpath 2007-11-16 22:46:16 UTC (rev 8978)
@@ -8,7 +8,6 @@
<classpathentry kind="lib" path="/thirdparty/oswego-concurrent/lib/concurrent.jar"/>
<classpathentry kind="lib" path="/thirdparty/sun-javamail/lib/mail.jar"/>
<classpathentry kind="lib" path="/thirdparty/apache-myfaces/lib/myfaces-api.jar"/>
- <classpathentry kind="lib" path="/tools/lib/xalan.jar"/>
<classpathentry kind="lib" path="/thirdparty/beanshell/lib/bsh-1.3.0.jar"/>
<classpathentry kind="lib" path="/thirdparty/apache-fileupload/lib/commons-fileupload.jar"/>
<classpathentry kind="lib" path="/thirdparty/apache-httpclient/lib/commons-httpclient.jar"/>
16 years, 10 months
JBoss Portal SVN: r8977 - in branches/UIServer: uiserver/src/main/org/jboss/portal/presentation and 4 other directories.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2007-11-16 13:53:28 -0500 (Fri, 16 Nov 2007)
New Revision: 8977
Added:
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/RequestContextImpl.java
Modified:
branches/UIServer/core/src/main/org/jboss/portal/core/presentation/server/MainProcessor.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/RequestContext.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/controller/UIController.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/server/ProcessorRequest.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/server/ProcessorResponse.java
branches/UIServer/uiserver/src/resources/portal-uiserver.war/WEB-INF/web.xml
Log:
integration
Modified: branches/UIServer/core/src/main/org/jboss/portal/core/presentation/server/MainProcessor.java
===================================================================
--- branches/UIServer/core/src/main/org/jboss/portal/core/presentation/server/MainProcessor.java 2007-11-16 16:47:30 UTC (rev 8976)
+++ branches/UIServer/core/src/main/org/jboss/portal/core/presentation/server/MainProcessor.java 2007-11-16 18:53:28 UTC (rev 8977)
@@ -89,14 +89,12 @@
ProcessorResponse response = null;
//For now, just for prototype sake just use the existing Controller to produce the outcome
- request.getServerInvocation().setHandler(new RequestControllerDispatcher(this.requestController));
- request.getServerInvocation().invokeNext();
+ requestContext.getInvocation().setHandler(new RequestControllerDispatcher(this.requestController));
+ requestContext.getInvocation().invokeNext();
//Get access to the core Portal objects to be used after the execution of the incoming Portal request
//by the Portal Controller
- ServerInvocation invocation = request.getServerInvocation();
- ServletContextDispatcher dispatcher = new ServletContextDispatcher(invocation.getServerContext().getClientRequest(),
- invocation.getServerContext().getClientResponse(), invocation.getRequest().getServer().getServletContainerContext());
+ ServerInvocation invocation = requestContext.getInvocation();
String task = (String)invocation.getServerContext().getClientRequest().getAttribute("pfTask");
if(task.equals("aggregate"))
@@ -107,7 +105,7 @@
String contentType = markupInfo.getContentType() + "; charset=" + markupInfo.getCharset();
//Generate the response to be sent back for processing by the Presentation Framework
- response = new ProcessorResponse(dispatcher, null);
+ response = new ProcessorResponse(null);
}
else if(task.equals("stream"))
{
@@ -115,21 +113,21 @@
String contentType = (String)invocation.getServerContext().getClientRequest().getAttribute("contentType");
InputStream in = (InputStream)invocation.getServerContext().getClientRequest().getAttribute("inputStream");
StreamResponse streamResponse = new StreamResponse(contentType, in);
- response = new ProcessorResponse(dispatcher, streamResponse);
+ response = new ProcessorResponse(streamResponse);
}
else if(task.equals("redirect"))
{
//Handle sendRedirect back to the client
String url = (String)invocation.getServerContext().getClientRequest().getAttribute("url");
RedirectResponse redirectResponse = new RedirectResponse(url);
- response = new ProcessorResponse(dispatcher, redirectResponse);
+ response = new ProcessorResponse(redirectResponse);
}
else if(task.equals("error"))
{
//Handle sendingErrror back to the client
Integer errorCode = (Integer)invocation.getServerContext().getClientRequest().getAttribute("errorCode");
ErrorResponse errorResponse = new ErrorResponse(errorCode.intValue());
- response = new ProcessorResponse(dispatcher, errorResponse);
+ response = new ProcessorResponse(errorResponse);
}
return response;
Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/RequestContext.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/RequestContext.java 2007-11-16 16:47:30 UTC (rev 8976)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/RequestContext.java 2007-11-16 18:53:28 UTC (rev 8977)
@@ -25,6 +25,8 @@
import org.jboss.portal.presentation.action.server.ServerAction;
import org.jboss.portal.presentation.model.UIContext;
import org.jboss.portal.presentation.model.state.ModelLoader;
+import org.jboss.portal.server.ServerInvocation;
+import org.jboss.portal.web.ServletContextDispatcher;
/**
* The contract that defines the services that the client provides to the server during a server invocation.
@@ -48,5 +50,16 @@
* Returns the root UI context provided by the portal.
*/
UIContext getUIContext();
-
+
+ /**
+ *
+ * @return
+ */
+ ServerInvocation getInvocation();
+
+ /**
+ *
+ * @return
+ */
+ ServletContextDispatcher getDispatcher();
}
Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/controller/UIController.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/controller/UIController.java 2007-11-16 16:47:30 UTC (rev 8976)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/controller/UIController.java 2007-11-16 18:53:28 UTC (rev 8977)
@@ -27,12 +27,12 @@
import javax.servlet.http.HttpServletRequest;
import org.jboss.portal.presentation.RequestContext;
+import org.jboss.portal.presentation.impl.RequestContextImpl;
import org.jboss.portal.presentation.server.ProcessorRequest;
import org.jboss.portal.presentation.server.ProcessorResponse;
import org.jboss.portal.presentation.server.PresentationServer;
import org.jboss.portal.presentation.action.server.ServerAction;
import org.jboss.portal.presentation.action.server.ServerResponse;
-import org.jboss.portal.presentation.action.server.LinkActivation;
import org.jboss.portal.presentation.action.server.GetActivation;
import org.jboss.portal.presentation.action.server.PostActivation;
import org.jboss.portal.presentation.action.server.ViewUIObjectAction;
@@ -84,10 +84,14 @@
{
try
{
- //Make a request to the Processor
- RequestContext requestContext = null; //Just use null until proper implementation is provided
+ /**
+ * TODO: decouple the implementation via factory pattern
+ */
+ RequestContext requestContext = new RequestContextImpl(this.presentationServer,
+ invocation);
+
ServerAction serverAction = this.getServerAction(requestContext,invocation);
- ProcessorRequest processorRequest = new ProcessorRequest(serverAction, invocation);
+ ProcessorRequest processorRequest = new ProcessorRequest(serverAction);
ProcessorResponse processorResponse = this.presentationServer.getProcessor().process(requestContext,
processorRequest);
Added: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/RequestContextImpl.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/RequestContextImpl.java (rev 0)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/RequestContextImpl.java 2007-11-16 18:53:28 UTC (rev 8977)
@@ -0,0 +1,107 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.impl;
+
+import javax.servlet.http.HttpSession;
+
+import org.jboss.portal.presentation.RequestContext;
+import org.jboss.portal.presentation.action.server.ServerAction;
+import org.jboss.portal.presentation.model.UIContext;
+import org.jboss.portal.presentation.server.PresentationServer;
+import org.jboss.portal.presentation.impl.model.UIContextImpl;
+import org.jboss.portal.server.ServerInvocation;
+import org.jboss.portal.web.ServletContextDispatcher;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class RequestContextImpl implements RequestContext
+{
+ /**
+ *
+ */
+ private ServerInvocation invocation = null;
+
+ private PresentationServer presentationServer = null;
+
+ /**
+ *
+ * @param invocation
+ */
+ public RequestContextImpl(PresentationServer presentationServer, ServerInvocation invocation)
+ {
+ this.invocation = invocation;
+ this.presentationServer = presentationServer;
+ }
+
+ /**
+ *
+ * @return
+ */
+ public UIContext getUIContext()
+ {
+ HttpSession session = this.invocation.getServerContext().getClientRequest().getSession();
+
+ UIContext uiContext = (UIContext)session.getAttribute("uicontext");
+ if(uiContext == null)
+ {
+ /**
+ * TODO: decouple the implementation via factory pattern
+ */
+ uiContext = new UIContextImpl();
+ ((UIContextImpl)uiContext).setModelLoader(this.presentationServer.getModelLoader());
+ session.setAttribute("uicontext", uiContext);
+ }
+
+ return uiContext;
+ }
+
+ /**
+ *
+ */
+ public ServerInvocation getInvocation()
+ {
+ return this.invocation;
+ }
+
+ /**
+ *
+ */
+ public ServletContextDispatcher getDispatcher()
+ {
+ return new ServletContextDispatcher(this.invocation.getServerContext().getClientRequest(),
+ this.invocation.getServerContext().getClientResponse(), this.invocation.getRequest().getServer().getServletContainerContext());
+ }
+
+ /**
+ *
+ * @param action
+ * @return
+ * @throws IllegalArgumentException
+ */
+ public String render(ServerAction action) throws IllegalArgumentException
+ {
+ return null;
+ }
+}
Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/server/ProcessorRequest.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/server/ProcessorRequest.java 2007-11-16 16:47:30 UTC (rev 8976)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/server/ProcessorRequest.java 2007-11-16 18:53:28 UTC (rev 8977)
@@ -24,7 +24,6 @@
import java.io.Serializable;
-import org.jboss.portal.server.ServerInvocation;
import org.jboss.portal.presentation.action.server.ServerAction;
@@ -41,21 +40,15 @@
/**
* The Portal action to be performed
*/
- private ServerAction action = null;
+ private ServerAction action = null;
/**
*
- */
- private ServerInvocation serverInvocation = null;
-
- /**
- *
*
*/
- public ProcessorRequest(ServerAction action, ServerInvocation serverInvocation)
+ public ProcessorRequest(ServerAction action)
{
- this.action = action;
- this.serverInvocation = serverInvocation;
+ this.action = action;
}
/**
@@ -74,25 +67,7 @@
public void setAction(ServerAction action)
{
this.action = action;
- }
-
- /**
- *
- * @return
- */
- public ServerInvocation getServerInvocation()
- {
- return serverInvocation;
- }
-
- /**
- *
- * @param serverInvocation
- */
- public void setServerInvocation(ServerInvocation serverInvocation)
- {
- this.serverInvocation = serverInvocation;
- }
+ }
/**
*
Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/server/ProcessorResponse.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/server/ProcessorResponse.java 2007-11-16 16:47:30 UTC (rev 8976)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/server/ProcessorResponse.java 2007-11-16 18:53:28 UTC (rev 8977)
@@ -24,7 +24,6 @@
import java.io.Serializable;
-import org.jboss.portal.web.ServletContextDispatcher;
import org.jboss.portal.presentation.action.server.ServerResponse;
/**
@@ -32,13 +31,8 @@
*
*/
public class ProcessorResponse implements Serializable
-{
+{
/**
- *
- */
- private ServletContextDispatcher dispatcher = null;
-
- /**
* The ServerResponse generated by processing the ProcessorRequest by the Processor
*/
private ServerResponse response = null;
@@ -48,32 +42,13 @@
* @param dispatcher
* @param updatedPages
*/
- public ProcessorResponse(ServletContextDispatcher dispatcher, ServerResponse response)
- {
- this.dispatcher = dispatcher;
+ public ProcessorResponse(ServerResponse response)
+ {
this.response = response;
- }
-
- /**
- *
- * @return
- */
- public ServletContextDispatcher getDispatcher()
- {
- return dispatcher;
- }
+ }
/**
*
- * @param dispatcher
- */
- public void setDispatcher(ServletContextDispatcher dispatcher)
- {
- this.dispatcher = dispatcher;
- }
-
- /**
- *
* @return
*/
public ServerResponse getResponse()
Modified: branches/UIServer/uiserver/src/resources/portal-uiserver.war/WEB-INF/web.xml
===================================================================
--- branches/UIServer/uiserver/src/resources/portal-uiserver.war/WEB-INF/web.xml 2007-11-16 16:47:30 UTC (rev 8976)
+++ branches/UIServer/uiserver/src/resources/portal-uiserver.war/WEB-INF/web.xml 2007-11-16 18:53:28 UTC (rev 8977)
@@ -27,7 +27,6 @@
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<!-- Add the GWT Client Filter to run the Portal in full Web 2.0 Ajax Mode. In turn, to run in Classic Html Mode, turn this filter off -->
- <!--
<filter>
<filter-name>GWTClientFilter</filter-name>
<filter-class>org.jboss.portal.presentation.entry.GWTClientFilter</filter-class>
@@ -36,7 +35,6 @@
<filter-name>GWTClientFilter</filter-name>
<servlet-name>PortalEntryPoint</servlet-name>
</filter-mapping>
- -->
<!-- The portal servlet is the main entrance point -->
<servlet>
16 years, 10 months
JBoss Portal SVN: r8976 - in branches/UIServer: core/src/main/org/jboss/portal/core/presentation/server and 32 other directories.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2007-11-16 11:47:30 -0500 (Fri, 16 Nov 2007)
New Revision: 8976
Added:
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/action/server/StreamResponse.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/AsyncPages.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/MyGWTPrototype.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/PartialRefresh.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/Portal.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/PortalLayout.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/PortletService.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/PortletServiceAsync.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/PortletWindowPanel.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/layout/
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/layout/LayoutManager.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/protocol/
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/protocol/Page.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/protocol/Window.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/service/
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/service/PortalRPC.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/service/PortalRPCAsync.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/widget/
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/widget/PortletWindow.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/controller/
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/controller/UIController.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/entry/
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/entry/EntryPoint.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/entry/GWTClientFilter.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/ajax/entry/
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/ajax/entry/PortalEntryPoint.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/classic/entry/
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/classic/entry/PortalEntryPoint.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/entry/
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/entry/EntryPointImpl.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/test/ajax/PortletServiceImpl.java
branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/
branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/
branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/AsyncPages.gwt.xml
branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/MyGWT.gwt.xml
branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/PartialRefresh.gwt.xml
branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/Portal.gwt.xml
branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/PortalLayout.gwt.xml
branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/
branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/asyncPages.html
branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/cmsPortlet.html
branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/images/
branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/images/ico_16_maximize.gif
branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/images/ico_16_minimize.gif
branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/images/ico_16_normal.gif
branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/index.html
branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/jspPortlet.html
branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/layout.html
branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/mygwt.html
branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/partialRefresh.html
branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/portal.css
branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/portal/
branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/portal/index.html
branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/prototype.js
branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/weatherPortlet.html
Removed:
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/ajax/service/
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model/Portal.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model/PortalObject.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/service/
branches/UIServer/uiserver/src/main/org/jboss/portal/uiserver/
branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/uiserver/
Modified:
branches/UIServer/core/src/main/org/jboss/portal/core/presentation/model/ModelLoaderImpl.java
branches/UIServer/core/src/main/org/jboss/portal/core/presentation/server/MainProcessor.java
branches/UIServer/core/src/main/org/jboss/portal/core/theme/PageRendition.java
branches/UIServer/uiserver/build.xml
branches/UIServer/uiserver/gwt-dev-env/AsyncPages(uiserver).launch
branches/UIServer/uiserver/gwt-dev-env/MyGWT(uiserver).launch
branches/UIServer/uiserver/gwt-dev-env/PartialRefresh(uiserver).launch
branches/UIServer/uiserver/gwt-dev-env/Portal(uiserver).launch
branches/UIServer/uiserver/gwt-dev-env/PortalLayout(uiserver).launch
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/action/server/ErrorResponse.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/action/server/LinkActivation.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/action/server/RedirectResponse.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/server/ProcessorResponse.java
branches/UIServer/uiserver/src/resources/portal-uiserver.sar/META-INF/jboss-service.xml
branches/UIServer/uiserver/src/resources/portal-uiserver.war/WEB-INF/web.xml
branches/UIServer/uiserver/src/resources/portal-uiserver.war/asyncPages.html
branches/UIServer/uiserver/src/resources/portal-uiserver.war/layout.html
branches/UIServer/uiserver/src/resources/portal-uiserver.war/partialRefresh.html
Log:
integration
Modified: branches/UIServer/core/src/main/org/jboss/portal/core/presentation/model/ModelLoaderImpl.java
===================================================================
--- branches/UIServer/core/src/main/org/jboss/portal/core/presentation/model/ModelLoaderImpl.java 2007-11-16 15:13:46 UTC (rev 8975)
+++ branches/UIServer/core/src/main/org/jboss/portal/core/presentation/model/ModelLoaderImpl.java 2007-11-16 16:47:30 UTC (rev 8976)
@@ -90,6 +90,12 @@
String token = st.nextToken();
portalObject = portalObject.getChild(token);
}
+
+ if(portalObject == null)
+ {
+ //Object by this id was not found in the Portal
+ return null;
+ }
//Type
Class<? extends UIObject> type = this.getType(portalObject);
Modified: branches/UIServer/core/src/main/org/jboss/portal/core/presentation/server/MainProcessor.java
===================================================================
--- branches/UIServer/core/src/main/org/jboss/portal/core/presentation/server/MainProcessor.java 2007-11-16 15:13:46 UTC (rev 8975)
+++ branches/UIServer/core/src/main/org/jboss/portal/core/presentation/server/MainProcessor.java 2007-11-16 16:47:30 UTC (rev 8976)
@@ -23,18 +23,10 @@
package org.jboss.portal.core.presentation.server;
import java.io.InputStream;
-import java.util.Map;
-import java.util.List;
-import java.util.Iterator;
-import java.util.ArrayList;
import org.apache.log4j.Logger;
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.ServletOutputStream;
-
import org.jboss.portal.common.util.MarkupInfo;
-import org.jboss.portal.common.io.IOTools;
import org.jboss.portal.jems.as.system.AbstractJBossService;
import org.jboss.portal.web.ServletContextDispatcher;
import org.jboss.portal.server.RequestControllerDispatcher;
@@ -42,13 +34,16 @@
import org.jboss.portal.server.RequestController;
import org.jboss.portal.server.ServerInvocation;
import org.jboss.portal.theme.page.PageResult;
-import org.jboss.portal.theme.page.WindowContext;
-import org.jboss.portal.theme.page.WindowResult;
+
import org.jboss.portal.presentation.RequestContext;
import org.jboss.portal.presentation.server.Processor;
import org.jboss.portal.presentation.server.ProcessorRequest;
import org.jboss.portal.presentation.server.ProcessorResponse;
+import org.jboss.portal.presentation.action.server.ShowUIObjectResponse;
+import org.jboss.portal.presentation.action.server.ErrorResponse;
+import org.jboss.portal.presentation.action.server.RedirectResponse;
+import org.jboss.portal.presentation.action.server.StreamResponse;
/**
* @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
@@ -90,15 +85,7 @@
public ProcessorResponse process(RequestContext requestContext, ProcessorRequest request) throws ServerException
{
try
- {
- /*
- This should process the request sent in from the UIServer using whatever framework the core Portal implements
- Basically based on the information sent in by the ProcessorRequest this component should have all the information
- it needs to perform necessary action inside the Portal
- the Processor should use the values sent in the ProcessorRequest object to perform
- the appropriate action and then send its Response back to the UIServer which should process
- the Response and sent a Response back to the client
- */
+ {
ProcessorResponse response = null;
//For now, just for prototype sake just use the existing Controller to produce the outcome
@@ -109,117 +96,47 @@
//by the Portal Controller
ServerInvocation invocation = request.getServerInvocation();
ServletContextDispatcher dispatcher = new ServletContextDispatcher(invocation.getServerContext().getClientRequest(),
- invocation.getServerContext().getClientResponse(), invocation.getRequest().getServer().getServletContainerContext());
+ invocation.getServerContext().getClientResponse(), invocation.getRequest().getServer().getServletContainerContext());
+
String task = (String)invocation.getServerContext().getClientRequest().getAttribute("pfTask");
if(task.equals("aggregate"))
{
//Handle page aggregation and sending result back to the client
- /*
MarkupInfo markupInfo = (MarkupInfo)invocation.getResponse().getContentInfo();
PageResult pageResult = (PageResult)invocation.getServerContext().getClientRequest().getAttribute("pageResult");
-
- //Now generate a ProcessorResponse by mapping the data produced during the execution of
- //the Portal Request
String contentType = markupInfo.getContentType() + "; charset=" + markupInfo.getCharset();
- Page pageToBeDisplayed = new Page();
- pageToBeDisplayed.setCurrentlyDisplayed(true);
- //Setup information inside the page object
- pageToBeDisplayed.setName(pageResult.getPageName());
- List windows = this.getWindows(pageResult.getWindowContextMap());
- if(windows != null)
- {
- pageToBeDisplayed.getChildren().addAll(windows);
- }
-
- //
- List updatedPages = new ArrayList();
- updatedPages.add(pageToBeDisplayed);
-
- //Generate the response to be sent back for processing by the Presentation Framework
- response = new ProcessorResponse(dispatcher, contentType, markupInfo.getCharset(), updatedPages);
- */
+ //Generate the response to be sent back for processing by the Presentation Framework
+ response = new ProcessorResponse(dispatcher, null);
}
else if(task.equals("stream"))
{
//Handle sending back binary content back to the client
String contentType = (String)invocation.getServerContext().getClientRequest().getAttribute("contentType");
- InputStream in = (InputStream)invocation.getServerContext().getClientRequest().getAttribute("inputStream");
-
- //Process and see if binary content needs to be sent back...
- //In this case write the response to the OutputStream directly
- //There is no need for any Presentation Framework processing
- if(contentType != null && in != null)
- {
- HttpServletResponse resp = invocation.getServerContext().getClientResponse();
- resp.setContentType(contentType);
- ServletOutputStream sout = null;
- try
- {
- sout = resp.getOutputStream();
- byte[] buf = new byte[2048];
- int len;
- while ((len = in.read(buf)) > 0)
- {
- sout.write(buf, 0, len);
- }
- sout.flush();
- }
- finally
- {
- IOTools.safeClose(in);
- IOTools.safeClose(sout);
- }
- }
+ InputStream in = (InputStream)invocation.getServerContext().getClientRequest().getAttribute("inputStream");
+ StreamResponse streamResponse = new StreamResponse(contentType, in);
+ response = new ProcessorResponse(dispatcher, streamResponse);
}
else if(task.equals("redirect"))
{
//Handle sendRedirect back to the client
String url = (String)invocation.getServerContext().getClientRequest().getAttribute("url");
- invocation.getServerContext().getClientResponse().sendRedirect(url);
+ RedirectResponse redirectResponse = new RedirectResponse(url);
+ response = new ProcessorResponse(dispatcher, redirectResponse);
}
else if(task.equals("error"))
{
//Handle sendingErrror back to the client
Integer errorCode = (Integer)invocation.getServerContext().getClientRequest().getAttribute("errorCode");
- invocation.getServerContext().getClientResponse().sendError(errorCode.intValue());
+ ErrorResponse errorResponse = new ErrorResponse(errorCode.intValue());
+ response = new ProcessorResponse(dispatcher, errorResponse);
}
-
-
+
return response;
}
catch(Exception e)
{
throw new ServerException(e);
}
- }
-
- /**
- *
- * @param windowContexts
- * @return
- */
- private List getWindows(Map windowContexts)
- {
- List windows = null;
-
- /*if(windowContexts != null)
- {
- windows = new ArrayList();
- for(Iterator itr=windowContexts.keySet().iterator(); itr.hasNext();)
- {
- String windowId = (String)itr.next();
- WindowContext windowContext = (WindowContext)windowContexts.get(windowId);
- WindowResult windowResult = windowContext.getResult();
-
- Window window = new Window(windowId, windowResult.getTitle(),
- windowResult.getContent(), windowResult.getHeaderContent(),
- windowResult.getWindowState(), windowResult.getMode());
-
- windows.add(window);
- }
- }*/
-
- return windows;
- }
+ }
}
Modified: branches/UIServer/core/src/main/org/jboss/portal/core/theme/PageRendition.java
===================================================================
--- branches/UIServer/core/src/main/org/jboss/portal/core/theme/PageRendition.java 2007-11-16 15:13:46 UTC (rev 8975)
+++ branches/UIServer/core/src/main/org/jboss/portal/core/theme/PageRendition.java 2007-11-16 16:47:30 UTC (rev 8976)
@@ -43,8 +43,6 @@
import java.util.List;
import java.util.ArrayList;
-//import org.jboss.portal.presentation.service.UIServer;
-
/**
* Should not be a controller response, but it comes from legacy design.
*
@@ -96,8 +94,6 @@
//
RendererContext rendererContext = layout.getRenderContext(themeContext, markupInfo, dispatcher);
- //
- //This is the non-uiserver based rendering
try
{
rendererContext.render(pageResult);
@@ -105,33 +101,7 @@
catch (RenderException e)
{
e.printStackTrace();
- }
-
- /*
- //Prototyping with the new ui server delegated rendering
- UIServer uiServer = new UIServer(); //This will actually be a jmx service...instead of instantiating the UiServer here
-
- //Setup the Windows for the UIServer
- List uiWindows = new ArrayList();
- Map windowContexts = pageResult.getWindowContextMap();
- for(Iterator itr=windowContexts.values().iterator();itr.hasNext();)
- {
- WindowContext wc = (WindowContext)itr.next();
- WindowResult result = wc.getResult();
-
- org.jboss.portal.uiserver.protocol.WindowResult uiWindow = new org.jboss.portal.uiserver.protocol.WindowResult(wc.getId(),
- result.getTitle(), result.getContent(), result.getHeaderContent(), result.getWindowState(), result.getMode()
- );
-
- uiWindows.add(uiWindow);
- }
-
- //Setup the Page for the UIServer
- org.jboss.portal.uiserver.protocol.PageResult uiPageResult = new org.jboss.portal.uiserver.protocol.PageResult(this.pageResult.getPageName(), uiWindows);
-
- //Delegate Rendering to the UIServer
- uiServer.render(new PrintWriter(dispatcher.getResponse().getOutputStream()), uiPageResult);
- */
+ }
}
public PageResult getPageResult()
Modified: branches/UIServer/uiserver/build.xml
===================================================================
--- branches/UIServer/uiserver/build.xml 2007-11-16 15:13:46 UTC (rev 8975)
+++ branches/UIServer/uiserver/build.xml 2007-11-16 16:47:30 UTC (rev 8976)
@@ -242,22 +242,22 @@
<path refid="gwt.gwt.classpath"/>
<path refid="mygwt.mygwt.classpath"/>
</path>
- <delete dir="${build.resources}/portal-uiserver.war/org.jboss.portal.uiserver.ajax.Portal"/>
+ <delete dir="${build.resources}/portal-uiserver.war/org.jboss.portal.presentation.ajax.Portal"/>
<java classpathref="full.gwt.classpath" fork="true" classname="com.google.gwt.dev.GWTCompiler">
<classpath>
<pathelement path="src/main"/>
<pathelement path="src/resources/client/ajax/src"/>
</classpath>
<arg line="-out ${build.resources}/portal-uiserver.war/"/>
- <arg line="org.jboss.portal.uiserver.ajax.Portal"/>
+ <arg line="org.jboss.portal.presentation.ajax.Portal"/>
</java>
<jar jarfile="${build.lib}/portal-uiserver.war">
<fileset dir="${build.resources}/portal-uiserver.war"></fileset>
</jar>
<copy todir="${build.resources}/portal-uiserver.war">
- <fileset dir="${build.resources}/portal-uiserver.war/org.jboss.portal.uiserver.ajax.Portal"/>
+ <fileset dir="${build.resources}/portal-uiserver.war/org.jboss.portal.presentation.ajax.Portal"/>
</copy>
- <delete dir="${build.resources}/portal-uiserver.war/org.jboss.portal.uiserver.ajax.Portal"/>
+ <delete dir="${build.resources}/portal-uiserver.war/org.jboss.portal.presentation.ajax.Portal"/>
<!-- portal-uiserver.sar -->
Modified: branches/UIServer/uiserver/gwt-dev-env/AsyncPages(uiserver).launch
===================================================================
--- branches/UIServer/uiserver/gwt-dev-env/AsyncPages(uiserver).launch 2007-11-16 15:13:46 UTC (rev 8975)
+++ branches/UIServer/uiserver/gwt-dev-env/AsyncPages(uiserver).launch 2007-11-16 16:47:30 UTC (rev 8976)
@@ -13,7 +13,7 @@
<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry id="org.eclipse.jdt.launching.classpathentry.defaultClasspath"> <memento exportedEntriesOnly="false" project="UIServer"/> </runtimeClasspathEntry> "/>
<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/UIServer/uiserver/gwt-dev-env/gwt-dev-linux.jar" path="3" type="2"/> "/>
</listAttribute>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-out www org.jboss.portal.uiserver.ajax.AsyncPages/asyncPages.html"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-out www org.jboss.portal.presentation.ajax.AsyncPages/asyncPages.html"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="UIServer"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/UIServer"/>
Modified: branches/UIServer/uiserver/gwt-dev-env/MyGWT(uiserver).launch
===================================================================
--- branches/UIServer/uiserver/gwt-dev-env/MyGWT(uiserver).launch 2007-11-16 15:13:46 UTC (rev 8975)
+++ branches/UIServer/uiserver/gwt-dev-env/MyGWT(uiserver).launch 2007-11-16 16:47:30 UTC (rev 8976)
@@ -14,7 +14,7 @@
<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/UIServer/uiserver/gwt-dev-env/gwt-dev-linux.jar" path="3" type="2"/> "/>
<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/UIServer/uiserver/gwt-dev-env/mygwt.jar" path="3" type="2"/> "/>
</listAttribute>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-out www org.jboss.portal.uiserver.ajax.MyGWT/mygwt.html"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-out www org.jboss.portal.presentation.ajax.MyGWT/mygwt.html"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="UIServer"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/UIServer"/>
Modified: branches/UIServer/uiserver/gwt-dev-env/PartialRefresh(uiserver).launch
===================================================================
--- branches/UIServer/uiserver/gwt-dev-env/PartialRefresh(uiserver).launch 2007-11-16 15:13:46 UTC (rev 8975)
+++ branches/UIServer/uiserver/gwt-dev-env/PartialRefresh(uiserver).launch 2007-11-16 16:47:30 UTC (rev 8976)
@@ -13,7 +13,7 @@
<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry id="org.eclipse.jdt.launching.classpathentry.defaultClasspath"> <memento exportedEntriesOnly="false" project="UIServer"/> </runtimeClasspathEntry> "/>
<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/UIServer/uiserver/gwt-dev-env/gwt-dev-linux.jar" path="3" type="2"/> "/>
</listAttribute>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-out www org.jboss.portal.uiserver.ajax.PartialRefresh/partialRefresh.html"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-out www org.jboss.portal.presentation.ajax.PartialRefresh/partialRefresh.html"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="UIServer"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/UIServer"/>
Modified: branches/UIServer/uiserver/gwt-dev-env/Portal(uiserver).launch
===================================================================
--- branches/UIServer/uiserver/gwt-dev-env/Portal(uiserver).launch 2007-11-16 15:13:46 UTC (rev 8975)
+++ branches/UIServer/uiserver/gwt-dev-env/Portal(uiserver).launch 2007-11-16 16:47:30 UTC (rev 8976)
@@ -13,7 +13,7 @@
<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry id="org.eclipse.jdt.launching.classpathentry.defaultClasspath"> <memento exportedEntriesOnly="false" project="UIServer"/> </runtimeClasspathEntry> "/>
<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/UIServer/uiserver/gwt-dev-env/gwt-dev-linux.jar" path="3" type="2"/> "/>
</listAttribute>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-out www org.jboss.portal.uiserver.ajax.Portal/index.html"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-out www org.jboss.portal.presentation.ajax.Portal/index.html"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="UIServer"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/UIServer"/>
Modified: branches/UIServer/uiserver/gwt-dev-env/PortalLayout(uiserver).launch
===================================================================
--- branches/UIServer/uiserver/gwt-dev-env/PortalLayout(uiserver).launch 2007-11-16 15:13:46 UTC (rev 8975)
+++ branches/UIServer/uiserver/gwt-dev-env/PortalLayout(uiserver).launch 2007-11-16 16:47:30 UTC (rev 8976)
@@ -13,7 +13,7 @@
<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry id="org.eclipse.jdt.launching.classpathentry.defaultClasspath"> <memento exportedEntriesOnly="false" project="UIServer"/> </runtimeClasspathEntry> "/>
<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/UIServer/uiserver/gwt-dev-env/gwt-dev-linux.jar" path="3" type="2"/> "/>
</listAttribute>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-out www org.jboss.portal.uiserver.ajax.PortalLayout/layout.html"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-out www org.jboss.portal.presentation.ajax.PortalLayout/layout.html"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="UIServer"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/UIServer"/>
Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/action/server/ErrorResponse.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/action/server/ErrorResponse.java 2007-11-16 15:13:46 UTC (rev 8975)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/action/server/ErrorResponse.java 2007-11-16 16:47:30 UTC (rev 8976)
@@ -28,4 +28,26 @@
*/
public class ErrorResponse extends ServerResponse
{
+ /**
+ *
+ */
+ private int errorCode = 0;
+
+ /**
+ *
+ * @param errorCode
+ */
+ public ErrorResponse(int errorCode)
+ {
+ this.errorCode = errorCode;
+ }
+
+ /**
+ *
+ * @return
+ */
+ public int getErrorCode()
+ {
+ return this.errorCode;
+ }
}
Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/action/server/LinkActivation.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/action/server/LinkActivation.java 2007-11-16 15:13:46 UTC (rev 8975)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/action/server/LinkActivation.java 2007-11-16 16:47:30 UTC (rev 8976)
@@ -24,8 +24,8 @@
import java.util.Map;
-import org.jboss.portal.presentation.model.Portal;
-import org.jboss.portal.presentation.model.PortalObject;
+import org.jboss.portal.presentation.model.UIPortal;
+import org.jboss.portal.presentation.model.UIObject;
/**
* @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
@@ -51,12 +51,12 @@
/**
* The Portal that the target object belongs to
*/
- protected Portal portal = null;
+ protected UIPortal portal = null;
/**
* Target object where action needs to be performed
*/
- protected PortalObject target = null;
+ protected UIObject target = null;
/**
*
@@ -116,7 +116,7 @@
*
* @return
*/
- public Portal getPortal()
+ public UIPortal getPortal()
{
return portal;
}
@@ -125,7 +125,7 @@
*
* @param portal
*/
- public void setPortal(Portal portal)
+ public void setPortal(UIPortal portal)
{
this.portal = portal;
}
@@ -134,7 +134,7 @@
*
* @return
*/
- public PortalObject getTarget()
+ public UIObject getTarget()
{
return target;
}
@@ -143,7 +143,7 @@
*
* @param target
*/
- public void setTarget(PortalObject target)
+ public void setTarget(UIObject target)
{
this.target = target;
}
Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/action/server/RedirectResponse.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/action/server/RedirectResponse.java 2007-11-16 15:13:46 UTC (rev 8975)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/action/server/RedirectResponse.java 2007-11-16 16:47:30 UTC (rev 8976)
@@ -26,7 +26,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-public class RedirectResponse
+public class RedirectResponse extends ServerResponse
{
/** . */
Added: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/action/server/StreamResponse.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/action/server/StreamResponse.java (rev 0)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/action/server/StreamResponse.java 2007-11-16 16:47:30 UTC (rev 8976)
@@ -0,0 +1,53 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.action.server;
+
+import java.io.InputStream;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class StreamResponse extends ServerResponse
+{
+ /**
+ *
+ */
+ private String contentType = null;
+
+ /**
+ *
+ */
+ private InputStream is = null;
+
+ /**
+ *
+ * @param contentType
+ * @param is
+ */
+ public StreamResponse(String contentType, InputStream is)
+ {
+ this.contentType = contentType;
+ this.is = is;
+ }
+}
Added: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/AsyncPages.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/AsyncPages.java (rev 0)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/AsyncPages.java 2007-11-16 16:47:30 UTC (rev 8976)
@@ -0,0 +1,566 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.ajax.client;
+
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.core.client.EntryPoint;
+
+import com.google.gwt.user.client.DOM;
+import com.google.gwt.user.client.Element;
+import com.google.gwt.user.client.Event;
+import com.google.gwt.user.client.HTTPRequest;
+import com.google.gwt.user.client.ResponseTextHandler;
+import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.Widget;
+import com.google.gwt.user.client.ui.ClickListener;
+import com.google.gwt.user.client.ui.TabBar;
+import com.google.gwt.user.client.ui.TabListener;
+import com.google.gwt.user.client.ui.SourcesTabEvents;
+
+import com.google.gwt.user.client.rpc.ServiceDefTarget;
+import com.google.gwt.user.client.rpc.AsyncCallback;
+
+import net.mygwt.ui.client.widget.ContentPanel;
+import net.mygwt.ui.client.widget.IconButton;
+import net.mygwt.ui.client.widget.WidgetContainer;
+import net.mygwt.ui.client.widget.Viewport;
+import net.mygwt.ui.client.widget.layout.*;
+import net.mygwt.ui.client.Style;
+import net.mygwt.ui.client.event.Listener;
+import net.mygwt.ui.client.event.BaseEvent;
+
+import org.jboss.portal.presentation.ajax.client.protocol.Page;
+import org.jboss.portal.presentation.ajax.client.protocol.Window;
+
+/**
+ * Used for Prototyping Async Page Management
+ *
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class AsyncPages implements EntryPoint
+{
+ /**
+ *
+ */
+ private Viewport viewport = null;
+
+ /**
+ *
+ */
+ private WidgetContainer north = null;
+
+ /**
+ *
+ */
+ private WidgetContainer west = null;
+
+ /**
+ *
+ */
+ private WidgetContainer center = null;
+
+
+ /**
+ * This is the entry point method.
+ */
+ public void onModuleLoad()
+ {
+ //Initialize the Viewport
+ this.viewport = new Viewport();
+
+ //Layout for the viewport
+ BorderLayout pageLayout = new BorderLayout();
+
+ //Layout for the north region (Header/Navigation related content produced by the portal are laid out here)
+ FlowLayout northLayout = new FlowLayout();
+
+ //Setup the layout of the root container of the page
+ this.viewport.setLayout(pageLayout);
+
+ //Setup the north region of the page
+ this.north = new WidgetContainer();
+ this.north.setLayout(northLayout);
+ float northSize = this.viewport.getOffsetHeight() * ((float)0.05);
+ BorderLayoutData northData = new BorderLayoutData(Style.NORTH, northSize);
+ northData.resizeable = true;
+ this.viewport.add(this.north, northData);
+
+ //Load the navigation bar....use a tabbed bar
+ TabBar pageNavigator = new TabBar();
+ pageNavigator.addTab("Page 1");
+ pageNavigator.addTab("Page 2");
+ pageNavigator.addTab("Page 3");
+ pageNavigator.selectTab(0);
+ pageNavigator.addTabListener(new TabListenerImpl());
+ this.north.add(pageNavigator);
+
+ //Load the Portal Page
+ this.loadPartialRefreshPage("Page 1");
+ }
+
+ /**
+ *
+ *
+ */
+ private void loadPartialRefreshPage(String pageId)
+ {
+ PortletServiceAsync portletService = (PortletServiceAsync)GWT.create(PortletService.class);
+ ((ServiceDefTarget)portletService).setServiceEntryPoint(GWT.getModuleBaseURL()+"/portletService");
+
+ AsyncCallback callback = new AsyncCallback()
+ {
+ public void onSuccess(Object result)
+ {
+ Page portalPage = (Page)result;
+ displayPortalPage(portalPage);
+ }
+
+ public void onFailure(Throwable caught)
+ {
+ }
+ };
+
+ portletService.getPage(pageId, callback);
+ }
+
+ /**
+ *
+ * @param portalPage
+ */
+ private void displayPortalPage(Page portalPage)
+ {
+ //A Viewport resizing listener
+
+
+ //Dispalying the fully aggregated page
+ Window[] windows = portalPage.getWindows();
+ int column = 0;
+
+ this.setUpPortletRegions();
+
+ //Fill up the page with portlet windows
+ for(int i=0; i<windows.length; i++)
+ {
+ Window pageWindow = windows[i];
+ if(pageWindow.isVisible())
+ {
+ //Add this window to the Page
+ if(column == 0 && windows.length>1)
+ {
+ this.west.add(this.getPortletWindow(pageWindow.getName(), pageWindow.getContent()));
+ column ++;
+ }
+ else
+ {
+ this.center.add(this.getPortletWindow(pageWindow.getName(), pageWindow.getContent()));
+ column = 0;
+ }
+ }
+ }
+
+ //render the page
+ this.viewport.layout(true);
+ }
+
+ /**
+ *
+ * @param content
+ * @return
+ */
+ private ContentPanel getPortletWindow(String windowName, String content)
+ {
+ ContentPanel portletWindow = new ContentPanel(Style.HEADER);
+ portletWindow.setId(windowName);
+ HTML windowContent = new HTML(content);
+
+
+ //Setup listeners
+ //Event Listener for the decoration components like
+ //Normal, Maximized, Minimized
+ Listener listener = new Listener()
+ {
+ public void handleEvent(BaseEvent event)
+ {
+ IconButton cour = (IconButton)event.widget;
+ String id = cour.getId();
+ String windowName = id.substring(0, id.indexOf(':'));
+ String action = id.substring(id.indexOf(':')+1);
+ if(action.equals("restore"))
+ {
+ handleWindowStateChanged(windowName, Window.NORMAL);
+ }
+ else if(action.equals("minimize"))
+ {
+ handleWindowStateChanged(windowName, Window.MINIMIZED);
+ }
+ else if(action.equals("maximize"))
+ {
+ handleWindowStateChanged(windowName, Window.MAXIMIZED);
+ }
+ else if(action.equals("save"))
+ {
+ handleWindowModeChanged(windowName, Window.EDIT);
+ }
+ }
+ };
+ IconButton save = new IconButton("my-tool-save");
+ save.setId(windowName+":save");
+ IconButton help = new IconButton("my-tool-help");
+ help.setId(windowName+":help");
+ IconButton restore = new IconButton("my-tool-restore");
+ restore.setId(windowName+":restore");
+ IconButton minimize = new IconButton("my-tool-minimize");
+ minimize.setId(windowName+":minimize");
+ IconButton maximize = new IconButton("my-tool-maximize");
+ maximize.setId(windowName+":maximize");
+ portletWindow.addButton(save, listener);
+ portletWindow.addButton(help, listener);
+ portletWindow.addButton(restore, listener);
+ portletWindow.addButton(minimize, listener);
+ portletWindow.addButton(maximize, listener);
+
+ //Event Listener for actions perfomed inside the portlet window content
+ //itself.
+ ClickListener contentListener = new ClickListener()
+ {
+ public void onClick(Widget sender)
+ {
+ Event event = DOM.eventGetCurrentEvent();
+ Element target = DOM.eventGetTarget(event);
+
+ if(target.toString().toUpperCase().trim().indexOf("</A>") != -1)
+ {
+ String link = DOM.getElementAttribute(target, "HREF");
+
+ //A link inside the portlet window was clicked
+ //Load its content asynchronously inside this window
+ boolean isPartialRefreshAllowed = isPartialRefreshAllowed(link);
+ if(isPartialRefreshAllowed)
+ {
+ DOM.eventPreventDefault(event);
+ handlePartialRefreshLink(link, sender);
+ }
+ }
+ else if(target.toString().toUpperCase().trim().indexOf("INPUT") != -1 &&
+ target.toString().toUpperCase().trim().indexOf("SUBMIT") != -1
+ )
+ {
+ Element currentForm = DOM.getParent(target);
+ String enctype = DOM.getElementAttribute(currentForm, "enctype");
+ String action = DOM.getElementAttribute(currentForm, "action");
+ boolean isPartialRefreshAllowed = isPartialRefreshAllowed(action);
+ if((isPartialRefreshAllowed) && (enctype == null || !enctype.equals("multipart/form-data")))
+ {
+ DOM.eventPreventDefault(event);
+
+ //Call a native javascript function here
+ String method = DOM.getElementAttribute(currentForm, "method");
+ String serializedForm = serializeForm(currentForm);
+
+ handlePartialRefreshForm(action, method, serializedForm, sender);
+ }
+ }
+ }
+ };
+ windowContent.addClickListener(contentListener);
+
+ //Add the content
+ portletWindow.add(windowContent);
+
+ return portletWindow;
+ }
+
+ /**
+ *
+ *
+ */
+ private void setUpPortletRegions()
+ {
+ if(this.west != null)
+ {
+ this.viewport.remove(this.west);
+ }
+ if(this.center != null)
+ {
+ this.viewport.remove(this.center);
+ }
+
+ //Re-add these two regions
+ //Layout for the west region (Portlet Windows are laid out here)
+ FlowLayout westLayout = new FlowLayout();
+ westLayout.spacing = 5;
+ westLayout.margin = 5;
+
+ //Layout for the center region (Portlet Windows are laid out here)
+ FlowLayout centerLayout = new FlowLayout();
+ centerLayout.spacing = 5;
+ centerLayout.margin = 5;
+
+ //Setup the west region of the page
+ this.west = new WidgetContainer();
+ this.west.setScrollEnabled(true);
+ this.west.setLayout(westLayout);
+ float westSize = this.viewport.getOffsetWidth() * ((float)0.2);
+ BorderLayoutData westData = new BorderLayoutData(Style.WEST, westSize);
+ westData.resizeable = true;
+ this.viewport.add(this.west, westData);
+
+ //Setup the center region of the page
+ this.center = new WidgetContainer();
+ this.center.setScrollEnabled(true);
+ this.center.setLayout(centerLayout);
+ BorderLayoutData centerData = new BorderLayoutData(Style.CENTER);
+ centerData.resizeable = true;
+ this.viewport.add(this.center, centerData);
+ }
+
+ /**
+ *
+ * @param window
+ * @param newState
+ */
+ private void handleWindowStateChanged(String window, String newState)
+ {
+ PortletServiceAsync portletService = (PortletServiceAsync)GWT.create(PortletService.class);
+ ((ServiceDefTarget)portletService).setServiceEntryPoint(GWT.getModuleBaseURL()+"/portletService");
+
+ AsyncCallback callback = new AsyncCallback()
+ {
+ public void onSuccess(Object result)
+ {
+ Page portalPage = (Page)result;
+ displayPortalPage(portalPage);
+ }
+
+ public void onFailure(Throwable caught)
+ {
+ }
+ };
+
+ portletService.setState(window, newState, callback);
+ }
+
+ /**
+ *
+ * @param window
+ * @param newState
+ */
+ private void handleWindowModeChanged(String window, String newMode)
+ {
+ PortletServiceAsync portletService = (PortletServiceAsync)GWT.create(PortletService.class);
+ ((ServiceDefTarget)portletService).setServiceEntryPoint(GWT.getModuleBaseURL()+"/portletService");
+
+ AsyncCallback callback = new AsyncCallback()
+ {
+ public void onSuccess(Object result)
+ {
+ Page portalPage = (Page)result;
+ displayPortalPage(portalPage);
+ }
+
+ public void onFailure(Throwable caught)
+ {
+ }
+ };
+
+ portletService.setMode(window, newMode, callback);
+ }
+
+ /**
+ *
+ * @param url
+ * @param portletWindow
+ */
+ private void handlePartialRefreshLink(String url, Widget windowContent)
+ {
+ HTTPRequest.asyncGet(url, new ResponseTextHandlerImpl(windowContent));
+ }
+
+ /**
+ *
+ * @param url
+ * @param portletWindow
+ */
+ private void handlePartialRefreshForm(String url, String method, String postData, Widget windowContent)
+ {
+ if(method.equalsIgnoreCase("post"))
+ {
+ HTTPRequest.asyncPost(url, postData, new ResponseTextHandlerImpl(windowContent));
+ }
+ else if(method.equalsIgnoreCase("get"))
+ {
+ if(postData != null && postData.trim().length() > 0)
+ {
+ url = url + "?" + postData;
+ }
+ HTTPRequest.asyncGet(url, new ResponseTextHandlerImpl(windowContent));
+ }
+ }
+
+ /**
+ *
+ * @author soshah
+ *
+ */
+ private class ResponseTextHandlerImpl implements ResponseTextHandler
+ {
+ private Widget windowContent = null;
+
+ public ResponseTextHandlerImpl(Widget windowContent)
+ {
+ this.windowContent = windowContent;
+ }
+ public void onCompletion(String responseText)
+ {
+ HTML html = new HTML(responseText);
+ ContentPanel window = (ContentPanel)this.windowContent.getParent();
+ window.remove(this.windowContent);
+ window.add(html);
+ window.layout(true);
+ }
+ }
+
+ /**
+ *
+ * @param url
+ * @return
+ */
+ private boolean isPartialRefreshAllowed(String url)
+ {
+ String basePortalURL = GWT.getModuleBaseURL();
+ String portalContext = "org.jboss.portal.presentation.Portal"; //This is hard coded for now, but must be populated from the Portal deployment environment
+ //If Portal is installed at Root context, this value will be an empty string
+
+ if(url == null)
+ {
+ return false;
+ }
+
+ if(url.startsWith(basePortalURL))
+ {
+ //This is an Absolute URL, but it points back to
+ //the Portal
+ //An Async Page Refresh call should be allowed in this case
+ return true;
+ }
+
+ if(url.startsWith("http://"))
+ {
+ //This is an Absolute URL and does not point back
+ //to the Portal
+ //Async Page Refresh call should not be allowed
+ return false;
+ }
+ else
+ {
+ //This is a relative URL.
+
+ //Make sure it points back to the Portal for an Async Page Refresh
+ //If it points to some other resource like another third-party web application etc, the response
+ //has nothing to do with Portal
+ //(unless ofcourse the client side processor of the Portal, wants to
+ //take this response and aggregate this inside the current Portal Page and Window being displayed. This is an exceptional usecase
+ //and not desired behavior for every scenario from end user standpoint)
+ //As standard behavior, Async Page Refresh to be done, only when Portlet Markup is sending a request back to the Portal
+ if(url.startsWith("/"))
+ {
+ if(!portalContext.equals(""))
+ {
+ String urlContext = null;
+ int index = url.indexOf('/', 1);
+ if(index != -1)
+ {
+ urlContext = url.substring(1, index);
+ }
+ else
+ {
+ urlContext = url.substring(1);
+ }
+
+ if(!portalContext.equals(urlContext))
+ {
+ //This request is not being sent to the Portal. It is being sent to some other web application
+ return false;
+ }
+ }
+ else
+ {
+ //If Portal is running on root context, there is no way to tell from client side, if this request is actually
+ //to be sent to the Portal or some other web application. Hence, in the interest of functional safety/correctness
+ //no Async Page Refresh here
+ //If Portal is running on Root context, Partial Refresh will happen only for pure relative links
+ return false;
+ }
+ }
+
+ //If I get here, Async Page Refresh through the Portal should be allowed
+ return true;
+ }
+ }
+
+ /**
+ *
+ * @param currentForm
+ * @return
+ */
+ public native String serializeForm(Element currentForm)
+ /*-{
+ var formData = $wnd.Form.serialize(currentForm);
+ return formData;
+ }-*/;
+ //------------Page Navigation related logic-----------------------------------------------------------------------------------------------------
+ /**
+ *
+ */
+ private class TabListenerImpl implements TabListener
+ {
+ /**
+ *
+ */
+ public boolean onBeforeTabSelected(SourcesTabEvents sender, int tabIndex)
+ {
+ return true;
+ }
+
+ /**
+ *
+ */
+ public void onTabSelected(SourcesTabEvents sender, int tabIndex)
+ {
+ if(tabIndex == 0)
+ {
+ loadPartialRefreshPage("Page 1");
+ }
+ else if(tabIndex == 1)
+ {
+ loadPartialRefreshPage("Page 2");
+ }
+ else if(tabIndex == 2)
+ {
+ loadPartialRefreshPage("Page 3");
+ }
+ }
+ }
+}
Added: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/MyGWTPrototype.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/MyGWTPrototype.java (rev 0)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/MyGWTPrototype.java 2007-11-16 16:47:30 UTC (rev 8976)
@@ -0,0 +1,114 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.ajax.client;
+
+import com.google.gwt.core.client.EntryPoint;
+import com.google.gwt.user.client.ui.VerticalPanel;
+import com.google.gwt.user.client.ui.RootPanel;
+import com.google.gwt.user.client.ui.HTML;
+
+import net.mygwt.ui.client.Style;
+import net.mygwt.ui.client.event.BaseEvent;
+import net.mygwt.ui.client.event.SelectionListener;
+import net.mygwt.ui.client.widget.Button;
+import net.mygwt.ui.client.widget.IconButton;
+import net.mygwt.ui.client.widget.ButtonBar;
+import net.mygwt.ui.client.widget.Info;
+import net.mygwt.ui.client.widget.ContentPanel;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class MyGWTPrototype implements EntryPoint
+{
+ /**
+ *
+ */
+ public void onModuleLoad()
+ {
+ VerticalPanel panel = new VerticalPanel();
+ RootPanel.get("currentPage").add(panel);
+
+ // Fillup panel with MyGWT widgets for testing
+ this.createButtonWidget(panel);
+ this.createPortletWindowWidget(panel);
+ }
+
+ /**
+ *
+ * @param container
+ */
+ private void createButtonWidget(VerticalPanel panel)
+ {
+ SelectionListener listener = new SelectionListener()
+ {
+ public void widgetSelected(BaseEvent be)
+ {
+ Button btn = (Button) be.widget;
+ Info.show("Click Event", "The '{0}' button was clicked.", btn
+ .getText());
+ }
+ };
+
+ ButtonBar buttonBar = new ButtonBar(Style.LEFT);
+ buttonBar.add(new Button("Click Me", listener));
+
+ Button iconBtn = new Button("Icon Button", listener);
+ iconBtn.setIconStyle("window-maximize-button");
+ buttonBar.add(iconBtn);
+
+ Button disabled = new Button("Disabled", listener);
+ disabled.setEnabled(false);
+ buttonBar.add(disabled);
+
+ panel.add(buttonBar);
+ }
+
+ /**
+ *
+ * @param panel
+ */
+ private void createPortletWindowWidget(VerticalPanel panel)
+ {
+ HTML html = new HTML("<div class=\"window-normal-button\">Normal</div><br/><div class=\"window-minimize-button\">Minimize</div><br/><div class=\"window-maximize-button\">Maximize</div>");
+
+ ContentPanel contentPanel = new ContentPanel(Style.HEADER);
+ contentPanel.addButton(new IconButton("my-tool-save"), null);
+ contentPanel.addButton(new IconButton("my-tool-help"), null);
+ contentPanel.addButton(new IconButton("my-tool-restore"), null);
+ contentPanel.addButton(new IconButton("my-tool-minimize"), null);
+ contentPanel.addButton(new IconButton("my-tool-maximize"), null);
+
+ Button normalButton = new Button("", null);
+ normalButton.setIconStyle("window-normal-button");
+
+ IconButton iconNormalButton = new IconButton("window-minimize-button");
+
+ contentPanel.add(html);
+ contentPanel.add(normalButton);
+ contentPanel.add(iconNormalButton);
+
+ panel.add(contentPanel);
+ }
+}
Added: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/PartialRefresh.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/PartialRefresh.java (rev 0)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/PartialRefresh.java 2007-11-16 16:47:30 UTC (rev 8976)
@@ -0,0 +1,410 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.ajax.client;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.core.client.EntryPoint;
+
+import com.google.gwt.user.client.DOM;
+import com.google.gwt.user.client.Element;
+import com.google.gwt.user.client.Event;
+import com.google.gwt.user.client.HTTPRequest;
+import com.google.gwt.user.client.ResponseTextHandler;
+import com.google.gwt.user.client.ui.RootPanel;
+import com.google.gwt.user.client.ui.VerticalPanel;
+import com.google.gwt.user.client.ui.HorizontalPanel;
+import com.google.gwt.user.client.ui.Button;
+import com.google.gwt.user.client.ui.ClickListener;
+import com.google.gwt.user.client.ui.Widget;
+import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.Panel;
+
+import com.google.gwt.user.client.rpc.ServiceDefTarget;
+import com.google.gwt.user.client.rpc.AsyncCallback;
+
+import org.jboss.portal.presentation.ajax.client.protocol.Page;
+import org.jboss.portal.presentation.ajax.client.protocol.Window;
+
+/**
+ * Used for Prototyping Partial Refresh feature
+ *
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class PartialRefresh implements EntryPoint
+{
+ /**
+ * This is the entry point method.
+ */
+ public void onModuleLoad()
+ {
+ //Proof of Concept for Portlet Partial Refresh feature
+ this.testPartialRefresh();
+ }
+
+ /**
+ *
+ *
+ */
+ private void testPartialRefresh()
+ {
+ VerticalPanel page = new VerticalPanel();
+ RootPanel.get("page").add(page);
+
+ this.loadPartialRefreshPage();
+ }
+
+ /**
+ *
+ *
+ */
+ private void loadPartialRefreshPage()
+ {
+ PortletServiceAsync portletService = (PortletServiceAsync)GWT.create(PortletService.class);
+ ((ServiceDefTarget)portletService).setServiceEntryPoint(GWT.getModuleBaseURL()+"/portletService");
+
+ AsyncCallback callback = new AsyncCallback()
+ {
+ public void onSuccess(Object result)
+ {
+ Page portalPage = (Page)result;
+ displayPortalPage(portalPage);
+ }
+
+ public void onFailure(Throwable caught)
+ {
+ }
+ };
+
+ portletService.getPage("index", callback);
+ }
+
+ /**
+ *
+ * @param window
+ * @param newState
+ */
+ private void handleWindowStateChanged(String window, String newState)
+ {
+ PortletServiceAsync portletService = (PortletServiceAsync)GWT.create(PortletService.class);
+ ((ServiceDefTarget)portletService).setServiceEntryPoint(GWT.getModuleBaseURL()+"/portletService");
+
+ AsyncCallback callback = new AsyncCallback()
+ {
+ public void onSuccess(Object result)
+ {
+ Page portalPage = (Page)result;
+ displayPortalPage(portalPage);
+ }
+
+ public void onFailure(Throwable caught)
+ {
+ }
+ };
+
+ portletService.setState(window, newState, callback);
+ }
+
+ /**
+ *
+ * @param window
+ * @param newState
+ */
+ private void handleWindowModeChanged(String window, String newMode)
+ {
+ PortletServiceAsync portletService = (PortletServiceAsync)GWT.create(PortletService.class);
+ ((ServiceDefTarget)portletService).setServiceEntryPoint(GWT.getModuleBaseURL()+"/portletService");
+
+ AsyncCallback callback = new AsyncCallback()
+ {
+ public void onSuccess(Object result)
+ {
+ Page portalPage = (Page)result;
+ displayPortalPage(portalPage);
+ }
+
+ public void onFailure(Throwable caught)
+ {
+ }
+ };
+
+ portletService.setMode(window, newMode, callback);
+ }
+
+ /**
+ *
+ * @param url
+ * @param portletWindow
+ */
+ private void handlePartialRefreshLink(String url, Widget windowContent)
+ {
+ HTTPRequest.asyncGet(url, new ResponseTextHandlerImpl(windowContent));
+ }
+
+ /**
+ *
+ * @param url
+ * @param portletWindow
+ */
+ private void handlePartialRefreshForm(String url, String method, String postData, Widget windowContent)
+ {
+ if(method.equalsIgnoreCase("post"))
+ {
+ HTTPRequest.asyncPost(url, postData, new ResponseTextHandlerImpl(windowContent));
+ }
+ else if(method.equalsIgnoreCase("get"))
+ {
+ if(postData != null && postData.trim().length() > 0)
+ {
+ url = url + "?" + postData;
+ }
+ HTTPRequest.asyncGet(url, new ResponseTextHandlerImpl(windowContent));
+ }
+ }
+
+ /**
+ *
+ * @author soshah
+ *
+ */
+ private static class ResponseTextHandlerImpl implements ResponseTextHandler
+ {
+ private Widget windowContent = null;
+
+ public ResponseTextHandlerImpl(Widget windowContent)
+ {
+ this.windowContent = windowContent;
+ }
+ public void onCompletion(String responseText)
+ {
+ HTML html = new HTML(responseText);
+ Panel window = (Panel)this.windowContent.getParent();
+ this.windowContent.removeFromParent();
+ window.add(html);
+ }
+ }
+
+ /**
+ *
+ * @param url
+ * @return
+ */
+ private boolean isPartialRefreshAllowed(String url)
+ {
+ String basePortalURL = GWT.getModuleBaseURL();
+ String portalContext = "org.jboss.portal.presentation.Portal"; //This is hard coded for now, but must be populated from the Portal deployment environment
+ //If Portal is installed at Root context, this value will be an empty string
+
+ if(url.startsWith(basePortalURL))
+ {
+ //This is an Absolute URL, but it points back to
+ //the Portal
+ //An Async Page Refresh call should be allowed in this case
+ return true;
+ }
+
+ if(url.startsWith("http://"))
+ {
+ //This is an Absolute URL and does not point back
+ //to the Portal
+ //Async Page Refresh call should not be allowed
+ return false;
+ }
+ else
+ {
+ //This is a relative URL.
+
+ //Make sure it points back to the Portal for an Async Page Refresh
+ //If it points to some other resource like another third-party web application etc, the response
+ //has nothing to do with Portal
+ //(unless ofcourse the client side processor of the Portal, wants to
+ //take this response and aggregate this inside the current Portal Page and Window being displayed. This is an exceptional usecase
+ //and not desired behavior for every scenario from end user standpoint)
+ //As standard behavior, Async Page Refresh to be done, only when Portlet Markup is sending a request back to the Portal
+ if(url.startsWith("/"))
+ {
+ if(!portalContext.equals(""))
+ {
+ String urlContext = null;
+ int index = url.indexOf('/', 1);
+ if(index != -1)
+ {
+ urlContext = url.substring(1, index);
+ }
+ else
+ {
+ urlContext = url.substring(1);
+ }
+
+ if(!portalContext.equals(urlContext))
+ {
+ //This request is not being sent to the Portal. It is being sent to some other web application
+ return false;
+ }
+ }
+ else
+ {
+ //If Portal is running on root context, there is no way to tell from client side, if this request is actually
+ //to be sent to the Portal or some other web application. Hence, in the interest of functional safety/correctness
+ //no Async Page Refresh here
+ //If Portal is running on Root context, Partial Refresh will happen only for pure relative links
+ return false;
+ }
+ }
+
+ //If I get here, Async Page Refresh through the Portal should be allowed
+ return true;
+ }
+ }
+
+ /**
+ *
+ * @param currentForm
+ * @return
+ */
+ public native String serializeForm(Element currentForm)
+ /*-{
+ var formData = $wnd.Form.serialize(currentForm);
+ return formData;
+ }-*/;
+
+ /**
+ *
+ * @param portalPage
+ */
+ private void displayPortalPage(Page portalPage)
+ {
+ //Event Listener for the decoration components like
+ //Normal, Maximized, Minimized
+ ClickListener listener = new ClickListener()
+ {
+ public void onClick(Widget sender)
+ {
+ Button cour = (Button)sender;
+ String windowName = sender.getParent().getTitle();
+ if(cour.getText().equals("Normal"))
+ {
+ handleWindowStateChanged(windowName, Window.NORMAL);
+ }
+ else if(cour.getText().equals("Minimized"))
+ {
+ handleWindowStateChanged(windowName, Window.MINIMIZED);
+ }
+ else if(cour.getText().equals("Maximized"))
+ {
+ handleWindowStateChanged(windowName, Window.MAXIMIZED);
+ }
+ else if(cour.getText().equals("Edit"))
+ {
+ handleWindowModeChanged(windowName, Window.EDIT);
+ }
+ }
+ };
+
+ //Event Listener for actions perfomed inside the portlet window content
+ //itself.
+ ClickListener contentListener = new ClickListener()
+ {
+ public void onClick(Widget sender)
+ {
+ Event event = DOM.eventGetCurrentEvent();
+ Element target = DOM.eventGetTarget(event);
+
+ if(target.toString().toUpperCase().trim().indexOf("</A>") != -1)
+ {
+ String link = DOM.getElementAttribute(target, "HREF");
+
+ //A link inside the portlet window was clicked
+ //Load its content asynchronously inside this window
+ boolean isPartialRefreshAllowed = isPartialRefreshAllowed(link);
+ if(isPartialRefreshAllowed)
+ {
+ DOM.eventPreventDefault(event);
+ handlePartialRefreshLink(link, sender);
+ }
+ }
+ else if(target.toString().toUpperCase().trim().indexOf("INPUT") != -1 &&
+ target.toString().toUpperCase().trim().indexOf("SUBMIT") != -1
+ )
+ {
+ Element currentForm = DOM.getParent(target);
+ String enctype = DOM.getElementAttribute(currentForm, "enctype");
+ String action = DOM.getElementAttribute(currentForm, "action");
+ boolean isPartialRefreshAllowed = isPartialRefreshAllowed(action);
+ if((isPartialRefreshAllowed) && (enctype == null || !enctype.equals("multipart/form-data")))
+ {
+ DOM.eventPreventDefault(event);
+
+ //Call a native javascript function here
+ String method = DOM.getElementAttribute(currentForm, "method");
+ String serializedForm = serializeForm(currentForm);
+
+ handlePartialRefreshForm(action, method, serializedForm, sender);
+ }
+ }
+ }
+ };
+
+ //Dispalying the fully aggregated page
+ Window[] windows = portalPage.getWindows();
+ VerticalPanel page = (VerticalPanel)RootPanel.get("page").getWidget(0);
+ page.clear();
+ for(int i=0; i<windows.length; i++)
+ {
+ Window pageWindow = windows[i];
+ if(pageWindow.isVisible())
+ {
+ VerticalPanel window = new VerticalPanel();
+
+ //Create the decoration panel
+ HorizontalPanel decoration = new HorizontalPanel();
+ decoration.setTitle(pageWindow.getName());
+
+ Button normal = new Button("Normal");
+ Button minimized = new Button("Minimized");
+ Button maximized = new Button("Maximized");
+ Button edit = new Button("Edit");
+
+ decoration.add(normal);
+ decoration.add(minimized);
+ decoration.add(maximized);
+ decoration.add(edit);
+ window.add(decoration);
+
+ //Create the actual content of the portlet to be displayed inside the window
+ HTML windowContent = new HTML(pageWindow.getContent());
+ window.add(windowContent);
+
+ //Event listeners for this Window
+ normal.addClickListener(listener);
+ minimized.addClickListener(listener);
+ maximized.addClickListener(listener);
+ edit.addClickListener(listener);
+ windowContent.addClickListener(contentListener);
+
+ //Add this window to the Page
+ page.add(window);
+ }
+ }
+ }
+}
Added: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/Portal.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/Portal.java (rev 0)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/Portal.java 2007-11-16 16:47:30 UTC (rev 8976)
@@ -0,0 +1,94 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.ajax.client;
+
+import java.util.List;
+import java.util.ArrayList;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.core.client.EntryPoint;
+import com.google.gwt.user.client.rpc.ServiceDefTarget;
+import com.google.gwt.user.client.rpc.AsyncCallback;
+
+
+import org.jboss.portal.presentation.ajax.client.service.PortalRPC;
+import org.jboss.portal.presentation.ajax.client.service.PortalRPCAsync;
+import org.jboss.portal.presentation.ajax.client.protocol.Page;
+import org.jboss.portal.presentation.ajax.client.protocol.Window;
+import org.jboss.portal.presentation.ajax.client.widget.PortletWindow;
+import org.jboss.portal.presentation.ajax.client.layout.LayoutManager;
+
+/**
+ * This is the Entry Point of the client-side Ajax agent of the Presentation Framework
+ *
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class Portal implements EntryPoint
+{
+ /**
+ * This is the entry point method.
+ */
+ public void onModuleLoad()
+ {
+ PortalRPCAsync portalRPC = (PortalRPCAsync)GWT.create(PortalRPC.class);
+ ((ServiceDefTarget)portalRPC).setServiceEntryPoint(GWT.getModuleBaseURL()+"/portalrpc");
+ AsyncCallback callback = new AsyncCallback()
+ {
+ public void onSuccess(Object result)
+ {
+ Page portalPage = (Page)result;
+ displayPortalPage(portalPage);
+ }
+
+ public void onFailure(Throwable caught)
+ {
+ }
+ };
+ portalRPC.loadPortal(callback);
+ }
+
+ /**
+ *
+ * @param portalPage
+ */
+ private void displayPortalPage(Page portalPage)
+ {
+ //Dispalying the fully aggregated page
+ Window[] windows = portalPage.getWindows();
+ if(windows != null && windows.length>0)
+ {
+ List displayWindows = new ArrayList();
+ for(int i=0; i<windows.length; i++)
+ {
+ Window pageWindow = windows[i];
+ if(pageWindow.isVisible())
+ {
+ PortletWindow portletWindow = new PortletWindow(pageWindow);
+ displayWindows.add(portletWindow);
+ }
+ }
+ LayoutManager.doLayout(displayWindows);
+ }
+ }
+}
Added: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/PortalLayout.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/PortalLayout.java (rev 0)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/PortalLayout.java 2007-11-16 16:47:30 UTC (rev 8976)
@@ -0,0 +1,181 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.ajax.client;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.core.client.EntryPoint;
+
+import com.google.gwt.user.client.ui.RootPanel;
+import com.google.gwt.user.client.ui.VerticalPanel;
+import com.google.gwt.user.client.ui.HTMLPanel;
+import com.google.gwt.user.client.ui.FlexTable;
+import com.google.gwt.user.client.ui.Button;
+import com.google.gwt.user.client.ui.ClickListener;
+import com.google.gwt.user.client.ui.Widget;
+
+import com.google.gwt.user.client.rpc.ServiceDefTarget;
+import com.google.gwt.user.client.rpc.AsyncCallback;
+
+/**
+ * Prototyping some client side layout concepts
+ *
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class PortalLayout implements EntryPoint
+{
+ private String leftContent = "<div><table border=\"1\"><tr><td><b>Left Content</b></td></tr></table></div>";
+ private String centerContent = "<div><table border=\"1\"><tr><td><b>Center Content</b></td></tr></table></div>";
+ private String rightContent = "<div><table border=\"1\"><tr><td><b>Right Content</b></td></tr></table></div>";
+
+ /**
+ * This is the entry point method.
+ */
+ public void onModuleLoad()
+ {
+ //Lets do a Proof of Concept of Layout capabilities that can be obtained using GWT
+ this.testLayout();
+ }
+
+
+
+ /**
+ *
+ */
+ private void testLayout()
+ {
+ this.performVerticalColumnLayout();
+ this.performFlexibleGridLayout();
+ this.createPortletButtons();
+ }
+
+
+ /**
+ *
+ *
+ */
+ private void performVerticalColumnLayout()
+ {
+ VerticalPanel leftPanel = new VerticalPanel();
+ leftPanel.add(new HTMLPanel(leftContent));
+ leftPanel.add(new HTMLPanel(leftContent));
+
+ VerticalPanel centerPanel = new VerticalPanel();
+ centerPanel.add(new HTMLPanel(centerContent));
+
+ VerticalPanel rightPanel = new VerticalPanel();
+ rightPanel.add(new HTMLPanel(rightContent));
+
+ RootPanel.get("leftPanel").add(leftPanel);
+ RootPanel.get("centerPanel").add(centerPanel);
+ RootPanel.get("rightPanel").add(rightPanel);
+ }
+
+ /**
+ *
+ *
+ */
+ private void performFlexibleGridLayout()
+ {
+ FlexTable flexTable = new FlexTable();
+
+ flexTable.setWidget(0, 0, new HTMLPanel(leftContent));
+ flexTable.setWidget(0, 1, new HTMLPanel(leftContent));
+ flexTable.setWidget(1, 0, new HTMLPanel(leftContent));
+ flexTable.setWidget(1, 1, new HTMLPanel(rightContent));
+
+ RootPanel.get("flexGrid").add(flexTable);
+ }
+
+ /**
+ *
+ *
+ */
+ private void createPortletButtons()
+ {
+ Button cmsPortletButton = new Button("cmsPortlet");
+ Button jspPortletButton = new Button("jspPortlet");
+ Button weatherPortletButton = new Button("weatherPortlet");
+
+ ClickListener listener = new ClickListener()
+ {
+ public void onClick(Widget sender)
+ {
+ Button button = (Button)sender;
+ if (button.getText().equals("cmsPortlet"))
+ {
+ refreshFlexibleGrid("cmsPortlet.html");
+ }
+ else if (button.getText().equals("jspPortlet"))
+ {
+ refreshFlexibleGrid("jspPortlet.html");
+ }
+ else if (button.getText().equals("weatherPortlet"))
+ {
+ refreshFlexibleGrid("weatherPortlet.html");
+ }
+ }
+ };
+
+ cmsPortletButton.addClickListener(listener);
+ jspPortletButton.addClickListener(listener);
+ weatherPortletButton.addClickListener(listener);
+
+
+ RootPanel.get("cmsPortlet").add(cmsPortletButton);
+ RootPanel.get("jspPortlet").add(jspPortletButton);
+ RootPanel.get("weatherPortlet").add(weatherPortletButton);
+ }
+
+ /**
+ *
+ *
+ */
+ private void refreshFlexibleGrid(String portletId)
+ {
+ PortletServiceAsync portletService = (PortletServiceAsync)GWT.create(PortletService.class);
+
+ ((ServiceDefTarget)portletService).setServiceEntryPoint(GWT.getModuleBaseURL()+"/portletService");
+
+ AsyncCallback callback = new AsyncCallback()
+ {
+ public void onSuccess(Object result)
+ {
+ String portletContent = (String)result;
+
+ FlexTable flexTable = new FlexTable();
+ flexTable.setWidget(0, 0, new HTMLPanel(portletContent));
+ flexTable.setWidget(1, 1, new HTMLPanel(portletContent));
+
+ RootPanel.get("flexGrid").clear();
+ RootPanel.get("flexGrid").add(flexTable);
+ }
+
+ public void onFailure(Throwable caught)
+ {
+ }
+ };
+
+ portletService.getPortlet(portletId, callback);
+ }
+}
Added: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/PortletService.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/PortletService.java (rev 0)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/PortletService.java 2007-11-16 16:47:30 UTC (rev 8976)
@@ -0,0 +1,66 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.ajax.client;
+
+import com.google.gwt.user.client.rpc.RemoteService;
+
+import org.jboss.portal.presentation.ajax.client.protocol.Page;
+
+/**
+ * A Protototype RPC service
+ *
+ * @author soshah
+ *
+ */
+public interface PortletService extends RemoteService
+{
+ /**
+ *
+ * @param portletId
+ * @return
+ */
+ public String getPortlet(String portletId);
+
+ /**
+ *
+ * @param pageId
+ * @return
+ */
+ public Page getPage(String pageId);
+
+ /**
+ *
+ * @param window
+ * @param state
+ * @return
+ */
+ public Page setState(String window, String newState);
+
+ /**
+ *
+ * @param window
+ * @param newMode
+ * @return
+ */
+ public Page setMode(String window, String newMode);
+}
Added: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/PortletServiceAsync.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/PortletServiceAsync.java (rev 0)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/PortletServiceAsync.java 2007-11-16 16:47:30 UTC (rev 8976)
@@ -0,0 +1,63 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.ajax.client;
+
+import com.google.gwt.user.client.rpc.AsyncCallback;
+
+/**
+ * A Prototype RPC Service
+ *
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public interface PortletServiceAsync
+{
+ /**
+ *
+ * @param portletId
+ * @return
+ */
+ public void getPortlet(String portletId, AsyncCallback callback);
+
+ /**
+ *
+ * @param pageId
+ * @param callback
+ */
+ public void getPage(String pageId, AsyncCallback callback);
+
+ /**
+ *
+ * @param window
+ * @param callback
+ */
+ public void setState(String window, String newState, AsyncCallback callback);
+
+ /**
+ *
+ * @param window
+ * @param newMode
+ * @return
+ */
+ public void setMode(String window, String newMode, AsyncCallback callback);
+}
Added: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/PortletWindowPanel.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/PortletWindowPanel.java (rev 0)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/PortletWindowPanel.java 2007-11-16 16:47:30 UTC (rev 8976)
@@ -0,0 +1,47 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.ajax.client;
+
+import com.google.gwt.user.client.ui.HTMLPanel;
+import com.google.gwt.user.client.Event;
+
+public class PortletWindowPanel extends HTMLPanel
+{
+ /**
+ *
+ * @param html
+ */
+ public PortletWindowPanel(String html)
+ {
+ super(html);
+ }
+
+ public void onBrowserEvent(Event event)
+ {
+ super.onBrowserEvent(event);
+
+ System.out.println("-------------------------------");
+ System.out.println(event);
+ System.out.println("-------------------------------");
+ }
+}
Added: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/layout/LayoutManager.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/layout/LayoutManager.java (rev 0)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/layout/LayoutManager.java 2007-11-16 16:47:30 UTC (rev 8976)
@@ -0,0 +1,164 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.ajax.client.layout;
+
+import java.util.List;
+
+import com.google.gwt.user.client.ui.Widget;
+
+import net.mygwt.ui.client.widget.Viewport;
+import net.mygwt.ui.client.widget.WidgetContainer;
+import net.mygwt.ui.client.widget.layout.BorderLayout;
+import net.mygwt.ui.client.widget.layout.BorderLayoutData;
+import net.mygwt.ui.client.widget.layout.FlowLayout;
+import net.mygwt.ui.client.Style;
+
+import org.jboss.portal.presentation.ajax.client.widget.PortletWindow;
+
+/**
+ * This layout manager provides a Flexible Grid for laying out the UI components (which would be Portlet Windows)
+ * inside a flexible coordinates based Grid
+ *
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class LayoutManager
+{
+ /**
+ *
+ */
+ private static Viewport viewport = null;
+
+ /**
+ *
+ */
+ private static WidgetContainer north = null;
+
+ /**
+ *
+ */
+ private static WidgetContainer west = null;
+
+ /**
+ *
+ */
+ private static WidgetContainer center = null;
+
+
+ /**
+ *
+ */
+ static
+ {
+ LayoutManager.viewport = new Viewport();
+
+ //Layout for the viewport
+ BorderLayout pageLayout = new BorderLayout();
+
+ //Layout for the north region (Header/Navigation related content produced by the portal are laid out here)
+ FlowLayout northLayout = new FlowLayout();
+
+ //Setup the layout of the root container of the page
+ LayoutManager.viewport.setLayout(pageLayout);
+
+ //Setup the north region of the page
+ LayoutManager.north = new WidgetContainer();
+ LayoutManager.north.setLayout(northLayout);
+ float northSize = LayoutManager.viewport.getOffsetHeight() * ((float)0.05);
+ BorderLayoutData northData = new BorderLayoutData(Style.NORTH, northSize);
+ northData.resizeable = true;
+ LayoutManager.viewport.add(LayoutManager.north, northData);
+ }
+
+ /**
+ *
+ * @param displayWindows
+ */
+ public static void doLayout(List displayWindows)
+ {
+ LayoutManager.setUpPortletRegions();
+
+ int column = 0;
+ for(int i=0; i<displayWindows.size(); i++)
+ {
+ PortletWindow portletWindow = (PortletWindow)displayWindows.get(i);
+ Widget window = portletWindow.create();
+ //Add this window to the Page
+ if(column == 0 && displayWindows.size()>1)
+ {
+ LayoutManager.west.add(window);
+ column ++;
+ }
+ else
+ {
+ LayoutManager.center.add(window);
+ column = 0;
+ }
+ }
+ LayoutManager.viewport.layout(true);
+ }
+
+ /**
+ *
+ *
+ */
+ private static void setUpPortletRegions()
+ {
+ if(LayoutManager.west != null)
+ {
+ LayoutManager.viewport.remove(LayoutManager.west);
+ }
+ if(LayoutManager.center != null)
+ {
+ LayoutManager.viewport.remove(LayoutManager.center);
+ }
+
+ //Re-add these two regions
+ //Layout for the west region (Portlet Windows are laid out here)
+ FlowLayout westLayout = new FlowLayout();
+ westLayout.spacing = 5;
+ westLayout.margin = 5;
+
+ //Layout for the center region (Portlet Windows are laid out here)
+ FlowLayout centerLayout = new FlowLayout();
+ centerLayout.spacing = 5;
+ centerLayout.margin = 5;
+
+ //Setup the west region of the page
+ LayoutManager.west = new WidgetContainer();
+ LayoutManager.west.setScrollEnabled(true);
+ LayoutManager.west.setLayout(westLayout);
+ float westSize = LayoutManager.viewport.getOffsetWidth() * ((float)0.2);
+ BorderLayoutData westData = new BorderLayoutData(Style.WEST, westSize);
+ westData.resizeable = true;
+ LayoutManager.viewport.add(LayoutManager.west, westData);
+
+ //Setup the center region of the page
+ LayoutManager.center = new WidgetContainer();
+ LayoutManager.center.setScrollEnabled(true);
+ LayoutManager.center.setLayout(centerLayout);
+ BorderLayoutData centerData = new BorderLayoutData(Style.CENTER);
+ centerData.resizeable = true;
+ LayoutManager.viewport.add(LayoutManager.center, centerData);
+ }
+}
Added: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/protocol/Page.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/protocol/Page.java (rev 0)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/protocol/Page.java 2007-11-16 16:47:30 UTC (rev 8976)
@@ -0,0 +1,73 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.ajax.client.protocol;
+
+import com.google.gwt.user.client.rpc.IsSerializable;
+
+/**
+ * Represents the concept of a Portal Page on the client-side Ajax agent
+ *
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class Page implements IsSerializable
+{
+ private String name = null;
+ private Window[] windows = null;
+
+ /**
+ *
+ * @return
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+ /**
+ *
+ * @param name
+ */
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ /**
+ *
+ * @return
+ */
+ public Window[] getWindows()
+ {
+ return windows;
+ }
+
+ /**
+ *
+ * @param windows
+ */
+ public void setWindows(Window[] windows)
+ {
+ this.windows = windows;
+ }
+}
Added: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/protocol/Window.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/protocol/Window.java (rev 0)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/protocol/Window.java 2007-11-16 16:47:30 UTC (rev 8976)
@@ -0,0 +1,136 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.ajax.client.protocol;
+
+import com.google.gwt.user.client.rpc.IsSerializable;
+
+/**
+ * Represents the concept of a Portal Window on the client-side Ajax agent
+ *
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class Window implements IsSerializable
+{
+ public static final String NORMAL = "NORMAL";
+ public static final String MAXIMIZED = "MAXIMIZED";
+ public static final String MINIMIZED = "MINIMIZED";
+ public static final String EDIT = "EDIT";
+ public static final String VIEW = "VIEW";
+
+ private String name = null;
+ private String content = null;
+ private String mode = VIEW;
+ private String state = NORMAL;
+ private boolean isVisible = true;
+
+ /**
+ *
+ * @return
+ */
+ public String getContent()
+ {
+ return content;
+ }
+
+ /**
+ *
+ * @param content
+ */
+ public void setContent(String content)
+ {
+ this.content = content;
+ }
+
+ /**
+ *
+ * @return
+ */
+ public boolean isVisible()
+ {
+ return isVisible;
+ }
+
+ /**
+ *
+ * @param isVisible
+ */
+ public void setVisible(boolean isVisible)
+ {
+ this.isVisible = isVisible;
+ }
+
+ /**
+ *
+ * @return
+ */
+ public String getMode()
+ {
+ return mode;
+ }
+
+ /**
+ *
+ * @param mode
+ */
+ public void setMode(String mode)
+ {
+ this.mode = mode;
+ }
+
+ /**
+ *
+ * @return
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+ /**
+ *
+ * @param name
+ */
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ /**
+ *
+ * @return
+ */
+ public String getState()
+ {
+ return state;
+ }
+
+ /**
+ *
+ * @param state
+ */
+ public void setState(String state)
+ {
+ this.state = state;
+ }
+}
Added: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/service/PortalRPC.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/service/PortalRPC.java (rev 0)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/service/PortalRPC.java 2007-11-16 16:47:30 UTC (rev 8976)
@@ -0,0 +1,48 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.ajax.client.service;
+
+import com.google.gwt.user.client.rpc.RemoteService;
+
+import org.jboss.portal.presentation.ajax.client.protocol.Page;
+
+/**
+ * RPC service used for Asynchronous communication between the client-side agent and the Portal Server
+ *
+ * @author soshah
+ *
+ */
+public interface PortalRPC extends RemoteService
+{
+ /**
+ * Loads the initial Portal Page at the start of a Portal session
+ *
+ * @return The Initial Portal Page
+ */
+ public Page loadPortal();
+
+ /**
+ * @return The Page of the Portal that should be currently displayed
+ */
+ public Page getCurrentPage();
+}
Added: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/service/PortalRPCAsync.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/service/PortalRPCAsync.java (rev 0)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/service/PortalRPCAsync.java 2007-11-16 16:47:30 UTC (rev 8976)
@@ -0,0 +1,44 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.ajax.client.service;
+
+import com.google.gwt.user.client.rpc.AsyncCallback;
+
+/**
+ * RPC service used for Asynchronous communication between the client-side agent and the Portal Server
+ *
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public interface PortalRPCAsync
+{
+ /**
+ * Loads the initial Portal Page at the start of a Portal session
+ */
+ public void loadPortal(AsyncCallback callback);
+
+ /**
+ * Loads the Page of the Portal that should be currently displayed
+ */
+ public void getCurrentPage(AsyncCallback callback);
+}
Added: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/widget/PortletWindow.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/widget/PortletWindow.java (rev 0)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/ajax/client/widget/PortletWindow.java 2007-11-16 16:47:30 UTC (rev 8976)
@@ -0,0 +1,383 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.ajax.client.widget;
+
+import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.ClickListener;
+import com.google.gwt.user.client.DOM;
+import com.google.gwt.user.client.Element;
+import com.google.gwt.user.client.Event;
+import com.google.gwt.user.client.HTTPRequest;
+import com.google.gwt.user.client.ResponseTextHandler;
+import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.Widget;
+import com.google.gwt.user.client.ui.Panel;
+import com.google.gwt.user.client.ui.RootPanel;
+import com.google.gwt.user.client.ui.HorizontalPanel;
+import com.google.gwt.user.client.ui.VerticalPanel;
+import com.google.gwt.user.client.ui.Button;
+import com.google.gwt.user.client.ui.ClickListener;
+import com.google.gwt.user.client.ui.FlexTable;
+
+import net.mygwt.ui.client.widget.ContentPanel;
+import net.mygwt.ui.client.Style;
+import net.mygwt.ui.client.widget.IconButton;
+import net.mygwt.ui.client.widget.Info;
+import net.mygwt.ui.client.event.Listener;
+import net.mygwt.ui.client.event.Listener;
+import net.mygwt.ui.client.event.BaseEvent;
+
+import org.jboss.portal.presentation.ajax.client.protocol.Window;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class PortletWindow
+{
+ /**
+ *
+ */
+ private Window window = null;
+
+ /**
+ *
+ *
+ */
+ public PortletWindow(Window window)
+ {
+ this.window = window;
+ }
+
+ /**
+ *
+ * @return
+ */
+ public ContentPanel create()
+ {
+ ContentPanel portletWindow = new ContentPanel(Style.HEADER);
+ String windowName = this.window.getName();
+ String content = this.window.getContent();
+ portletWindow.setId(windowName);
+ HTML windowContent = new HTML(content);
+
+
+ //Setup listeners
+ //Event Listener for the decoration components like
+ //Normal, Maximized, Minimized
+ Listener listener = new Listener()
+ {
+ public void handleEvent(BaseEvent event)
+ {
+ IconButton cour = (IconButton)event.widget;
+ String id = cour.getId();
+ String windowName = id.substring(0, id.indexOf(':'));
+ String action = id.substring(id.indexOf(':')+1);
+ if(action.equals("restore"))
+ {
+ //handleWindowStateChanged(windowName, Window.NORMAL);
+ Info.show("Normal", "Loading Normal Mode....", "Loading Normal Mode....");
+ }
+ else if(action.equals("minimize"))
+ {
+ //handleWindowStateChanged(windowName, Window.MINIMIZED);
+ Info.show("Minimize", "Loading Minimize Mode....", "Loading Minimize Mode....");
+ }
+ else if(action.equals("maximize"))
+ {
+ //handleWindowStateChanged(windowName, Window.MAXIMIZED);
+ Info.show("Maximize", "Loading Maximize Mode....", "Loading Maximize Mode....");
+ }
+ else if(action.equals("save"))
+ {
+ //handleWindowModeChanged(windowName, Window.EDIT);
+ Info.show("Save", "Loading Save Mode....", "Loading Save Mode....");
+ }
+ else if(action.equals("help"))
+ {
+ //handleWindowModeChanged(windowName, Window.EDIT);
+ Info.show("Help", "Loading Help Mode....", "Loading Help Mode....");
+ }
+ }
+ };
+ IconButton save = new IconButton("my-tool-save");
+ save.setId(windowName+":save");
+ save.setToolTip("Edit");
+ IconButton help = new IconButton("my-tool-help");
+ help.setId(windowName+":help");
+ help.setToolTip("Help");
+ IconButton restore = new IconButton("my-tool-restore");
+ restore.setId(windowName+":restore");
+ restore.setToolTip("Normal");
+ IconButton minimize = new IconButton("my-tool-minimize");
+ minimize.setId(windowName+":minimize");
+ minimize.setToolTip("Minimize");
+ IconButton maximize = new IconButton("my-tool-maximize");
+ maximize.setId(windowName+":maximize");
+ maximize.setToolTip("Maximize");
+ portletWindow.addButton(save, listener);
+ portletWindow.addButton(help, listener);
+ portletWindow.addButton(restore, listener);
+ portletWindow.addButton(minimize, listener);
+ portletWindow.addButton(maximize, listener);
+
+ //Event Listener for actions perfomed inside the portlet window content
+ //itself. Used for performing Partial Refresh of a Portal Page
+ /*ClickListener contentListener = new ClickListener()
+ {
+ public void onClick(Widget sender)
+ {
+ Event event = DOM.eventGetCurrentEvent();
+ Element target = DOM.eventGetTarget(event);
+
+ if(target.toString().toUpperCase().trim().indexOf("</A>") != -1)
+ {
+ String link = DOM.getElementAttribute(target, "HREF");
+
+ //A link inside the portlet window was clicked
+ //Load its content asynchronously inside this window
+ boolean isPartialRefreshAllowed = isPartialRefreshAllowed(link);
+ if(isPartialRefreshAllowed)
+ {
+ DOM.eventPreventDefault(event);
+ handlePartialRefreshLink(link, sender);
+ }
+ }
+ else if(target.toString().toUpperCase().trim().indexOf("INPUT") != -1 &&
+ target.toString().toUpperCase().trim().indexOf("SUBMIT") != -1
+ )
+ {
+ Element currentForm = DOM.getParent(target);
+ String enctype = DOM.getElementAttribute(currentForm, "enctype");
+ String action = DOM.getElementAttribute(currentForm, "action");
+ boolean isPartialRefreshAllowed = isPartialRefreshAllowed(action);
+ if((isPartialRefreshAllowed) && (enctype == null || !enctype.equals("multipart/form-data")))
+ {
+ DOM.eventPreventDefault(event);
+
+ //Call a native javascript function here
+ String method = DOM.getElementAttribute(currentForm, "method");
+ String serializedForm = serializeForm(currentForm);
+
+ handlePartialRefreshForm(action, method, serializedForm, sender);
+ }
+ }
+ }
+ };
+ windowContent.addClickListener(contentListener);*/
+
+ //Add the content
+ portletWindow.add(windowContent);
+
+ return portletWindow;
+ }
+ //-------------------------------------------------------------------------------------------------------------------------------------------------------------
+ /**
+ *
+ * @param window
+ * @param newState
+ */
+ /*private void handleWindowStateChanged(String window, String newState)
+ {
+ PortletServiceAsync portletService = (PortletServiceAsync)GWT.create(PortletService.class);
+ ((ServiceDefTarget)portletService).setServiceEntryPoint(GWT.getModuleBaseURL()+"/portalrpc");
+
+ AsyncCallback callback = new AsyncCallback()
+ {
+ public void onSuccess(Object result)
+ {
+ Page portalPage = (Page)result;
+ displayPortalPage(portalPage);
+ }
+
+ public void onFailure(Throwable caught)
+ {
+ }
+ };
+
+ portletService.setState(window, newState, callback);
+ }*/
+
+ /**
+ *
+ * @param window
+ * @param newState
+ */
+ /*private void handleWindowModeChanged(String window, String newMode)
+ {
+ PortletServiceAsync portletService = (PortletServiceAsync)GWT.create(PortletService.class);
+ ((ServiceDefTarget)portletService).setServiceEntryPoint(GWT.getModuleBaseURL()+"/portalrpc");
+
+ AsyncCallback callback = new AsyncCallback()
+ {
+ public void onSuccess(Object result)
+ {
+ Page portalPage = (Page)result;
+ displayPortalPage(portalPage);
+ }
+
+ public void onFailure(Throwable caught)
+ {
+ }
+ };
+
+ portletService.setMode(window, newMode, callback);
+ }*/
+
+ /**
+ *
+ * @param url
+ * @param portletWindow
+ */
+ /*private void handlePartialRefreshLink(String url, Widget windowContent)
+ {
+ HTTPRequest.asyncGet(url, new ResponseTextHandlerImpl(windowContent));
+ }*/
+
+ /**
+ *
+ * @param url
+ * @param portletWindow
+ */
+ /*private void handlePartialRefreshForm(String url, String method, String postData, Widget windowContent)
+ {
+ if(method.equalsIgnoreCase("post"))
+ {
+ HTTPRequest.asyncPost(url, postData, new ResponseTextHandlerImpl(windowContent));
+ }
+ else if(method.equalsIgnoreCase("get"))
+ {
+ if(postData != null && postData.trim().length() > 0)
+ {
+ url = url + "?" + postData;
+ }
+ HTTPRequest.asyncGet(url, new ResponseTextHandlerImpl(windowContent));
+ }
+ }*/
+
+ /**
+ *
+ * @author soshah
+ *
+ */
+ /*private class ResponseTextHandlerImpl implements ResponseTextHandler
+ {
+ private Widget windowContent = null;
+
+ public ResponseTextHandlerImpl(Widget windowContent)
+ {
+ this.windowContent = windowContent;
+ }
+ public void onCompletion(String responseText)
+ {
+ HTML html = new HTML(responseText);
+ Panel window = (Panel)this.windowContent.getParent();
+ this.windowContent.removeFromParent();
+ window.add(html);
+ }
+ }*/
+
+ /**
+ *
+ * @param url
+ * @return
+ */
+ /*private boolean isPartialRefreshAllowed(String url)
+ {
+ String basePortalURL = GWT.getModuleBaseURL();
+ String portalContext = "org.jboss.portal.uiserver.Portal"; //This is hard coded for now, but must be populated from the Portal deployment environment
+ //If Portal is installed at Root context, this value will be an empty string
+
+ if(url.startsWith(basePortalURL))
+ {
+ //This is an Absolute URL, but it points back to
+ //the Portal
+ //An Async Page Refresh call should be allowed in this case
+ return true;
+ }
+
+ if(url.startsWith("http://"))
+ {
+ //This is an Absolute URL and does not point back
+ //to the Portal
+ //Async Page Refresh call should not be allowed
+ return false;
+ }
+ else
+ {
+ //This is a relative URL.
+
+ //Make sure it points back to the Portal for an Async Page Refresh
+ //If it points to some other resource like another third-party web application etc, the response
+ //has nothing to do with Portal
+ //(unless ofcourse the client side processor of the Portal, wants to
+ //take this response and aggregate this inside the current Portal Page and Window being displayed. This is an exceptional usecase
+ //and not desired behavior for every scenario from end user standpoint)
+ //As standard behavior, Async Page Refresh to be done, only when Portlet Markup is sending a request back to the Portal
+ if(url.startsWith("/"))
+ {
+ if(!portalContext.equals(""))
+ {
+ String urlContext = null;
+ int index = url.indexOf('/', 1);
+ if(index != -1)
+ {
+ urlContext = url.substring(1, index);
+ }
+ else
+ {
+ urlContext = url.substring(1);
+ }
+
+ if(!portalContext.equals(urlContext))
+ {
+ //This request is not being sent to the Portal. It is being sent to some other web application
+ return false;
+ }
+ }
+ else
+ {
+ //If Portal is running on root context, there is no way to tell from client side, if this request is actually
+ //to be sent to the Portal or some other web application. Hence, in the interest of functional safety/correctness
+ //no Async Page Refresh here
+ //If Portal is running on Root context, Partial Refresh will happen only for pure relative links
+ return false;
+ }
+ }
+
+ //If I get here, Async Page Refresh through the Portal should be allowed
+ return true;
+ }
+ }*/
+
+ /**
+ *
+ * @param currentForm
+ * @return
+ */
+ public native String serializeForm(Element currentForm)
+ /*-{
+ var formData = $wnd.Form.serialize(currentForm);
+ return formData;
+ }-*/;
+}
Added: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/controller/UIController.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/controller/UIController.java (rev 0)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/controller/UIController.java 2007-11-16 16:47:30 UTC (rev 8976)
@@ -0,0 +1,252 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.controller;
+
+import java.util.StringTokenizer;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.jboss.portal.presentation.RequestContext;
+import org.jboss.portal.presentation.server.ProcessorRequest;
+import org.jboss.portal.presentation.server.ProcessorResponse;
+import org.jboss.portal.presentation.server.PresentationServer;
+import org.jboss.portal.presentation.action.server.ServerAction;
+import org.jboss.portal.presentation.action.server.ServerResponse;
+import org.jboss.portal.presentation.action.server.LinkActivation;
+import org.jboss.portal.presentation.action.server.GetActivation;
+import org.jboss.portal.presentation.action.server.PostActivation;
+import org.jboss.portal.presentation.action.server.ViewUIObjectAction;
+import org.jboss.portal.presentation.model.UIPortal;
+import org.jboss.portal.presentation.model.UIObject;
+import org.jboss.portal.presentation.model.UIPage;
+import org.jboss.portal.presentation.model.UIWindow;
+import org.jboss.portal.presentation.model.state.ObjectState;
+
+import org.jboss.portal.server.RequestController;
+import org.jboss.portal.server.ServerException;
+import org.jboss.portal.server.ServerInvocation;
+import org.jboss.portal.server.ServerInvocationContext;
+
+
+/**
+ * The UIServer is responsible for generating the output that is sent back to the client based on the Portal state of a particular Portal Request
+ *
+ * The UIServer provides various UI level services like Page Aggregation, Page Layout, Web 2.0 client interactions etc.
+ *
+ * Typically the Core component of the Portal delegates all UI specific functions to this component
+ *
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class UIController implements RequestController
+{
+ /**
+ *
+ */
+ private PresentationServer presentationServer = null;
+
+
+ /**
+ *
+ *
+ */
+ public UIController()
+ {
+ }
+
+
+ /**
+ * handle is the entry point for handling an incoming Portal request. The request is handed over
+ * from the Http Layer via the main Portal Servlet
+ *
+ */
+ public void handle(ServerInvocation invocation) throws ServerException
+ {
+ try
+ {
+ //Make a request to the Processor
+ RequestContext requestContext = null; //Just use null until proper implementation is provided
+ ServerAction serverAction = this.getServerAction(requestContext,invocation);
+ ProcessorRequest processorRequest = new ProcessorRequest(serverAction, invocation);
+ ProcessorResponse processorResponse = this.presentationServer.getProcessor().process(requestContext,
+ processorRequest);
+
+ //Process the response from the Processor
+ ServerResponse serverResponse = processorResponse.getResponse();
+ }
+ catch(Exception e)
+ {
+ throw new ServerException(e);
+ }
+ }
+
+ /**
+ *
+ *
+ */
+ public void start()
+ {
+
+ }
+
+ /**
+ *
+ *
+ */
+ public void stop()
+ {
+
+ }
+ //-----------------------------------------------------------------------------------------------------------------------------------------------------------
+ /**
+ *
+ */
+ public PresentationServer getPresentationServer()
+ {
+ return presentationServer;
+ }
+
+ /**
+ *
+ * @param presentationServer
+ */
+ public void setPresentationServer(PresentationServer presentationServer)
+ {
+ this.presentationServer = presentationServer;
+ }
+ //--------------------------------------------------------------------------------------------------------------------------------------------------------------
+ /**
+ *
+ */
+ private ServerAction getServerAction(RequestContext requestContext,ServerInvocation invocation)
+ {
+ ServerAction serverAction = null;
+
+ ServerInvocationContext invocationContext = invocation.getServerContext();
+ HttpServletRequest request = invocationContext.getClientRequest();
+
+ String portalRequestPath = invocation.getServerContext().getPortalRequestPath();
+ if(portalRequestPath == null || portalRequestPath.equals("") || portalRequestPath.equals("/") || portalRequestPath.equals("/index.html"))
+ {
+ portalRequestPath = "/default/default";
+ }
+
+ UIPortal targetPortal = this.getTargetPortal(requestContext,portalRequestPath);
+ UIObject targetPortalObject = this.getTargetPortalObject(requestContext,portalRequestPath);
+
+ if(targetPortalObject instanceof UIPage)
+ {
+ serverAction = new ViewUIObjectAction(targetPortalObject.getId());
+ }
+ else if(targetPortalObject instanceof UIWindow)
+ {
+ if(request.getMethod().equals("GET"))
+ {
+ GetActivation get = new GetActivation();
+ get.setUrl(request.getRequestURL().toString());
+ get.setContentType(invocationContext.getMediaType());
+ get.setQueryParameters(invocationContext.getQueryParameterMap());
+ get.setPortal(targetPortal);
+ get.setTarget(targetPortalObject);
+ serverAction = get;
+ }
+ else if(request.getMethod().equals("POST"))
+ {
+ PostActivation post = new PostActivation();
+ post.setUrl(request.getRequestURL().toString());
+ post.setContentType(invocationContext.getMediaType());
+ post.setQueryParameters(invocationContext.getQueryParameterMap());
+ post.setBodyParameters(invocationContext.getBodyParameterMap());
+ post.setPortal(targetPortal);
+ post.setTarget(targetPortalObject);
+ serverAction = post;
+ }
+ }
+
+ return serverAction;
+ }
+
+ /**
+ *
+ * @param portalRequestPath
+ * @return
+ */
+ private UIPortal getTargetPortal(RequestContext requestContext,String portalRequestPath)
+ {
+ UIPortal targetPortal = null;
+
+ //Parse the portalRequestPath and find the targetted Portal
+ StringTokenizer st = new StringTokenizer(portalRequestPath, "/");
+ StringBuffer buffer = new StringBuffer("/");
+ while(st.hasMoreTokens())
+ {
+ String token = st.nextToken();
+ buffer.append(token);
+ String id = buffer.toString();
+ ObjectState objectState = this.presentationServer.getModelLoader().loadState(id);
+ if(objectState != null && objectState.getType() == UIPortal.class)
+ {
+ targetPortal = requestContext.getUIContext().getObject(id, UIPortal.class);
+ break;
+ }
+ buffer.append("/");
+ }
+
+ return targetPortal;
+ }
+
+ /**
+ *
+ * @param portalRequestPath
+ * @return
+ */
+ private UIObject getTargetPortalObject(RequestContext requestContext,String portalRequestPath)
+ {
+ UIObject targetPortalObject = null;
+
+ //Parse the portalRequestPath and find the targetted Portal Object (Page or Window)
+ StringTokenizer st = new StringTokenizer(portalRequestPath, "/");
+ StringBuffer buffer = new StringBuffer("/");
+ while(st.hasMoreTokens())
+ {
+ String token = st.nextToken();
+ buffer.append(token);
+ String id = buffer.toString();
+ ObjectState objectState = this.presentationServer.getModelLoader().loadState(id);
+ if(objectState != null)
+ {
+ if(objectState.getType() == UIPage.class)
+ {
+ targetPortalObject = requestContext.getUIContext().getObject(id, UIPage.class);
+ }
+ else if(objectState.getType() == UIWindow.class)
+ {
+ targetPortalObject = requestContext.getUIContext().getObject(id, UIWindow.class);
+ }
+ }
+ buffer.append("/");
+ }
+
+ return targetPortalObject;
+ }
+}
Added: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/entry/EntryPoint.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/entry/EntryPoint.java (rev 0)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/entry/EntryPoint.java 2007-11-16 16:47:30 UTC (rev 8976)
@@ -0,0 +1,61 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.entry;
+
+import org.jboss.portal.server.RequestControllerFactory;
+import org.jboss.portal.server.Server;
+import org.jboss.portal.common.invocation.InterceptorStackFactory;
+
+/**
+ * A Utility Service used by different Portal Server Entry Points
+ *
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public interface EntryPoint
+{
+ /**
+ *
+ * @return
+ */
+ public Server getPortalServer();
+
+ /**
+ *
+ * @return
+ */
+ public RequestControllerFactory getControllerFactory();
+
+ /**
+ *
+ * @return
+ */
+ public InterceptorStackFactory getInterceptorStackFactory();
+
+ /**
+ *
+ * @param contentType
+ * @return
+ */
+ public String retrieveMediaType(String contentType);
+}
Added: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/entry/GWTClientFilter.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/entry/GWTClientFilter.java (rev 0)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/entry/GWTClientFilter.java 2007-11-16 16:47:30 UTC (rev 8976)
@@ -0,0 +1,154 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.entry;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.ByteArrayOutputStream;
+
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * This filter is activated or deactivated depending on whether the Portal needs to runs in Ajax mode or Classic Html mode
+ *
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class GWTClientFilter implements Filter
+{
+ /**
+ *
+ */
+ public void init(FilterConfig arg0) throws ServletException
+ {
+ }
+
+ /**
+ *
+ */
+ public void destroy()
+ {
+ }
+
+ /**
+ *
+ */
+ public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException
+ {
+ HttpServletRequest request = (HttpServletRequest)servletRequest;
+ HttpServletResponse response = (HttpServletResponse)servletResponse;
+ String contextPath = request.getContextPath();
+
+ //Extract the resource that is being accessed
+ String resource = request.getRequestURI().replaceFirst(contextPath, "");
+ while(resource.startsWith("/"))
+ {
+ if(resource.length() > 1)
+ {
+ resource = resource.substring(1);
+ }
+ else
+ {
+ resource = "";
+ }
+ }
+
+ if(resource == null || resource.trim().length() == 0)
+ {
+ response.sendRedirect("index.html");
+ return;
+ }
+
+ //Now make sure the resource requested is a GWT resource
+ if( resource.equals("index.html") ||
+ resource.equals("portal.css") ||
+ resource.equals("mygwt-all.css") ||
+ resource.equals("mygwt-all-gray.css") ||
+ resource.equals("gwt.js") ||
+ resource.equals("prototype.js") ||
+ resource.contains(".cache.") ||
+ resource.contains(".nocache.") ||
+ resource.contains(".gwt.rpc") ||
+ resource.contains("images/default") ||
+ resource.contains("images/gray")
+ )
+ {
+ byte[] gwtResource = this.readContent(resource);
+ response.getOutputStream().write(gwtResource);
+ response.getOutputStream().flush();
+ return;
+ }
+ }
+
+ /**
+ *
+ * @param path
+ * @return
+ */
+ private byte[] readContent(String path)
+ {
+ byte[] content = null;
+
+ InputStream is = null;
+ ByteArrayOutputStream bos = null;
+ try
+ {
+ bos = new ByteArrayOutputStream();
+ is = Thread.currentThread().getContextClassLoader().getResourceAsStream(path);
+ int bytesRead = 0;
+ byte[] data = new byte[1024];
+ while((bytesRead=is.read(data)) != -1)
+ {
+ byte[] cour = new byte[bytesRead];
+ System.arraycopy(data, 0, cour, 0, bytesRead);
+ bos.write(cour);
+ bos.flush();
+ }
+ }
+ catch(Exception e)
+ {
+ throw new RuntimeException(e);
+ }
+ finally
+ {
+ if(is != null)
+ {
+ try{is.close();}catch(Exception e){}
+ }
+ if(bos != null)
+ {
+ content = bos.toByteArray();
+ try{bos.close();}catch(Exception e){}
+ }
+ }
+
+ return content;
+ }
+}
Added: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/ajax/entry/PortalEntryPoint.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/ajax/entry/PortalEntryPoint.java (rev 0)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/ajax/entry/PortalEntryPoint.java 2007-11-16 16:47:30 UTC (rev 8976)
@@ -0,0 +1,222 @@
+package org.jboss.portal.presentation.impl.ajax.entry;
+
+
+import java.util.Map;
+import java.util.List;
+import java.util.HashMap;
+
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+
+import javax.servlet.ServletException;
+import javax.servlet.UnavailableException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.log4j.Logger;
+import org.jboss.mx.util.MBeanProxy;
+import org.jboss.mx.util.MBeanServerLocator;
+
+import org.jboss.portal.common.invocation.InterceptorStackFactory;
+import org.jboss.portal.server.RequestControllerFactory;
+import org.jboss.portal.server.Server;
+import org.jboss.portal.server.ServerInvocationContext;
+import org.jboss.portal.server.impl.ServerInvocationContextImpl;
+import org.jboss.portal.server.request.URLContext;
+import org.jboss.portal.server.ServerRequest;
+import org.jboss.portal.server.ServerResponse;
+import org.jboss.portal.server.ServerInvocation;
+import org.jboss.portal.server.RequestController;
+import org.jboss.portal.server.RequestControllerDispatcher;
+
+import org.jboss.portal.presentation.ajax.client.service.PortalRPC;
+import org.jboss.portal.presentation.ajax.client.protocol.Page;
+import org.jboss.portal.presentation.ajax.client.protocol.Window;
+import org.jboss.portal.presentation.server.ProcessorResponse;
+import org.jboss.portal.presentation.entry.EntryPoint;
+
+import com.google.gwt.user.client.rpc.SerializationException;
+import com.google.gwt.user.server.rpc.RemoteServiceServlet;
+
+/**
+ * This serves as the Portal Entry Point for AJAX (Asynchronous) RPC calls being made by the
+ * client-side Ajax agent of the Presentation Framework
+ *
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class PortalEntryPoint extends RemoteServiceServlet implements
+PortalRPC
+{
+ /** The logger. */
+ private Logger log = Logger.getLogger(getClass());
+
+ /**
+ *
+ */
+ private EntryPoint entryPoint = null;
+
+ /** Configure the as default servlet. */
+ public void init() throws ServletException
+ {
+ try
+ {
+ MBeanServer mbeanServer = MBeanServerLocator.locateJBoss();
+ this.entryPoint = (EntryPoint) MBeanProxy.get(EntryPoint.class, new ObjectName(
+ this.getInitParameter("entryPointServiceName")),
+ mbeanServer);
+ }
+ catch (Exception e)
+ {
+ this.entryPoint = null;
+ String msg = "Portal Entry Point could not be created";
+ log.error(msg, e);
+ throw new UnavailableException(msg);
+ }
+ }
+
+ /**
+ *
+ */
+ public String processCall(String payload) throws SerializationException
+ {
+ HttpServletRequest request = this.getThreadLocalRequest();
+
+ //Perform the remote procedure call
+ String returnVal = super.processCall(payload);
+
+ //Perform any post-processing after calling the actual remote method that will perform
+ //the functionality for this particular remote procedure call
+
+ return returnVal;
+ }
+ // -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ /**
+ * Loads the initial Portal Page at the start of a Portal session
+ *
+ * @return The Initial Portal Page
+ */
+ public Page loadPortal()
+ {
+ try
+ {
+ Page display = null;
+ HttpServletRequest request = this.getThreadLocalRequest();
+ this.callPortalServer();
+ display = this.getDisplay((ProcessorResponse)request.getAttribute("processorResponse"));
+ return display;
+ }
+ catch(Exception e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * @return The Page of the Portal that should be currently displayed
+ */
+ public Page getCurrentPage()
+ {
+ Page currentPage = null;
+
+ HttpServletRequest request = this.getThreadLocalRequest();
+
+ ProcessorResponse processorResponse = (ProcessorResponse) request.getSession().getAttribute("processorResponse");
+
+ currentPage = this.getDisplay(processorResponse);
+
+ return currentPage;
+ }
+ //-------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ /**
+ *
+ * @param processorResponse
+ * @return
+ */
+ private Page getDisplay(ProcessorResponse processorResponse)
+ {
+ Page display = null;
+
+ //Implement this with the new model
+ /*
+ org.jboss.portal.presentation.model.Page portalPage = processorResponse
+ .findDisplayedPage();
+
+ // Construct the ajax currentPage object from the portalPage that has been
+ // chosen to be displayed
+ if (portalPage != null)
+ {
+ display = new Page();
+ display.setName(portalPage.getName());
+ List pageWindows = portalPage.getWindows();
+ if(pageWindows != null && pageWindows.size()>0)
+ {
+ Window[] windows = new Window[pageWindows.size()];
+ display.setWindows(windows);
+ for(int i=0; i<pageWindows.size(); i++)
+ {
+ org.jboss.portal.presentation.model.Window pageWindow = (org.jboss.portal.presentation.model.Window)pageWindows.get(i);
+ Window window = new Window();
+ window.setName(pageWindow.getName());
+ window.setContent(pageWindow.getContent());
+ windows[i] = window;
+ }
+ }
+ }
+ */
+
+ return display;
+ }
+
+ /**
+ *
+ *
+ */
+ private void callPortalServer() throws Exception
+ {
+ HttpServletRequest req = this.getThreadLocalRequest();
+ HttpServletResponse resp = this.getThreadLocalResponse();
+ String requestURI = req.getRequestURI();
+ String contextPath = req.getContextPath();
+ String portalHost = req.getServerName();
+ String portalRequestPath = requestURI.substring(contextPath.length());
+ String portalContextPath = requestURI.substring(0, contextPath.length());
+ Map queryParameterMap = new HashMap();
+ URLContext urlContext = URLContext.newInstance(req.isSecure(), req.getRemoteUser() != null);
+
+ Server server = this.entryPoint.getPortalServer();
+
+ //
+ ServerInvocationContext invocationCtx = new ServerInvocationContextImpl(
+ req,
+ resp,
+ portalHost,
+ portalRequestPath,
+ portalContextPath,
+ queryParameterMap,
+ null, //body parameter map is not applicable for asynchronous RPC calls
+ urlContext,
+ null //media type information is not applicable for asynchronous RPC calls
+ );
+
+ //
+ ServerRequest request = new ServerRequest(invocationCtx);
+ request.setServer(server);
+
+ //
+ ServerResponse response = new ServerResponse(request, invocationCtx);
+
+ //
+ ServerInvocation invocation = new ServerInvocation(invocationCtx);
+ invocation.setRequest(request);
+ invocation.setResponse(response);
+
+ //
+ RequestControllerFactory controllerFactory = this.entryPoint.getControllerFactory();
+ RequestController controller = controllerFactory.createRequestController(invocation);
+ invocation.setHandler(new RequestControllerDispatcher(controller));
+
+ InterceptorStackFactory stack = this.entryPoint.getInterceptorStackFactory();
+ invocation.invoke(stack.getInterceptorStack());
+ }
+}
Added: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/classic/entry/PortalEntryPoint.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/classic/entry/PortalEntryPoint.java (rev 0)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/classic/entry/PortalEntryPoint.java 2007-11-16 16:47:30 UTC (rev 8976)
@@ -0,0 +1,609 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.impl.classic.entry;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.nio.charset.Charset;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.UnavailableException;
+
+import org.apache.log4j.Logger;
+import org.jboss.mx.util.MBeanProxy;
+import org.jboss.mx.util.MBeanServerLocator;
+import org.jboss.portal.common.http.QueryStringParser;
+import org.jboss.portal.common.invocation.InterceptorStackFactory;
+import org.jboss.portal.common.invocation.InvocationException;
+import org.jboss.portal.common.net.URLTools;
+import org.jboss.portal.common.util.Exceptions;
+import org.jboss.portal.server.PortalConstants;
+import org.jboss.portal.server.RequestController;
+import org.jboss.portal.server.RequestControllerDispatcher;
+import org.jboss.portal.server.RequestControllerFactory;
+import org.jboss.portal.server.Server;
+import org.jboss.portal.server.ServerException;
+import org.jboss.portal.server.ServerInvocation;
+import org.jboss.portal.server.ServerInvocationContext;
+import org.jboss.portal.server.ServerRequest;
+import org.jboss.portal.server.ServerResponse;
+import org.jboss.portal.server.impl.ServerInvocationContextImpl;
+import org.jboss.portal.server.request.URLContext;
+import org.jboss.portal.presentation.layout.LayoutManager;
+import org.jboss.portal.presentation.impl.classic.layout.FlexibleGrid;
+import org.jboss.portal.presentation.impl.classic.layout.FlexibleGridConstraints;
+import org.jboss.portal.presentation.impl.classic.layout.FlexibleGridLayoutManager;
+import org.jboss.portal.presentation.impl.classic.layout.RegionConstraints;
+import org.jboss.portal.presentation.impl.classic.layout.RegionLayoutManager;
+import org.jboss.portal.presentation.server.ProcessorResponse;
+import org.jboss.portal.presentation.entry.EntryPoint;
+
+/**
+ * The Portal Server Entry Point for classic html mode
+ *
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class PortalEntryPoint extends HttpServlet
+{
+ /**
+ *
+ */
+ private Logger log = Logger.getLogger(getClass());
+
+ /** . */
+ private static final int GET_METHOD = 0;
+
+ /** . */
+ private static final int POST_METHOD = 1;
+
+ /** Describes a default servlet mapping. */
+ private static final int DEFAULT_SERVLET_MAPPING = 0;
+
+ /** Describes a root path mapping. */
+ private static final int ROOT_PATH_MAPPING = 1;
+
+ /** Describes a path mapping. */
+ private static final int PATH_MAPPING = 2;
+
+ /** Are we or not the default servlet ? */
+ private boolean asDefaultServlet = false;
+
+ /**
+ *
+ */
+ private EntryPoint entryPoint = null;
+
+ /** Configure the as default servlet. */
+ public void init() throws ServletException
+ {
+ asDefaultServlet = getAsDefaultServletInitValue();
+ try
+ {
+ MBeanServer mbeanServer = MBeanServerLocator.locateJBoss();
+ this.entryPoint = (EntryPoint) MBeanProxy.get(EntryPoint.class, new ObjectName(
+ this.getInitParameter("entryPointServiceName")),
+ mbeanServer);
+ }
+ catch (Exception e)
+ {
+ this.entryPoint = null;
+ String msg = "Portal Entry Point could not be created";
+ log.error(msg, e);
+ throw new UnavailableException(msg);
+ }
+ }
+
+ /**
+ *
+ */
+ protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
+ {
+ //
+ String servletPath = req.getServletPath();
+ String requestURI = req.getRequestURI();
+ String contextPath = req.getContextPath();
+
+ String resource = req.getRequestURI().replaceFirst(contextPath, "");
+ while(resource.startsWith("/"))
+ {
+ if(resource.length() > 1)
+ {
+ resource = resource.substring(1);
+ }
+ else
+ {
+ resource = "";
+ }
+ }
+
+ if(resource == null || resource.trim().length() == 0)
+ {
+ resp.sendRedirect("index.html");
+ return;
+ }
+
+ int method;
+ if ("GET".equals(req.getMethod()))
+ {
+ method = GET_METHOD;
+ }
+ else if ("POST".equals(req.getMethod()))
+ {
+ method = POST_METHOD;
+ }
+ else
+ {
+ throw new ServletException();
+ }
+
+ // Compute the media type in the content type
+ String mediaType = this.entryPoint.retrieveMediaType(req.getContentType());
+
+ // Only affect the charset encoding if the servlet container will decode the request
+ if (method == POST_METHOD && PortalConstants.APPLICATION_X_WWW_FORM_URLENCODED.equals(mediaType))
+ {
+ // Now we must ensure that we have either an equals or a trailing space after the media-type
+ String characterEncoding = req.getCharacterEncoding();
+ if (characterEncoding == null)
+ {
+ // Set out charset for the portal request
+ req.setCharacterEncoding(PortalConstants.UTF_8.name());
+ }
+ else
+ {
+ Charset charset = Charset.forName(characterEncoding);
+ if (!PortalConstants.UTF_8.equals(charset))
+ {
+ throw new ServletException("Unaccepted charset " + characterEncoding);
+ }
+ }
+ }
+
+ // Determine the mapping we have
+ int mapping = DEFAULT_SERVLET_MAPPING;
+ if (!asDefaultServlet)
+ {
+ if (servletPath.length() == 0)
+ {
+ mapping = ROOT_PATH_MAPPING;
+ }
+ else
+ {
+ mapping = PATH_MAPPING;
+ }
+ }
+
+ // Determine the host for this request
+ String portalHost = req.getServerName();
+
+ // Determine the request path
+ String portalRequestPath = null;
+ String portalContextPath = null;
+ switch (mapping)
+ {
+ case DEFAULT_SERVLET_MAPPING:
+ portalRequestPath = requestURI.substring(contextPath.length());
+ portalContextPath = requestURI.substring(0, contextPath.length());
+ break;
+ case ROOT_PATH_MAPPING:
+ portalRequestPath = requestURI.substring(contextPath.length());
+ portalContextPath = requestURI.substring(0, contextPath.length());
+ break;
+ case PATH_MAPPING:
+ portalRequestPath = requestURI.substring(contextPath.length() + servletPath.length());
+ portalContextPath = requestURI.substring(0, contextPath.length() + servletPath.length());
+ break;
+ }
+
+ // Apply the url decoding
+ portalRequestPath = URLTools.decodeXWWWFormURL(portalRequestPath);
+ portalContextPath = URLTools.decodeXWWWFormURL(portalContextPath);
+
+ //
+ URLContext urlContext = URLContext.newInstance(req.isSecure(), req.getRemoteUser() != null);
+
+ // ***************
+ // ***************
+ // ***************
+ // ***************
+
+ // Parse the query string to have the get parameters
+ // The resulting map has its parameters decoded from the x-www-form-url encoding
+ Map queryParameterMap = Collections.EMPTY_MAP;
+ String queryString = req.getQueryString();
+ if (queryString != null)
+ {
+ queryParameterMap = QueryStringParser.parseQueryString(queryString);
+ }
+
+ //
+ Map bodyParameterMap = null;
+ if (method == POST_METHOD && PortalConstants.APPLICATION_X_WWW_FORM_URLENCODED.equals(mediaType))
+ {
+ bodyParameterMap = Collections.EMPTY_MAP;
+ for (Iterator i = req.getParameterMap().entrySet().iterator(); i.hasNext();)
+ {
+ Map.Entry entry = (Map.Entry)i.next();
+
+ // Get param name
+ String paramName = (String)entry.getKey();
+
+ // Values that are aggregated from the query string and the body
+ String[] paramValues = (String[])entry.getValue();
+
+ // Values decoded from the query string
+ String[] queryValues = (String[])queryParameterMap.get(paramName);
+ if (queryValues != null)
+ {
+ int bodyValuesLength = paramValues.length - queryValues.length;
+ if (bodyValuesLength > 0)
+ {
+ String[] bodyValues = new String[bodyValuesLength];
+ System.arraycopy(paramValues, queryValues.length, bodyValues, 0, bodyValuesLength);
+ if (bodyParameterMap.isEmpty())
+ {
+ bodyParameterMap = new HashMap();
+ }
+ bodyParameterMap.put(paramName, bodyValues);
+ }
+ }
+ else
+ {
+ if (bodyParameterMap.isEmpty())
+ {
+ bodyParameterMap = new HashMap();
+ }
+ bodyParameterMap.put(paramName, paramValues);
+ }
+ }
+
+ // Make the map unmodifiable
+ bodyParameterMap = bodyParameterMap.isEmpty() ? bodyParameterMap : Collections.unmodifiableMap(bodyParameterMap);
+ }
+
+ // ***************
+ // ***************
+ // ***************
+ // ***************
+
+ //
+ Server server = this.entryPoint.getPortalServer();
+
+ //
+ ServerInvocationContext invocationCtx = new ServerInvocationContextImpl(
+ req,
+ resp,
+ portalHost,
+ portalRequestPath,
+ portalContextPath,
+ queryParameterMap,
+ bodyParameterMap,
+ urlContext,
+ mediaType);
+
+ //
+ ServerRequest request = new ServerRequest(invocationCtx);
+ request.setServer(server);
+
+ //
+ ServerResponse response = new ServerResponse(request, invocationCtx);
+
+ //
+ ServerInvocation invocation = new ServerInvocation(invocationCtx);
+ invocation.setRequest(request);
+ invocation.setResponse(response);
+
+ //
+ RequestControllerFactory controllerFactory = this.entryPoint.getControllerFactory();
+ RequestController controller = controllerFactory.createRequestController(invocation);
+ invocation.setHandler(new RequestControllerDispatcher(controller));
+
+ //
+ try
+ {
+ InterceptorStackFactory stack = this.entryPoint.getInterceptorStackFactory();
+ invocation.invoke(stack.getInterceptorStack());
+ }
+ catch (ServerException e)
+ {
+ log.error("Server exception", e);
+ Throwable nested = Exceptions.unwrap(e);
+ throw new ServletException(nested);
+ }
+ catch (InvocationException e)
+ {
+ log.error("Invocation exception", e);
+ Throwable nested = Exceptions.unwrap(e);
+ throw new ServletException(nested);
+ }
+ catch (ServletException e)
+ {
+ throw e;
+ }
+ catch (IOException e)
+ {
+ throw e;
+ }
+ catch (Exception e)
+ {
+ log.error("Unexpected exception", e);
+ Throwable nested = Exceptions.unwrap(e);
+ throw new ServletException(nested);
+ }
+ }
+
+ /**
+ * Return the value for the servlet mapping. This implementation get the
+ * value from an init parameter of the servlet called <b>asDefaultServlet</b>
+ */
+ private boolean getAsDefaultServletInitValue()
+ {
+ ServletConfig config = getServletConfig();
+ String value = config.getInitParameter("asDefaultServlet");
+ if ("true".equalsIgnoreCase(value))
+ {
+ log.debug("Servlet loaded as default servlet mapping");
+ return true;
+ }
+ else if ("false".equalsIgnoreCase(value))
+ {
+ log.debug("Servlet loaded as path mapping servlet");
+ return false;
+ }
+ else
+ {
+ log.warn("Servlet mapping cannot be determined with init parameter value="
+ + value);
+ return false;
+ }
+ }
+ // ---------All these are just helper methods for the prototype-----------------------------------------------------------------------------------------------
+ //----It containts mostly hard coded logic for the prototype-------------------------------------------------------------------------------------------------
+ /**
+ * Based on the latest design discussion, this method is not needed.
+ *
+ * This will be an implementation detail of the UIServer processing the Response that is sent back to it
+ * from the Core Portal Processor
+ *
+ * @param clientConnection
+ * @param page
+ */
+ /*private void render(PrintWriter clientConnection, Page pageResult)
+ {
+ //Some flexible grid layout testing code
+ Object[] gridData = this.getFlexibleGridLayoutManager(pageResult);
+ Page page = (Page)gridData[0];
+ LayoutManager layoutManager = (LayoutManager)gridData[1];
+
+ //Some region layout testing code
+ //Object[] regionData = this.getRegionBasedLayoutManager(pageResult);
+ //Page page = (Page)regionData[0];
+ //LayoutManager layoutManager = (LayoutManager)regionData[1];
+
+ //Peform Page Layout
+ String output = layoutManager.doLayout(page);
+
+
+ //Create the final output...Also hardcoded without any preprocessing/postprocessing etc
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"><html xmlns=\"http://www.w3.org/1999/xhtml\"><head><title>JBoss Portal UIServer</title><link rel=\"stylesheet\" id=\"dyna_css\" href=\"/portal-ajax/dyna/style.css\" type=\"text/css\"/><link rel=\"stylesheet\" type=\"text/css\" id=\"main_css\" href=\"/portal-core/themes/renaissance/portal_style.css\"/><link rel=\"shortcut icon\" href=\"/portal-core/themes/renaissance/images/favicon.ico\" /><link rel=\"icon\" type=\"image/gif\" href=\"/portal-core/themes/renaissance/images/animated_favicon1.gif\" /></head><body id=\"body\">\n");
+ buffer.append(output);
+ buffer.append("</body></html>\n");
+
+
+ //Sending the results back to the Client
+ clientConnection.write(buffer.toString());
+ clientConnection.flush();
+ }*/
+
+ /**
+ *
+ */
+ /*private Object[] getFlexibleGridLayoutManager(Page pageResult)
+ {
+
+ Page page = new Page();
+ Container header = new Container("header");
+ Container leftPanel = new Container("leftPanel");
+ Container mainPanel = new Container("mainPanel");
+ Window headerTabsWindow = new Window("header-tabs-window");
+ Window menuWindow = new Window("menu-window");
+ Window leftPanelWindow1 = new Window("left-panel-window1");
+ Window leftPanelWindow2 = new Window("left-panel-window2");
+ Window mainPanelWindow = new Window("main-panel-window");
+ header.addComponent(headerTabsWindow);
+ header.addComponent(menuWindow);
+ leftPanel.addComponent(leftPanelWindow1);
+ leftPanel.addComponent(leftPanelWindow2);
+ mainPanel.addComponent(mainPanelWindow);
+
+ //Setup the Grid for headerTabs container
+ page.addContainer(header);
+ FlexibleGrid headerGrid = this.getGrid("header", 1, 2);
+ FlexibleGridConstraints[] headerTabConstraints = { this.getConstraints("header-tabs-window", "100", 0, 0, 10, 0, 0, 0),
+ this.getConstraints("menu-window", "100", 0, 0, 0, 0, 0, 1) };
+ headerGrid.setConstraints(headerTabConstraints);
+
+ //Setup the Grid for left panel container
+ page.addContainer(leftPanel);
+ FlexibleGrid leftPanelGrid = this.getGrid("leftPanel", 2, 1);
+ FlexibleGridConstraints[] leftPanelConstraints = { this.getConstraints("left-panel-window1", "75", 0, 0, 0, 0, 0, 0),
+ this.getConstraints("left-panel-window2", "75", 0, 0, 0, 0, 1, 0) };
+ leftPanelGrid.setConstraints(leftPanelConstraints);
+
+ //Setup the Grid for main panel container
+ page.addContainer(mainPanel);
+ FlexibleGrid mainPanelGrid = this.getGrid("mainPanel", 1, 1);
+ FlexibleGridConstraints[] mainPanelConstraints = { this.getConstraints("main-panel-window", "100", 0, 0, 0, 0, 0, 0) };
+ mainPanelGrid.setConstraints(mainPanelConstraints);
+
+ //Setup the FlexibleGrid Layout Manager with the different grids
+ FlexibleGrid[] row1 = { headerGrid };
+ FlexibleGrid[] row2 = { leftPanelGrid, mainPanelGrid };
+ FlexibleGridLayoutManager layoutManager = new FlexibleGridLayoutManager();
+ layoutManager.addRowOfGrids(row1);
+ layoutManager.addRowOfGrids(row2);
+
+ //Populate the grid windows with proper content
+ List windows = pageResult.getWindows();
+ int counter = 0;
+ for(Iterator itr=windows.iterator();itr.hasNext();)
+ {
+ Window result = (Window)itr.next();
+
+ switch(counter)
+ {
+ case 0:
+ leftPanelWindow1.setContent(result.getContent());
+ break;
+
+ case 1:
+ leftPanelWindow2.setContent(result.getContent());
+ break;
+
+ case 2:
+ mainPanelWindow.setContent(result.getContent());
+ break;
+
+ case 3:
+ menuWindow.setContent(result.getContent());
+ break;
+
+ case 4:
+ headerTabsWindow.setContent(result.getContent());
+ break;
+ }
+
+ counter++;
+ }
+
+ return new Object[]{page, layoutManager};
+ }*/
+
+
+ /**
+ *
+ * @param containerId
+ * @param rows
+ * @param columns
+ * @return
+ */
+ /*private FlexibleGrid getGrid(String containerId,int rows, int columns)
+ {
+ FlexibleGrid grid = new FlexibleGrid(containerId);
+ grid.setRows(rows);
+ grid.setColumns(columns);
+ return grid;
+ }*/
+
+ /**
+ *
+ * @param componentId
+ * @param widthPercentage
+ * @param top
+ * @param bottom
+ * @param left
+ * @param right
+ */
+ /*private FlexibleGridConstraints getConstraints(String componentId, String widthPercentage, int top, int bottom, int left, int right, int row, int column)
+ {
+ FlexibleGridConstraints constraints = new FlexibleGridConstraints();
+ constraints.setComponentId(componentId);
+ constraints.setWidthPercentage(widthPercentage);
+ constraints.setRow(row);
+ constraints.setColumn(column);
+ constraints.setTop(top);
+ constraints.setBottom(bottom);
+ constraints.setLeft(left);
+ constraints.setRight(right);
+ return constraints;
+ }*/
+
+ /**
+ *
+ * @param pageResult
+ * @return
+ */
+ /*private Object[] getRegionBasedLayoutManager(Page pageResult)
+ {
+ Page page = new Page();
+ Container left = new Container("left");
+ Container center = new Container("center");
+ page.addContainer(left);
+ page.addContainer(center);
+
+ //Populate the grid windows with proper content
+ List windows = pageResult.getWindows();
+ int counter = 0;
+ for(Iterator itr=windows.iterator();itr.hasNext();)
+ {
+ Window result = (Window)itr.next();
+ Window uiWindow = new Window(result.getId());
+ uiWindow.setContent(result.getContent());
+ switch(counter)
+ {
+ case 0:
+ left.addComponent(uiWindow);
+ break;
+
+ case 1:
+ left.addComponent(uiWindow);
+ break;
+
+ case 2:
+ center.addComponent(uiWindow);
+ break;
+
+ case 3:
+ center.addComponent(uiWindow);
+ break;
+
+ case 4:
+ left.addComponent(uiWindow);
+ break;
+ }
+
+ counter++;
+ }
+
+ RegionLayoutManager layoutManager = new RegionLayoutManager();
+ RegionConstraints leftConstraints = new RegionConstraints("left", RegionConstraints.LEFT);
+ RegionConstraints centerConstraints = new RegionConstraints("center", RegionConstraints.CENTER);
+ layoutManager.addRegionConstraints(leftConstraints);
+ layoutManager.addRegionConstraints(centerConstraints);
+
+ return new Object[]{page, layoutManager};
+ }*/
+}
Added: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/entry/EntryPointImpl.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/entry/EntryPointImpl.java (rev 0)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/impl/entry/EntryPointImpl.java 2007-11-16 16:47:30 UTC (rev 8976)
@@ -0,0 +1,138 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.impl.entry;
+
+import org.jboss.portal.common.invocation.InterceptorStackFactory;
+import org.jboss.portal.server.RequestControllerFactory;
+import org.jboss.portal.server.Server;
+import org.jboss.portal.jems.as.system.AbstractJBossService;
+import org.jboss.portal.presentation.entry.EntryPoint;
+
+/**
+ * Implementation of an Entry Point Utility
+ *
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class EntryPointImpl extends AbstractJBossService implements EntryPoint
+{
+ /** The interceptor stack. */
+ private InterceptorStackFactory interceptorStackFactory = null;
+
+ /** The controller for this servlet. */
+ private RequestControllerFactory controllerFactory = null;
+
+ /**
+ *
+ */
+ private Server portalServer = null;
+
+
+ /**
+ *
+ * @return
+ */
+ public RequestControllerFactory getControllerFactory()
+ {
+ return controllerFactory;
+ }
+
+
+ /**
+ *
+ * @param controllerFactory
+ */
+ public void setControllerFactory(RequestControllerFactory controllerFactory)
+ {
+ this.controllerFactory = controllerFactory;
+ }
+
+
+ /**
+ *
+ * @return
+ */
+ public InterceptorStackFactory getInterceptorStackFactory()
+ {
+ return interceptorStackFactory;
+ }
+
+
+ /**
+ *
+ * @param interceptorStackFactory
+ */
+ public void setInterceptorStackFactory(
+ InterceptorStackFactory interceptorStackFactory)
+ {
+ this.interceptorStackFactory = interceptorStackFactory;
+ }
+
+ /**
+ *
+ * @return
+ */
+ public Server getPortalServer()
+ {
+ return portalServer;
+ }
+
+
+ /**
+ *
+ * @param portalServer
+ */
+ public void setPortalServer(Server portalServer)
+ {
+ this.portalServer = portalServer;
+ }
+
+
+ /**
+ *
+ * @param contentType
+ * @return
+ */
+ public String retrieveMediaType(String contentType)
+ {
+ String mediaType = contentType;
+
+ //
+ if (mediaType != null)
+ {
+ // Remove any parameters
+ int index = mediaType.indexOf(';');
+ if (index != -1)
+ {
+ mediaType = contentType.substring(0, index);
+ }
+
+ // Trim
+ mediaType = mediaType.trim();
+
+ // Media type matching is case insensitive, so we convert to lower case
+ mediaType = mediaType.toLowerCase();
+ }
+ return mediaType;
+ }
+}
Deleted: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model/Portal.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model/Portal.java 2007-11-16 15:13:46 UTC (rev 8975)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model/Portal.java 2007-11-16 16:47:30 UTC (rev 8976)
@@ -1,39 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model;
-
-
-/**
- * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
- *
- */
-public class Portal extends PortalObject
-{
- /**
- *
- */
- public String toString()
- {
- return "Portal: "+super.toString();
- }
-}
Deleted: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model/PortalObject.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model/PortalObject.java 2007-11-16 15:13:46 UTC (rev 8975)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/model/PortalObject.java 2007-11-16 16:47:30 UTC (rev 8976)
@@ -1,110 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.model;
-
-import java.io.Serializable;
-
-/**
- * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
- *
- */
-public abstract class PortalObject implements Serializable
-{
- protected String id = null;
- protected String name = null;
-
- /**
- *
- *
- */
- public PortalObject()
- {
- }
-
- /**
- *
- * @param id
- * @param name
- * @param parent
- * @param children
- */
- public PortalObject(String id, String name)
- {
- this.id = id;
- this.name = name;
- }
-
- /**
- *
- * @return
- */
- public String getId()
- {
- return id;
- }
-
- /**
- *
- * @param id
- */
- public void setId(String id)
- {
- this.id = id;
- }
-
- /**
- *
- * @return
- */
- public String getName()
- {
- return name;
- }
-
- /**
- *
- * @param name
- */
- public void setName(String name)
- {
- this.name = name;
- }
-
- /**
- *
- */
- public String toString()
- {
- String rep = null;
-
- StringBuffer buffer = new StringBuffer();
- buffer.append("[");
- buffer.append("id="+this.id+",");
- buffer.append("name="+this.name);
- buffer.append("]");
-
- rep = buffer.toString();
-
- return rep;
- }
-}
Modified: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/server/ProcessorResponse.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/server/ProcessorResponse.java 2007-11-16 15:13:46 UTC (rev 8975)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/server/ProcessorResponse.java 2007-11-16 16:47:30 UTC (rev 8976)
@@ -23,9 +23,9 @@
package org.jboss.portal.presentation.server;
import java.io.Serializable;
-import java.util.List;
import org.jboss.portal.web.ServletContextDispatcher;
+import org.jboss.portal.presentation.action.server.ServerResponse;
/**
* @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
@@ -36,39 +36,22 @@
/**
*
*/
- private ServletContextDispatcher dispatcher = null;
+ private ServletContextDispatcher dispatcher = null;
/**
- * Contains a list of pages that need to be updated on the client. These pages may not necessarily
- * be the currently displayed page, but nevertheless, these are pages whose window content changed
- * as a result of this particular Portal request processing.
- *
- * For most usecases this probably only consist of the Page that is currently being displayed on the client
+ * The ServerResponse generated by processing the ProcessorRequest by the Processor
*/
- private List updatedPages = null;
-
+ private ServerResponse response = null;
+
/**
- * Content Type of the response being sent back to the client
- */
- private String contentType = null;
-
- /**
- * Character Set of the response being sent back to the client
- */
- private String charSet = null;
-
-
- /**
*
* @param dispatcher
* @param updatedPages
*/
- public ProcessorResponse(ServletContextDispatcher dispatcher, String contentType, String charSet, List updatedPages)
+ public ProcessorResponse(ServletContextDispatcher dispatcher, ServerResponse response)
{
- this.dispatcher = dispatcher;
- this.contentType = contentType;
- this.charSet = charSet;
- this.updatedPages = updatedPages;
+ this.dispatcher = dispatcher;
+ this.response = response;
}
/**
@@ -93,77 +76,17 @@
*
* @return
*/
- public List getUpdatedPages()
+ public ServerResponse getResponse()
{
- return updatedPages;
+ return response;
}
/**
*
- * @param updatedPages
+ * @param response
*/
- public void setUpdatedPages(List updatedPages)
+ public void setResponse(ServerResponse response)
{
- this.updatedPages = updatedPages;
- }
-
- /**
- *
- * @return
- */
- public String getCharSet()
- {
- return charSet;
- }
-
- /**
- *
- * @param charSet
- */
- public void setCharSet(String charSet)
- {
- this.charSet = charSet;
- }
-
- /**
- *
- * @return
- */
- public String getContentType()
- {
- return contentType;
- }
-
- /**
- *
- * @param contentType
- */
- public void setContentType(String contentType)
- {
- this.contentType = contentType;
- }
-
- /**
- *
- * @return
- */
- /*public Page findDisplayedPage()
- {
- Page displayedPage = null;
-
- if(this.updatedPages != null)
- {
- for(int i=0; i<this.updatedPages.size(); i++)
- {
- Page cour = (Page)this.updatedPages.get(i);
- if(cour.isCurrentlyDisplayed())
- {
- displayedPage = cour;
- break;
- }
- }
- }
-
- return displayedPage;
- }*/
+ this.response = response;
+ }
}
Added: branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/test/ajax/PortletServiceImpl.java
===================================================================
--- branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/test/ajax/PortletServiceImpl.java (rev 0)
+++ branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/test/ajax/PortletServiceImpl.java 2007-11-16 16:47:30 UTC (rev 8976)
@@ -0,0 +1,232 @@
+package org.jboss.portal.presentation.test.ajax;
+
+import java.io.InputStream;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.jboss.portal.presentation.ajax.client.PortletService;
+import org.jboss.portal.presentation.ajax.client.protocol.Page;
+import org.jboss.portal.presentation.ajax.client.protocol.Window;
+
+import com.google.gwt.user.server.rpc.RemoteServiceServlet;
+
+/**
+ * This is just a STUB server side component to test the client side components
+ * of the GWT-based AJAX UI
+ *
+ * Only used for Prototyping stuff
+ *
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class PortletServiceImpl extends RemoteServiceServlet implements
+ PortletService
+{
+ /**
+ *
+ */
+ public String getPortlet(String portletId)
+ {
+ String portletContent = null;
+
+ String contentPath = portletId;
+ InputStream is = null;
+ try
+ {
+ is = Thread.currentThread().getContextClassLoader()
+ .getResourceAsStream(contentPath);
+ StringBuffer contentBuffer = new StringBuffer();
+ int bytesRead = 0;
+ byte[] data = new byte[1024];
+ while ((bytesRead = is.read(data)) != -1)
+ {
+ byte[] cour = new byte[bytesRead];
+ System.arraycopy(data, 0, cour, 0, bytesRead);
+ contentBuffer.append(new String(cour));
+ }
+ portletContent = contentBuffer.toString();
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException(e);
+ }
+ finally
+ {
+ if (is != null)
+ {
+ try
+ {
+ is.close();
+ }
+ catch (Exception e)
+ {
+ }
+ }
+ }
+
+ return portletContent;
+ }
+
+ /**
+ *
+ * @param pageId
+ * @return
+ */
+ public Page getPage(String pageId)
+ {
+ Page page = new Page();
+ page.setName(pageId);
+
+ if (pageId.equals("index") || pageId.equals("Page 1"))
+ {
+ String weatherContent = this.getPortlet("weatherPortlet.html");
+ String cmsContent = this.getPortlet("cmsPortlet.html");
+ Window[] windows = new Window[2];
+ page.setWindows(windows);
+
+ Window weatherWindow = new Window();
+ weatherWindow.setName("weatherPortlet");
+ weatherWindow.setContent(weatherContent);
+
+ Window cmsWindow = new Window();
+ cmsWindow.setName("cmsPortlet");
+ cmsWindow.setContent(cmsContent);
+
+ windows[0] = weatherWindow;
+ windows[1] = cmsWindow;
+ }
+ else if (pageId.equals("Page 2"))
+ {
+ String weatherContent = this.getPortlet("weatherPortlet.html");
+ Window[] windows = new Window[1];
+ page.setWindows(windows);
+
+ Window weatherWindow = new Window();
+ weatherWindow.setName("weatherPortlet");
+ weatherWindow.setContent(weatherContent);
+
+ windows[0] = weatherWindow;
+ }
+ else if (pageId.equals("Page 3"))
+ {
+ String cmsContent = this.getPortlet("cmsPortlet.html");
+ Window[] windows = new Window[1];
+ page.setWindows(windows);
+
+ Window cmsWindow = new Window();
+ cmsWindow.setName("cmsPortlet");
+ cmsWindow.setContent(cmsContent);
+
+ windows[0] = cmsWindow;
+ }
+
+ HttpServletRequest request = this.getThreadLocalRequest();
+ request.getSession().setAttribute("currentPage", page);
+
+ return page;
+ }
+
+ /**
+ *
+ * @param window
+ * @param state
+ */
+ public Page setState(String window, String newState)
+ {
+ HttpServletRequest request = this.getThreadLocalRequest();
+ Page page = (Page) request.getSession().getAttribute("currentPage");
+
+ Window selectedWindow = this.findWindow(page, window);
+ selectedWindow.setState(newState);
+ if (selectedWindow.getState().equals(Window.NORMAL))
+ {
+ if (selectedWindow.getName().equals("cmsPortlet"))
+ {
+ selectedWindow.setContent(this.getPortlet("cmsPortlet.html"));
+ }
+ else
+ {
+ selectedWindow.setContent(this.getPortlet("weatherPortlet.html"));
+ }
+ this.hideWindows(page.getWindows(), null, false);
+ }
+ else if (selectedWindow.getState().equals(Window.MINIMIZED))
+ {
+ selectedWindow.setContent("");
+ this.hideWindows(page.getWindows(), null, false);
+ }
+ if (selectedWindow.getState().equals(Window.MAXIMIZED))
+ {
+ if (selectedWindow.getName().equals("cmsPortlet"))
+ {
+ selectedWindow.setContent(this.getPortlet("cmsPortlet.html"));
+ }
+ else
+ {
+ selectedWindow.setContent(this.getPortlet("weatherPortlet.html"));
+ }
+ this.hideWindows(page.getWindows(), selectedWindow, true);
+ }
+
+ return page;
+ }
+
+ /**
+ *
+ * @param window
+ * @param state
+ */
+ public Page setMode(String window, String newMode)
+ {
+ HttpServletRequest request = this.getThreadLocalRequest();
+ Page page = (Page) request.getSession().getAttribute("currentPage");
+
+ Window selectedWindow = this.findWindow(page, window);
+ selectedWindow.setMode(newMode);
+
+ return page;
+ }
+
+ /**
+ *
+ * @param page
+ * @param windowName
+ * @return
+ */
+ private Window findWindow(Page page, String windowName)
+ {
+ Window window = null;
+
+ Window[] windows = page.getWindows();
+ for (int i = 0; i < windows.length; i++)
+ {
+ if (windows[i].getName().equals(windowName))
+ {
+ window = windows[i];
+ break;
+ }
+ }
+
+ return window;
+ }
+
+ /**
+ *
+ * @param excludedWindow
+ * @param hide
+ */
+ private void hideWindows(Window[] windows, Window excludedWindow,
+ boolean hide)
+ {
+ for (int i = 0; i < windows.length; i++)
+ {
+ if (excludedWindow != null
+ && windows[i].getName().equals(excludedWindow.getName()))
+ {
+ continue;
+ }
+
+ windows[i].setVisible(!hide);
+ }
+ }
+}
Added: branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/AsyncPages.gwt.xml
===================================================================
--- branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/AsyncPages.gwt.xml (rev 0)
+++ branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/AsyncPages.gwt.xml 2007-11-16 16:47:30 UTC (rev 8976)
@@ -0,0 +1,12 @@
+<module>
+ <!-- Inherit the core Web Toolkit stuff -->
+ <inherits name="com.google.gwt.user.User"/>
+ <!-- Inherit the MyGWT toolkit -->
+ <inherits name='net.mygwt.ui.MyGWT'/>
+
+ <!-- Specify the app entry point class -->
+ <entry-point class="org.jboss.portal.presentation.ajax.client.AsyncPages"/>
+
+ <!-- RPC related configuration -->
+ <servlet path="/portletService" class="org.jboss.portal.presentation.impl.ajax.service.PortletServiceImpl"/>
+</module>
Added: branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/MyGWT.gwt.xml
===================================================================
--- branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/MyGWT.gwt.xml (rev 0)
+++ branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/MyGWT.gwt.xml 2007-11-16 16:47:30 UTC (rev 8976)
@@ -0,0 +1,9 @@
+<module>
+ <!-- Inherit the core Web Toolkit stuff -->
+ <inherits name="com.google.gwt.user.User"/>
+ <!-- Inherit the MyGWT toolkit -->
+ <inherits name='net.mygwt.ui.MyGWT'/>
+
+ <!-- Specify the app entry point class -->
+ <entry-point class="org.jboss.portal.presentation.ajax.client.MyGWTPrototype"/>
+</module>
Added: branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/PartialRefresh.gwt.xml
===================================================================
--- branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/PartialRefresh.gwt.xml (rev 0)
+++ branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/PartialRefresh.gwt.xml 2007-11-16 16:47:30 UTC (rev 8976)
@@ -0,0 +1,10 @@
+<module>
+ <!-- Inherit the core Web Toolkit stuff -->
+ <inherits name="com.google.gwt.user.User"/>
+
+ <!-- Specify the app entry point class -->
+ <entry-point class="org.jboss.portal.presentation.ajax.client.PartialRefresh"/>
+
+ <!-- RPC related configuration -->
+ <servlet path="/portletService" class="org.jboss.portal.presentation.impl.ajax.service.PortletServiceImpl"/>
+</module>
Added: branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/Portal.gwt.xml
===================================================================
--- branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/Portal.gwt.xml (rev 0)
+++ branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/Portal.gwt.xml 2007-11-16 16:47:30 UTC (rev 8976)
@@ -0,0 +1,12 @@
+<module>
+ <!-- Inherit the core Web Toolkit stuff -->
+ <inherits name="com.google.gwt.user.User"/>
+ <!-- Inherit the MyGWT toolkit -->
+ <inherits name='net.mygwt.ui.MyGWT'/>
+
+ <!-- Specify the app entry point class -->
+ <entry-point class="org.jboss.portal.presentation.ajax.client.Portal"/>
+
+ <!-- RPC related configuration. This is used only in Hosted Mode -->
+ <servlet path="/portalrpc" class="org.jboss.portal.presentation.test.ajax.HostedModeProxy"/>
+</module>
Added: branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/PortalLayout.gwt.xml
===================================================================
--- branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/PortalLayout.gwt.xml (rev 0)
+++ branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/PortalLayout.gwt.xml 2007-11-16 16:47:30 UTC (rev 8976)
@@ -0,0 +1,10 @@
+<module>
+ <!-- Inherit the core Web Toolkit stuff -->
+ <inherits name="com.google.gwt.user.User"/>
+
+ <!-- Specify the app entry point class -->
+ <entry-point class="org.jboss.portal.presentation.ajax.client.PortalLayout"/>
+
+ <!-- RPC related configuration -->
+ <servlet path="/portletService" class="org.jboss.portal.presentation.impl.ajax.service.PortletServiceImpl"/>
+</module>
Added: branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/asyncPages.html
===================================================================
--- branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/asyncPages.html (rev 0)
+++ branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/asyncPages.html 2007-11-16 16:47:30 UTC (rev 8976)
@@ -0,0 +1,27 @@
+<html>
+ <head>
+
+ <!-- -->
+ <!-- Any title is fine -->
+ <!-- -->
+ <title>JBoss Portal</title>
+
+ <link href="portal.css" rel="stylesheet" type="text/css">
+
+ <!-- -->
+ <!-- This script loads your compiled module. -->
+ <!-- If you add any GWT meta tags, they must -->
+ <!-- be added before this line. -->
+ <!-- -->
+ <script language='javascript' src='prototype.js'></script>
+ <script language='javascript' src='org.jboss.portal.presentation.ajax.AsyncPages.nocache.js'></script>
+ </head>
+
+ <!-- -->
+ <!-- The body can have arbitrary html, or -->
+ <!-- you can leave the body empty if you want -->
+ <!-- to create a completely dynamic ui -->
+ <!-- -->
+ <body>
+ </body>
+</html>
Added: branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/cmsPortlet.html
===================================================================
--- branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/cmsPortlet.html (rev 0)
+++ branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/cmsPortlet.html 2007-11-16 16:47:30 UTC (rev 8976)
@@ -0,0 +1,81 @@
+<style type="text/css">
+ #welcomelogo {
+ float: left;
+ margin: 30px 0px 30px 15px;
+ }
+
+ #welcometext {
+ margin: 30px 50px 30px 225px;
+ }
+
+ #welcomegreybox {
+ padding: 15px;
+ margin-bottom: 30px;
+ }
+
+ #welcomegreyboxTD {
+ border-left: 1px solid #d5d5d5;
+ padding-left: 15px;
+ }
+
+ #welcomegreybox h3 {
+ color: #5078aa;
+ font: bold 13px Helvetica, Arial, sans-serif;
+ }
+</style>
+
+<!--
+<div>
+ <img src="/portal/content/default/images/homeimg_main.png" width="560" height="160"/>
+</div>
+-->
+
+<!--
+<div id="welcomelogo"><img src="/portal/content/default/images/homeimg_jbosslogo.png" width="143" height="64"/></div>
+-->
+
+
+<p id="welcometext">JBoss Portal provides an open source platform for hosting and serving a portal Web interface,
+ publishing and managing its content, and customizing its experience. While most packaged Portal frameworks help
+ enterprises launch Portals more quickly, only JBoss Portal delivers the benefits of a zero-cost open source license
+ combined with a flexible and scalable underling platform.</p>
+
+<div id="welcomegreybox">
+ <table width="100%">
+ <tr>
+ <td valign="top"><h3>Support Services</h3>
+ <p>
+ JBoss Inc. offers various support services tailored to fit your needs. <a href="portal/index.html">Explore</a>
+ support and service options for JBoss Portal.
+ </p>
+ </td>
+ <td valign="top" id="welcomegreyboxTD"><h3>PortletSwap</h3>
+ <p>
+ <a href="http://www.portletswap.com">Portletswap.com</a> is an open community sponsored by JBoss, Inc. to facilitate the exchange of portlets and layouts for use in JBoss Portal.
+ </p>
+ </td>
+ <td valign="top" id="welcomegreyboxTD"><h3>Project Information</h3>
+ <p>Learn more about the <a href="/portal/index.html">JBoss Portal project</a>, on-going development, open
+ issues, and our
+ user and developer communities.
+ </p>
+ </td>
+ </tr>
+ </table>
+
+</div>
+<p>Thank you for downloading and deploying JBoss Portal. We hope your enjoy working with it as much as we enjoy
+ developing it!</p>
+<p>Baci e abbracci,<br/>
+ The JBoss Portal Team.
+</p>
+
+<br/>
+
+<div>
+ <form name="testForm" method="post" action="portal/index.html">
+ <span>Param1:</span><input type="text" name="param1"/><br/>
+ <span>Param2:</span><input type="text" name="param2"/><br/>
+ <input type="submit"/>
+ </form>
+</div>
\ No newline at end of file
Added: branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/images/ico_16_maximize.gif
===================================================================
(Binary files differ)
Property changes on: branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/images/ico_16_maximize.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/images/ico_16_minimize.gif
===================================================================
(Binary files differ)
Property changes on: branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/images/ico_16_minimize.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/images/ico_16_normal.gif
===================================================================
(Binary files differ)
Property changes on: branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/images/ico_16_normal.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/index.html
===================================================================
--- branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/index.html (rev 0)
+++ branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/index.html 2007-11-16 16:47:30 UTC (rev 8976)
@@ -0,0 +1,27 @@
+<html>
+ <head>
+
+ <!-- -->
+ <!-- Any title is fine -->
+ <!-- -->
+ <title>JBoss Portal</title>
+
+ <link href="portal.css" rel="stylesheet" type="text/css">
+
+ <!-- -->
+ <!-- This script loads your compiled module. -->
+ <!-- If you add any GWT meta tags, they must -->
+ <!-- be added before this line. -->
+ <!-- -->
+ <script language='javascript' src='prototype.js'></script>
+ <script language='javascript' src='org.jboss.portal.presentation.ajax.Portal.nocache.js'></script>
+ </head>
+
+ <!-- -->
+ <!-- The body can have arbitrary html, or -->
+ <!-- you can leave the body empty if you want -->
+ <!-- to create a completely dynamic ui -->
+ <!-- -->
+ <body>
+ </body>
+</html>
Added: branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/jspPortlet.html
===================================================================
--- branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/jspPortlet.html (rev 0)
+++ branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/jspPortlet.html 2007-11-16 16:47:30 UTC (rev 8976)
@@ -0,0 +1,42 @@
+<div class="portlet-container"><table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td class="portlet-titlebar-left"></td><td class="portlet-titlebar-center"><div class="portlet-titlebar-decoration"></div><span class="portlet-titlebar-title">Greetings!</span><div class="portlet-mode-container"><span title="minimized"><a class="portlet-mode-minimized" href="/portal/portal/default/default/JSPPortletWindow?windowstate=minimized"> </a></span><span title="maximized"><a class="portlet-mode-maximized" href="/portal/portal/default/default/JSPPortletWindow?windowstate=maximized"> </a></span></div></td><td class="portlet-titlebar-right"></td></tr><tr><td class="portlet-content-left"></td><td class="portlet-body"><div class="portlet-content-center">
+
+<table border="0" cellspacing="2" cellpadding="2">
+ <tr>
+ <td align="center"><a href="http://portal.demo.jboss.com" target="_blank"><img
+ src="/portal-jsp-samples/images/dodemo.gif" border="0"
+ alt="Try the latest release of JBoss Portal, live and online."></a>
+ <a href="http://labs.jboss.com/portal/jbossportal/download/index.html" target="_blank"><img
+ src="/portal-jsp-samples/images/getcode.gif" border="0"
+ alt="Download JBoss Portal and have it up and running in minutes."></a>
+ <a href="http://www.portletswap.com" target="_blank"><img
+ src="/portal-jsp-samples/images/accessorize.gif" border="0"
+ alt="Download portlets and layouts for your new JBoss Portal installation."></a></td>
+ </tr>
+ <tr>
+
+ <td></td>
+ </tr>
+ <tr>
+ <td class="portlet-section-alternate">
+ <font class="portlet-font">This is a basic installation of <b>JBoss Portal 2.8.0-SNAPSHOT</b>. You may
+ log in at any time, using the <i>Login</i> link at the top-right of this page, with the following
+ credentials:</font>
+ </td>
+
+ </tr>
+ <tr>
+ <td class="portlet-section-alternate" align="center">
+ <b>user/user</b> or <b>admin/admin</b>
+ </td>
+ </tr>
+ <tr>
+
+ <td align="center">
+ If you are in need of guidance with regards to navigating, configuring, or operating the portal, please view
+ our <a href="http://labs.jboss.com/portal/jbossportal/docs/index.html" target="_blank">online documentation</a>.
+ </td>
+ </tr>
+</table>
+</div></td><td class="portlet-content-right"></td></tr><tr><td class="portlet-footer-left"></td><td class="portlet-footer-center"></td><td class="portlet-footer-right"></td></tr></table>
+
+</div>
\ No newline at end of file
Added: branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/layout.html
===================================================================
--- branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/layout.html (rev 0)
+++ branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/layout.html 2007-11-16 16:47:30 UTC (rev 8976)
@@ -0,0 +1,59 @@
+<html>
+ <head>
+
+ <!-- -->
+ <!-- Any title is fine -->
+ <!-- -->
+ <title>JBoss Portal</title>
+
+ <link href="portal.css" rel="stylesheet" type="text/css">
+
+ <!-- -->
+ <!-- This script loads your compiled module. -->
+ <!-- If you add any GWT meta tags, they must -->
+ <!-- be added before this line. -->
+ <!-- -->
+ <script language='javascript' src='prototype.js'></script>
+ <script language='javascript' src='org.jboss.portal.presentation.ajax.PortalLayout.nocache.js'></script>
+ </head>
+
+ <!-- -->
+ <!-- The body can have arbitrary html, or -->
+ <!-- you can leave the body empty if you want -->
+ <!-- to create a completely dynamic ui -->
+ <!-- -->
+ <body>
+ <!-- OPTIONAL: include this if you want history support -->
+ <iframe src="javascript:''" id="__gwt_historyFrame" style="width:0;height:0;border:0"></iframe>
+
+ <h1>JBoss Portal</h1>
+
+ <!-- Portal Portlet Layout capabilities Proof of Concept -->
+ <p>
+ Testing Vertical Column based Portlet Layout
+ </p>
+ <table align="center">
+ <tr>
+ <td id="leftPanel"></td>
+ <td id="centerPanel"></td>
+ <td id="rightPanel"></td>
+ </tr>
+ </table>
+
+ <p>
+ Testing Flexible Grid based Portlet Layout
+ </p>
+ <table align="center">
+ <tr>
+ <td id="cmsPortlet"></td>
+ <td id="jspPortlet"></td>
+ <td id="weatherPortlet"></td>
+ </tr>
+ </table>
+ <table align="center">
+ <tr>
+ <td id="flexGrid"></td>
+ </tr>
+ </table>
+ </body>
+</html>
Added: branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/mygwt.html
===================================================================
--- branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/mygwt.html (rev 0)
+++ branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/mygwt.html 2007-11-16 16:47:30 UTC (rev 8976)
@@ -0,0 +1,30 @@
+<html>
+ <head>
+ <title>JBoss Portal</title>
+
+ <!-- portal styles defined here -->
+ <link href="portal.css" rel="stylesheet" type="text/css">
+
+ <!-- -->
+ <!-- This script loads your compiled module. -->
+ <!-- If you add any GWT meta tags, they must -->
+ <!-- be added before this line. -->
+ <!-- -->
+ <script language='javascript' src='org.jboss.portal.presentation.ajax.MyGWT.nocache.js'></script>
+ </head>
+
+ <!-- -->
+ <!-- The body can have arbitrary html, or -->
+ <!-- you can leave the body empty if you want -->
+ <!-- to create a completely dynamic ui -->
+ <!-- -->
+ <body>
+ <!-- MyGWT Proof of Concept -->
+ <h1>MyGWT Prototype</h1><br/>
+ <table align="center">
+ <tr>
+ <td id="currentPage"></td>
+ </tr>
+ </table>
+ </body>
+</html>
Added: branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/partialRefresh.html
===================================================================
--- branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/partialRefresh.html (rev 0)
+++ branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/partialRefresh.html 2007-11-16 16:47:30 UTC (rev 8976)
@@ -0,0 +1,41 @@
+<html>
+ <head>
+
+ <!-- -->
+ <!-- Any title is fine -->
+ <!-- -->
+ <title>JBoss Portal</title>
+
+ <link href="portal.css" rel="stylesheet" type="text/css">
+
+ <!-- -->
+ <!-- This script loads your compiled module. -->
+ <!-- If you add any GWT meta tags, they must -->
+ <!-- be added before this line. -->
+ <!-- -->
+ <script language='javascript' src='prototype.js'></script>
+ <script language='javascript' src='org.jboss.portal.presentation.ajax.PartialRefresh.nocache.js'></script>
+ </head>
+
+ <!-- -->
+ <!-- The body can have arbitrary html, or -->
+ <!-- you can leave the body empty if you want -->
+ <!-- to create a completely dynamic ui -->
+ <!-- -->
+ <body>
+ <!-- OPTIONAL: include this if you want history support -->
+ <iframe src="javascript:''" id="__gwt_historyFrame" style="width:0;height:0;border:0"></iframe>
+
+ <h1>JBoss Portal</h1>
+
+ <!-- Portal Partial Page Refresh Proof of Concept -->
+ <p>
+ Portal Partial Refresh Proof of Concept
+ </p>
+ <table align="center">
+ <tr>
+ <td id="page"></td>
+ </tr>
+ </table>
+ </body>
+</html>
Added: branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/portal/index.html
===================================================================
--- branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/portal/index.html (rev 0)
+++ branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/portal/index.html 2007-11-16 16:47:30 UTC (rev 8976)
@@ -0,0 +1,76 @@
+<div class="portlet-container"><table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td class="portlet-titlebar-left"></td><td class="portlet-titlebar-center"><div class="portlet-titlebar-decoration"></div><span class="portlet-titlebar-title">Weather Portlet</span><div class="portlet-mode-container"><span title="minimized"><a class="portlet-mode-minimized" href="/portal/portal/default/default/2?windowstate=minimized"> </a></span><span title="maximized"><a class="portlet-mode-maximized" href="/portal/portal/default/default/2?windowstate=maximized"> </a></span></div></td><td class="portlet-titlebar-right"></td></tr><tr><td class="portlet-content-left"></td><td class="portlet-body"><div class="portlet-content-center"><br/>
+<div align="center">
+<font>
+<b>Miami, FL, US</b>
+</font>
+
+<br/>
+<br/>
+<table border="0" width="130">
+<tr>
+<td>
+<table height="130" border="0">
+<tr>
+<td align="center" class="portlet-section-header">Currently</td>
+</tr>
+<tr>
+<td valign="top" align="center" class="portlet-section-alternate">
+<img src="http://us.i1.yimg.com/us.yimg.com/i/us/we/52//28.gif"/>
+</td>
+</tr>
+<tr>
+<td valign="top" align="center" class="portlet-section-alternate">Mostly Cloudy</td>
+
+</tr>
+<tr>
+<td valign="top" align="center" class="portlet-section-alternate">86F</td>
+</tr>
+</table>
+</td>
+<td>
+<table height="130" border="0">
+<tr>
+<td valign="top" align="center" class="portlet-section-header">Thu</td>
+</tr>
+<tr>
+<td valign="top" align="center" class="portlet-section-alternate">
+<img src="http://us.i1.yimg.com/us.yimg.com/i/us/we/52//38.gif"/>
+</td>
+
+</tr>
+<tr>
+<td valign="top" align="center" class="portlet-section-alternate">Scattered Thunderstorms</td>
+</tr>
+<tr>
+<td valign="top" align="center" class="portlet-section-alternate">76F/86F</td>
+</tr>
+</table>
+</td>
+<td>
+<table height="130" border="0">
+<tr>
+<td valign="top" align="center" class="portlet-section-header">Fri</td>
+</tr>
+
+<tr>
+<td valign="top" align="center" class="portlet-section-alternate">
+<img src="http://us.i1.yimg.com/us.yimg.com/i/us/we/52//38.gif"/>
+</td>
+</tr>
+<tr>
+<td valign="top" align="center" class="portlet-section-alternate">Scattered Thunderstorms</td>
+</tr>
+<tr>
+<td valign="top" align="center" class="portlet-section-alternate">78F/89F</td>
+</tr>
+</table>
+</td>
+</tr>
+</table>
+
+<br/>
+<a target="_blank" href="http://us.rd.yahoo.com/dailynews/rss/weather/Miami__FL/*http://weather.ya...">Complete Forecast</a>
+</div>
+</div></td><td class="portlet-content-right"></td></tr><tr><td class="portlet-footer-left"></td><td class="portlet-footer-center"></td><td class="portlet-footer-right"></td></tr></table>
+
+</div>
\ No newline at end of file
Added: branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/portal.css
===================================================================
--- branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/portal.css (rev 0)
+++ branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/portal.css 2007-11-16 16:47:30 UTC (rev 8976)
@@ -0,0 +1,480 @@
+body {
+ background-color: white;
+ color: black;
+ font-family: Helvetica, Arial, sans-serif;
+ font-size: 10pt;
+ margin: 0px 20px 20px 20px;
+}
+
+h2 {
+ font-weight: normal;
+}
+
+table {
+ font-size: 100%;
+}
+
+code {
+ font-size: small;
+}
+
+a {
+ color: darkblue;
+}
+
+a:visited {
+ color: darkblue;
+}
+/*----------------Client-Side Ajax Agent styles-------------------------------------------------------------------------------------------------------------------------------*/
+.window-normal-button{
+ background: url(images/ico_16_normal.gif);
+}
+
+.window-minimize-button{
+ background: url(images/ico_16_minimize.gif);
+}
+
+.window-maximize-button{
+ background: url(images/ico_16_maximize.gif);
+}
+/*-------------Core GWT styles------------------------------------------------------------------------------------------------------------------------------------*/
+.gwt-BorderedPanel {
+}
+
+.gwt-Button {
+ background:#f5f5f5;
+ border:1px solid #aaa;
+ border-top:1px solid #ddd;
+ border-left:1px solid #ddd;
+ padding: 2px;
+ width: 12em;
+}
+
+.gwt-Button:active {
+ border:1px solid #aaa;
+ border-bottom:1px solid #ccc;
+ border-right:1px solid #ccc;
+}
+
+.gwt-Button[disabled] {
+ background: #ccc;
+ border:1px solid #999;
+ border-top:1px solid #ccc;
+ border-left:1px solid #ccc;
+ color: #888;
+}
+
+.gwt-Canvas {
+}
+
+.gwt-CheckBox {
+}
+
+.gwt-DialogBox {
+ border: 2px outset;
+ background-color: white;
+}
+
+.gwt-DialogBox .Caption {
+ background-color: #C3D9FF;
+ padding: 3px;
+ margin: 2px;
+ font-weight: bold;
+ cursor: default;
+}
+
+.gwt-FileUpload {
+}
+
+.gwt-Frame {
+}
+
+.gwt-HTML {
+}
+
+.gwt-Hyperlink {
+}
+
+.gwt-Image {
+}
+
+.gwt-Label {
+}
+
+.gwt-ListBox {
+}
+
+.gwt-MenuBar {
+ background-color: #C3D9FF;
+ border: 1px solid #87B3FF;
+ cursor: default;
+}
+
+.gwt-MenuBar .gwt-MenuItem {
+ padding: 1px 4px 1px 4px;
+ cursor: default;
+}
+
+.gwt-MenuBar .gwt-MenuItem-selected {
+ background-color: #E8EEF7;
+}
+
+.gwt-PasswordTextBox {
+}
+
+.gwt-RadioButton {
+}
+
+.gwt-TabPanel {
+ margin-top: 4px;
+}
+
+.gwt-TabPanelBottom {
+ background-color: #E8EEF7;
+}
+
+.gwt-TabBar {
+ padding-top: 2px;
+ border-bottom: 4px solid #87B3FF;
+ background-color: #fff;
+}
+
+.gwt-TabBar .gwt-TabBarFirst {
+}
+
+.gwt-TabBar .gwt-TabBarRest {
+}
+
+.gwt-TabBar .gwt-TabBarItem {
+ padding: 4px;
+ cursor: pointer;
+ cursor: hand;
+
+ background-color: #e8eef7;
+ border-bottom: 2px solid white;
+ margin-right: 2px;
+}
+
+.gwt-TabBar .gwt-TabBarItem-selected {
+ padding: 4px;
+ font-weight: bold;
+ cursor: default;
+
+ background-color: #87b3ff;
+ border-bottom: 2px solid #87b3ff;
+ margin-right: 2px;
+}
+
+.gwt-TextArea {
+}
+
+.gwt-TextBox {
+}
+
+.gwt-TextBox-readonly {
+ color: #888;
+}
+
+.gwt-Tree {
+ background: white;
+}
+
+.gwt-Tree .gwt-TreeItem {
+}
+
+.gwt-Tree .gwt-TreeItem-selected {
+ background-color: #C3D9FF;
+}
+
+.gwt-StackPanel {
+}
+
+.gwt-StackPanel .gwt-StackPanelItem {
+ background-color: #C3D9FF;
+ cursor: pointer;
+ cursor: hand;
+}
+
+.gwt-StackPanel .gwt-StackPanelItem-selected {
+}
+
+.gwt-PushButton-up {
+ background-color: #C3D9FF;
+ padding: 2px;
+ border: 2px solid transparent;
+ border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205) rgb(232, 241, 255);
+ cursor: pointer;
+ cursor: hand;
+}
+
+.gwt-PushButton-up-hovering {
+ background-color: #C3D9FF;
+ padding: 2px;
+ border: 2px solid transparent;
+ border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205) rgb(232, 241, 255);
+ cursor: pointer;
+ cursor: hand;
+}
+
+.gwt-PushButton-down {
+ background-color: #C3D9FF;
+ padding: 2px;
+ border: 2px solid transparent;
+ border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174, 205);
+ cursor: pointer;
+ cursor: hand;
+}
+
+.gwt-PushButton-down-hovering {
+ background-color: #C3D9FF;
+ padding: 2px;
+ border: 2px solid transparent;
+ border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174, 205);
+ cursor: pointer;
+ cursor: hand;
+}
+
+.gwt-ToggleButton-up {
+ background-color: #C3D9FF;
+ padding: 2px;
+ border: 2px solid transparent;
+ border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205) rgb(232, 241, 255);
+ cursor: pointer;
+ cursor: hand;
+}
+
+.gwt-ToggleButton-up-hovering {
+ background-color: #C3D9FF;
+ padding: 2px;
+ border: 2px solid transparent;
+ border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205) rgb(232, 241, 255);
+ cursor: pointer;
+ cursor: hand;
+}
+
+.gwt-ToggleButton-down {
+ background-color: #C3D9FF;
+ padding: 2px;
+ background-color: #E8F1FF;
+ border: 2px solid transparent;
+ border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174, 205);
+ cursor: pointer;
+ cursor: hand;
+}
+
+.gwt-ToggleButton-down-hovering {
+ background-color: #C3D9FF;
+ padding: 2px;
+ background-color: #E8F1FF;
+ border: 2px solid transparent;
+ border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174, 205);
+ cursor: pointer;
+ cursor: hand;
+}
+
+.gwt-RichTextArea {
+ border: 1px solid black;
+ background-color: white;
+}
+
+.gwt-RichTextToolbar {
+ background-color: #C3D9FF;
+ padding: 2px;
+}
+
+.gwt-RichTextToolbar .gwt-PushButton-up {
+ margin-right: 2px;
+ border: 1px solid #C3D9FF;
+}
+
+.gwt-RichTextToolbar .gwt-PushButton-up-hovering {
+ margin-right: 2px;
+ border: 1px solid #C3D9FF;
+ border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205) rgb(232, 241, 255);
+}
+
+.gwt-RichTextToolbar .gwt-PushButton-down {
+ margin-right: 2px;
+ border: 1px solid #C3D9FF;
+ border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174, 205);
+}
+
+.gwt-RichTextToolbar .gwt-PushButton-down-hovering {
+ margin-right: 2px;
+ border: 1px solid #C3D9FF;
+ border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174, 205);
+}
+
+.gwt-RichTextToolbar .gwt-ToggleButton-up {
+ margin-right: 2px;
+ border: 1px solid #C3D9FF;
+}
+
+.gwt-RichTextToolbar .gwt-ToggleButton-up-hovering {
+ margin-right: 2px;
+ border: 1px solid #C3D9FF;
+ border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205) rgb(232, 241, 255);
+}
+
+.gwt-RichTextToolbar .gwt-ToggleButton-down {
+ margin-right: 2px;
+ background-color: #E8F1FF;
+ border: 1px solid #C3D9FF;
+ border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174, 205);
+}
+
+.gwt-RichTextToolbar .gwt-ToggleButton-down-hovering {
+ margin-right: 2px;
+ background-color: #E8F1FF;
+ border: 1px solid #C3D9FF;
+ border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174, 205);
+}
+
+.gwt-HorizontalSplitPanel {
+ border: 8px solid #C3D9FF;
+}
+
+.gwt-HorizontalSplitPanel .hsplitter {
+ background-color: #C3D9FF;
+ cursor: move;
+}
+
+.gwt-HorizontalSplitPanel .left {
+ background-color: #E8EEF7;
+}
+
+.gwt-VerticalSplitPanel {
+}
+
+.gwt-VerticalSplitPanel .splitter {
+ background-color: #C3D9FF;
+ height: 8px;
+ cursor: move;
+}
+
+.gwt-SuggestBoxPopup {
+ border: 2px solid #C3D9FF;
+}
+
+.gwt-SuggestBoxPopup .item {
+ padding: 2px;
+}
+
+.gwt-SuggestBoxPopup .item-selected {
+ background-color: #C3D9FF;
+ padding: 2px;
+}
+
+.ks-Sink {
+ width: 100%;
+ height: 24em;
+}
+
+.ks-Info {
+ color: white;
+ padding: 20px 10px 20px 40px;
+ margin-bottom: 10px;
+}
+
+.ks-List {
+}
+
+.ks-List .gwt-Image {
+ position: relative;
+ top: 8px;
+}
+
+.ks-List .ks-SinkItem a {
+ text-decoration: none;
+ color: white;
+}
+
+.ks-List .ks-SinkItem-selected a {
+ text-decoration: none;
+ color: white;
+}
+
+.ks-List .ks-FirstSinkItem a {
+ text-decoration: none;
+ color: white;
+}
+
+.ks-List .ks-FirstSinkItem-selected a {
+ text-decoration: none;
+ color: white;
+}
+
+.ks-List .ks-SinkItem {
+ background: #c6cab7;
+ padding: 4px;
+ padding-left: 16px;
+ padding-right: 16px;
+ margin-right: 3px;
+ border-bottom: 3px solid white;
+ cursor: pointer;
+ cursor: hand;
+}
+
+.ks-List .ks-SinkItem-selected {
+ background: #c6cab7;
+ padding: 4px;
+ padding-left: 16px;
+ padding-right: 16px;
+ margin-right: 3px;
+ padding-bottom: 7px;
+}
+
+.ks-List .ks-FirstSinkItem {
+ background: #c6cab7 url(images/corner.gif) no-repeat top left;
+ padding: 4px;
+ padding-left: 16px;
+ padding-right: 16px;
+ margin-right: 3px;
+ border-bottom: 3px solid white;
+ cursor: pointer;
+ cursor: hand;
+}
+
+.ks-List .ks-FirstSinkItem-selected {
+ background: #c3d9ff url(images/corner.gif) no-repeat top left;
+ padding: 4px;
+ padding-left: 16px;
+ padding-right: 16px;
+ margin-right: 3px;
+ padding-bottom: 7px;
+}
+
+.ks-images-Image {
+ margin: 8px;
+}
+
+.ks-images-Button {
+ margin: 8px;
+ cursor: pointer;
+ cursor: hand;
+}
+
+.ks-layouts {
+ margin: 8px;
+}
+
+.ks-layouts-Label {
+ background-color: #C3D9FF;
+ font-weight: bold;
+ margin-top: 1em;
+ padding: 2px 0px 2px 0px;
+ width: 100%;
+}
+
+.ks-layouts-Scroller {
+ height: 128px;
+ border: 2px solid #C3D9FF;
+ padding: 8px;
+ margin: 8px;
+}
+
+.ks-popups-Popup {
+ background-color: white;
+ border: 1px solid #87B3FF;
+ padding: 4px;
+}
Added: branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/prototype.js
===================================================================
--- branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/prototype.js (rev 0)
+++ branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/prototype.js 2007-11-16 16:47:30 UTC (rev 8976)
@@ -0,0 +1,2515 @@
+/* Prototype JavaScript framework, version 1.5.0
+ * (c) 2005-2007 Sam Stephenson
+ *
+ * Prototype is freely distributable under the terms of an MIT-style license.
+ * For details, see the Prototype web site: http://prototype.conio.net/
+ *
+/*--------------------------------------------------------------------------*/
+
+var Prototype = {
+ Version: '1.5.0',
+ BrowserFeatures: {
+ XPath: !!document.evaluate
+ },
+
+ ScriptFragment: '(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)',
+ emptyFunction: function() {},
+ K: function(x) { return x }
+}
+
+var Class = {
+ create: function() {
+ return function() {
+ this.initialize.apply(this, arguments);
+ }
+ }
+}
+
+var Abstract = new Object();
+
+Object.extend = function(destination, source) {
+ for (var property in source) {
+ destination[property] = source[property];
+ }
+ return destination;
+}
+
+Object.extend(Object, {
+ inspect: function(object) {
+ try {
+ if (object === undefined) return 'undefined';
+ if (object === null) return 'null';
+ return object.inspect ? object.inspect() : object.toString();
+ } catch (e) {
+ if (e instanceof RangeError) return '...';
+ throw e;
+ }
+ },
+
+ keys: function(object) {
+ var keys = [];
+ for (var property in object)
+ keys.push(property);
+ return keys;
+ },
+
+ values: function(object) {
+ var values = [];
+ for (var property in object)
+ values.push(object[property]);
+ return values;
+ },
+
+ clone: function(object) {
+ return Object.extend({}, object);
+ }
+});
+
+Function.prototype.bind = function() {
+ var __method = this, args = $A(arguments), object = args.shift();
+ return function() {
+ return __method.apply(object, args.concat($A(arguments)));
+ }
+}
+
+Function.prototype.bindAsEventListener = function(object) {
+ var __method = this, args = $A(arguments), object = args.shift();
+ return function(event) {
+ return __method.apply(object, [( event || window.event)].concat(args).concat($A(arguments)));
+ }
+}
+
+Object.extend(Number.prototype, {
+ toColorPart: function() {
+ var digits = this.toString(16);
+ if (this < 16) return '0' + digits;
+ return digits;
+ },
+
+ succ: function() {
+ return this + 1;
+ },
+
+ times: function(iterator) {
+ $R(0, this, true).each(iterator);
+ return this;
+ }
+});
+
+var Try = {
+ these: function() {
+ var returnValue;
+
+ for (var i = 0, length = arguments.length; i < length; i++) {
+ var lambda = arguments[i];
+ try {
+ returnValue = lambda();
+ break;
+ } catch (e) {}
+ }
+
+ return returnValue;
+ }
+}
+
+/*--------------------------------------------------------------------------*/
+
+var PeriodicalExecuter = Class.create();
+PeriodicalExecuter.prototype = {
+ initialize: function(callback, frequency) {
+ this.callback = callback;
+ this.frequency = frequency;
+ this.currentlyExecuting = false;
+
+ this.registerCallback();
+ },
+
+ registerCallback: function() {
+ this.timer = setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);
+ },
+
+ stop: function() {
+ if (!this.timer) return;
+ clearInterval(this.timer);
+ this.timer = null;
+ },
+
+ onTimerEvent: function() {
+ if (!this.currentlyExecuting) {
+ try {
+ this.currentlyExecuting = true;
+ this.callback(this);
+ } finally {
+ this.currentlyExecuting = false;
+ }
+ }
+ }
+}
+String.interpret = function(value){
+ return value == null ? '' : String(value);
+}
+
+Object.extend(String.prototype, {
+ gsub: function(pattern, replacement) {
+ var result = '', source = this, match;
+ replacement = arguments.callee.prepareReplacement(replacement);
+
+ while (source.length > 0) {
+ if (match = source.match(pattern)) {
+ result += source.slice(0, match.index);
+ result += String.interpret(replacement(match));
+ source = source.slice(match.index + match[0].length);
+ } else {
+ result += source, source = '';
+ }
+ }
+ return result;
+ },
+
+ sub: function(pattern, replacement, count) {
+ replacement = this.gsub.prepareReplacement(replacement);
+ count = count === undefined ? 1 : count;
+
+ return this.gsub(pattern, function(match) {
+ if (--count < 0) return match[0];
+ return replacement(match);
+ });
+ },
+
+ scan: function(pattern, iterator) {
+ this.gsub(pattern, iterator);
+ return this;
+ },
+
+ truncate: function(length, truncation) {
+ length = length || 30;
+ truncation = truncation === undefined ? '...' : truncation;
+ return this.length > length ?
+ this.slice(0, length - truncation.length) + truncation : this;
+ },
+
+ strip: function() {
+ return this.replace(/^\s+/, '').replace(/\s+$/, '');
+ },
+
+ stripTags: function() {
+ return this.replace(/<\/?[^>]+>/gi, '');
+ },
+
+ stripScripts: function() {
+ return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), '');
+ },
+
+ extractScripts: function() {
+ var matchAll = new RegExp(Prototype.ScriptFragment, 'img');
+ var matchOne = new RegExp(Prototype.ScriptFragment, 'im');
+ return (this.match(matchAll) || []).map(function(scriptTag) {
+ return (scriptTag.match(matchOne) || ['', ''])[1];
+ });
+ },
+
+ evalScripts: function() {
+ return this.extractScripts().map(function(script) { return eval(script) });
+ },
+
+ escapeHTML: function() {
+ var div = document.createElement('div');
+ var text = document.createTextNode(this);
+ div.appendChild(text);
+ return div.innerHTML;
+ },
+
+ unescapeHTML: function() {
+ var div = document.createElement('div');
+ div.innerHTML = this.stripTags();
+ return div.childNodes[0] ? (div.childNodes.length > 1 ?
+ $A(div.childNodes).inject('',function(memo,node){ return memo+node.nodeValue }) :
+ div.childNodes[0].nodeValue) : '';
+ },
+
+ toQueryParams: function(separator) {
+ var match = this.strip().match(/([^?#]*)(#.*)?$/);
+ if (!match) return {};
+
+ return match[1].split(separator || '&').inject({}, function(hash, pair) {
+ if ((pair = pair.split('='))[0]) {
+ var name = decodeURIComponent(pair[0]);
+ var value = pair[1] ? decodeURIComponent(pair[1]) : undefined;
+
+ if (hash[name] !== undefined) {
+ if (hash[name].constructor != Array)
+ hash[name] = [hash[name]];
+ if (value) hash[name].push(value);
+ }
+ else hash[name] = value;
+ }
+ return hash;
+ });
+ },
+
+ toArray: function() {
+ return this.split('');
+ },
+
+ succ: function() {
+ return this.slice(0, this.length - 1) +
+ String.fromCharCode(this.charCodeAt(this.length - 1) + 1);
+ },
+
+ camelize: function() {
+ var parts = this.split('-'), len = parts.length;
+ if (len == 1) return parts[0];
+
+ var camelized = this.charAt(0) == '-'
+ ? parts[0].charAt(0).toUpperCase() + parts[0].substring(1)
+ : parts[0];
+
+ for (var i = 1; i < len; i++)
+ camelized += parts[i].charAt(0).toUpperCase() + parts[i].substring(1);
+
+ return camelized;
+ },
+
+ capitalize: function(){
+ return this.charAt(0).toUpperCase() + this.substring(1).toLowerCase();
+ },
+
+ underscore: function() {
+ return this.gsub(/::/, '/').gsub(/([A-Z]+)([A-Z][a-z])/,'#{1}_#{2}').gsub(/([a-z\d])([A-Z])/,'#{1}_#{2}').gsub(/-/,'_').toLowerCase();
+ },
+
+ dasherize: function() {
+ return this.gsub(/_/,'-');
+ },
+
+ inspect: function(useDoubleQuotes) {
+ var escapedString = this.replace(/\\/g, '\\\\');
+ if (useDoubleQuotes)
+ return '"' + escapedString.replace(/"/g, '\\"') + '"';
+ else
+ return "'" + escapedString.replace(/'/g, '\\\'') + "'";
+ }
+});
+
+String.prototype.gsub.prepareReplacement = function(replacement) {
+ if (typeof replacement == 'function') return replacement;
+ var template = new Template(replacement);
+ return function(match) { return template.evaluate(match) };
+}
+
+String.prototype.parseQuery = String.prototype.toQueryParams;
+
+var Template = Class.create();
+Template.Pattern = /(^|.|\r|\n)(#\{(.*?)\})/;
+Template.prototype = {
+ initialize: function(template, pattern) {
+ this.template = template.toString();
+ this.pattern = pattern || Template.Pattern;
+ },
+
+ evaluate: function(object) {
+ return this.template.gsub(this.pattern, function(match) {
+ var before = match[1];
+ if (before == '\\') return match[2];
+ return before + String.interpret(object[match[3]]);
+ });
+ }
+}
+
+var $break = new Object();
+var $continue = new Object();
+
+var Enumerable = {
+ each: function(iterator) {
+ var index = 0;
+ try {
+ this._each(function(value) {
+ try {
+ iterator(value, index++);
+ } catch (e) {
+ if (e != $continue) throw e;
+ }
+ });
+ } catch (e) {
+ if (e != $break) throw e;
+ }
+ return this;
+ },
+
+ eachSlice: function(number, iterator) {
+ var index = -number, slices = [], array = this.toArray();
+ while ((index += number) < array.length)
+ slices.push(array.slice(index, index+number));
+ return slices.map(iterator);
+ },
+
+ all: function(iterator) {
+ var result = true;
+ this.each(function(value, index) {
+ result = result && !!(iterator || Prototype.K)(value, index);
+ if (!result) throw $break;
+ });
+ return result;
+ },
+
+ any: function(iterator) {
+ var result = false;
+ this.each(function(value, index) {
+ if (result = !!(iterator || Prototype.K)(value, index))
+ throw $break;
+ });
+ return result;
+ },
+
+ collect: function(iterator) {
+ var results = [];
+ this.each(function(value, index) {
+ results.push((iterator || Prototype.K)(value, index));
+ });
+ return results;
+ },
+
+ detect: function(iterator) {
+ var result;
+ this.each(function(value, index) {
+ if (iterator(value, index)) {
+ result = value;
+ throw $break;
+ }
+ });
+ return result;
+ },
+
+ findAll: function(iterator) {
+ var results = [];
+ this.each(function(value, index) {
+ if (iterator(value, index))
+ results.push(value);
+ });
+ return results;
+ },
+
+ grep: function(pattern, iterator) {
+ var results = [];
+ this.each(function(value, index) {
+ var stringValue = value.toString();
+ if (stringValue.match(pattern))
+ results.push((iterator || Prototype.K)(value, index));
+ })
+ return results;
+ },
+
+ include: function(object) {
+ var found = false;
+ this.each(function(value) {
+ if (value == object) {
+ found = true;
+ throw $break;
+ }
+ });
+ return found;
+ },
+
+ inGroupsOf: function(number, fillWith) {
+ fillWith = fillWith === undefined ? null : fillWith;
+ return this.eachSlice(number, function(slice) {
+ while(slice.length < number) slice.push(fillWith);
+ return slice;
+ });
+ },
+
+ inject: function(memo, iterator) {
+ this.each(function(value, index) {
+ memo = iterator(memo, value, index);
+ });
+ return memo;
+ },
+
+ invoke: function(method) {
+ var args = $A(arguments).slice(1);
+ return this.map(function(value) {
+ return value[method].apply(value, args);
+ });
+ },
+
+ max: function(iterator) {
+ var result;
+ this.each(function(value, index) {
+ value = (iterator || Prototype.K)(value, index);
+ if (result == undefined || value >= result)
+ result = value;
+ });
+ return result;
+ },
+
+ min: function(iterator) {
+ var result;
+ this.each(function(value, index) {
+ value = (iterator || Prototype.K)(value, index);
+ if (result == undefined || value < result)
+ result = value;
+ });
+ return result;
+ },
+
+ partition: function(iterator) {
+ var trues = [], falses = [];
+ this.each(function(value, index) {
+ ((iterator || Prototype.K)(value, index) ?
+ trues : falses).push(value);
+ });
+ return [trues, falses];
+ },
+
+ pluck: function(property) {
+ var results = [];
+ this.each(function(value, index) {
+ results.push(value[property]);
+ });
+ return results;
+ },
+
+ reject: function(iterator) {
+ var results = [];
+ this.each(function(value, index) {
+ if (!iterator(value, index))
+ results.push(value);
+ });
+ return results;
+ },
+
+ sortBy: function(iterator) {
+ return this.map(function(value, index) {
+ return {value: value, criteria: iterator(value, index)};
+ }).sort(function(left, right) {
+ var a = left.criteria, b = right.criteria;
+ return a < b ? -1 : a > b ? 1 : 0;
+ }).pluck('value');
+ },
+
+ toArray: function() {
+ return this.map();
+ },
+
+ zip: function() {
+ var iterator = Prototype.K, args = $A(arguments);
+ if (typeof args.last() == 'function')
+ iterator = args.pop();
+
+ var collections = [this].concat(args).map($A);
+ return this.map(function(value, index) {
+ return iterator(collections.pluck(index));
+ });
+ },
+
+ size: function() {
+ return this.toArray().length;
+ },
+
+ inspect: function() {
+ return '#<Enumerable:' + this.toArray().inspect() + '>';
+ }
+}
+
+Object.extend(Enumerable, {
+ map: Enumerable.collect,
+ find: Enumerable.detect,
+ select: Enumerable.findAll,
+ member: Enumerable.include,
+ entries: Enumerable.toArray
+});
+var $A = Array.from = function(iterable) {
+ if (!iterable) return [];
+ if (iterable.toArray) {
+ return iterable.toArray();
+ } else {
+ var results = [];
+ for (var i = 0, length = iterable.length; i < length; i++)
+ results.push(iterable[i]);
+ return results;
+ }
+}
+
+Object.extend(Array.prototype, Enumerable);
+
+if (!Array.prototype._reverse)
+ Array.prototype._reverse = Array.prototype.reverse;
+
+Object.extend(Array.prototype, {
+ _each: function(iterator) {
+ for (var i = 0, length = this.length; i < length; i++)
+ iterator(this[i]);
+ },
+
+ clear: function() {
+ this.length = 0;
+ return this;
+ },
+
+ first: function() {
+ return this[0];
+ },
+
+ last: function() {
+ return this[this.length - 1];
+ },
+
+ compact: function() {
+ return this.select(function(value) {
+ return value != null;
+ });
+ },
+
+ flatten: function() {
+ return this.inject([], function(array, value) {
+ return array.concat(value && value.constructor == Array ?
+ value.flatten() : [value]);
+ });
+ },
+
+ without: function() {
+ var values = $A(arguments);
+ return this.select(function(value) {
+ return !values.include(value);
+ });
+ },
+
+ indexOf: function(object) {
+ for (var i = 0, length = this.length; i < length; i++)
+ if (this[i] == object) return i;
+ return -1;
+ },
+
+ reverse: function(inline) {
+ return (inline !== false ? this : this.toArray())._reverse();
+ },
+
+ reduce: function() {
+ return this.length > 1 ? this : this[0];
+ },
+
+ uniq: function() {
+ return this.inject([], function(array, value) {
+ return array.include(value) ? array : array.concat([value]);
+ });
+ },
+
+ clone: function() {
+ return [].concat(this);
+ },
+
+ size: function() {
+ return this.length;
+ },
+
+ inspect: function() {
+ return '[' + this.map(Object.inspect).join(', ') + ']';
+ }
+});
+
+Array.prototype.toArray = Array.prototype.clone;
+
+function $w(string){
+ string = string.strip();
+ return string ? string.split(/\s+/) : [];
+}
+
+if(window.opera){
+ Array.prototype.concat = function(){
+ var array = [];
+ for(var i = 0, length = this.length; i < length; i++) array.push(this[i]);
+ for(var i = 0, length = arguments.length; i < length; i++) {
+ if(arguments[i].constructor == Array) {
+ for(var j = 0, arrayLength = arguments[i].length; j < arrayLength; j++)
+ array.push(arguments[i][j]);
+ } else {
+ array.push(arguments[i]);
+ }
+ }
+ return array;
+ }
+}
+var Hash = function(obj) {
+ Object.extend(this, obj || {});
+};
+
+Object.extend(Hash, {
+ toQueryString: function(obj) {
+ var parts = [];
+
+ this.prototype._each.call(obj, function(pair) {
+ if (!pair.key) return;
+
+ if (pair.value && pair.value.constructor == Array) {
+ var values = pair.value.compact();
+ if (values.length < 2) pair.value = values.reduce();
+ else {
+ key = encodeURIComponent(pair.key);
+ values.each(function(value) {
+ value = value != undefined ? encodeURIComponent(value) : '';
+ parts.push(key + '=' + encodeURIComponent(value));
+ });
+ return;
+ }
+ }
+ if (pair.value == undefined) pair[1] = '';
+ parts.push(pair.map(encodeURIComponent).join('='));
+ });
+
+ return parts.join('&');
+ }
+});
+
+Object.extend(Hash.prototype, Enumerable);
+Object.extend(Hash.prototype, {
+ _each: function(iterator) {
+ for (var key in this) {
+ var value = this[key];
+ if (value && value == Hash.prototype[key]) continue;
+
+ var pair = [key, value];
+ pair.key = key;
+ pair.value = value;
+ iterator(pair);
+ }
+ },
+
+ keys: function() {
+ return this.pluck('key');
+ },
+
+ values: function() {
+ return this.pluck('value');
+ },
+
+ merge: function(hash) {
+ return $H(hash).inject(this, function(mergedHash, pair) {
+ mergedHash[pair.key] = pair.value;
+ return mergedHash;
+ });
+ },
+
+ remove: function() {
+ var result;
+ for(var i = 0, length = arguments.length; i < length; i++) {
+ var value = this[arguments[i]];
+ if (value !== undefined){
+ if (result === undefined) result = value;
+ else {
+ if (result.constructor != Array) result = [result];
+ result.push(value)
+ }
+ }
+ delete this[arguments[i]];
+ }
+ return result;
+ },
+
+ toQueryString: function() {
+ return Hash.toQueryString(this);
+ },
+
+ inspect: function() {
+ return '#<Hash:{' + this.map(function(pair) {
+ return pair.map(Object.inspect).join(': ');
+ }).join(', ') + '}>';
+ }
+});
+
+function $H(object) {
+ if (object && object.constructor == Hash) return object;
+ return new Hash(object);
+};
+ObjectRange = Class.create();
+Object.extend(ObjectRange.prototype, Enumerable);
+Object.extend(ObjectRange.prototype, {
+ initialize: function(start, end, exclusive) {
+ this.start = start;
+ this.end = end;
+ this.exclusive = exclusive;
+ },
+
+ _each: function(iterator) {
+ var value = this.start;
+ while (this.include(value)) {
+ iterator(value);
+ value = value.succ();
+ }
+ },
+
+ include: function(value) {
+ if (value < this.start)
+ return false;
+ if (this.exclusive)
+ return value < this.end;
+ return value <= this.end;
+ }
+});
+
+var $R = function(start, end, exclusive) {
+ return new ObjectRange(start, end, exclusive);
+}
+
+var Ajax = {
+ getTransport: function() {
+ return Try.these(
+ function() {return new XMLHttpRequest()},
+ function() {return new ActiveXObject('Msxml2.XMLHTTP')},
+ function() {return new ActiveXObject('Microsoft.XMLHTTP')}
+ ) || false;
+ },
+
+ activeRequestCount: 0
+}
+
+Ajax.Responders = {
+ responders: [],
+
+ _each: function(iterator) {
+ this.responders._each(iterator);
+ },
+
+ register: function(responder) {
+ if (!this.include(responder))
+ this.responders.push(responder);
+ },
+
+ unregister: function(responder) {
+ this.responders = this.responders.without(responder);
+ },
+
+ dispatch: function(callback, request, transport, json) {
+ this.each(function(responder) {
+ if (typeof responder[callback] == 'function') {
+ try {
+ responder[callback].apply(responder, [request, transport, json]);
+ } catch (e) {}
+ }
+ });
+ }
+};
+
+Object.extend(Ajax.Responders, Enumerable);
+
+Ajax.Responders.register({
+ onCreate: function() {
+ Ajax.activeRequestCount++;
+ },
+ onComplete: function() {
+ Ajax.activeRequestCount--;
+ }
+});
+
+Ajax.Base = function() {};
+Ajax.Base.prototype = {
+ setOptions: function(options) {
+ this.options = {
+ method: 'post',
+ asynchronous: true,
+ contentType: 'application/x-www-form-urlencoded',
+ encoding: 'UTF-8',
+ parameters: ''
+ }
+ Object.extend(this.options, options || {});
+
+ this.options.method = this.options.method.toLowerCase();
+ if (typeof this.options.parameters == 'string')
+ this.options.parameters = this.options.parameters.toQueryParams();
+ }
+}
+
+Ajax.Request = Class.create();
+Ajax.Request.Events =
+ ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete'];
+
+Ajax.Request.prototype = Object.extend(new Ajax.Base(), {
+ _complete: false,
+
+ initialize: function(url, options) {
+ this.transport = Ajax.getTransport();
+ this.setOptions(options);
+ this.request(url);
+ },
+
+ request: function(url) {
+ this.url = url;
+ this.method = this.options.method;
+ var params = this.options.parameters;
+
+ if (!['get', 'post'].include(this.method)) {
+ // simulate other verbs over post
+ params['_method'] = this.method;
+ this.method = 'post';
+ }
+
+ params = Hash.toQueryString(params);
+ if (params && /Konqueror|Safari|KHTML/.test(navigator.userAgent)) params += '&_='
+
+ // when GET, append parameters to URL
+ if (this.method == 'get' && params)
+ this.url += (this.url.indexOf('?') > -1 ? '&' : '?') + params;
+
+ try {
+ Ajax.Responders.dispatch('onCreate', this, this.transport);
+
+ this.transport.open(this.method.toUpperCase(), this.url,
+ this.options.asynchronous);
+
+ if (this.options.asynchronous)
+ setTimeout(function() { this.respondToReadyState(1) }.bind(this), 10);
+
+ this.transport.onreadystatechange = this.onStateChange.bind(this);
+ this.setRequestHeaders();
+
+ var body = this.method == 'post' ? (this.options.postBody || params) : null;
+
+ this.transport.send(body);
+
+ /* Force Firefox to handle ready state 4 for synchronous requests */
+ if (!this.options.asynchronous && this.transport.overrideMimeType)
+ this.onStateChange();
+
+ }
+ catch (e) {
+ this.dispatchException(e);
+ }
+ },
+
+ onStateChange: function() {
+ var readyState = this.transport.readyState;
+ if (readyState > 1 && !((readyState == 4) && this._complete))
+ this.respondToReadyState(this.transport.readyState);
+ },
+
+ setRequestHeaders: function() {
+ var headers = {
+ 'X-Requested-With': 'XMLHttpRequest',
+ 'X-Prototype-Version': Prototype.Version,
+ 'Accept': 'text/javascript, text/html, application/xml, text/xml, */*'
+ };
+
+ if (this.method == 'post') {
+ headers['Content-type'] = this.options.contentType +
+ (this.options.encoding ? '; charset=' + this.options.encoding : '');
+
+ /* Force "Connection: close" for older Mozilla browsers to work
+ * around a bug where XMLHttpRequest sends an incorrect
+ * Content-length header. See Mozilla Bugzilla #246651.
+ */
+ if (this.transport.overrideMimeType &&
+ (navigator.userAgent.match(/Gecko\/(\d{4})/) || [0,2005])[1] < 2005)
+ headers['Connection'] = 'close';
+ }
+
+ // user-defined headers
+ if (typeof this.options.requestHeaders == 'object') {
+ var extras = this.options.requestHeaders;
+
+ if (typeof extras.push == 'function')
+ for (var i = 0, length = extras.length; i < length; i += 2)
+ headers[extras[i]] = extras[i+1];
+ else
+ $H(extras).each(function(pair) { headers[pair.key] = pair.value });
+ }
+
+ for (var name in headers)
+ this.transport.setRequestHeader(name, headers[name]);
+ },
+
+ success: function() {
+ return !this.transport.status
+ || (this.transport.status >= 200 && this.transport.status < 300);
+ },
+
+ respondToReadyState: function(readyState) {
+ var state = Ajax.Request.Events[readyState];
+ var transport = this.transport, json = this.evalJSON();
+
+ if (state == 'Complete') {
+ try {
+ this._complete = true;
+ (this.options['on' + this.transport.status]
+ || this.options['on' + (this.success() ? 'Success' : 'Failure')]
+ || Prototype.emptyFunction)(transport, json);
+ } catch (e) {
+ this.dispatchException(e);
+ }
+
+ if ((this.getHeader('Content-type') || 'text/javascript').strip().
+ match(/^(text|application)\/(x-)?(java|ecma)script(;.*)?$/i))
+ this.evalResponse();
+ }
+
+ try {
+ (this.options['on' + state] || Prototype.emptyFunction)(transport, json);
+ Ajax.Responders.dispatch('on' + state, this, transport, json);
+ } catch (e) {
+ this.dispatchException(e);
+ }
+
+ if (state == 'Complete') {
+ // avoid memory leak in MSIE: clean up
+ this.transport.onreadystatechange = Prototype.emptyFunction;
+ }
+ },
+
+ getHeader: function(name) {
+ try {
+ return this.transport.getResponseHeader(name);
+ } catch (e) { return null }
+ },
+
+ evalJSON: function() {
+ try {
+ var json = this.getHeader('X-JSON');
+ return json ? eval('(' + json + ')') : null;
+ } catch (e) { return null }
+ },
+
+ evalResponse: function() {
+ try {
+ return eval(this.transport.responseText);
+ } catch (e) {
+ this.dispatchException(e);
+ }
+ },
+
+ dispatchException: function(exception) {
+ (this.options.onException || Prototype.emptyFunction)(this, exception);
+ Ajax.Responders.dispatch('onException', this, exception);
+ }
+});
+
+Ajax.Updater = Class.create();
+
+Object.extend(Object.extend(Ajax.Updater.prototype, Ajax.Request.prototype), {
+ initialize: function(container, url, options) {
+ this.container = {
+ success: (container.success || container),
+ failure: (container.failure || (container.success ? null : container))
+ }
+
+ this.transport = Ajax.getTransport();
+ this.setOptions(options);
+
+ var onComplete = this.options.onComplete || Prototype.emptyFunction;
+ this.options.onComplete = (function(transport, param) {
+ this.updateContent();
+ onComplete(transport, param);
+ }).bind(this);
+
+ this.request(url);
+ },
+
+ updateContent: function() {
+ var receiver = this.container[this.success() ? 'success' : 'failure'];
+ var response = this.transport.responseText;
+
+ if (!this.options.evalScripts) response = response.stripScripts();
+
+ if (receiver = $(receiver)) {
+ if (this.options.insertion)
+ new this.options.insertion(receiver, response);
+ else
+ receiver.update(response);
+ }
+
+ if (this.success()) {
+ if (this.onComplete)
+ setTimeout(this.onComplete.bind(this), 10);
+ }
+ }
+});
+
+Ajax.PeriodicalUpdater = Class.create();
+Ajax.PeriodicalUpdater.prototype = Object.extend(new Ajax.Base(), {
+ initialize: function(container, url, options) {
+ this.setOptions(options);
+ this.onComplete = this.options.onComplete;
+
+ this.frequency = (this.options.frequency || 2);
+ this.decay = (this.options.decay || 1);
+
+ this.updater = {};
+ this.container = container;
+ this.url = url;
+
+ this.start();
+ },
+
+ start: function() {
+ this.options.onComplete = this.updateComplete.bind(this);
+ this.onTimerEvent();
+ },
+
+ stop: function() {
+ this.updater.options.onComplete = undefined;
+ clearTimeout(this.timer);
+ (this.onComplete || Prototype.emptyFunction).apply(this, arguments);
+ },
+
+ updateComplete: function(request) {
+ if (this.options.decay) {
+ this.decay = (request.responseText == this.lastText ?
+ this.decay * this.options.decay : 1);
+
+ this.lastText = request.responseText;
+ }
+ this.timer = setTimeout(this.onTimerEvent.bind(this),
+ this.decay * this.frequency * 1000);
+ },
+
+ onTimerEvent: function() {
+ this.updater = new Ajax.Updater(this.container, this.url, this.options);
+ }
+});
+function $(element) {
+ if (arguments.length > 1) {
+ for (var i = 0, elements = [], length = arguments.length; i < length; i++)
+ elements.push($(arguments[i]));
+ return elements;
+ }
+ if (typeof element == 'string')
+ element = document.getElementById(element);
+ return Element.extend(element);
+}
+
+if (Prototype.BrowserFeatures.XPath) {
+ document._getElementsByXPath = function(expression, parentElement) {
+ var results = [];
+ var query = document.evaluate(expression, $(parentElement) || document,
+ null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+ for (var i = 0, length = query.snapshotLength; i < length; i++)
+ results.push(query.snapshotItem(i));
+ return results;
+ };
+}
+
+document.getElementsByClassName = function(className, parentElement) {
+ if (Prototype.BrowserFeatures.XPath) {
+ var q = ".//*[contains(concat(' ', @class, ' '), ' " + className + " ')]";
+ return document._getElementsByXPath(q, parentElement);
+ } else {
+ var children = ($(parentElement) || document.body).getElementsByTagName('*');
+ var elements = [], child;
+ for (var i = 0, length = children.length; i < length; i++) {
+ child = children[i];
+ if (Element.hasClassName(child, className))
+ elements.push(Element.extend(child));
+ }
+ return elements;
+ }
+};
+
+/*--------------------------------------------------------------------------*/
+
+if (!window.Element)
+ var Element = new Object();
+
+Element.extend = function(element) {
+ if (!element || _nativeExtensions || element.nodeType == 3) return element;
+
+ if (!element._extended && element.tagName && element != window) {
+ var methods = Object.clone(Element.Methods), cache = Element.extend.cache;
+
+ if (element.tagName == 'FORM')
+ Object.extend(methods, Form.Methods);
+ if (['INPUT', 'TEXTAREA', 'SELECT'].include(element.tagName))
+ Object.extend(methods, Form.Element.Methods);
+
+ Object.extend(methods, Element.Methods.Simulated);
+
+ for (var property in methods) {
+ var value = methods[property];
+ if (typeof value == 'function' && !(property in element))
+ element[property] = cache.findOrStore(value);
+ }
+ }
+
+ element._extended = true;
+ return element;
+};
+
+Element.extend.cache = {
+ findOrStore: function(value) {
+ return this[value] = this[value] || function() {
+ return value.apply(null, [this].concat($A(arguments)));
+ }
+ }
+};
+
+Element.Methods = {
+ visible: function(element) {
+ return $(element).style.display != 'none';
+ },
+
+ toggle: function(element) {
+ element = $(element);
+ Element[Element.visible(element) ? 'hide' : 'show'](element);
+ return element;
+ },
+
+ hide: function(element) {
+ $(element).style.display = 'none';
+ return element;
+ },
+
+ show: function(element) {
+ $(element).style.display = '';
+ return element;
+ },
+
+ remove: function(element) {
+ element = $(element);
+ element.parentNode.removeChild(element);
+ return element;
+ },
+
+ update: function(element, html) {
+ html = typeof html == 'undefined' ? '' : html.toString();
+ $(element).innerHTML = html.stripScripts();
+ setTimeout(function() {html.evalScripts()}, 10);
+ return element;
+ },
+
+ replace: function(element, html) {
+ element = $(element);
+ html = typeof html == 'undefined' ? '' : html.toString();
+ if (element.outerHTML) {
+ element.outerHTML = html.stripScripts();
+ } else {
+ var range = element.ownerDocument.createRange();
+ range.selectNodeContents(element);
+ element.parentNode.replaceChild(
+ range.createContextualFragment(html.stripScripts()), element);
+ }
+ setTimeout(function() {html.evalScripts()}, 10);
+ return element;
+ },
+
+ inspect: function(element) {
+ element = $(element);
+ var result = '<' + element.tagName.toLowerCase();
+ $H({'id': 'id', 'className': 'class'}).each(function(pair) {
+ var property = pair.first(), attribute = pair.last();
+ var value = (element[property] || '').toString();
+ if (value) result += ' ' + attribute + '=' + value.inspect(true);
+ });
+ return result + '>';
+ },
+
+ recursivelyCollect: function(element, property) {
+ element = $(element);
+ var elements = [];
+ while (element = element[property])
+ if (element.nodeType == 1)
+ elements.push(Element.extend(element));
+ return elements;
+ },
+
+ ancestors: function(element) {
+ return $(element).recursivelyCollect('parentNode');
+ },
+
+ descendants: function(element) {
+ return $A($(element).getElementsByTagName('*'));
+ },
+
+ immediateDescendants: function(element) {
+ if (!(element = $(element).firstChild)) return [];
+ while (element && element.nodeType != 1) element = element.nextSibling;
+ if (element) return [element].concat($(element).nextSiblings());
+ return [];
+ },
+
+ previousSiblings: function(element) {
+ return $(element).recursivelyCollect('previousSibling');
+ },
+
+ nextSiblings: function(element) {
+ return $(element).recursivelyCollect('nextSibling');
+ },
+
+ siblings: function(element) {
+ element = $(element);
+ return element.previousSiblings().reverse().concat(element.nextSiblings());
+ },
+
+ match: function(element, selector) {
+ if (typeof selector == 'string')
+ selector = new Selector(selector);
+ return selector.match($(element));
+ },
+
+ up: function(element, expression, index) {
+ return Selector.findElement($(element).ancestors(), expression, index);
+ },
+
+ down: function(element, expression, index) {
+ return Selector.findElement($(element).descendants(), expression, index);
+ },
+
+ previous: function(element, expression, index) {
+ return Selector.findElement($(element).previousSiblings(), expression, index);
+ },
+
+ next: function(element, expression, index) {
+ return Selector.findElement($(element).nextSiblings(), expression, index);
+ },
+
+ getElementsBySelector: function() {
+ var args = $A(arguments), element = $(args.shift());
+ return Selector.findChildElements(element, args);
+ },
+
+ getElementsByClassName: function(element, className) {
+ return document.getElementsByClassName(className, element);
+ },
+
+ readAttribute: function(element, name) {
+ element = $(element);
+ if (document.all && !window.opera) {
+ var t = Element._attributeTranslations;
+ if (t.values[name]) return t.values[name](element, name);
+ if (t.names[name]) name = t.names[name];
+ var attribute = element.attributes[name];
+ if(attribute) return attribute.nodeValue;
+ }
+ return element.getAttribute(name);
+ },
+
+ getHeight: function(element) {
+ return $(element).getDimensions().height;
+ },
+
+ getWidth: function(element) {
+ return $(element).getDimensions().width;
+ },
+
+ classNames: function(element) {
+ return new Element.ClassNames(element);
+ },
+
+ hasClassName: function(element, className) {
+ if (!(element = $(element))) return;
+ var elementClassName = element.className;
+ if (elementClassName.length == 0) return false;
+ if (elementClassName == className ||
+ elementClassName.match(new RegExp("(^|\\s)" + className + "(\\s|$)")))
+ return true;
+ return false;
+ },
+
+ addClassName: function(element, className) {
+ if (!(element = $(element))) return;
+ Element.classNames(element).add(className);
+ return element;
+ },
+
+ removeClassName: function(element, className) {
+ if (!(element = $(element))) return;
+ Element.classNames(element).remove(className);
+ return element;
+ },
+
+ toggleClassName: function(element, className) {
+ if (!(element = $(element))) return;
+ Element.classNames(element)[element.hasClassName(className) ? 'remove' : 'add'](className);
+ return element;
+ },
+
+ observe: function() {
+ Event.observe.apply(Event, arguments);
+ return $A(arguments).first();
+ },
+
+ stopObserving: function() {
+ Event.stopObserving.apply(Event, arguments);
+ return $A(arguments).first();
+ },
+
+ // removes whitespace-only text node children
+ cleanWhitespace: function(element) {
+ element = $(element);
+ var node = element.firstChild;
+ while (node) {
+ var nextNode = node.nextSibling;
+ if (node.nodeType == 3 && !/\S/.test(node.nodeValue))
+ element.removeChild(node);
+ node = nextNode;
+ }
+ return element;
+ },
+
+ empty: function(element) {
+ return $(element).innerHTML.match(/^\s*$/);
+ },
+
+ descendantOf: function(element, ancestor) {
+ element = $(element), ancestor = $(ancestor);
+ while (element = element.parentNode)
+ if (element == ancestor) return true;
+ return false;
+ },
+
+ scrollTo: function(element) {
+ element = $(element);
+ var pos = Position.cumulativeOffset(element);
+ window.scrollTo(pos[0], pos[1]);
+ return element;
+ },
+
+ getStyle: function(element, style) {
+ element = $(element);
+ if (['float','cssFloat'].include(style))
+ style = (typeof element.style.styleFloat != 'undefined' ? 'styleFloat' : 'cssFloat');
+ style = style.camelize();
+ var value = element.style[style];
+ if (!value) {
+ if (document.defaultView && document.defaultView.getComputedStyle) {
+ var css = document.defaultView.getComputedStyle(element, null);
+ value = css ? css[style] : null;
+ } else if (element.currentStyle) {
+ value = element.currentStyle[style];
+ }
+ }
+
+ if((value == 'auto') && ['width','height'].include(style) && (element.getStyle('display') != 'none'))
+ value = element['offset'+style.capitalize()] + 'px';
+
+ if (window.opera && ['left', 'top', 'right', 'bottom'].include(style))
+ if (Element.getStyle(element, 'position') == 'static') value = 'auto';
+ if(style == 'opacity') {
+ if(value) return parseFloat(value);
+ if(value = (element.getStyle('filter') || '').match(/alpha\(opacity=(.*)\)/))
+ if(value[1]) return parseFloat(value[1]) / 100;
+ return 1.0;
+ }
+ return value == 'auto' ? null : value;
+ },
+
+ setStyle: function(element, style) {
+ element = $(element);
+ for (var name in style) {
+ var value = style[name];
+ if(name == 'opacity') {
+ if (value == 1) {
+ value = (/Gecko/.test(navigator.userAgent) &&
+ !/Konqueror|Safari|KHTML/.test(navigator.userAgent)) ? 0.999999 : 1.0;
+ if(/MSIE/.test(navigator.userAgent) && !window.opera)
+ element.style.filter = element.getStyle('filter').replace(/alpha\([^\)]*\)/gi,'');
+ } else if(value === '') {
+ if(/MSIE/.test(navigator.userAgent) && !window.opera)
+ element.style.filter = element.getStyle('filter').replace(/alpha\([^\)]*\)/gi,'');
+ } else {
+ if(value < 0.00001) value = 0;
+ if(/MSIE/.test(navigator.userAgent) && !window.opera)
+ element.style.filter = element.getStyle('filter').replace(/alpha\([^\)]*\)/gi,'') +
+ 'alpha(opacity='+value*100+')';
+ }
+ } else if(['float','cssFloat'].include(name)) name = (typeof element.style.styleFloat != 'undefined') ? 'styleFloat' : 'cssFloat';
+ element.style[name.camelize()] = value;
+ }
+ return element;
+ },
+
+ getDimensions: function(element) {
+ element = $(element);
+ var display = $(element).getStyle('display');
+ if (display != 'none' && display != null) // Safari bug
+ return {width: element.offsetWidth, height: element.offsetHeight};
+
+ // All *Width and *Height properties give 0 on elements with display none,
+ // so enable the element temporarily
+ var els = element.style;
+ var originalVisibility = els.visibility;
+ var originalPosition = els.position;
+ var originalDisplay = els.display;
+ els.visibility = 'hidden';
+ els.position = 'absolute';
+ els.display = 'block';
+ var originalWidth = element.clientWidth;
+ var originalHeight = element.clientHeight;
+ els.display = originalDisplay;
+ els.position = originalPosition;
+ els.visibility = originalVisibility;
+ return {width: originalWidth, height: originalHeight};
+ },
+
+ makePositioned: function(element) {
+ element = $(element);
+ var pos = Element.getStyle(element, 'position');
+ if (pos == 'static' || !pos) {
+ element._madePositioned = true;
+ element.style.position = 'relative';
+ // Opera returns the offset relative to the positioning context, when an
+ // element is position relative but top and left have not been defined
+ if (window.opera) {
+ element.style.top = 0;
+ element.style.left = 0;
+ }
+ }
+ return element;
+ },
+
+ undoPositioned: function(element) {
+ element = $(element);
+ if (element._madePositioned) {
+ element._madePositioned = undefined;
+ element.style.position =
+ element.style.top =
+ element.style.left =
+ element.style.bottom =
+ element.style.right = '';
+ }
+ return element;
+ },
+
+ makeClipping: function(element) {
+ element = $(element);
+ if (element._overflow) return element;
+ element._overflow = element.style.overflow || 'auto';
+ if ((Element.getStyle(element, 'overflow') || 'visible') != 'hidden')
+ element.style.overflow = 'hidden';
+ return element;
+ },
+
+ undoClipping: function(element) {
+ element = $(element);
+ if (!element._overflow) return element;
+ element.style.overflow = element._overflow == 'auto' ? '' : element._overflow;
+ element._overflow = null;
+ return element;
+ }
+};
+
+Object.extend(Element.Methods, {childOf: Element.Methods.descendantOf});
+
+Element._attributeTranslations = {};
+
+Element._attributeTranslations.names = {
+ colspan: "colSpan",
+ rowspan: "rowSpan",
+ valign: "vAlign",
+ datetime: "dateTime",
+ accesskey: "accessKey",
+ tabindex: "tabIndex",
+ enctype: "encType",
+ maxlength: "maxLength",
+ readonly: "readOnly",
+ longdesc: "longDesc"
+};
+
+Element._attributeTranslations.values = {
+ _getAttr: function(element, attribute) {
+ return element.getAttribute(attribute, 2);
+ },
+
+ _flag: function(element, attribute) {
+ return $(element).hasAttribute(attribute) ? attribute : null;
+ },
+
+ style: function(element) {
+ return element.style.cssText.toLowerCase();
+ },
+
+ title: function(element) {
+ var node = element.getAttributeNode('title');
+ return node.specified ? node.nodeValue : null;
+ }
+};
+
+Object.extend(Element._attributeTranslations.values, {
+ href: Element._attributeTranslations.values._getAttr,
+ src: Element._attributeTranslations.values._getAttr,
+ disabled: Element._attributeTranslations.values._flag,
+ checked: Element._attributeTranslations.values._flag,
+ readonly: Element._attributeTranslations.values._flag,
+ multiple: Element._attributeTranslations.values._flag
+});
+
+Element.Methods.Simulated = {
+ hasAttribute: function(element, attribute) {
+ var t = Element._attributeTranslations;
+ attribute = t.names[attribute] || attribute;
+ return $(element).getAttributeNode(attribute).specified;
+ }
+};
+
+// IE is missing .innerHTML support for TABLE-related elements
+if (document.all && !window.opera){
+ Element.Methods.update = function(element, html) {
+ element = $(element);
+ html = typeof html == 'undefined' ? '' : html.toString();
+ var tagName = element.tagName.toUpperCase();
+ if (['THEAD','TBODY','TR','TD'].include(tagName)) {
+ var div = document.createElement('div');
+ switch (tagName) {
+ case 'THEAD':
+ case 'TBODY':
+ div.innerHTML = '<table><tbody>' + html.stripScripts() + '</tbody></table>';
+ depth = 2;
+ break;
+ case 'TR':
+ div.innerHTML = '<table><tbody><tr>' + html.stripScripts() + '</tr></tbody></table>';
+ depth = 3;
+ break;
+ case 'TD':
+ div.innerHTML = '<table><tbody><tr><td>' + html.stripScripts() + '</td></tr></tbody></table>';
+ depth = 4;
+ }
+ $A(element.childNodes).each(function(node){
+ element.removeChild(node)
+ });
+ depth.times(function(){ div = div.firstChild });
+
+ $A(div.childNodes).each(
+ function(node){ element.appendChild(node) });
+ } else {
+ element.innerHTML = html.stripScripts();
+ }
+ setTimeout(function() {html.evalScripts()}, 10);
+ return element;
+ }
+};
+
+Object.extend(Element, Element.Methods);
+
+var _nativeExtensions = false;
+
+if(/Konqueror|Safari|KHTML/.test(navigator.userAgent))
+ ['', 'Form', 'Input', 'TextArea', 'Select'].each(function(tag) {
+ var className = 'HTML' + tag + 'Element';
+ if(window[className]) return;
+ var klass = window[className] = {};
+ klass.prototype = document.createElement(tag ? tag.toLowerCase() : 'div').__proto__;
+ });
+
+Element.addMethods = function(methods) {
+ Object.extend(Element.Methods, methods || {});
+
+ function copy(methods, destination, onlyIfAbsent) {
+ onlyIfAbsent = onlyIfAbsent || false;
+ var cache = Element.extend.cache;
+ for (var property in methods) {
+ var value = methods[property];
+ if (!onlyIfAbsent || !(property in destination))
+ destination[property] = cache.findOrStore(value);
+ }
+ }
+
+ if (typeof HTMLElement != 'undefined') {
+ copy(Element.Methods, HTMLElement.prototype);
+ copy(Element.Methods.Simulated, HTMLElement.prototype, true);
+ copy(Form.Methods, HTMLFormElement.prototype);
+ [HTMLInputElement, HTMLTextAreaElement, HTMLSelectElement].each(function(klass) {
+ copy(Form.Element.Methods, klass.prototype);
+ });
+ _nativeExtensions = true;
+ }
+}
+
+var Toggle = new Object();
+Toggle.display = Element.toggle;
+
+/*--------------------------------------------------------------------------*/
+
+Abstract.Insertion = function(adjacency) {
+ this.adjacency = adjacency;
+}
+
+Abstract.Insertion.prototype = {
+ initialize: function(element, content) {
+ this.element = $(element);
+ this.content = content.stripScripts();
+
+ if (this.adjacency && this.element.insertAdjacentHTML) {
+ try {
+ this.element.insertAdjacentHTML(this.adjacency, this.content);
+ } catch (e) {
+ var tagName = this.element.tagName.toUpperCase();
+ if (['TBODY', 'TR'].include(tagName)) {
+ this.insertContent(this.contentFromAnonymousTable());
+ } else {
+ throw e;
+ }
+ }
+ } else {
+ this.range = this.element.ownerDocument.createRange();
+ if (this.initializeRange) this.initializeRange();
+ this.insertContent([this.range.createContextualFragment(this.content)]);
+ }
+
+ setTimeout(function() {content.evalScripts()}, 10);
+ },
+
+ contentFromAnonymousTable: function() {
+ var div = document.createElement('div');
+ div.innerHTML = '<table><tbody>' + this.content + '</tbody></table>';
+ return $A(div.childNodes[0].childNodes[0].childNodes);
+ }
+}
+
+var Insertion = new Object();
+
+Insertion.Before = Class.create();
+Insertion.Before.prototype = Object.extend(new Abstract.Insertion('beforeBegin'), {
+ initializeRange: function() {
+ this.range.setStartBefore(this.element);
+ },
+
+ insertContent: function(fragments) {
+ fragments.each((function(fragment) {
+ this.element.parentNode.insertBefore(fragment, this.element);
+ }).bind(this));
+ }
+});
+
+Insertion.Top = Class.create();
+Insertion.Top.prototype = Object.extend(new Abstract.Insertion('afterBegin'), {
+ initializeRange: function() {
+ this.range.selectNodeContents(this.element);
+ this.range.collapse(true);
+ },
+
+ insertContent: function(fragments) {
+ fragments.reverse(false).each((function(fragment) {
+ this.element.insertBefore(fragment, this.element.firstChild);
+ }).bind(this));
+ }
+});
+
+Insertion.Bottom = Class.create();
+Insertion.Bottom.prototype = Object.extend(new Abstract.Insertion('beforeEnd'), {
+ initializeRange: function() {
+ this.range.selectNodeContents(this.element);
+ this.range.collapse(this.element);
+ },
+
+ insertContent: function(fragments) {
+ fragments.each((function(fragment) {
+ this.element.appendChild(fragment);
+ }).bind(this));
+ }
+});
+
+Insertion.After = Class.create();
+Insertion.After.prototype = Object.extend(new Abstract.Insertion('afterEnd'), {
+ initializeRange: function() {
+ this.range.setStartAfter(this.element);
+ },
+
+ insertContent: function(fragments) {
+ fragments.each((function(fragment) {
+ this.element.parentNode.insertBefore(fragment,
+ this.element.nextSibling);
+ }).bind(this));
+ }
+});
+
+/*--------------------------------------------------------------------------*/
+
+Element.ClassNames = Class.create();
+Element.ClassNames.prototype = {
+ initialize: function(element) {
+ this.element = $(element);
+ },
+
+ _each: function(iterator) {
+ this.element.className.split(/\s+/).select(function(name) {
+ return name.length > 0;
+ })._each(iterator);
+ },
+
+ set: function(className) {
+ this.element.className = className;
+ },
+
+ add: function(classNameToAdd) {
+ if (this.include(classNameToAdd)) return;
+ this.set($A(this).concat(classNameToAdd).join(' '));
+ },
+
+ remove: function(classNameToRemove) {
+ if (!this.include(classNameToRemove)) return;
+ this.set($A(this).without(classNameToRemove).join(' '));
+ },
+
+ toString: function() {
+ return $A(this).join(' ');
+ }
+};
+
+Object.extend(Element.ClassNames.prototype, Enumerable);
+var Selector = Class.create();
+Selector.prototype = {
+ initialize: function(expression) {
+ this.params = {classNames: []};
+ this.expression = expression.toString().strip();
+ this.parseExpression();
+ this.compileMatcher();
+ },
+
+ parseExpression: function() {
+ function abort(message) { throw 'Parse error in selector: ' + message; }
+
+ if (this.expression == '') abort('empty expression');
+
+ var params = this.params, expr = this.expression, match, modifier, clause, rest;
+ while (match = expr.match(/^(.*)\[([a-z0-9_:-]+?)(?:([~\|!]?=)(?:"([^"]*)"|([^\]\s]*)))?\]$/i)) {
+ params.attributes = params.attributes || [];
+ params.attributes.push({name: match[2], operator: match[3], value: match[4] || match[5] || ''});
+ expr = match[1];
+ }
+
+ if (expr == '*') return this.params.wildcard = true;
+
+ while (match = expr.match(/^([^a-z0-9_-])?([a-z0-9_-]+)(.*)/i)) {
+ modifier = match[1], clause = match[2], rest = match[3];
+ switch (modifier) {
+ case '#': params.id = clause; break;
+ case '.': params.classNames.push(clause); break;
+ case '':
+ case undefined: params.tagName = clause.toUpperCase(); break;
+ default: abort(expr.inspect());
+ }
+ expr = rest;
+ }
+
+ if (expr.length > 0) abort(expr.inspect());
+ },
+
+ buildMatchExpression: function() {
+ var params = this.params, conditions = [], clause;
+
+ if (params.wildcard)
+ conditions.push('true');
+ if (clause = params.id)
+ conditions.push('element.readAttribute("id") == ' + clause.inspect());
+ if (clause = params.tagName)
+ conditions.push('element.tagName.toUpperCase() == ' + clause.inspect());
+ if ((clause = params.classNames).length > 0)
+ for (var i = 0, length = clause.length; i < length; i++)
+ conditions.push('element.hasClassName(' + clause[i].inspect() + ')');
+ if (clause = params.attributes) {
+ clause.each(function(attribute) {
+ var value = 'element.readAttribute(' + attribute.name.inspect() + ')';
+ var splitValueBy = function(delimiter) {
+ return value + ' && ' + value + '.split(' + delimiter.inspect() + ')';
+ }
+
+ switch (attribute.operator) {
+ case '=': conditions.push(value + ' == ' + attribute.value.inspect()); break;
+ case '~=': conditions.push(splitValueBy(' ') + '.include(' + attribute.value.inspect() + ')'); break;
+ case '|=': conditions.push(
+ splitValueBy('-') + '.first().toUpperCase() == ' + attribute.value.toUpperCase().inspect()
+ ); break;
+ case '!=': conditions.push(value + ' != ' + attribute.value.inspect()); break;
+ case '':
+ case undefined: conditions.push('element.hasAttribute(' + attribute.name.inspect() + ')'); break;
+ default: throw 'Unknown operator ' + attribute.operator + ' in selector';
+ }
+ });
+ }
+
+ return conditions.join(' && ');
+ },
+
+ compileMatcher: function() {
+ this.match = new Function('element', 'if (!element.tagName) return false; \
+ element = $(element); \
+ return ' + this.buildMatchExpression());
+ },
+
+ findElements: function(scope) {
+ var element;
+
+ if (element = $(this.params.id))
+ if (this.match(element))
+ if (!scope || Element.childOf(element, scope))
+ return [element];
+
+ scope = (scope || document).getElementsByTagName(this.params.tagName || '*');
+
+ var results = [];
+ for (var i = 0, length = scope.length; i < length; i++)
+ if (this.match(element = scope[i]))
+ results.push(Element.extend(element));
+
+ return results;
+ },
+
+ toString: function() {
+ return this.expression;
+ }
+}
+
+Object.extend(Selector, {
+ matchElements: function(elements, expression) {
+ var selector = new Selector(expression);
+ return elements.select(selector.match.bind(selector)).map(Element.extend);
+ },
+
+ findElement: function(elements, expression, index) {
+ if (typeof expression == 'number') index = expression, expression = false;
+ return Selector.matchElements(elements, expression || '*')[index || 0];
+ },
+
+ findChildElements: function(element, expressions) {
+ return expressions.map(function(expression) {
+ return expression.match(/[^\s"]+(?:"[^"]*"[^\s"]+)*/g).inject([null], function(results, expr) {
+ var selector = new Selector(expr);
+ return results.inject([], function(elements, result) {
+ return elements.concat(selector.findElements(result || element));
+ });
+ });
+ }).flatten();
+ }
+});
+
+function $$() {
+ return Selector.findChildElements(document, $A(arguments));
+}
+var Form = {
+ reset: function(form) {
+ $(form).reset();
+ return form;
+ },
+
+ serializeElements: function(elements, getHash) {
+ var data = elements.inject({}, function(result, element) {
+ if (!element.disabled && element.name) {
+ var key = element.name, value = $(element).getValue();
+ if (value != undefined) {
+ if (result[key]) {
+ if (result[key].constructor != Array) result[key] = [result[key]];
+ result[key].push(value);
+ }
+ else result[key] = value;
+ }
+ }
+ return result;
+ });
+
+ return getHash ? data : Hash.toQueryString(data);
+ }
+};
+
+Form.Methods = {
+ serialize: function(form, getHash) {
+ return Form.serializeElements(Form.getElements(form), getHash);
+ },
+
+ getElements: function(form) {
+ return $A($(form).getElementsByTagName('*')).inject([],
+ function(elements, child) {
+ if (Form.Element.Serializers[child.tagName.toLowerCase()])
+ elements.push(Element.extend(child));
+ return elements;
+ }
+ );
+ },
+
+ getInputs: function(form, typeName, name) {
+ form = $(form);
+ var inputs = form.getElementsByTagName('input');
+
+ if (!typeName && !name) return $A(inputs).map(Element.extend);
+
+ for (var i = 0, matchingInputs = [], length = inputs.length; i < length; i++) {
+ var input = inputs[i];
+ if ((typeName && input.type != typeName) || (name && input.name != name))
+ continue;
+ matchingInputs.push(Element.extend(input));
+ }
+
+ return matchingInputs;
+ },
+
+ disable: function(form) {
+ form = $(form);
+ form.getElements().each(function(element) {
+ element.blur();
+ element.disabled = 'true';
+ });
+ return form;
+ },
+
+ enable: function(form) {
+ form = $(form);
+ form.getElements().each(function(element) {
+ element.disabled = '';
+ });
+ return form;
+ },
+
+ findFirstElement: function(form) {
+ return $(form).getElements().find(function(element) {
+ return element.type != 'hidden' && !element.disabled &&
+ ['input', 'select', 'textarea'].include(element.tagName.toLowerCase());
+ });
+ },
+
+ focusFirstElement: function(form) {
+ form = $(form);
+ form.findFirstElement().activate();
+ return form;
+ }
+}
+
+Object.extend(Form, Form.Methods);
+
+/*--------------------------------------------------------------------------*/
+
+Form.Element = {
+ focus: function(element) {
+ $(element).focus();
+ return element;
+ },
+
+ select: function(element) {
+ $(element).select();
+ return element;
+ }
+}
+
+Form.Element.Methods = {
+ serialize: function(element) {
+ element = $(element);
+ if (!element.disabled && element.name) {
+ var value = element.getValue();
+ if (value != undefined) {
+ var pair = {};
+ pair[element.name] = value;
+ return Hash.toQueryString(pair);
+ }
+ }
+ return '';
+ },
+
+ getValue: function(element) {
+ element = $(element);
+ var method = element.tagName.toLowerCase();
+ return Form.Element.Serializers[method](element);
+ },
+
+ clear: function(element) {
+ $(element).value = '';
+ return element;
+ },
+
+ present: function(element) {
+ return $(element).value != '';
+ },
+
+ activate: function(element) {
+ element = $(element);
+ element.focus();
+ if (element.select && ( element.tagName.toLowerCase() != 'input' ||
+ !['button', 'reset', 'submit'].include(element.type) ) )
+ element.select();
+ return element;
+ },
+
+ disable: function(element) {
+ element = $(element);
+ element.disabled = true;
+ return element;
+ },
+
+ enable: function(element) {
+ element = $(element);
+ element.blur();
+ element.disabled = false;
+ return element;
+ }
+}
+
+Object.extend(Form.Element, Form.Element.Methods);
+var Field = Form.Element;
+var $F = Form.Element.getValue;
+
+/*--------------------------------------------------------------------------*/
+
+Form.Element.Serializers = {
+ input: function(element) {
+ switch (element.type.toLowerCase()) {
+ case 'checkbox':
+ case 'radio':
+ return Form.Element.Serializers.inputSelector(element);
+ default:
+ return Form.Element.Serializers.textarea(element);
+ }
+ },
+
+ inputSelector: function(element) {
+ return element.checked ? element.value : null;
+ },
+
+ textarea: function(element) {
+ return element.value;
+ },
+
+ select: function(element) {
+ return this[element.type == 'select-one' ?
+ 'selectOne' : 'selectMany'](element);
+ },
+
+ selectOne: function(element) {
+ var index = element.selectedIndex;
+ return index >= 0 ? this.optionValue(element.options[index]) : null;
+ },
+
+ selectMany: function(element) {
+ var values, length = element.length;
+ if (!length) return null;
+
+ for (var i = 0, values = []; i < length; i++) {
+ var opt = element.options[i];
+ if (opt.selected) values.push(this.optionValue(opt));
+ }
+ return values;
+ },
+
+ optionValue: function(opt) {
+ // extend element because hasAttribute may not be native
+ return Element.extend(opt).hasAttribute('value') ? opt.value : opt.text;
+ }
+}
+
+/*--------------------------------------------------------------------------*/
+
+Abstract.TimedObserver = function() {}
+Abstract.TimedObserver.prototype = {
+ initialize: function(element, frequency, callback) {
+ this.frequency = frequency;
+ this.element = $(element);
+ this.callback = callback;
+
+ this.lastValue = this.getValue();
+ this.registerCallback();
+ },
+
+ registerCallback: function() {
+ setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);
+ },
+
+ onTimerEvent: function() {
+ var value = this.getValue();
+ var changed = ('string' == typeof this.lastValue && 'string' == typeof value
+ ? this.lastValue != value : String(this.lastValue) != String(value));
+ if (changed) {
+ this.callback(this.element, value);
+ this.lastValue = value;
+ }
+ }
+}
+
+Form.Element.Observer = Class.create();
+Form.Element.Observer.prototype = Object.extend(new Abstract.TimedObserver(), {
+ getValue: function() {
+ return Form.Element.getValue(this.element);
+ }
+});
+
+Form.Observer = Class.create();
+Form.Observer.prototype = Object.extend(new Abstract.TimedObserver(), {
+ getValue: function() {
+ return Form.serialize(this.element);
+ }
+});
+
+/*--------------------------------------------------------------------------*/
+
+Abstract.EventObserver = function() {}
+Abstract.EventObserver.prototype = {
+ initialize: function(element, callback) {
+ this.element = $(element);
+ this.callback = callback;
+
+ this.lastValue = this.getValue();
+ if (this.element.tagName.toLowerCase() == 'form')
+ this.registerFormCallbacks();
+ else
+ this.registerCallback(this.element);
+ },
+
+ onElementEvent: function() {
+ var value = this.getValue();
+ if (this.lastValue != value) {
+ this.callback(this.element, value);
+ this.lastValue = value;
+ }
+ },
+
+ registerFormCallbacks: function() {
+ Form.getElements(this.element).each(this.registerCallback.bind(this));
+ },
+
+ registerCallback: function(element) {
+ if (element.type) {
+ switch (element.type.toLowerCase()) {
+ case 'checkbox':
+ case 'radio':
+ Event.observe(element, 'click', this.onElementEvent.bind(this));
+ break;
+ default:
+ Event.observe(element, 'change', this.onElementEvent.bind(this));
+ break;
+ }
+ }
+ }
+}
+
+Form.Element.EventObserver = Class.create();
+Form.Element.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), {
+ getValue: function() {
+ return Form.Element.getValue(this.element);
+ }
+});
+
+Form.EventObserver = Class.create();
+Form.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), {
+ getValue: function() {
+ return Form.serialize(this.element);
+ }
+});
+if (!window.Event) {
+ var Event = new Object();
+}
+
+Object.extend(Event, {
+ KEY_BACKSPACE: 8,
+ KEY_TAB: 9,
+ KEY_RETURN: 13,
+ KEY_ESC: 27,
+ KEY_LEFT: 37,
+ KEY_UP: 38,
+ KEY_RIGHT: 39,
+ KEY_DOWN: 40,
+ KEY_DELETE: 46,
+ KEY_HOME: 36,
+ KEY_END: 35,
+ KEY_PAGEUP: 33,
+ KEY_PAGEDOWN: 34,
+
+ element: function(event) {
+ return event.target || event.srcElement;
+ },
+
+ isLeftClick: function(event) {
+ return (((event.which) && (event.which == 1)) ||
+ ((event.button) && (event.button == 1)));
+ },
+
+ pointerX: function(event) {
+ return event.pageX || (event.clientX +
+ (document.documentElement.scrollLeft || document.body.scrollLeft));
+ },
+
+ pointerY: function(event) {
+ return event.pageY || (event.clientY +
+ (document.documentElement.scrollTop || document.body.scrollTop));
+ },
+
+ stop: function(event) {
+ if (event.preventDefault) {
+ event.preventDefault();
+ event.stopPropagation();
+ } else {
+ event.returnValue = false;
+ event.cancelBubble = true;
+ }
+ },
+
+ // find the first node with the given tagName, starting from the
+ // node the event was triggered on; traverses the DOM upwards
+ findElement: function(event, tagName) {
+ var element = Event.element(event);
+ while (element.parentNode && (!element.tagName ||
+ (element.tagName.toUpperCase() != tagName.toUpperCase())))
+ element = element.parentNode;
+ return element;
+ },
+
+ observers: false,
+
+ _observeAndCache: function(element, name, observer, useCapture) {
+ if (!this.observers) this.observers = [];
+ if (element.addEventListener) {
+ this.observers.push([element, name, observer, useCapture]);
+ element.addEventListener(name, observer, useCapture);
+ } else if (element.attachEvent) {
+ this.observers.push([element, name, observer, useCapture]);
+ element.attachEvent('on' + name, observer);
+ }
+ },
+
+ unloadCache: function() {
+ if (!Event.observers) return;
+ for (var i = 0, length = Event.observers.length; i < length; i++) {
+ Event.stopObserving.apply(this, Event.observers[i]);
+ Event.observers[i][0] = null;
+ }
+ Event.observers = false;
+ },
+
+ observe: function(element, name, observer, useCapture) {
+ element = $(element);
+ useCapture = useCapture || false;
+
+ if (name == 'keypress' &&
+ (navigator.appVersion.match(/Konqueror|Safari|KHTML/)
+ || element.attachEvent))
+ name = 'keydown';
+
+ Event._observeAndCache(element, name, observer, useCapture);
+ },
+
+ stopObserving: function(element, name, observer, useCapture) {
+ element = $(element);
+ useCapture = useCapture || false;
+
+ if (name == 'keypress' &&
+ (navigator.appVersion.match(/Konqueror|Safari|KHTML/)
+ || element.detachEvent))
+ name = 'keydown';
+
+ if (element.removeEventListener) {
+ element.removeEventListener(name, observer, useCapture);
+ } else if (element.detachEvent) {
+ try {
+ element.detachEvent('on' + name, observer);
+ } catch (e) {}
+ }
+ }
+});
+
+/* prevent memory leaks in IE */
+if (navigator.appVersion.match(/\bMSIE\b/))
+ Event.observe(window, 'unload', Event.unloadCache, false);
+var Position = {
+ // set to true if needed, warning: firefox performance problems
+ // NOT neeeded for page scrolling, only if draggable contained in
+ // scrollable elements
+ includeScrollOffsets: false,
+
+ // must be called before calling withinIncludingScrolloffset, every time the
+ // page is scrolled
+ prepare: function() {
+ this.deltaX = window.pageXOffset
+ || document.documentElement.scrollLeft
+ || document.body.scrollLeft
+ || 0;
+ this.deltaY = window.pageYOffset
+ || document.documentElement.scrollTop
+ || document.body.scrollTop
+ || 0;
+ },
+
+ realOffset: function(element) {
+ var valueT = 0, valueL = 0;
+ do {
+ valueT += element.scrollTop || 0;
+ valueL += element.scrollLeft || 0;
+ element = element.parentNode;
+ } while (element);
+ return [valueL, valueT];
+ },
+
+ cumulativeOffset: function(element) {
+ var valueT = 0, valueL = 0;
+ do {
+ valueT += element.offsetTop || 0;
+ valueL += element.offsetLeft || 0;
+ element = element.offsetParent;
+ } while (element);
+ return [valueL, valueT];
+ },
+
+ positionedOffset: function(element) {
+ var valueT = 0, valueL = 0;
+ do {
+ valueT += element.offsetTop || 0;
+ valueL += element.offsetLeft || 0;
+ element = element.offsetParent;
+ if (element) {
+ if(element.tagName=='BODY') break;
+ var p = Element.getStyle(element, 'position');
+ if (p == 'relative' || p == 'absolute') break;
+ }
+ } while (element);
+ return [valueL, valueT];
+ },
+
+ offsetParent: function(element) {
+ if (element.offsetParent) return element.offsetParent;
+ if (element == document.body) return element;
+
+ while ((element = element.parentNode) && element != document.body)
+ if (Element.getStyle(element, 'position') != 'static')
+ return element;
+
+ return document.body;
+ },
+
+ // caches x/y coordinate pair to use with overlap
+ within: function(element, x, y) {
+ if (this.includeScrollOffsets)
+ return this.withinIncludingScrolloffsets(element, x, y);
+ this.xcomp = x;
+ this.ycomp = y;
+ this.offset = this.cumulativeOffset(element);
+
+ return (y >= this.offset[1] &&
+ y < this.offset[1] + element.offsetHeight &&
+ x >= this.offset[0] &&
+ x < this.offset[0] + element.offsetWidth);
+ },
+
+ withinIncludingScrolloffsets: function(element, x, y) {
+ var offsetcache = this.realOffset(element);
+
+ this.xcomp = x + offsetcache[0] - this.deltaX;
+ this.ycomp = y + offsetcache[1] - this.deltaY;
+ this.offset = this.cumulativeOffset(element);
+
+ return (this.ycomp >= this.offset[1] &&
+ this.ycomp < this.offset[1] + element.offsetHeight &&
+ this.xcomp >= this.offset[0] &&
+ this.xcomp < this.offset[0] + element.offsetWidth);
+ },
+
+ // within must be called directly before
+ overlap: function(mode, element) {
+ if (!mode) return 0;
+ if (mode == 'vertical')
+ return ((this.offset[1] + element.offsetHeight) - this.ycomp) /
+ element.offsetHeight;
+ if (mode == 'horizontal')
+ return ((this.offset[0] + element.offsetWidth) - this.xcomp) /
+ element.offsetWidth;
+ },
+
+ page: function(forElement) {
+ var valueT = 0, valueL = 0;
+
+ var element = forElement;
+ do {
+ valueT += element.offsetTop || 0;
+ valueL += element.offsetLeft || 0;
+
+ // Safari fix
+ if (element.offsetParent==document.body)
+ if (Element.getStyle(element,'position')=='absolute') break;
+
+ } while (element = element.offsetParent);
+
+ element = forElement;
+ do {
+ if (!window.opera || element.tagName=='BODY') {
+ valueT -= element.scrollTop || 0;
+ valueL -= element.scrollLeft || 0;
+ }
+ } while (element = element.parentNode);
+
+ return [valueL, valueT];
+ },
+
+ clone: function(source, target) {
+ var options = Object.extend({
+ setLeft: true,
+ setTop: true,
+ setWidth: true,
+ setHeight: true,
+ offsetTop: 0,
+ offsetLeft: 0
+ }, arguments[2] || {})
+
+ // find page position of source
+ source = $(source);
+ var p = Position.page(source);
+
+ // find coordinate system to use
+ target = $(target);
+ var delta = [0, 0];
+ var parent = null;
+ // delta [0,0] will do fine with position: fixed elements,
+ // position:absolute needs offsetParent deltas
+ if (Element.getStyle(target,'position') == 'absolute') {
+ parent = Position.offsetParent(target);
+ delta = Position.page(parent);
+ }
+
+ // correct by body offsets (fixes Safari)
+ if (parent == document.body) {
+ delta[0] -= document.body.offsetLeft;
+ delta[1] -= document.body.offsetTop;
+ }
+
+ // set position
+ if(options.setLeft) target.style.left = (p[0] - delta[0] + options.offsetLeft) + 'px';
+ if(options.setTop) target.style.top = (p[1] - delta[1] + options.offsetTop) + 'px';
+ if(options.setWidth) target.style.width = source.offsetWidth + 'px';
+ if(options.setHeight) target.style.height = source.offsetHeight + 'px';
+ },
+
+ absolutize: function(element) {
+ element = $(element);
+ if (element.style.position == 'absolute') return;
+ Position.prepare();
+
+ var offsets = Position.positionedOffset(element);
+ var top = offsets[1];
+ var left = offsets[0];
+ var width = element.clientWidth;
+ var height = element.clientHeight;
+
+ element._originalLeft = left - parseFloat(element.style.left || 0);
+ element._originalTop = top - parseFloat(element.style.top || 0);
+ element._originalWidth = element.style.width;
+ element._originalHeight = element.style.height;
+
+ element.style.position = 'absolute';
+ element.style.top = top + 'px';
+ element.style.left = left + 'px';
+ element.style.width = width + 'px';
+ element.style.height = height + 'px';
+ },
+
+ relativize: function(element) {
+ element = $(element);
+ if (element.style.position == 'relative') return;
+ Position.prepare();
+
+ element.style.position = 'relative';
+ var top = parseFloat(element.style.top || 0) - (element._originalTop || 0);
+ var left = parseFloat(element.style.left || 0) - (element._originalLeft || 0);
+
+ element.style.top = top + 'px';
+ element.style.left = left + 'px';
+ element.style.height = element._originalHeight;
+ element.style.width = element._originalWidth;
+ }
+}
+
+// Safari returns margins on body which is incorrect if the child is absolutely
+// positioned. For performance reasons, redefine Position.cumulativeOffset for
+// KHTML/WebKit only.
+if (/Konqueror|Safari|KHTML/.test(navigator.userAgent)) {
+ Position.cumulativeOffset = function(element) {
+ var valueT = 0, valueL = 0;
+ do {
+ valueT += element.offsetTop || 0;
+ valueL += element.offsetLeft || 0;
+ if (element.offsetParent == document.body)
+ if (Element.getStyle(element, 'position') == 'absolute') break;
+
+ element = element.offsetParent;
+ } while (element);
+
+ return [valueL, valueT];
+ }
+}
+
+Element.addMethods();
\ No newline at end of file
Added: branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/weatherPortlet.html
===================================================================
--- branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/weatherPortlet.html (rev 0)
+++ branches/UIServer/uiserver/src/resources/client/ajax/src/org/jboss/portal/presentation/ajax/public/weatherPortlet.html 2007-11-16 16:47:30 UTC (rev 8976)
@@ -0,0 +1,76 @@
+<div class="portlet-container"><table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td class="portlet-titlebar-left"></td><td class="portlet-titlebar-center"><div class="portlet-titlebar-decoration"></div><span class="portlet-titlebar-title">Weather Portlet</span><div class="portlet-mode-container"><span title="minimized"><a class="portlet-mode-minimized" href="/portal/portal/default/default/2?windowstate=minimized"> </a></span><span title="maximized"><a class="portlet-mode-maximized" href="/portal/portal/default/default/2?windowstate=maximized"> </a></span></div></td><td class="portlet-titlebar-right"></td></tr><tr><td class="portlet-content-left"></td><td class="portlet-body"><div class="portlet-content-center"><br/>
+<div align="center">
+<font>
+<b>Miami, FL, US</b>
+</font>
+
+<br/>
+<br/>
+<table border="0" width="130">
+<tr>
+<td>
+<table height="130" border="0">
+<tr>
+<td align="center" class="portlet-section-header">Currently</td>
+</tr>
+<tr>
+<td valign="top" align="center" class="portlet-section-alternate">
+<img src="http://us.i1.yimg.com/us.yimg.com/i/us/we/52//28.gif"/>
+</td>
+</tr>
+<tr>
+<td valign="top" align="center" class="portlet-section-alternate">Mostly Cloudy</td>
+
+</tr>
+<tr>
+<td valign="top" align="center" class="portlet-section-alternate">86F</td>
+</tr>
+</table>
+</td>
+<td>
+<table height="130" border="0">
+<tr>
+<td valign="top" align="center" class="portlet-section-header">Thu</td>
+</tr>
+<tr>
+<td valign="top" align="center" class="portlet-section-alternate">
+<img src="http://us.i1.yimg.com/us.yimg.com/i/us/we/52//38.gif"/>
+</td>
+
+</tr>
+<tr>
+<td valign="top" align="center" class="portlet-section-alternate">Scattered Thunderstorms</td>
+</tr>
+<tr>
+<td valign="top" align="center" class="portlet-section-alternate">76F/86F</td>
+</tr>
+</table>
+</td>
+<td>
+<table height="130" border="0">
+<tr>
+<td valign="top" align="center" class="portlet-section-header">Fri</td>
+</tr>
+
+<tr>
+<td valign="top" align="center" class="portlet-section-alternate">
+<img src="http://us.i1.yimg.com/us.yimg.com/i/us/we/52//38.gif"/>
+</td>
+</tr>
+<tr>
+<td valign="top" align="center" class="portlet-section-alternate">Scattered Thunderstorms</td>
+</tr>
+<tr>
+<td valign="top" align="center" class="portlet-section-alternate">78F/89F</td>
+</tr>
+</table>
+</td>
+</tr>
+</table>
+
+<br/>
+<a target="_blank" href="http://us.rd.yahoo.com/dailynews/rss/weather/Miami__FL/*http://weather.ya...">Complete Forecast</a>
+</div>
+</div></td><td class="portlet-content-right"></td></tr><tr><td class="portlet-footer-left"></td><td class="portlet-footer-center"></td><td class="portlet-footer-right"></td></tr></table>
+
+</div>
\ No newline at end of file
Modified: branches/UIServer/uiserver/src/resources/portal-uiserver.sar/META-INF/jboss-service.xml
===================================================================
--- branches/UIServer/uiserver/src/resources/portal-uiserver.sar/META-INF/jboss-service.xml 2007-11-16 15:13:46 UTC (rev 8975)
+++ branches/UIServer/uiserver/src/resources/portal-uiserver.sar/META-INF/jboss-service.xml 2007-11-16 16:47:30 UTC (rev 8976)
@@ -24,7 +24,7 @@
<server>
<mbean
- code="org.jboss.portal.presentation.service.UIServer"
+ code="org.jboss.portal.presentation.controller.UIController"
name="portal:service=Controller"
xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
@@ -32,7 +32,7 @@
<depends optional-attribute-name="PresentationServer" proxy-type="attribute">portal:service=PresentationServer</depends>
</mbean>
<mbean
- code="org.jboss.portal.presentation.service.EntryPointImpl"
+ code="org.jboss.portal.presentation.impl.entry.EntryPointImpl"
name="portal:service=EntryPoint"
xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
Modified: branches/UIServer/uiserver/src/resources/portal-uiserver.war/WEB-INF/web.xml
===================================================================
--- branches/UIServer/uiserver/src/resources/portal-uiserver.war/WEB-INF/web.xml 2007-11-16 15:13:46 UTC (rev 8975)
+++ branches/UIServer/uiserver/src/resources/portal-uiserver.war/WEB-INF/web.xml 2007-11-16 16:47:30 UTC (rev 8976)
@@ -27,20 +27,21 @@
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<!-- Add the GWT Client Filter to run the Portal in full Web 2.0 Ajax Mode. In turn, to run in Classic Html Mode, turn this filter off -->
+ <!--
<filter>
<filter-name>GWTClientFilter</filter-name>
- <filter-class>org.jboss.portal.presentation.service.GWTClientFilter</filter-class>
+ <filter-class>org.jboss.portal.presentation.entry.GWTClientFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>GWTClientFilter</filter-name>
<servlet-name>PortalEntryPoint</servlet-name>
</filter-mapping>
+ -->
-
<!-- The portal servlet is the main entrance point -->
<servlet>
<servlet-name>PortalEntryPoint</servlet-name>
- <servlet-class>org.jboss.portal.presentation.service.PortalEntryPoint</servlet-class>
+ <servlet-class>org.jboss.portal.presentation.impl.classic.entry.PortalEntryPoint</servlet-class>
<init-param>
<param-name>asDefaultServlet</param-name>
<param-value>false</param-value>
@@ -74,7 +75,7 @@
<!-- Asynchronous service request processor -->
<servlet>
<servlet-name>AjaxPortalEntryPoint</servlet-name>
- <servlet-class>org.jboss.portal.presentation.impl.ajax.service.PortalEntryPoint</servlet-class>
+ <servlet-class>org.jboss.portal.presentation.impl.ajax.entry.PortalEntryPoint</servlet-class>
<init-param>
<param-name>asDefaultServlet</param-name>
<param-value>false</param-value>
Modified: branches/UIServer/uiserver/src/resources/portal-uiserver.war/asyncPages.html
===================================================================
--- branches/UIServer/uiserver/src/resources/portal-uiserver.war/asyncPages.html 2007-11-16 15:13:46 UTC (rev 8975)
+++ branches/UIServer/uiserver/src/resources/portal-uiserver.war/asyncPages.html 2007-11-16 16:47:30 UTC (rev 8976)
@@ -1,6 +1,6 @@
<html>
<head>
- <meta http-equiv="refresh" content="0;url=org.jboss.portal.uiserver.ajax.AsyncPages/asyncPages.html">
+ <meta http-equiv="refresh" content="0;url=org.jboss.portal.presentation.ajax.AsyncPages/asyncPages.html">
</head>
<body>
</body>
Modified: branches/UIServer/uiserver/src/resources/portal-uiserver.war/layout.html
===================================================================
--- branches/UIServer/uiserver/src/resources/portal-uiserver.war/layout.html 2007-11-16 15:13:46 UTC (rev 8975)
+++ branches/UIServer/uiserver/src/resources/portal-uiserver.war/layout.html 2007-11-16 16:47:30 UTC (rev 8976)
@@ -1,6 +1,6 @@
<html>
<head>
- <meta http-equiv="refresh" content="0;url=org.jboss.portal.uiserver.ajax.PortalLayout/layout.html">
+ <meta http-equiv="refresh" content="0;url=org.jboss.portal.presentation.ajax.PortalLayout/layout.html">
</head>
<body>
</body>
Modified: branches/UIServer/uiserver/src/resources/portal-uiserver.war/partialRefresh.html
===================================================================
--- branches/UIServer/uiserver/src/resources/portal-uiserver.war/partialRefresh.html 2007-11-16 15:13:46 UTC (rev 8975)
+++ branches/UIServer/uiserver/src/resources/portal-uiserver.war/partialRefresh.html 2007-11-16 16:47:30 UTC (rev 8976)
@@ -1,6 +1,6 @@
<html>
<head>
- <meta http-equiv="refresh" content="0;url=org.jboss.portal.uiserver.ajax.PartialRefresh/partialRefresh.html">
+ <meta http-equiv="refresh" content="0;url=org.jboss.portal.presentation.ajax.PartialRefresh/partialRefresh.html">
</head>
<body>
</body>
16 years, 10 months
JBoss Portal SVN: r8975 - in branches/JBoss_Portal_Branch_2_6/widget: src/main/org/jboss/portal/test/widget/google and 10 other directories.
by portal-commits@lists.jboss.org
Author: emuckenhuber
Date: 2007-11-16 10:13:46 -0500 (Fri, 16 Nov 2007)
New Revision: 8975
Added:
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/test/widget/netvibes/NetvibesQueryResultTestCase.java
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/test/widget/netvibes/NetvibesQueryTestCase.java
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/directory/
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/directory/NVEcosystemFactory.java
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/directory/NVQueryResultMetaData.java
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/directory/NetvibesWidgetApplicationType.java
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/directory/NetvibesWidgetCategory.java
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/provider/NetvibesDirectoryQueryMapEntry.java
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/provider/NetvibesQuery.java
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/provider/NetvibesQueryResult.java
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/provider/NetvibesQueryResultBuilder.java
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/provider/NetvibesQueryResultEntry.java
branches/JBoss_Portal_Branch_2_6/widget/src/resources/test/netvibes/queryresult_1.xml
Modified:
branches/JBoss_Portal_Branch_2_6/widget/build.xml
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/test/widget/google/Foo3TestCase.java
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/test/widget/support/TestQuery.java
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/AbstractWidgetProvider.java
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/WidgetProvider.java
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/GGWidgetPortlet.java
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/provider/GGDirectoryQueryMapEntry.java
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/provider/GGProvider.java
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesWidgetPortlet.java
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/provider/NetvibesProvider.java
branches/JBoss_Portal_Branch_2_6/widget/src/resources/portal-widget-netvibes-war/WEB-INF/jsp/edit_content.jsp
Log:
JBPORTAL-1534: NV directory lookup, still requires some cleanup
Modified: branches/JBoss_Portal_Branch_2_6/widget/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/build.xml 2007-11-16 14:59:43 UTC (rev 8974)
+++ branches/JBoss_Portal_Branch_2_6/widget/build.xml 2007-11-16 15:13:46 UTC (rev 8975)
@@ -282,14 +282,14 @@
-->
<x-test>
- <!--
<test todir="${test.reports}" name="org.jboss.portal.test.widget.google.Foo3TestCase"/>
- -->
<test todir="${test.reports}" name="org.jboss.portal.test.widget.netvibes.NetvibesProviderTestCase"/>
<test todir="${test.reports}" name="org.jboss.portal.test.widget.netvibes.NetvibesWidgetRenderTestCase"/>
<test todir="${test.reports}" name="org.jboss.portal.test.widget.google.QueryResultParserTestCase"/>
<test todir="${test.reports}" name="org.jboss.portal.test.widget.google.PreferencesTestCase"/>
<test todir="${test.reports}" name="org.jboss.portal.test.widget.netvibes.JSONBuilderTestCase"/>
+ <test todir="${test.reports}" name="org.jboss.portal.test.widget.netvibes.NetvibesQueryTestCase"/>
+ <test todir="${test.reports}" name="org.jboss.portal.test.widget.netvibes.NetvibesQueryResultTestCase"/>
</x-test>
<x-classpath>
<!--
Modified: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/test/widget/google/Foo3TestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/test/widget/google/Foo3TestCase.java 2007-11-16 14:59:43 UTC (rev 8974)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/test/widget/google/Foo3TestCase.java 2007-11-16 15:13:46 UTC (rev 8975)
@@ -43,7 +43,7 @@
public void test01() throws Exception
{
- AbstractSynchronizedServer server = new AbstractSynchronizedServer.AbstractReturnFileServer(8080, "google/queryresult1.xml")
+ AbstractSynchronizedServer server = new AbstractSynchronizedServer.AbstractReturnFileServer(8181, "google/queryresult1.xml")
{
protected void doClient() throws Exception
{
@@ -54,8 +54,9 @@
TestQuery q = new TestQuery();
List<DirectoryQueryResultEntry> w = provider.search(q);
-
+
provider.stop();
+ assertEquals(24, w.size());
}
};
@@ -65,7 +66,7 @@
public void test02() throws Exception
{
- AbstractSynchronizedServer server = new AbstractSynchronizedServer.AbstractReturnFileServer(8080, "google/queryresult2.xml")
+ AbstractSynchronizedServer server = new AbstractSynchronizedServer.AbstractReturnFileServer(8181, "google/queryresult2.xml")
{
protected void doClient() throws Exception
{
@@ -78,7 +79,7 @@
List<DirectoryQueryResultEntry> w = provider.search(q);
provider.stop();
-
+ assertEquals(24, w.size());
}
};
server.performInteraction();
@@ -86,7 +87,7 @@
public void test03_fail() throws Exception
{
- AbstractSynchronizedServer server = new AbstractSynchronizedServer.AbstractReturnFileServer(8080, "google/queryresult3_fail.xml")
+ AbstractSynchronizedServer server = new AbstractSynchronizedServer.AbstractReturnFileServer(8181, "google/queryresult3_fail.xml")
{
protected void doClient() throws Exception
{
@@ -99,6 +100,7 @@
List<DirectoryQueryResultEntry> w = provider.search(q);
provider.stop();
+ assertEquals(0, w.size());
}
};
@@ -108,7 +110,7 @@
public void test03_timeout() throws Exception
{
- AbstractSynchronizedServer server = new AbstractSynchronizedServer.AbstractTimeoutServer(8080)
+ AbstractSynchronizedServer server = new AbstractSynchronizedServer.AbstractTimeoutServer(8181)
{
protected void doClient() throws Exception
{
@@ -117,9 +119,8 @@
TestQuery q = new TestQuery();
List<DirectoryQueryResultEntry> w = provider.search(q);
+ provider.stop();
assertEquals(0, w.size());
-
- provider.stop();
}
};
server.performInteraction();
@@ -127,7 +128,7 @@
public void test404() throws Exception
{
- AbstractSynchronizedServer server = new AbstractSynchronizedServer.Abstract404Server(8080)
+ AbstractSynchronizedServer server = new AbstractSynchronizedServer.Abstract404Server(8181)
{
protected void doClient() throws Exception
{
@@ -136,9 +137,8 @@
TestQuery q = new TestQuery();
List<DirectoryQueryResultEntry> w = provider.search(q);
+ provider.stop();
assertEquals(0, w.size());
-
- provider.stop();
}
};
server.performInteraction();
@@ -147,16 +147,16 @@
public void test_widget404() throws Exception
{
- AbstractSynchronizedServer server = new AbstractSynchronizedServer.Abstract404Server(8080)
+ AbstractSynchronizedServer server = new AbstractSynchronizedServer.Abstract404Server(8181)
{
protected void doClient() throws Exception
{
WidgetProvider provider = new GGProvider();
provider.start();
- URL url = new URL("http://localhost:8080");
+ URL url = new URL("http://localhost:8181");
Widget w = provider.getWidget(url);
-
+
provider.stop();
assertNull(w);
@@ -167,14 +167,14 @@
public void test_widget_wrong_content() throws Exception
{
- AbstractSynchronizedServer server = new AbstractSynchronizedServer.AbstractReturnFileServer(8080, "google/gadget1_fail.xml")
+ AbstractSynchronizedServer server = new AbstractSynchronizedServer.AbstractReturnFileServer(8181, "google/gadget1_fail.xml")
{
protected void doClient() throws Exception
{
WidgetProvider provider = new GGProvider();
provider.start();
- URL url = new URL("http://localhost:8080");
+ URL url = new URL("http://localhost:8181");
Widget w = provider.getWidget(url);
provider.stop();
@@ -187,19 +187,19 @@
public void test_widget_timeout() throws Exception
{
- AbstractSynchronizedServer server = new AbstractSynchronizedServer.AbstractTimeoutServer(8080)
+ AbstractSynchronizedServer server = new AbstractSynchronizedServer.AbstractTimeoutServer(8181)
{
protected void doClient() throws Exception
{
WidgetProvider provider = new GGProvider();
provider.start();
- URL url = new URL("http://localhost:8080");
+ URL url = new URL("http://localhost:8181");
Widget w = provider.getWidget(url);
- assertNull(w);
+
provider.stop();
-
+ assertNull(w);
}
};
server.performInteraction();
Added: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/test/widget/netvibes/NetvibesQueryResultTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/test/widget/netvibes/NetvibesQueryResultTestCase.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/test/widget/netvibes/NetvibesQueryResultTestCase.java 2007-11-16 15:13:46 UTC (rev 8975)
@@ -0,0 +1,101 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.test.widget.netvibes;
+
+import java.net.URL;
+import java.util.Iterator;
+
+import junit.framework.TestCase;
+
+import org.jboss.portal.widget.netvibes.provider.NetvibesQueryResult;
+import org.jboss.portal.widget.netvibes.provider.NetvibesQueryResultBuilder;
+import org.jboss.portal.widget.netvibes.provider.NetvibesQueryResultEntry;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class NetvibesQueryResultTestCase extends TestCase
+{
+
+ public void test01()
+ {
+ URL url = this.getFileURL("netvibes/queryresult_1.xml");
+ assertNotNull(url);
+ NetvibesQueryResultBuilder builder = new NetvibesQueryResultBuilder(url);
+ NetvibesQueryResult result = builder.build(5000);
+ assertNotNull(result);
+ assertEquals(10, result.collection().size());
+ Iterator i = result.entries();
+ NetvibesQueryResultEntry entry = (NetvibesQueryResultEntry) i.next();
+ assertNotNull(entry);
+ assertEquals("The Jerusalem Post", entry.getTitle());
+ assertEquals("Latest news from The Jerusalem Post, the world's top English-language daily newspaper covering Israel, the Middle East and the Jewish World.", entry.getDescription());
+ assertEquals("http://www.netvibes.com/modules/multipleFeeds/multipleFeeds.php?provider=...", entry.getURL().toString());
+ entry = (NetvibesQueryResultEntry) i.next();
+ assertNotNull(entry);
+ assertEquals("WMLScript reference", entry.getTitle());
+ assertEquals("Search through WMLScript help, reference, tutorials and examples.", entry.getDescription());
+ assertEquals("http://freebestoffer.com/downloads/wmlscript.html", entry.getURL().toString());
+ entry = (NetvibesQueryResultEntry) i.next();
+ assertNotNull(entry);
+ assertEquals("Web developer's help", entry.getTitle());
+ assertEquals("Search and browse help, tutorials, examples and reference documents on XML, XSLT, HTML, JavaScript, VBScript, Flash, SQL and more.", entry.getDescription());
+ assertEquals("http://freebestoffer.com/downloads/webdevel.html", entry.getURL().toString());
+ entry = (NetvibesQueryResultEntry) i.next();
+ assertNotNull(entry);
+ assertEquals("VBScript reference", entry.getTitle());
+ assertEquals("Search through Visual Basic script help, reference, tutorials and examples.", entry.getDescription());
+ assertEquals("http://freebestoffer.com/downloads/vbscript.html", entry.getURL().toString());
+ entry = (NetvibesQueryResultEntry) i.next();
+ assertNotNull(entry);
+ assertEquals("SVG reference", entry.getTitle());
+ assertEquals("Search through SVG help, reference, tutorials and examples.", entry.getDescription());
+ assertEquals("http://freebestoffer.com/downloads/svg.html", entry.getURL().toString());
+ entry = (NetvibesQueryResultEntry) i.next();
+ assertNotNull(entry);
+ assertEquals("SQL reference", entry.getTitle());
+ assertEquals("Search through SQL help, reference, tutorials and examples.", entry.getDescription());
+ assertEquals("http://freebestoffer.com/downloads/sql.html", entry.getURL().toString());
+ entry = (NetvibesQueryResultEntry) i.next();
+ assertNotNull(entry);
+
+ entry = (NetvibesQueryResultEntry) i.next();
+ assertNotNull(entry);
+
+ entry = (NetvibesQueryResultEntry) i.next();
+ assertNotNull(entry);
+
+ entry = (NetvibesQueryResultEntry) i.next();
+ assertNotNull(entry);
+
+ assertFalse(i.hasNext());
+ }
+
+ private URL getFileURL(String filename)
+ {
+ return Thread.currentThread().getContextClassLoader().getResource(filename);
+ }
+
+}
+
Added: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/test/widget/netvibes/NetvibesQueryTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/test/widget/netvibes/NetvibesQueryTestCase.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/test/widget/netvibes/NetvibesQueryTestCase.java 2007-11-16 15:13:46 UTC (rev 8975)
@@ -0,0 +1,57 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.test.widget.netvibes;
+
+import org.jboss.portal.widget.netvibes.provider.NetvibesQuery;
+
+import junit.framework.TestCase;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class NetvibesQueryTestCase extends TestCase
+{
+
+ public void test01() throws Exception
+ {
+ NetvibesQuery q = new NetvibesQuery(0, 10, "14", "all", "foo");
+ assertEquals("http://eco.netvibes.com/rss.php?synd=jboss&count=10&cat=14&type=all&q=foo", q.buildQueryURL().toString());
+ }
+
+
+ public void test02() throws Exception
+ {
+ NetvibesQuery q = new NetvibesQuery(1, 11, "5", "foo", "bar");
+ assertEquals("http://eco.netvibes.com/rss.php?synd=jboss&start=1&count=11&cat=5&type=fo...", q.buildQueryURL().toString());
+ }
+
+ public void test03()
+ {
+ NetvibesQuery q1 = new NetvibesQuery(0, 10, "14", "all", "foo");
+ NetvibesQuery q2 = new NetvibesQuery(0, 10, "14", "all", "foo");
+ assertTrue(q1.equals(q2));
+ }
+
+}
+
Modified: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/test/widget/support/TestQuery.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/test/widget/support/TestQuery.java 2007-11-16 14:59:43 UTC (rev 8974)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/test/widget/support/TestQuery.java 2007-11-16 15:13:46 UTC (rev 8975)
@@ -36,7 +36,7 @@
public URL buildQueryURL() throws MalformedURLException
{
- return new URL("http://localhost:8080");
+ return new URL("http://localhost:8181");
}
}
Modified: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/AbstractWidgetProvider.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/AbstractWidgetProvider.java 2007-11-16 14:59:43 UTC (rev 8974)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/AbstractWidgetProvider.java 2007-11-16 15:13:46 UTC (rev 8975)
@@ -65,7 +65,7 @@
private boolean fetchWidgetsOnDirectoryLookup = false;
/** The connection timeout */
- protected long connectionTimeout = 5000;
+ protected int connectionTimeout = 5000;
/** Eviction thread timing */
protected long timing = TimeUnit.MILLISECONDS.convert(60, TimeUnit.SECONDS);
@@ -92,7 +92,7 @@
return connectionTimeout;
}
- public void setConnectionTimeout(long connectionTimeout)
+ public void setConnectionTimeout(int connectionTimeout)
{
this.connectionTimeout = connectionTimeout;
}
Modified: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/WidgetProvider.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/WidgetProvider.java 2007-11-16 14:59:43 UTC (rev 8974)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/WidgetProvider.java 2007-11-16 15:13:46 UTC (rev 8975)
@@ -43,7 +43,7 @@
public List<DirectoryQueryResultEntry> search(WidgetQuery query);
- public void setConnectionTimeout(long connectionTimeout);
+ public void setConnectionTimeout(int connectionTimeout);
public void setQueryExpiration(long millis);
Modified: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/GGWidgetPortlet.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/GGWidgetPortlet.java 2007-11-16 14:59:43 UTC (rev 8974)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/GGWidgetPortlet.java 2007-11-16 15:13:46 UTC (rev 8975)
@@ -100,6 +100,12 @@
params.put("currentPage", new String[]{currentPage});
}
+ String numberOfResults = req.getParameter("numberOfResults");
+ if (numberOfResults != null)
+ {
+ params.put("numberOfResults", new String[]{numberOfResults});
+ }
+
//
String queryParam = req.getParameter("query");
if (queryParam != null)
Modified: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/provider/GGDirectoryQueryMapEntry.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/provider/GGDirectoryQueryMapEntry.java 2007-11-16 14:59:43 UTC (rev 8974)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/provider/GGDirectoryQueryMapEntry.java 2007-11-16 15:13:46 UTC (rev 8975)
@@ -36,14 +36,18 @@
/** The widget URL */
private final WidgetQuery query;
- public GGDirectoryQueryMapEntry(WidgetQuery query)
+ /** The connection timeout */
+ private final int connectionTimeout;
+
+ public GGDirectoryQueryMapEntry(WidgetQuery query, int connectionTimeout)
{
this.query = query;
+ this.connectionTimeout = connectionTimeout;
}
public DirectoryQueryResult call() throws Exception
{
- return new GGQueryResultBuilder(query).build(5000); // todo
+ return new GGQueryResultBuilder(query).build(connectionTimeout);
}
}
Modified: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/provider/GGProvider.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/provider/GGProvider.java 2007-11-16 14:59:43 UTC (rev 8974)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/provider/GGProvider.java 2007-11-16 15:13:46 UTC (rev 8975)
@@ -58,7 +58,7 @@
@Override
protected final void addDirectoryResult(WidgetQuery query)
{
- ExpiringFutureTask<DirectoryQueryResult> dt = new ExpiringFutureTask<DirectoryQueryResult>(queryExpiration, new GGDirectoryQueryMapEntry(query));
+ ExpiringFutureTask<DirectoryQueryResult> dt = new ExpiringFutureTask<DirectoryQueryResult>(queryExpiration, new GGDirectoryQueryMapEntry(query, (int) connectionTimeout));
ExpiringFutureTask<DirectoryQueryResult> e = queries.putIfAbsent(query, dt);
if (e == null)
{
Modified: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesWidgetPortlet.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesWidgetPortlet.java 2007-11-16 14:59:43 UTC (rev 8974)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesWidgetPortlet.java 2007-11-16 15:13:46 UTC (rev 8975)
@@ -90,7 +90,26 @@
{
params.put("cat", new String[]{catParam});
}
+
+ String typeParam = req.getParameter("type");
+ if (catParam != null)
+ {
+ params.put("type", new String[]{typeParam});
+ }
+ String currentPage = req.getParameter("currentPage");
+ if (currentPage != null)
+ {
+ params.put("currentPage", new String[]{currentPage});
+ }
+
+
+ String numberOfResults = req.getParameter("numberOfResults");
+ if (numberOfResults != null)
+ {
+ params.put("numberOfResults", new String[]{numberOfResults});
+ }
+
//
String queryParam = req.getParameter("query");
if (queryParam != null)
@@ -98,10 +117,10 @@
params.put("query", new String[]{queryParam});
}
- String pickMethod = req.getParameter("gg_pick_method");
+ String pickMethod = req.getParameter("nv_pick_method");
if (pickMethod != null)
{
- params.put("gg_pick_method", new String[]{pickMethod});
+ params.put("nv_pick_method", new String[]{pickMethod});
}
//
Added: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/directory/NVEcosystemFactory.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/directory/NVEcosystemFactory.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/directory/NVEcosystemFactory.java 2007-11-16 15:13:46 UTC (rev 8975)
@@ -0,0 +1,100 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.widget.netvibes.directory;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.xb.binding.GenericObjectModelFactory;
+import org.jboss.xb.binding.UnmarshallingContext;
+import org.xml.sax.Attributes;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class NVEcosystemFactory implements GenericObjectModelFactory
+{
+
+ public void addChild(Object parent, Object child, UnmarshallingContext unmarshallingContext, String namespaceURI, String localname)
+ {
+ if(child instanceof NVQueryResultMetaData)
+ {
+ ((List)parent).add(child);
+ }
+ }
+
+ public Object newChild(Object parent, UnmarshallingContext unmarshallingContext, String namespaceURI, String localName, Attributes attributes)
+ {
+ if("channel".equals(localName))
+ {
+ return parent;
+ }
+ if("item".equals(localName))
+ {
+ return new NVQueryResultMetaData();
+ }
+ return null;
+ }
+
+ public void setValue(Object object, UnmarshallingContext unmarshallingContext, String namespaceURI, String localName, String value)
+ {
+ if(object instanceof NVQueryResultMetaData)
+ {
+ NVQueryResultMetaData meta = (NVQueryResultMetaData) object;
+ if ("title".equals(localName))
+ {
+ meta.setTitle(value);
+ }
+ else if ("description".equals(localName))
+ {
+ meta.setDescription(value);
+ }
+ else if ("link".equals(localName))
+ {
+ meta.setLink(value);
+ }
+ else if ("guid".equals(localName))
+ {
+ meta.setGuid(value);
+ }
+ else if ("pubDate".equals(localName))
+ {
+ meta.setPubDate(value);
+ }
+ }
+
+ }
+
+ public Object completeRoot(Object root, UnmarshallingContext unmarshallingContext, String namespaceURI, String localname)
+ {
+ return root;
+ }
+
+ public Object newRoot(Object root, UnmarshallingContext unmarshallingContext, String namespaceURI, String localname, Attributes attributes)
+ {
+ return new ArrayList();
+ }
+
+}
+
Added: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/directory/NVQueryResultMetaData.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/directory/NVQueryResultMetaData.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/directory/NVQueryResultMetaData.java 2007-11-16 15:13:46 UTC (rev 8975)
@@ -0,0 +1,97 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.widget.netvibes.directory;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class NVQueryResultMetaData
+{
+
+ /** . */
+ private String title;
+
+ /** . */
+ private String description;
+
+ /** . */
+ private String link;
+
+ /** . */
+ private String guid;
+
+ /** . */
+ private String pubDate;
+
+ public String getTitle()
+ {
+ return title;
+ }
+
+ public void setTitle(String title)
+ {
+ this.title = title;
+ }
+
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public void setDescription(String description)
+ {
+ this.description = description;
+ }
+
+ public String getLink()
+ {
+ return link;
+ }
+
+ public void setLink(String link)
+ {
+ this.link = link;
+ }
+
+ public String getGuid()
+ {
+ return guid;
+ }
+
+ public void setGuid(String guid)
+ {
+ this.guid = guid;
+ }
+
+ public String getPubDate()
+ {
+ return pubDate;
+ }
+
+ public void setPubDate(String pubDate)
+ {
+ this.pubDate = pubDate;
+ }
+}
+
Added: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/directory/NetvibesWidgetApplicationType.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/directory/NetvibesWidgetApplicationType.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/directory/NetvibesWidgetApplicationType.java 2007-11-16 15:13:46 UTC (rev 8975)
@@ -0,0 +1,54 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.widget.netvibes.directory;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class NetvibesWidgetApplicationType
+{
+
+ private String id;
+
+ private String description;
+
+ public NetvibesWidgetApplicationType(String id, String description)
+ {
+ this.id = id;
+ this.description = description;
+ }
+
+ public String getId()
+ {
+ return id;
+ }
+
+ public String getDescription()
+ {
+ return description;
+ }
+
+
+}
+
Added: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/directory/NetvibesWidgetCategory.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/directory/NetvibesWidgetCategory.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/directory/NetvibesWidgetCategory.java 2007-11-16 15:13:46 UTC (rev 8975)
@@ -0,0 +1,53 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.widget.netvibes.directory;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class NetvibesWidgetCategory
+{
+
+ private String id;
+
+ private String description;
+
+ public NetvibesWidgetCategory(String id, String description)
+ {
+ this.id = id;
+ this.description = description;
+ }
+
+ public String getId()
+ {
+ return id;
+ }
+
+ public String getDescription()
+ {
+ return description;
+ }
+
+}
+
Added: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/provider/NetvibesDirectoryQueryMapEntry.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/provider/NetvibesDirectoryQueryMapEntry.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/provider/NetvibesDirectoryQueryMapEntry.java 2007-11-16 15:13:46 UTC (rev 8975)
@@ -0,0 +1,55 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.widget.netvibes.provider;
+
+import java.util.concurrent.Callable;
+
+import org.jboss.portal.widget.DirectoryQueryResult;
+import org.jboss.portal.widget.WidgetQuery;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class NetvibesDirectoryQueryMapEntry implements Callable<DirectoryQueryResult>
+{
+
+ /** The widget URL */
+ private final WidgetQuery query;
+
+ /** The connection timeout */
+ private final int connectionTimeout;
+
+ public NetvibesDirectoryQueryMapEntry(WidgetQuery query, int connectionTimeout)
+ {
+ this.query = query;
+ this.connectionTimeout = connectionTimeout;
+ }
+
+ public DirectoryQueryResult call() throws Exception
+ {
+ return new NetvibesQueryResultBuilder(query).build(connectionTimeout);
+ }
+
+}
+
Modified: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/provider/NetvibesProvider.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/provider/NetvibesProvider.java 2007-11-16 14:59:43 UTC (rev 8974)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/provider/NetvibesProvider.java 2007-11-16 15:13:46 UTC (rev 8975)
@@ -23,11 +23,18 @@
package org.jboss.portal.widget.netvibes.provider;
import java.net.URL;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import org.jboss.portal.common.util.CollectionBuilder;
import org.jboss.portal.widget.AbstractWidgetProvider;
+import org.jboss.portal.widget.DirectoryQueryResult;
import org.jboss.portal.widget.ExpiringFutureTask;
import org.jboss.portal.widget.Widget;
import org.jboss.portal.widget.WidgetQuery;
+import org.jboss.portal.widget.netvibes.directory.NetvibesWidgetApplicationType;
+import org.jboss.portal.widget.netvibes.directory.NetvibesWidgetCategory;
/**
* @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
@@ -37,10 +44,52 @@
public class NetvibesProvider extends AbstractWidgetProvider
{
+ /** The netvibes categories */
+ private static final Collection CATEGORIES = Collections.unmodifiableList((List)CollectionBuilder.arrayList()
+ .add(new NetvibesWidgetCategory("0", "All"))
+ .add(new NetvibesWidgetCategory("4", "News"))
+ .add(new NetvibesWidgetCategory("5", "Tools & Reference"))
+ .add(new NetvibesWidgetCategory("6", "Communication"))
+ .add(new NetvibesWidgetCategory("7", "Arts & Entertainment"))
+ .add(new NetvibesWidgetCategory("8", "Fun & Games"))
+ .add(new NetvibesWidgetCategory("9", "Shopping"))
+ .add(new NetvibesWidgetCategory("10", "Sports"))
+ .add(new NetvibesWidgetCategory("11", "Travels"))
+ .add(new NetvibesWidgetCategory("12", "Business"))
+ .add(new NetvibesWidgetCategory("13", "Lifestyle"))
+ .add(new NetvibesWidgetCategory("14", "Technology"))
+ .add(new NetvibesWidgetCategory("15", "Sciences"))
+ .get());
+
+ /** The netvibes application types */
+ private static final Collection TYPES = Collections.unmodifiableList((List)CollectionBuilder.arrayList()
+ .add(new NetvibesWidgetApplicationType("all", "All"))
+ .add(new NetvibesWidgetApplicationType("application", "Application"))
+ .add(new NetvibesWidgetApplicationType("feed", "Feed"))
+ .add(new NetvibesWidgetApplicationType("podcast", "Podcast"))
+ .add(new NetvibesWidgetApplicationType("event", "Event"))
+ .get());
+
+ public Collection getCategories()
+ {
+ return CATEGORIES;
+ }
+
+ public Collection getApplicationTypes()
+ {
+ return TYPES;
+ }
+
@Override
protected void addDirectoryResult(WidgetQuery query)
{
- throw new IllegalArgumentException("Not yet implemented");
+ ExpiringFutureTask<DirectoryQueryResult> dt = new ExpiringFutureTask<DirectoryQueryResult>(queryExpiration, new NetvibesDirectoryQueryMapEntry(query, connectionTimeout));
+ ExpiringFutureTask<DirectoryQueryResult> e = queries.putIfAbsent(query, dt);
+ if (e == null)
+ {
+ e = dt;
+ executor.submit(e);
+ }
}
@Override
Added: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/provider/NetvibesQuery.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/provider/NetvibesQuery.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/provider/NetvibesQuery.java 2007-11-16 15:13:46 UTC (rev 8975)
@@ -0,0 +1,156 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.widget.netvibes.provider;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Locale;
+
+import org.jboss.portal.widget.WidgetQuery;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class NetvibesQuery implements WidgetQuery
+{
+
+ /** . */
+ private static final org.jboss.logging.Logger log = org.jboss.logging.Logger.getLogger(NetvibesQuery.class);
+
+ /** . */
+ private int start;
+
+ /** Zero or negative means it is not used. */
+ private int count = 10;
+
+ /** . */
+ private String cat;
+
+ /** . */
+ private String type;
+
+ /** . */
+ private String q;
+
+ /** . */
+ private Locale locale;
+
+ /** . */
+ private int hashCode;
+
+ public NetvibesQuery(int start, int num, String cat, String type, String q)
+ {
+ if (start < 0)
+ {
+ throw new IllegalArgumentException("No negative start");
+ }
+ if (cat != null && cat.length() == 0)
+ {
+ cat = null;
+ }
+ if (q != null && q.length() == 0)
+ {
+ q = null;
+ }
+
+ //
+ this.start = start;
+ this.count = num;
+ this.cat = cat;
+ this.q = q;
+ this.type = type;
+ this.hashCode = start + num + (cat == null ? 0 : 1 + cat.hashCode()) + (q == null ? 0 : 1 + q.hashCode()) + (type == null ? 0 : 1 + type.hashCode());
+ }
+
+ public int getStart()
+ {
+ return start;
+ }
+
+ public int getNum()
+ {
+ return count;
+ }
+
+ public String getCat()
+ {
+ return cat;
+ }
+
+ public String getQ()
+ {
+ return q;
+ }
+
+ public boolean equals(Object obj)
+ {
+ if( obj == this)
+ {
+ return true;
+ }
+ if(obj instanceof NetvibesQuery)
+ {
+ NetvibesQuery that = (NetvibesQuery) obj;
+ return
+ (this.start == that.start) &&
+ (this.count == that.count) &&
+ (this.cat == null ? that.cat == null : this.cat.equals(that.cat)) &&
+ (this.q == null ? that.q == null : this.q.equals(that.q));
+ }
+ return false;
+ }
+
+ public int hashCode()
+ {
+ return hashCode;
+ }
+
+ public URL buildQueryURL() throws MalformedURLException
+ {
+ StringBuffer buffer = new StringBuffer("http://eco.netvibes.com/rss.php?synd=jboss");
+ if( start > 0 )
+ {
+ buffer.append("&start=").append(start);
+ }
+ if (count > 0)
+ {
+ buffer.append("&count=").append(count);
+ }
+ if (cat != null)
+ {
+ buffer.append("&cat=").append(cat);
+ }
+ if (type != null)
+ {
+ buffer.append("&type=").append(type);
+ }
+ if (q != null)
+ {
+ buffer.append("&q=").append(q);
+ }
+ return new URL(buffer.toString());
+ }
+
+}
+
Added: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/provider/NetvibesQueryResult.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/provider/NetvibesQueryResult.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/provider/NetvibesQueryResult.java 2007-11-16 15:13:46 UTC (rev 8975)
@@ -0,0 +1,66 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.widget.netvibes.provider;
+
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.jboss.portal.widget.DirectoryQueryResult;
+import org.jboss.portal.widget.DirectoryQueryResultEntry;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class NetvibesQueryResult implements DirectoryQueryResult
+{
+ private final List<NetvibesQueryResultEntry> entries;
+
+ public NetvibesQueryResult(List entries)
+ {
+ if (entries == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ this.entries = entries;
+ }
+
+ public List<URL> collection()
+ {
+ List<URL> list = new ArrayList<URL>();
+ for(NetvibesQueryResultEntry entry : entries)
+ {
+ list.add(entry.getURL());
+ }
+ return list;
+ }
+
+ public Iterator<? extends DirectoryQueryResultEntry> entries()
+ {
+ return entries.iterator();
+ }
+
+}
+
Added: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/provider/NetvibesQueryResultBuilder.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/provider/NetvibesQueryResultBuilder.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/provider/NetvibesQueryResultBuilder.java 2007-11-16 15:13:46 UTC (rev 8975)
@@ -0,0 +1,139 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.widget.netvibes.provider;
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.SocketTimeoutException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+import org.jboss.portal.common.io.IOTools;
+import org.jboss.portal.common.net.URLTools;
+import org.jboss.portal.widget.WidgetQuery;
+import org.jboss.portal.widget.netvibes.directory.NVEcosystemFactory;
+import org.jboss.portal.widget.netvibes.directory.NVQueryResultMetaData;
+import org.jboss.xb.binding.ObjectModelFactory;
+import org.jboss.xb.binding.Unmarshaller;
+import org.jboss.xb.binding.UnmarshallerFactory;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class NetvibesQueryResultBuilder
+{
+
+ private static final org.jboss.logging.Logger log = org.jboss.logging.Logger.getLogger(NetvibesQueryResultBuilder.class);
+
+ /** . */
+ private final URL url;
+
+
+ public NetvibesQueryResultBuilder(WidgetQuery query) throws MalformedURLException
+ {
+ if (query == null)
+ {
+
+ }
+ this.url = query.buildQueryURL();
+ }
+
+ public NetvibesQueryResultBuilder(URL url)
+ {
+ if (url == null)
+ {
+
+ }
+ this.url = url;
+ }
+
+ public NetvibesQueryResult build(int connectionTimeout)
+ {
+ try
+ {
+ // Read fully the URL content first
+ long millis = System.currentTimeMillis();
+ byte[] bytes;
+ if ("http".equals(url.getProtocol()))
+ {
+ bytes = URLTools.getContent(url, connectionTimeout, connectionTimeout);
+ }
+ else
+ {
+
+ InputStream in = url.openStream();
+ try
+ {
+ bytes = IOTools.getBytes(in);
+ }
+ finally
+ {
+ IOTools.safeClose(in);
+ }
+ }
+
+ //
+ if (bytes == null)
+ {
+ throw new Exception("Cannot retrieve " + url);
+ }
+
+ String string = new String(bytes);
+
+ List data = null;
+
+ Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
+
+ // create an instance of ObjectModelFactory
+ ObjectModelFactory factory = new NVEcosystemFactory();
+
+ // let the object model factory to create an instance of List and populate it with data from XML
+ data = (List)unmarshaller.unmarshal(new ByteArrayInputStream(string.getBytes("UTF-8")), factory, null);
+ List entries = new ArrayList();
+
+ for (Iterator iterator = data.iterator(); iterator.hasNext();)
+ {
+ NVQueryResultMetaData meta = (NVQueryResultMetaData) iterator.next();
+ NetvibesQueryResultEntry entry = new NetvibesQueryResultEntry(meta);
+ entries.add(entry);
+ }
+ return new NetvibesQueryResult(entries);
+ }
+ catch (SocketTimeoutException e)
+ {
+ log.error("Query for netvibs widget in directory failed due to timeout. Try to increase connectionTimeout initial parameter; ", e);
+ }
+ catch(Exception e)
+ {
+ log.error("Netvibes widget query failed: ", e);
+ }
+ return new NetvibesQueryResult(Collections.EMPTY_LIST);
+ }
+
+}
+
Added: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/provider/NetvibesQueryResultEntry.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/provider/NetvibesQueryResultEntry.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/provider/NetvibesQueryResultEntry.java 2007-11-16 15:13:46 UTC (rev 8975)
@@ -0,0 +1,70 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.widget.netvibes.provider;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.jboss.portal.widget.DirectoryQueryResultEntry;
+import org.jboss.portal.widget.netvibes.directory.NVQueryResultMetaData;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class NetvibesQueryResultEntry implements DirectoryQueryResultEntry
+{
+
+ /** . */
+ private String title;
+
+ /** . */
+ private String description;
+
+ /** . */
+ private URL url;
+
+ public NetvibesQueryResultEntry(NVQueryResultMetaData meta) throws MalformedURLException
+ {
+ this.title = meta.getTitle();
+ this.description = meta.getDescription();
+ this.url = new URL(meta.getLink());
+ }
+
+ public String getDescription()
+ {
+ return this.description;
+ }
+
+ public String getTitle()
+ {
+ return this.title;
+ }
+
+ public URL getURL()
+ {
+ return this.url;
+ }
+
+}
+
Modified: branches/JBoss_Portal_Branch_2_6/widget/src/resources/portal-widget-netvibes-war/WEB-INF/jsp/edit_content.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/resources/portal-widget-netvibes-war/WEB-INF/jsp/edit_content.jsp 2007-11-16 14:59:43 UTC (rev 8974)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/resources/portal-widget-netvibes-war/WEB-INF/jsp/edit_content.jsp 2007-11-16 15:13:46 UTC (rev 8975)
@@ -1,14 +1,20 @@
+<%@page import="org.jboss.portal.widget.netvibes.directory.NetvibesWidgetCategory"%>
+<%@page import="org.jboss.portal.widget.netvibes.directory.NetvibesWidgetApplicationType"%>
<%@page import="org.jboss.portal.widget.netvibes.provider.NetvibesProvider"%>
<%@page import="org.jboss.portal.widget.netvibes.NetvibesPreferenceInfo"%>
+<%@page import="org.jboss.portal.widget.netvibes.provider.NetvibesQuery"%>
+<%@page import="org.jboss.portal.common.util.IteratorStatus"%>
+<%@page import="org.jboss.portal.widget.DirectoryQueryResultEntry"%>
<%@page import="org.jboss.portal.widget.netvibes.NetvibesWidget"%>
<%@page import="org.jboss.portal.widget.netvibes.type.NVDataType"%>
<%@page import="org.jboss.portal.widget.netvibes.type.NVRangeType"%>
+<%@page import="org.jboss.portal.widget.netvibes.type.NVListType"%>
<%@page import="javax.portlet.PortletURL"%>
+<%@page import="java.util.List"%>
<%@page import="java.util.Iterator"%>
<%@ page language="java" %>
<%@ taglib uri="http://java.sun.com/portlet" prefix="p" %>
<%@ page isELIgnored="false" %>
-<%@page import="org.jboss.portal.widget.netvibes.type.NVListType"%>
<p:defineObjects/>
<div>
<%
@@ -21,15 +27,72 @@
selWidget = (NetvibesWidget) provider.getWidget(uri);
}
- // no directory lookup available
- boolean uriPickMethod = true;
+ // Number of results to display
+ int numberOfResults = 10;
+ String resultSize= request.getParameter("numberOfResults");
+ if (resultSize != null && !resultSize.equals(""))
+ {
+ numberOfResults = Integer.parseInt(resultSize);
+ }
+
+ // Pagination
+ int currentPage = 0;
+ String tempPage = request.getParameter("currentPage");
+ if ( tempPage != null && !tempPage.equals(""))
+ {
+ int temp = Integer.parseInt(tempPage);
+ currentPage = temp < 0 ? 0 : temp;
+ }
+
+ // Get query term
+ String queryTerm = request.getParameter("query");
+ if (queryTerm == null)
+ {
+ queryTerm = "";
+ }
+
+ String type = request.getParameter("type");
+ if (type == null)
+ {
+ type = "all";
+ }
+
+ // Get category term
+ String catTerm = request.getParameter("cat");
+ if (catTerm == null)
+ {
+ catTerm = "0"; // all
+ }
+
+ // Compute query
+ int queryStart = currentPage * numberOfResults;
+ NetvibesQuery query = new NetvibesQuery(queryStart, numberOfResults + 1, catTerm, type, queryTerm);
+ List queryResults = provider.search(query);
+
+ boolean uriPickMethod = false;
+ String nvPickMethod = request.getParameter("nv_pick_method");
+ if (nvPickMethod != null && nvPickMethod.equals("uri"))
+ {
+ uriPickMethod = true;
+ }
%>
+<div id="<p:namespace/>selection">
+ <input type="RADIO" name="nv_pick_method" value="directory" <%= !uriPickMethod ? "CHECKED" : "" %>
+ onclick="document.getElementById('<p:namespace/>directory_search_div').style.display = 'block'; document.getElementById('<p:namespace/>gadget_url_div').style.display = 'none'; ">
+ Widget Directory
+ <input type="RADIO" name="nv_pick_method" value="uri" <%= uriPickMethod ? "CHECKED" : "" %>
+ onclick="document.getElementById('<p:namespace/>directory_search_div').style.display = 'none'; document.getElementById('<p:namespace/>gadget_url_div').style.display = 'block'; ">
+ Widget URI
+ <br>
+ <hr>
+</div>
+
<div id="<p:namespace/>gadget_url_div" style="display: <%= uriPickMethod ? "block" : "none" %>;">
<%
PortletURL contentURL = renderResponse.createActionURL();
contentURL.setParameter("content.action.select", "content.action.select");
- contentURL.setParameter("gg_pick_method", "uri");
+ contentURL.setParameter("nv_pick_method", "uri");
%>
<form action="<%= contentURL %>" method="post">
<%
@@ -57,6 +120,135 @@
<input type="submit" value="Select Widget" class="portlet-form-button"/>
</form>
</div>
+<div id="<p:namespace/>directory_search_div" style="display: <%= !uriPickMethod ? "block" : "none" %>;">
+
+ <form action="<p:renderURL></p:renderURL>" method="post">
+ <input type="text" name="query" value="<%= queryTerm %>" class="portlet-form-field"/>
+ <select name="cat" class="portlet-form-field">
+ <%
+ // Category dropdown
+ for (Iterator i = provider.getCategories().iterator(); i.hasNext();)
+ {
+ NetvibesWidgetCategory cat = (NetvibesWidgetCategory)i.next();
+ boolean selected = cat.getId().equals(catTerm);
+ %>
+ <option value="<%= cat.getId() %>" <%= selected ? "selected=\"selected\"" : "" %>><%=cat.getDescription()%>
+ </option>
+ <%
+ }
+ %>
+ </select>
+ <select name="type" class="portlet-form-field">
+ <%
+ // Category dropdown
+ for (Iterator i = provider.getApplicationTypes().iterator(); i.hasNext();)
+ {
+ NetvibesWidgetApplicationType appType = (NetvibesWidgetApplicationType)i.next();
+ boolean selected = appType.getId().equals(type);
+ %>
+ <option value="<%= appType.getId() %>" <%= selected ? "selected=\"selected\"" : "" %>><%=appType.getDescription()%>
+ </option>
+ <%
+ }
+ %>
+ </select>
+ <select name="numberOfResults" class="portlet-form-field">
+ <%
+ // Number of results dropdown
+ for(int i = 5; i <= 25; i = i + 5)
+ {
+ boolean selected = i == numberOfResults;
+ %><option value="<%= i %>" <%= selected ? "selected=\"selected\"" : "" %>><%= i %></option><%
+ }
+ %>
+ </select>
+ <br/>
+ <input type="submit" value="Search Widgets" class="portlet-form-button"/>
+ </form>
+
+ <p>
+ <table style="width:100%; border: 1px solid;" cellspacing="0" cellpadding="0">
+ <%
+ for (IteratorStatus i = new IteratorStatus(queryResults.iterator()); i.hasNext();)
+ {
+ if ( (i.getIndex() + 1) >= numberOfResults)
+ {
+ break;
+ }
+
+ DirectoryQueryResultEntry result = (DirectoryQueryResultEntry) i.next();
+ boolean selected = selWidget != null && selWidget.getId().equals(result.getURL().toString());
+ PortletURL selectURL = renderResponse.createActionURL();
+
+ // Set parameters for selection
+ selectURL.setParameter("content.action.select", "content.action.select");
+ selectURL.setParameter("content.uri", result.getURL().toString());
+
+ // Set default parametrization state
+
+ // Propagage search nav state
+ selectURL.setParameter("cat", catTerm);
+ selectURL.setParameter("query", queryTerm);
+ selectURL.setParameter("type", type);
+ selectURL.setParameter("currentPage", String.valueOf(currentPage));
+ selectURL.setParameter("numberOfResults", String.valueOf(numberOfResults));
+
+ //
+ String rowClass = selected ? "portlet-section-selected" : (i.getIndex() % 2 == 0 ? "portlet-section-body" : "portlet-section-alternate");
+ %>
+ <tr class="<%= rowClass %>">
+ <td><a
+ href="<%= selectURL %>"><%= result.getTitle() %>
+ </a></td>
+ </tr>
+ <%
+ }
+ %>
+ </table>
+ <table style="width:100%; border: none;" cellspacing="0" cellpadding="0">
+ <tr>
+ <td style="test-align: left;">
+ <% // previous page
+ if ( currentPage > 0 )
+ {
+ PortletURL prevURL = renderResponse.createRenderURL();
+ prevURL.setParameter("cat", catTerm);
+ prevURL.setParameter("query", queryTerm);
+ prevURL.setParameter("type", type);
+ prevURL.setParameter("numberOfResults", String.valueOf(numberOfResults));
+
+ String prevPage = String.valueOf(currentPage - 1);
+
+ prevURL.setParameter("currentPage", prevPage);
+ %><a href="<%=prevURL %>">previous page</a><%
+ }
+ %>
+ </td>
+ <td style="text-align: right;">
+ <% // next page
+ if ( queryResults.size() > numberOfResults )
+ {
+ PortletURL nextURL = renderResponse.createRenderURL();
+ nextURL.setParameter("cat", catTerm);
+ nextURL.setParameter("query", queryTerm);
+ nextURL.setParameter("type", type);
+ nextURL.setParameter("numberOfResults", String.valueOf(numberOfResults));
+
+ String nextPage = String.valueOf(currentPage + 1);
+
+ nextURL.setParameter("currentPage", nextPage);
+ %><a href="<%= nextURL %>">next page</a><%
+ }
+ %>
+ </td>
+ </tr>
+ </table>
+ </p>
+
+</div>
+
+
+
<%
if (selWidget != null && !selWidget.getWidgetInfo().getPreferencesInfo().getPreferences().isEmpty())
{
Added: branches/JBoss_Portal_Branch_2_6/widget/src/resources/test/netvibes/queryresult_1.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/resources/test/netvibes/queryresult_1.xml (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/resources/test/netvibes/queryresult_1.xml 2007-11-16 15:13:46 UTC (rev 8975)
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="utf-8"?>
+<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0">
+ <channel>
+ <title><![CDATA[Netvibes ecosystem latest modules]]></title>
+ <link>http://eco.netvibes.com</link>
+ <description><![CDATA[Netvibes ecosystem latest modules]]></description>
+ <pubDate>Fri, 16 Nov 2007 12:44:27 +0000</pubDate>
+ <generator>Netvibes Ecosystem</generator>
+
+ <docs>http://blogs.law.harvard.edu/tech/rss</docs>
+ <item>
+ <title><![CDATA[The Jerusalem Post]]></title>
+ <link>http://www.netvibes.com/modules/multipleFeeds/multipleFeeds.php?provider=...</link>
+ <guid>http://eco.netvibes.com/6/206552</guid>
+ <description><![CDATA[Latest news from The Jerusalem Post, the world's top English-language daily newspaper covering Israel, the Middle East and the Jewish World.]]></description>
+ <pubDate>Thu, 15 Nov 2007 08:57:46 +0000</pubDate>
+
+ <enclosure url="http://eco.netvibes.com/thumb/206552" type="image/jpeg" length=""/>
+ </item>
+ <item>
+ <title><![CDATA[WMLScript reference]]></title>
+ <link>http://freebestoffer.com/downloads/wmlscript.html</link>
+ <guid>http://eco.netvibes.com/6/206470</guid>
+ <description><![CDATA[Search through WMLScript help, reference, tutorials and examples.]]></description>
+
+ <pubDate>Tue, 13 Nov 2007 16:13:34 +0000</pubDate>
+ <enclosure url="http://eco.netvibes.com/thumb/206470" type="image/jpeg" length=""/>
+ </item>
+ <item>
+ <title><![CDATA[Web developer's help]]></title>
+ <link>http://freebestoffer.com/downloads/webdevel.html</link>
+ <guid>http://eco.netvibes.com/6/206469</guid>
+
+ <description><![CDATA[Search and browse help, tutorials, examples and reference documents on XML, XSLT, HTML, JavaScript, VBScript, Flash, SQL and more.]]></description>
+ <pubDate>Tue, 13 Nov 2007 16:13:36 +0000</pubDate>
+ <enclosure url="http://eco.netvibes.com/thumb/206469" type="image/jpeg" length=""/>
+ </item>
+ <item>
+ <title><![CDATA[VBScript reference]]></title>
+ <link>http://freebestoffer.com/downloads/vbscript.html</link>
+
+ <guid>http://eco.netvibes.com/6/206468</guid>
+ <description><![CDATA[Search through Visual Basic script help, reference, tutorials and examples.]]></description>
+ <pubDate>Tue, 13 Nov 2007 16:13:39 +0000</pubDate>
+ <enclosure url="http://eco.netvibes.com/thumb/206468" type="image/jpeg" length=""/>
+ </item>
+ <item>
+ <title><![CDATA[SVG reference]]></title>
+
+ <link>http://freebestoffer.com/downloads/svg.html</link>
+ <guid>http://eco.netvibes.com/6/206467</guid>
+ <description><![CDATA[Search through SVG help, reference, tutorials and examples.]]></description>
+ <pubDate>Tue, 13 Nov 2007 16:13:42 +0000</pubDate>
+ <enclosure url="http://eco.netvibes.com/thumb/206467" type="image/jpeg" length=""/>
+ </item>
+ <item>
+
+ <title><![CDATA[SQL reference]]></title>
+ <link>http://freebestoffer.com/downloads/sql.html</link>
+ <guid>http://eco.netvibes.com/6/206466</guid>
+ <description><![CDATA[Search through SQL help, reference, tutorials and examples.]]></description>
+ <pubDate>Tue, 13 Nov 2007 16:13:44 +0000</pubDate>
+ <enclosure url="http://eco.netvibes.com/thumb/206466" type="image/jpeg" length=""/>
+ </item>
+
+ <item>
+ <title><![CDATA[SMIL reference]]></title>
+ <link>http://freebestoffer.com/downloads/smil.html</link>
+ <guid>http://eco.netvibes.com/6/206465</guid>
+ <description><![CDATA[Search through SMIL help, reference, tutorials and examples.]]></description>
+ <pubDate>Tue, 13 Nov 2007 16:13:47 +0000</pubDate>
+ <enclosure url="http://eco.netvibes.com/thumb/206465" type="image/jpeg" length=""/>
+
+ </item>
+ <item>
+ <title><![CDATA[PHP reference]]></title>
+ <link>http://freebestoffer.com/downloads/php.html</link>
+ <guid>http://eco.netvibes.com/6/206464</guid>
+ <description><![CDATA[Search through PHP help, reference, tutorials and examples.]]></description>
+ <pubDate>Tue, 13 Nov 2007 16:13:51 +0000</pubDate>
+
+ <enclosure url="http://eco.netvibes.com/thumb/206464" type="image/jpeg" length=""/>
+ </item>
+ <item>
+ <title><![CDATA[Javascript Reference]]></title>
+ <link>http://freebestoffer.com/downloads/javascript.html</link>
+ <guid>http://eco.netvibes.com/6/206463</guid>
+ <description><![CDATA[Search and browse Javascript Reference.]]></description>
+
+ <pubDate>Tue, 13 Nov 2007 16:13:54 +0000</pubDate>
+ <enclosure url="http://eco.netvibes.com/thumb/206463" type="image/jpeg" length=""/>
+ </item>
+ <item>
+ <title><![CDATA[HTML DOM Reference]]></title>
+ <link>http://freebestoffer.com/downloads/htmldom.html</link>
+ <guid>http://eco.netvibes.com/6/206459</guid>
+
+ <description><![CDATA[Search and browse HTML DOM Reference.]]></description>
+ <pubDate>Tue, 13 Nov 2007 16:13:59 +0000</pubDate>
+ <enclosure url="http://eco.netvibes.com/thumb/206459" type="image/jpeg" length=""/>
+ </item>
+ </channel>
+</rss>
\ No newline at end of file
16 years, 10 months
JBoss Portal SVN: r8974 - in tools/docbook/support: support/lib and 1 other directory.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-11-16 09:59:43 -0500 (Fri, 16 Nov 2007)
New Revision: 8974
Removed:
tools/docbook/support/support/lib/xcluder-0.9.2.jar
Modified:
tools/docbook/support/support.xml
Log:
Unfortunately painfully slow... Xerces solution is also slow (no xinclude then :( )
Deleted: tools/docbook/support/support/lib/xcluder-0.9.2.jar
===================================================================
(Binary files differ)
Modified: tools/docbook/support/support.xml
===================================================================
--- tools/docbook/support/support.xml 2007-11-16 13:29:12 UTC (rev 8973)
+++ tools/docbook/support/support.xml 2007-11-16 14:59:43 UTC (rev 8974)
@@ -101,22 +101,7 @@
-->
</target>
- <target name="xincludefusion">
-
- <taskdef name="xcluder"
- classname="gr.abiss.xcluder.XercesXcluder"
- classpathref="lib.classpath"
- />
-
-
- <xcluder in="${basedir}/${lang}/master.xml"
- out="${basedir}/${build.dir}/${lang}/master.xml"
- indent="yes"
- />
-
- </target>
-
- <target name="lang.docpdf" depends="xincludefusion">
+ <target name="lang.docpdf">
<!-- Copy all the images to the output location,
will be removed later. -->
@@ -143,7 +128,7 @@
<classpath refid="lib.classpath"/>
<arg value="-o" />
<arg value="${basedir}/${build.dir}/${lang}/pdf/docbook_fop.tmp"/>
- <arg value="${basedir}/${build.dir}/${lang}/master.xml"/>
+ <arg value="${basedir}/${lang}/master.xml"/>
<arg value="${styles.dir}/${lang}/${db.style.fopdf}"/>
<arg value="ulink.footnotes=1" />
</java>
@@ -170,7 +155,7 @@
<delete dir="${basedir}/${build.dir}/${lang}/pdf/images"/>
</target>
- <target name="lang.dochtml" depends="xincludefusion">
+ <target name="lang.dochtml">
<mkdir dir="${basedir}/${build.dir}/${lang}/html/"/>
<!-- Copy all the images to the output location -->
@@ -195,12 +180,12 @@
<java classname="com.icl.saxon.StyleSheet"
fork="true" dir="${basedir}/${build.dir}/${lang}/html">
<classpath refid="lib.classpath"/>
- <arg value="${basedir}/${build.dir}/${lang}/master.xml"/>
+ <arg value="${basedir}/${lang}/master.xml"/>
<arg value="${styles.dir}/${lang}/${db.style.html}"/>
</java>
</target>
- <target name="lang.dochtmlsingle" depends="xincludefusion">
+ <target name="lang.dochtmlsingle">
<mkdir dir="${basedir}/${build.dir}/${lang}/html_single/"/>
<!-- Copy all the images to the output location -->
@@ -227,7 +212,7 @@
<classpath refid="lib.classpath"/>
<arg value="-o"/>
<arg value="${basedir}/${build.dir}/${lang}/html_single/index.html"/>
- <arg value="${basedir}/${build.dir}/${lang}/master.xml"/>
+ <arg value="${basedir}/${lang}/master.xml"/>
<arg value="${styles.dir}/${lang}/${db.style.htmlsingle}"/>
</java>
</target>
16 years, 10 months
JBoss Portal SVN: r8973 - in tools/docbook/support: support/lib and 1 other directory.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-11-16 08:29:12 -0500 (Fri, 16 Nov 2007)
New Revision: 8973
Added:
tools/docbook/support/support/lib/xcluder-0.9.2.jar
Modified:
tools/docbook/support/support.xml
Log:
Enable usage of xinclude
Added: tools/docbook/support/support/lib/xcluder-0.9.2.jar
===================================================================
(Binary files differ)
Property changes on: tools/docbook/support/support/lib/xcluder-0.9.2.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: tools/docbook/support/support.xml
===================================================================
--- tools/docbook/support/support.xml 2007-11-16 12:12:44 UTC (rev 8972)
+++ tools/docbook/support/support.xml 2007-11-16 13:29:12 UTC (rev 8973)
@@ -1,236 +1,252 @@
<project name="DocSupport" default="all.doc" basedir=".">
- <dirname property="support.basedir" file="${ant.file.DocSupport}"/>
+ <dirname property="support.basedir" file="${ant.file.DocSupport}"/>
- <!-- Set build directories for all formats. -->
- <property name="build.dir" value="build"/>
+ <!-- Set build directories for all formats. -->
+ <property name="build.dir" value="build"/>
- <!-- Support files for build process. -->
- <property name="support.dir" value="${support.basedir}/support"/>
- <property name="styles.dir" value="${support.basedir}/styles"/>
+ <!-- Support files for build process. -->
+ <property name="support.dir" value="${support.basedir}/support"/>
+ <property name="styles.dir" value="${support.basedir}/styles"/>
- <!-- Set DocBook stylesheets. -->
- <property name="db.style.fopdf" value="fopdf.xsl"/>
- <property name="db.style.html" value="html_chunk.xsl"/>
- <property name="db.style.htmlsingle" value="html.xsl"/>
+ <!-- Set DocBook stylesheets. -->
+ <property name="db.style.fopdf" value="fopdf.xsl"/>
+ <property name="db.style.html" value="html_chunk.xsl"/>
+ <property name="db.style.htmlsingle" value="html.xsl"/>
- <property name="maxmem" value="1024m" />
+ <property name="maxmem" value="1024m" />
- <xmlcatalog id="docbook.catalog">
- <catalogpath path="${support.basedir}/docbook-dtd/catalog.xml" />
- </xmlcatalog>
+ <xmlcatalog id="docbook.catalog">
+ <catalogpath path="${support.basedir}/docbook-dtd/catalog.xml" />
+ </xmlcatalog>
- <!-- Classpath for the build tools. -->
- <path id="lib.classpath">
- <fileset dir="${support.dir}/lib">
- <include name="**/*.jar"/>
- </fileset>
- </path>
+ <!-- Classpath for the build tools. -->
+ <path id="lib.classpath">
+ <fileset dir="${support.dir}/lib">
+ <include name="**/*.jar"/>
+ </fileset>
+ </path>
- <!-- ################################################################## -->
+ <!-- ################################################################## -->
- <target name="all.doc" depends="clean">
- <antcall target="lang.all"><param name="lang" value="en"/></antcall>
- </target>
+ <target name="all.doc" depends="clean">
+ <antcall target="lang.all">
+ <param name="lang" value="en"/>
+ </antcall>
+ </target>
- <!-- ################################################################## -->
+ <!-- ################################################################## -->
- <target name="lang.all.bypass.check" unless="lang.all.bypass.disabled">
- <uptodate property="lang.all.bypass.on" targetfile="${basedir}/${build.dir}/${lang}/pdf/${pdf.name}">
- <srcfiles dir="${support.basedir}" includes="**"/>
- <srcfiles dir="${basedir}/${lang}" includes="**"/>
- <srcfiles dir="${basedir}" includes="build.xml"/>
- </uptodate>
- </target>
+ <target name="lang.all.bypass.check" unless="lang.all.bypass.disabled">
+ <uptodate property="lang.all.bypass.on" targetfile="${basedir}/${build.dir}/${lang}/pdf/${pdf.name}">
+ <srcfiles dir="${support.basedir}" includes="**"/>
+ <srcfiles dir="${basedir}/${lang}" includes="**"/>
+ <srcfiles dir="${basedir}" includes="build.xml"/>
+ </uptodate>
+ </target>
- <target name="lang.all.run" depends="lang.all.bypass.check, lang.all.bypass.message" unless="lang.all.bypass.on">
- <antcall target="clean"/>
- <antcall target="lang.all"/>
- </target>
-
- <target name="lang.all.bypass.message" if="lang.all.bypass.on">
- <echo>Already uptodate: ${basedir}/${build.dir}/${lang}/pdf/${pdf.name}</echo>
- <echo>add -Dlang.all.bypass.disabled=true to force a rebuild</echo>
- </target>
+ <target name="lang.all.run" depends="lang.all.bypass.check, lang.all.bypass.message" unless="lang.all.bypass.on">
+ <antcall target="clean"/>
+ <antcall target="lang.all"/>
+ </target>
- <!-- ################################################################## -->
+ <target name="lang.all.bypass.message" if="lang.all.bypass.on">
+ <echo>Already uptodate: ${basedir}/${build.dir}/${lang}/pdf/${pdf.name}</echo>
+ <echo>add -Dlang.all.bypass.disabled=true to force a rebuild</echo>
+ </target>
- <target name="lang.dochtml.bypass.check" unless="lang.dochtml.bypass.disabled">
- <uptodate property="lang.dochtml.bypass.on" targetfile="${basedir}/${build.dir}/${lang}/html/index.html">
- <srcfiles dir="${support.basedir}" includes="**"/>
- <srcfiles dir="${basedir}/${lang}" includes="**"/>
- <srcfiles dir="${basedir}" includes="build.xml"/>
- </uptodate>
- </target>
+ <!-- ################################################################## -->
- <target name="lang.dochtml.run" depends="lang.dochtml.bypass.check, lang.dochtml.bypass.message" unless="lang.dochtml.bypass.on">
- <antcall target="clean.dochtml"/>
- <antcall target="lang.dochtml"/>
- <antcall target="lang.dochtmlsingle"/>
- </target>
-
- <target name="lang.dochtml.bypass.message" if="lang.dochtml.bypass.on">
- <echo>Already uptodate: ${basedir}/${build.dir}/${lang}/html/index.html</echo>
- <echo>add -Dlang.dochtml.bypass.disabled=true to force a rebuild</echo>
- </target>
+ <target name="lang.dochtml.bypass.check" unless="lang.dochtml.bypass.disabled">
+ <uptodate property="lang.dochtml.bypass.on" targetfile="${basedir}/${build.dir}/${lang}/html/index.html">
+ <srcfiles dir="${support.basedir}" includes="**"/>
+ <srcfiles dir="${basedir}/${lang}" includes="**"/>
+ <srcfiles dir="${basedir}" includes="build.xml"/>
+ </uptodate>
+ </target>
- <!-- ################################################################## -->
+ <target name="lang.dochtml.run" depends="lang.dochtml.bypass.check, lang.dochtml.bypass.message" unless="lang.dochtml.bypass.on">
+ <antcall target="clean.dochtml"/>
+ <antcall target="lang.dochtml"/>
+ <antcall target="lang.dochtmlsingle"/>
+ </target>
- <target name="clean">
- <!-- Delete build directory. -->
- <delete dir="${basedir}/${build.dir}"/>
- </target>
+ <target name="lang.dochtml.bypass.message" if="lang.dochtml.bypass.on">
+ <echo>Already uptodate: ${basedir}/${build.dir}/${lang}/html/index.html</echo>
+ <echo>add -Dlang.dochtml.bypass.disabled=true to force a rebuild</echo>
+ </target>
- <target name="clean.dochtml">
- <!-- Delete build directory for single html -->
- <delete dir="${basedir}/${build.dir}/${lang}/html"/>
- <delete dir="${basedir}/${build.dir}/${lang}/html_single"/>
- </target>
+ <!-- ################################################################## -->
- <!-- ################################################################## -->
+ <target name="clean">
+ <!-- Delete build directory. -->
+ <delete dir="${basedir}/${build.dir}"/>
+ </target>
- <target name="lang.all">
- <antcall target="lang.docpdf"/>
- <antcall target="lang.dochtml"/>
- <antcall target="lang.dochtmlsingle"/>
- <!--
+ <target name="clean.dochtml">
+ <!-- Delete build directory for single html -->
+ <delete dir="${basedir}/${build.dir}/${lang}/html"/>
+ <delete dir="${basedir}/${build.dir}/${lang}/html_single"/>
+ </target>
+
+ <!-- ################################################################## -->
+
+ <target name="lang.all">
+ <antcall target="lang.docpdf"/>
+ <antcall target="lang.dochtml"/>
+ <antcall target="lang.dochtmlsingle"/>
+ <!--
<antcall target="lang.htmlmisc"/>
-->
- </target>
+ </target>
- <target name="lang.docpdf">
- <!-- Copy all the images to the output location,
+ <target name="xincludefusion">
+
+ <taskdef name="xcluder"
+ classname="gr.abiss.xcluder.XercesXcluder"
+ classpathref="lib.classpath"
+ />
+
+
+ <xcluder in="${basedir}/${lang}/master.xml"
+ out="${basedir}/${build.dir}/${lang}/master.xml"
+ indent="yes"
+ />
+
+ </target>
+
+ <target name="lang.docpdf" depends="xincludefusion">
+ <!-- Copy all the images to the output location,
will be removed later. -->
- <!-- "rebuild" the build.dir variable, in case ${basedir} has been overridden -->
- <copy todir="${basedir}/${build.dir}/${lang}/pdf/images" failonerror="false">
- <fileset dir="${basedir}/${lang}/images">
- <include name="**/*.png"/>
- <include name="**/*.svg"/>
- <include name="**/*.gif"/>
- <include name="**/*.jpg"/>
- </fileset>
- <fileset dir="../common/${lang}/images">
- <include name="**/*.png"/>
- <include name="**/*.svg"/>
- <include name="**/*.gif"/>
- <include name="**/*.jpg"/>
- </fileset>
- </copy>
+ <!-- "rebuild" the build.dir variable, in case ${basedir} has been overridden -->
+ <copy todir="${basedir}/${build.dir}/${lang}/pdf/images" failonerror="false">
+ <fileset dir="${basedir}/${lang}/images">
+ <include name="**/*.png"/>
+ <include name="**/*.svg"/>
+ <include name="**/*.gif"/>
+ <include name="**/*.jpg"/>
+ </fileset>
+ <fileset dir="../common/${lang}/images">
+ <include name="**/*.png"/>
+ <include name="**/*.svg"/>
+ <include name="**/*.gif"/>
+ <include name="**/*.jpg"/>
+ </fileset>
+ </copy>
- <!-- Create the XSL/FO temporary file. -->
-
- <java classname="com.icl.saxon.StyleSheet"
+ <!-- Create the XSL/FO temporary file. -->
+ <java classname="com.icl.saxon.StyleSheet"
maxmemory="${maxmem}"
fork="true" dir="${basedir}">
- <classpath refid="lib.classpath"/>
- <arg value="-o" />
- <arg value="${basedir}/${build.dir}/${lang}/pdf/docbook_fop.tmp"/>
- <arg value="${basedir}/${lang}/master.xml"/>
- <arg value="${styles.dir}/${lang}/${db.style.fopdf}"/>
- <arg value="ulink.footnotes=1" />
- </java>
+ <classpath refid="lib.classpath"/>
+ <arg value="-o" />
+ <arg value="${basedir}/${build.dir}/${lang}/pdf/docbook_fop.tmp"/>
+ <arg value="${basedir}/${build.dir}/${lang}/master.xml"/>
+ <arg value="${styles.dir}/${lang}/${db.style.fopdf}"/>
+ <arg value="ulink.footnotes=1" />
+ </java>
-<!--
+ <!--
<xslt out="${basedir}/${build.dir}/${lang}/pdf/docbook_fop.tmp"
in="${basedir}/${lang}/master.xml"
style="${styles.dir}/${lang}/${db.style.fopdf}">
<xmlcatalog refid="docbook.catalog"/>
</xslt>
-->
- <!-- Create a PDF from the XSL/FO. -->
- <java classname="org.apache.fop.apps.Fop"
+ <!-- Create a PDF from the XSL/FO. -->
+ <java classname="org.apache.fop.apps.Fop"
maxmemory="${maxmem}"
fork="true" dir="${basedir}">
- <classpath refid="lib.classpath"/>
- <arg value="${basedir}/${build.dir}/${lang}/pdf/docbook_fop.tmp"/>
- <arg value="${basedir}/${build.dir}/${lang}/pdf/${pdf.name}"/>
- </java>
+ <classpath refid="lib.classpath"/>
+ <arg value="${basedir}/${build.dir}/${lang}/pdf/docbook_fop.tmp"/>
+ <arg value="${basedir}/${build.dir}/${lang}/pdf/${pdf.name}"/>
+ </java>
- <!-- Delete temporary files. -->
- <delete file="${basedir}/${build.dir}/${lang}/pdf/docbook_fop.tmp"/>
- <delete dir="${basedir}/${build.dir}/${lang}/pdf/images"/>
- </target>
+ <!-- Delete temporary files. -->
+ <delete file="${basedir}/${build.dir}/${lang}/pdf/docbook_fop.tmp"/>
+ <delete dir="${basedir}/${build.dir}/${lang}/pdf/images"/>
+ </target>
- <target name="lang.dochtml">
- <mkdir dir="${basedir}/${build.dir}/${lang}/html/"/>
+ <target name="lang.dochtml" depends="xincludefusion">
+ <mkdir dir="${basedir}/${build.dir}/${lang}/html/"/>
- <!-- Copy all the images to the output location -->
- <copy todir="${basedir}/${build.dir}/${lang}/html/images" failonerror="false">
- <fileset dir="${basedir}/${lang}/images">
- <include name="**/*.png"/>
- <include name="**/*.gif"/>
- <include name="**/*.jpg"/>
- </fileset>
- <fileset dir="../common/${lang}/images">
- <include name="**/*.png"/>
- <include name="**/*.gif"/>
- <include name="**/*.jpg"/>
- </fileset>
- </copy>
- <copy todir="${basedir}/${build.dir}/${lang}/html/css">
- <fileset dir="${styles.dir}/${lang}">
- <include name="**/*.css"/>
- </fileset>
- </copy>
+ <!-- Copy all the images to the output location -->
+ <copy todir="${basedir}/${build.dir}/${lang}/html/images" failonerror="false">
+ <fileset dir="${basedir}/${lang}/images">
+ <include name="**/*.png"/>
+ <include name="**/*.gif"/>
+ <include name="**/*.jpg"/>
+ </fileset>
+ <fileset dir="../common/${lang}/images">
+ <include name="**/*.png"/>
+ <include name="**/*.gif"/>
+ <include name="**/*.jpg"/>
+ </fileset>
+ </copy>
+ <copy todir="${basedir}/${build.dir}/${lang}/html/css">
+ <fileset dir="${styles.dir}/${lang}">
+ <include name="**/*.css"/>
+ </fileset>
+ </copy>
- <java classname="com.icl.saxon.StyleSheet"
+ <java classname="com.icl.saxon.StyleSheet"
fork="true" dir="${basedir}/${build.dir}/${lang}/html">
- <classpath refid="lib.classpath"/>
- <arg value="${basedir}/${lang}/master.xml"/>
- <arg value="${styles.dir}/${lang}/${db.style.html}"/>
- </java>
- </target>
+ <classpath refid="lib.classpath"/>
+ <arg value="${basedir}/${build.dir}/${lang}/master.xml"/>
+ <arg value="${styles.dir}/${lang}/${db.style.html}"/>
+ </java>
+ </target>
- <target name="lang.dochtmlsingle">
- <mkdir dir="${basedir}/${build.dir}/${lang}/html_single/"/>
+ <target name="lang.dochtmlsingle" depends="xincludefusion">
+ <mkdir dir="${basedir}/${build.dir}/${lang}/html_single/"/>
- <!-- Copy all the images to the output location -->
- <copy todir="${basedir}/${build.dir}/${lang}/html_single/images" failonerror="false">
- <fileset dir="${basedir}/${lang}/images">
- <include name="**/*.png"/>
- <include name="**/*.gif"/>
- <include name="**/*.jpg"/>
- </fileset>
- <fileset dir="../common/${lang}/images">
- <include name="**/*.png"/>
- <include name="**/*.gif"/>
- <include name="**/*.jpg"/>
- </fileset>
- </copy>
- <copy todir="${basedir}/${build.dir}/${lang}/html_single/css">
- <fileset dir="${styles.dir}/${lang}">
- <include name="**/*.css"/>
- </fileset>
- </copy>
+ <!-- Copy all the images to the output location -->
+ <copy todir="${basedir}/${build.dir}/${lang}/html_single/images" failonerror="false">
+ <fileset dir="${basedir}/${lang}/images">
+ <include name="**/*.png"/>
+ <include name="**/*.gif"/>
+ <include name="**/*.jpg"/>
+ </fileset>
+ <fileset dir="../common/${lang}/images">
+ <include name="**/*.png"/>
+ <include name="**/*.gif"/>
+ <include name="**/*.jpg"/>
+ </fileset>
+ </copy>
+ <copy todir="${basedir}/${build.dir}/${lang}/html_single/css">
+ <fileset dir="${styles.dir}/${lang}">
+ <include name="**/*.css"/>
+ </fileset>
+ </copy>
- <java classname="com.icl.saxon.StyleSheet"
+ <java classname="com.icl.saxon.StyleSheet"
fork="true" dir="${basedir}">
- <classpath refid="lib.classpath"/>
- <arg value="-o"/>
- <arg value="${basedir}/${build.dir}/${lang}/html_single/index.html"/>
- <arg value="${basedir}/${lang}/master.xml"/>
- <arg value="${styles.dir}/${lang}/${db.style.htmlsingle}"/>
- </java>
- </target>
+ <classpath refid="lib.classpath"/>
+ <arg value="-o"/>
+ <arg value="${basedir}/${build.dir}/${lang}/html_single/index.html"/>
+ <arg value="${basedir}/${build.dir}/${lang}/master.xml"/>
+ <arg value="${styles.dir}/${lang}/${db.style.htmlsingle}"/>
+ </java>
+ </target>
- <!-- I do not really like to have external dependency for HTML pages
+ <!-- I do not really like to have external dependency for HTML pages
So, I am not using this task ... -->
- <target name="lang.htmlmisc">
- <!-- Copy images and CSS for HTML documentation, language specific. -->
- <copy todir="${basedir}/${build.dir}/${lang}/shared/images">
- <fileset dir="${basedir}/${lang}/images">
- <include name="**/*.png"/>
- <include name="**/*.gif"/>
- </fileset>
- </copy>
+ <target name="lang.htmlmisc">
+ <!-- Copy images and CSS for HTML documentation, language specific. -->
+ <copy todir="${basedir}/${build.dir}/${lang}/shared/images">
+ <fileset dir="${basedir}/${lang}/images">
+ <include name="**/*.png"/>
+ <include name="**/*.gif"/>
+ </fileset>
+ </copy>
- <copy todir="${basedir}/${build.dir}/${lang}/shared/css">
- <fileset dir="${styles.dir}/${lang}">
- <include name="**/*.css"/>
- </fileset>
- </copy>
- </target>
+ <copy todir="${basedir}/${build.dir}/${lang}/shared/css">
+ <fileset dir="${styles.dir}/${lang}">
+ <include name="**/*.css"/>
+ </fileset>
+ </copy>
+ </target>
</project>
16 years, 10 months
JBoss Portal SVN: r8972 - docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-11-16 07:12:44 -0500 (Fri, 16 Nov 2007)
New Revision: 8972
Added:
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/actionIcon_Add.gif
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/actionIcon_CreateInstance.gif
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/actionIcon_Delete.gif
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/actionIcon_Details.gif
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/actionIcon_IsDefault.gif
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/actionIcon_Layout.gif
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/actionIcon_MakeDefault.gif
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/actionIcon_MoveDown.gif
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/actionIcon_MoveUp.gif
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/actionIcon_Properties.gif
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/actionIcon_Rename.gif
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/actionIcon_Security.gif
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/actionIcon_Theme.gif
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/animated_favicon1.gif
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/favicon.ico
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/header_bg.gif
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/homeimg_cornerelement.gif
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/ico_16_help.gif
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/ico_16_maximize.gif
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/ico_16_minimize.gif
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/ico_16_normal.gif
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/ico_16_reload.gif
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/ico_16_remove.gif
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/ico_16_swizzleclosed.gif
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/ico_16_swizzleopen.gif
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/ico_addcontent.gif
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/ico_admin.gif
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/ico_arrow_blue_left.gif
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/ico_arrow_blue_right.gif
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/ico_arrow_grey_left.gif
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/ico_arrow_grey_right.gif
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/ico_cancel.gif
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/ico_edit.gif
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/ico_listelement.gif
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/logo.gif
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/msgIcon_Warning.gif
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/objectPath_Arrow.gif
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/pathBackground.png
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/pathSeparator.png
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/portlet-bottom-left.gif
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/portlet-bottom-middle.gif
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/portlet-bottom-right.gif
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/portlet-left-vertical.gif
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/portlet-right-vertical.gif
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/portlet-top-left.gif
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/portlet-top-middle.gif
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/portlet-top-right.gif
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/spacer.gif
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/tab_left.gif
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/tab_left_admin.gif
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/tab_left_current.gif
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/tab_left_hover2.gif
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/tab_right.gif
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/tab_right_admin.gif
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/tab_right_current.gif
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/tab_right_hover2.gif
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/tab_swizzle.gif
Log:
Sync Branch 2.6 and trunk
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/actionIcon_Add.gif
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/actionIcon_Add.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/actionIcon_CreateInstance.gif
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/actionIcon_CreateInstance.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/actionIcon_Delete.gif
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/actionIcon_Delete.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/actionIcon_Details.gif
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/actionIcon_Details.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/actionIcon_IsDefault.gif
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/actionIcon_IsDefault.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/actionIcon_Layout.gif
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/actionIcon_Layout.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/actionIcon_MakeDefault.gif
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/actionIcon_MakeDefault.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/actionIcon_MoveDown.gif
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/actionIcon_MoveDown.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/actionIcon_MoveUp.gif
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/actionIcon_MoveUp.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/actionIcon_Properties.gif
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/actionIcon_Properties.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/actionIcon_Rename.gif
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/actionIcon_Rename.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/actionIcon_Security.gif
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/actionIcon_Security.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/actionIcon_Theme.gif
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/actionIcon_Theme.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/animated_favicon1.gif
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/animated_favicon1.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/favicon.ico
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/favicon.ico
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/header_bg.gif
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/header_bg.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/homeimg_cornerelement.gif
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/homeimg_cornerelement.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/ico_16_help.gif
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/ico_16_help.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/ico_16_maximize.gif
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/ico_16_maximize.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/ico_16_minimize.gif
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/ico_16_minimize.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/ico_16_normal.gif
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/ico_16_normal.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/ico_16_reload.gif
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/ico_16_reload.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/ico_16_remove.gif
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/ico_16_remove.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/ico_16_swizzleclosed.gif
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/ico_16_swizzleclosed.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/ico_16_swizzleopen.gif
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/ico_16_swizzleopen.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/ico_addcontent.gif
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/ico_addcontent.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/ico_admin.gif
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/ico_admin.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/ico_arrow_blue_left.gif
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/ico_arrow_blue_left.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/ico_arrow_blue_right.gif
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/ico_arrow_blue_right.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/ico_arrow_grey_left.gif
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/ico_arrow_grey_left.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/ico_arrow_grey_right.gif
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/ico_arrow_grey_right.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/ico_cancel.gif
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/ico_cancel.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/ico_edit.gif
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/ico_edit.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/ico_listelement.gif
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/ico_listelement.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/logo.gif
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/logo.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/msgIcon_Warning.gif
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/msgIcon_Warning.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/objectPath_Arrow.gif
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/objectPath_Arrow.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/pathBackground.png
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/pathBackground.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/pathSeparator.png
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/pathSeparator.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/portlet-bottom-left.gif
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/portlet-bottom-left.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/portlet-bottom-middle.gif
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/portlet-bottom-middle.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/portlet-bottom-right.gif
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/portlet-bottom-right.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/portlet-left-vertical.gif
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/portlet-left-vertical.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/portlet-right-vertical.gif
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/portlet-right-vertical.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/portlet-top-left.gif
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/portlet-top-left.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/portlet-top-middle.gif
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/portlet-top-middle.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/portlet-top-right.gif
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/portlet-top-right.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/spacer.gif
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/spacer.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/tab_left.gif
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/tab_left.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/tab_left_admin.gif
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/tab_left_admin.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/tab_left_current.gif
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/tab_left_current.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/tab_left_hover2.gif
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/tab_left_hover2.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/tab_right.gif
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/tab_right.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/tab_right_admin.gif
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/tab_right_admin.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/tab_right_current.gif
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/tab_right_current.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/tab_right_hover2.gif
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/tab_right_hover2.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/tab_swizzle.gif
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/tab_swizzle.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
16 years, 10 months
JBoss Portal SVN: r8971 - in docs: branches/JBoss_Portal_Branch_2_6/docbook-support and 13 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-11-16 07:11:07 -0500 (Fri, 16 Nov 2007)
New Revision: 8971
Added:
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/forward.png
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/messagebox_info.png
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/messagebox_warning.png
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/previous.png
docs/branches/JBoss_Portal_Branch_2_6/common/en/images/renaissance/
docs/branches/JBoss_Portal_Branch_2_6/docbook-support/styles/en/renaissance.css
Removed:
docs/branches/JBoss_Portal_Branch_2_6/docbook-support/.project
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/images/setup/build_deploy.gif
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/images/setup/build_ds.gif
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/images/setup/build_ds_dir.gif
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/images/setup/deploy_dir.gif
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/images/setup/dsfiles.gif
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/images/setup/inst_fin.gif
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/images/setup/inst_lang.gif
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/images/setup/inst_localhost.png
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/images/setup/inst_name.gif
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/images/setup/inst_packs.gif
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/images/setup/inst_path.gif
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/images/setup/inst_portal.gif
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/images/setup/inst_secure.gif
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/images/setup/package.gif
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/images/setup/svncodir.gif
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/images/tutorials/jsf_portlet/package.gif
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/acknowledgements.xml
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/featurelist.xml
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/overview.xml
docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/images/intro/user_portlet.gif
docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/images/intro/user_portlet_editinfo.gif
docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/images/role/createrole.gif
docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/images/role/createuser.gif
docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/images/role/editprofile.gif
docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/images/role/editrolemembers.gif
docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/images/role/editrolename.gif
docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/images/role/editroles.gif
docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/images/role/edituserroles.gif
docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/images/role/memberspage.gif
docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/images/role/normalstate.gif
docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/images/role/searchusers.gif
docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/images/role/user_ss.gif
docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/modules/acknowledgements.xml
docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/modules/featurelist.xml
docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/modules/overview.xml
Modified:
docs/branches/JBoss_Portal_Branch_2_6/docbook-support/styles/en/html.xsl
docs/branches/JBoss_Portal_Branch_2_6/docbook-support/styles/en/html_chunk.xsl
docs/branches/JBoss_Portal_Branch_2_6/docbook-support/support.xml
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/identity.xml
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/sso.xml
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/tutorials.xml
docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/modules/intro.xml
docs/trunk/quickstartuser/en/master.xml
docs/trunk/readmeFiles/jboss-portal-bin.README
docs/trunk/readmeFiles/jboss-portal-ha-bin.README
docs/trunk/readmeFiles/jboss-portal-src.README
docs/trunk/referenceGuide/en/master.xml
docs/trunk/referenceGuide/en/modules/configuration.xml
docs/trunk/referenceGuide/en/modules/errorhandling.xml
docs/trunk/referenceGuide/en/modules/installation.xml
docs/trunk/referenceGuide/en/modules/security.xml
docs/trunk/referenceGuide/en/modules/wsrp.xml
docs/trunk/userGuide/en/master.xml
docs/trunk/userGuide/en/modules/dynamicity.xml
Log:
Sync Branch 2.6 and trunk
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/forward.png
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/forward.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/messagebox_info.png
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/messagebox_info.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/messagebox_warning.png
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/messagebox_warning.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/previous.png
===================================================================
(Binary files differ)
Property changes on: docs/branches/JBoss_Portal_Branch_2_6/common/en/images/previous.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: docs/branches/JBoss_Portal_Branch_2_6/docbook-support/.project
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/docbook-support/.project 2007-11-16 12:06:29 UTC (rev 8970)
+++ docs/branches/JBoss_Portal_Branch_2_6/docbook-support/.project 2007-11-16 12:11:07 UTC (rev 8971)
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>docbook-support</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- </buildSpec>
- <natures>
- </natures>
-</projectDescription>
Modified: docs/branches/JBoss_Portal_Branch_2_6/docbook-support/styles/en/html.xsl
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/docbook-support/styles/en/html.xsl 2007-11-16 12:06:29 UTC (rev 8970)
+++ docs/branches/JBoss_Portal_Branch_2_6/docbook-support/styles/en/html.xsl 2007-11-16 12:11:07 UTC (rev 8971)
@@ -29,7 +29,7 @@
HTML Settings
################################################### -->
- <xsl:param name="html.stylesheet">css/html.css</xsl:param>
+ <xsl:param name="html.stylesheet">css/html.css css/renaissance.css</xsl:param>
<!-- These extensions are required for table printing and other stuff -->
<xsl:param name="use.extensions">1</xsl:param>
Modified: docs/branches/JBoss_Portal_Branch_2_6/docbook-support/styles/en/html_chunk.xsl
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/docbook-support/styles/en/html_chunk.xsl 2007-11-16 12:06:29 UTC (rev 8970)
+++ docs/branches/JBoss_Portal_Branch_2_6/docbook-support/styles/en/html_chunk.xsl 2007-11-16 12:11:07 UTC (rev 8971)
@@ -31,7 +31,7 @@
<xsl:param name="chunk.section.depth">'5'</xsl:param>
<xsl:param name="use.id.as.filename">'1'</xsl:param>
- <xsl:param name="html.stylesheet">css/html.css</xsl:param>
+ <xsl:param name="html.stylesheet">css/html.css css/renaissance.css</xsl:param>
<!-- These extensions are required for table printing and other stuff -->
<xsl:param name="use.extensions">1</xsl:param>
Added: docs/branches/JBoss_Portal_Branch_2_6/docbook-support/styles/en/renaissance.css
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/docbook-support/styles/en/renaissance.css (rev 0)
+++ docs/branches/JBoss_Portal_Branch_2_6/docbook-support/styles/en/renaissance.css 2007-11-16 12:11:07 UTC (rev 8971)
@@ -0,0 +1,170 @@
+body {
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ margin: 0;
+ padding: 0;
+}
+
+a {
+ color: #5078AA;
+}
+
+p {
+ padding: 0;
+ margin: 5px 0 5px 0;
+}
+
+hr {
+ line-height: 0;
+ height: 0;
+ background-color: #fff;
+}
+
+div.navheader table,
+div.navheader table tr td{
+ padding: 0;
+ margin:0;
+ vertical-align:top;
+}
+
+div.navheader td {
+ padding: 0;
+ margin:0;
+ vertical-align:top;
+}
+
+div.navheader td[align=right] a,
+div.navfooter td[align=right] a{
+ background-image: url( '../images/forward.png' );
+ background-repeat: no-repeat;
+ background-position: center right;
+ padding: 8px 35px 5px 0;
+ margin:0;
+}
+
+div.navheader td[align=left] a,
+div.navfooter td[align=left] a{
+ background-image: url( '../images/previous.png' );
+ background-repeat: no-repeat;
+ background-position: center left;
+ padding: 8px 0 5px 35px;
+ margin:0;
+}
+
+div.toc dl {
+ padding: 0 0 0 15px;
+}
+
+div.book div.titlepage h1.title {
+ margin: 0;
+ padding: 10px;
+ width: 100%;
+ height: 65px;
+ background-image: url( '../images/renaissance/header_bg.gif' );
+ background-repeat: repeat-x;
+ color: #fff;
+ font-size: 15px;
+ font-weight: bold;
+}
+
+div.book div.titlepage h2.subtitle,
+ div.toc b,
+ h2.title {
+ margin: 15px 0 5px 0;
+ padding: 3px;
+ display: block;
+ width: 100%;
+ font-size: 15px;
+ font-weight: bold;
+ background-image: url( '../images/renaissance/pathBackground.png' );
+ background-repeat: repeat-x;
+ color: #333333;
+ border: 1px solid #BBB;
+}
+
+div.book div.titlepage div div {
+ clear: both;
+}
+
+div.book div.titlepage div.author,
+ div.book div.titlepage h3.author,
+ div.book div.titlepage h3.author span,
+ div.book div.titlepage tt,
+ div.book div.titlepage tt .email {
+ margin: 0;
+ padding: 3px;
+ font-size: 11px;
+ font-weight: bold;
+ float: left;
+}
+
+div.book div.titlepage div.author tt.email,
+ div.book div.titlepage div.author a {
+ font-size: 10px;
+}
+
+div.book div.titlepage div.author tt.email {
+ padding: 5px 0 0 0;
+}
+
+div.book div.titlepage h3.author {
+
+}
+
+div.chapter div.titlepage {
+ padding: 0 0 15px 0;
+}
+
+div.chapter * div.titlepage {
+ padding: 0 0 0 0;
+}
+
+div.chapter * h3.title {
+ background-color: #EBF2F5;
+ border-top: 1px solid #999;
+ color: #656565;
+ margin: 15px 0 5px 0;
+}
+
+div.chapter * h4.title {
+ background-color: #5986B3;
+ border: 1px solid #54708C;
+ color: #FFFFFF;
+ font-size: 11px;
+ font-weight: bold;
+ margin: 0pt;
+ padding: 2px 2px 2px 4px;
+}
+
+div.chapter div.note h3.title {
+ color: #003399;
+ font-weight: bold;
+ margin-top: 10px;
+ padding-top: 5px;
+ background-color: transparent;
+ border: 0;
+}
+
+div.chapter div.note {
+ padding: 3px 0 3px 65px;
+ background-image: url( '../images/messagebox_info.png' );
+ background-repeat: no-repeat;
+ background-position: 5 5;
+ margin: 10px 0 10px 0;
+}
+
+div.chapter div.warning h3.title {
+ color: #003399;
+ font-weight: bold;
+ margin-top: 10px;
+ padding-top: 5px;
+ background-color: transparent;
+ border: 0;
+}
+
+div.chapter div.warning {
+ padding: 3px 0 3px 65px;
+ background-image: url( '../images/messagebox_warning.png' );
+ background-repeat: no-repeat;
+ background-position: 5 5;
+ margin: 10px 0 10px 0;
+}
Modified: docs/branches/JBoss_Portal_Branch_2_6/docbook-support/support.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/docbook-support/support.xml 2007-11-16 12:06:29 UTC (rev 8970)
+++ docs/branches/JBoss_Portal_Branch_2_6/docbook-support/support.xml 2007-11-16 12:11:07 UTC (rev 8971)
@@ -104,7 +104,7 @@
will be removed later. -->
<!-- "rebuild" the build.dir variable, in case ${basedir} has been overridden -->
- <copy todir="${basedir}/${build.dir}/${lang}/pdf/images">
+ <copy todir="${basedir}/${build.dir}/${lang}/pdf/images" failonerror="false">
<fileset dir="${basedir}/${lang}/images">
<include name="**/*.png"/>
<include name="**/*.svg"/>
@@ -158,7 +158,7 @@
<mkdir dir="${basedir}/${build.dir}/${lang}/html/"/>
<!-- Copy all the images to the output location -->
- <copy todir="${basedir}/${build.dir}/${lang}/html/images">
+ <copy todir="${basedir}/${build.dir}/${lang}/html/images" failonerror="false">
<fileset dir="${basedir}/${lang}/images">
<include name="**/*.png"/>
<include name="**/*.gif"/>
@@ -188,7 +188,7 @@
<mkdir dir="${basedir}/${build.dir}/${lang}/html_single/"/>
<!-- Copy all the images to the output location -->
- <copy todir="${basedir}/${build.dir}/${lang}/html_single/images">
+ <copy todir="${basedir}/${build.dir}/${lang}/html_single/images" failonerror="false">
<fileset dir="${basedir}/${lang}/images">
<include name="**/*.png"/>
<include name="**/*.gif"/>
Deleted: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/images/setup/build_deploy.gif
===================================================================
(Binary files differ)
Deleted: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/images/setup/build_ds.gif
===================================================================
(Binary files differ)
Deleted: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/images/setup/build_ds_dir.gif
===================================================================
(Binary files differ)
Deleted: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/images/setup/deploy_dir.gif
===================================================================
(Binary files differ)
Deleted: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/images/setup/dsfiles.gif
===================================================================
(Binary files differ)
Deleted: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/images/setup/inst_fin.gif
===================================================================
(Binary files differ)
Deleted: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/images/setup/inst_lang.gif
===================================================================
(Binary files differ)
Deleted: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/images/setup/inst_localhost.png
===================================================================
(Binary files differ)
Deleted: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/images/setup/inst_name.gif
===================================================================
(Binary files differ)
Deleted: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/images/setup/inst_packs.gif
===================================================================
(Binary files differ)
Deleted: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/images/setup/inst_path.gif
===================================================================
(Binary files differ)
Deleted: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/images/setup/inst_portal.gif
===================================================================
(Binary files differ)
Deleted: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/images/setup/inst_secure.gif
===================================================================
(Binary files differ)
Deleted: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/images/setup/package.gif
===================================================================
(Binary files differ)
Deleted: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/images/setup/svncodir.gif
===================================================================
(Binary files differ)
Deleted: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/images/tutorials/jsf_portlet/package.gif
===================================================================
(Binary files differ)
Deleted: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/acknowledgements.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/acknowledgements.xml 2007-11-16 12:06:29 UTC (rev 8970)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/acknowledgements.xml 2007-11-16 12:11:07 UTC (rev 8971)
@@ -1,42 +0,0 @@
-<preface id="acknowledgements">
- <title>Acknowledgements</title>
- <para>We would like to thank the developers that participate in the JBoss Portal project effort.</para>
- <para>Specifically,</para>
- <para>
- <itemizedlist>
- <listitem>
- Antoine Herzog for his feedback, for writing Wikis and helping in the forums.
- </listitem>
- <listitem>
- Mark Fernandes and Paul Tamaro from Novell, for their hard work in supplying the
- portal project with usable and attractive themes and layouts in the 2.4 version of JBoss Portal.
- </listitem>
- <listitem>
- Martin Holzner from Novell, for his work on themes in the 2.4 version of JBoss Portal.
- </listitem>
- <listitem>
- Kev "kevs3d" Roast for supplying us with two working portlets that integrate existing
- frameworks in to the portal: Sun JSF-RI and Spring MVC Portlet.
- </listitem>
- <listitem>
- Swarn "sdhaliwal" Dhaliwal for supplying us with the Struts-Bridge, that will allow
- for existing struts applications to work with the Portal.
- </listitem>
- <listitem>
- A few Red Hat employees, Remy Maucherat for Tomcat configuration, Magesh Kumar Bojan and Martin Putz always there to help our customers,
- Prabhat Jha for making sure that JBoss Portal runs great everywhere. Noel Rocher for his early feedback on JBoss Portal 2.6
- and contributions. James Cobb for the Renaissance theme.
- </listitem>
- <listitem>
- The JBoss Labs (http://www.JBoss.org) team for building a great infrastructure on top of JBoss Portal 2.6, providing very useful feedback and
- giving us the initial Drag and Drop implementation.
- </listitem>
- <listitem>
- Everyone participating in the forums and Wiki in general.
- </listitem>
- </itemizedlist>
- </para>
- <para>Contributions of any kind are always welcome, you can contribute by providing ideas,
- filling bug reports, producing some code, designing a theme, writing some documentation,
- etc... If you think your name is missing from this page, please let us know.</para>
-</preface>
\ No newline at end of file
Deleted: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/featurelist.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/featurelist.xml 2007-11-16 12:06:29 UTC (rev 8970)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/featurelist.xml 2007-11-16 12:11:07 UTC (rev 8971)
@@ -1,263 +0,0 @@
-<preface id="features">
- <title>Feature List</title>
- <para>The following list details features found in this document's related release. For a
- technical view of our features, view the
- <ulink
- url="http://jira.jboss.com/jira/browse/JBPORTAL">Project Roadmap and Task List</ulink>
- .
- </para>
- <para>
- <emphasis role="bold">Technology and Architecture</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <emphasis role="bold">JEMS:</emphasis>
- Leverages the power of JBoss Enterprise Middleware
- Services : JBoss Application Server, JBoss Cache, JGroups, and Hibernate.
- </listitem>
- <listitem>
- <emphasis role="bold">DB Agnostic:</emphasis>
- Will work with any RDBMS supported by Hibernate
- </listitem>
- <listitem>
- <emphasis role="bold">SSO/LDAP:</emphasis>
- Leverages Tomcat and JBoss single sign on (SSO)
- solutions.
- Identity mapping framework adaptable to the enterprise LDAP deployments.
- </listitem>
- <listitem>
- <emphasis role="bold">JAAS Authentication:</emphasis>
- Custom authentication via JAAS login modules.
- </listitem>
- <listitem>
- <emphasis role="bold">Cacheing:</emphasis>
- Utilizes render-view caching for improved performance.
- </listitem>
- <listitem>
- <emphasis role="bold">Clusterable:</emphasis>
- Cluster support allows for portal state to be
- clustered for all portal instances.
- </listitem>
- <listitem>
- <emphasis role="bold">Hot-Deployment:</emphasis>
- Leverages JBoss dynamic auto deployment
- features.
- </listitem>
- <listitem>
- <emphasis role="bold">SAR Installer:</emphasis>
- Browser-based installer makes installation
- and initial configuration a breeze.
- </listitem>
- </itemizedlist>
- <para>
- <emphasis role="bold">Supported Standards</emphasis>
- <itemizedlist>
- <listitem>
- <emphasis role="bold">Portlet Specification and API 1.0 (JSR-168)</emphasis>
- </listitem>
- <listitem>
- <emphasis role="bold">Content Repository for Java Technology API (JSR-170)</emphasis>
- </listitem>
- <listitem>
- <emphasis role="bold">Java Server Faces 1.2 (JSR-252)</emphasis>
- </listitem>
- <listitem>
- <emphasis role="bold">Java Management Extension (JMX) 1.2</emphasis>
- </listitem>
- <listitem>
- <emphasis role="bold">Web Services for Remote Portlets (WSRP) 1.0</emphasis>
- See <ulink url="http://docs.jboss.com/jbportal/v2.6/reference-guide/en/html/wsrp.html#wsr...">WSRP
- support in Portal</ulink> for more details.
- </listitem>
- <listitem>
- <emphasis role="bold">Full J2EE 1.4 compliance when used with JBoss AS</emphasis>
- </listitem>
- </itemizedlist>
- </para>
- <para>
- <emphasis role="bold">Portal and Portal Container</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <emphasis role="bold">Multiple Portal Instances:</emphasis>
- Ability to have multiple Portal
- instances running inside of one Portal container.
- </listitem>
- <listitem>
- <emphasis role="bold">IPC</emphasis>
- Inter-Portlet Communication API enables portlets to create links to other
- objects such as a page, portal or window .
- </listitem>
- <listitem>
- <emphasis role="bold">Dynamicity</emphasis>
- The ability for administrators and users to create and destroy objects such as
- portlets, pages, portals, themes, and layouts at runtime.
- </listitem>
- <listitem>
- <emphasis role="bold">Internationalization:</emphasis>
- Ability to use internationalization
- resource files for every portlet.
- </listitem>
- <listitem>
- <emphasis role="bold">Pluggable services:</emphasis>
- Authentication performed by the
- servlet container and JAAS make it possible to swap the authentication scheme.
- </listitem>
- <listitem>
- <emphasis role="bold">Page-based Architecture:</emphasis>
- Allows for the grouping/division
- of portlets on a per-page basis.
- </listitem>
- <listitem>
- <emphasis role="bold">Existing Framework support:</emphasis>
- Portlets utilizing Struts,
- Spring MVC, Sun JSF-RI, AJAX, or MyFaces are supported.
- </listitem>
- </itemizedlist>
- <para>
- <emphasis role="bold">Themes and Layouts</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <emphasis role="bold">Easily swappable themes/layouts:</emphasis>
- New themes and layouts
- containing images can be deployed in WAR archives.
- </listitem>
- <listitem>
- <emphasis role="bold">Flexible API:</emphasis>
- Theme and Layout API are designed to
- separate the business layer from the presentation layer.
- </listitem>
- <listitem>
- <emphasis role="bold">Per-page layout strategy:</emphasis>
- Different layouts can be
- assigned to different pages.
- </listitem>
- </itemizedlist>
- <para>
- <emphasis role="bold">User and Group Functionality</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <emphasis role="bold">User registration/validation:</emphasis>
- Configurable registration
- parameters allow for user email validation before activation.
- </listitem>
- <listitem>
- <emphasis role="bold">User login:</emphasis>
- Makes use of servlet container authentication.
- </listitem>
- <listitem>
- <emphasis role="bold">Create/Edit Users:</emphasis>
- Ability for administrators to
- create/edit user profiles.
- </listitem>
- <listitem>
- <emphasis role="bold">Create/Edit Roles:</emphasis>
- Ability for administrators create/edit
- roles.
- </listitem>
- <listitem>
- <emphasis role="bold">Role Assignment:</emphasis>
- Ability for administrators to assign
- users to roles.
- </listitem>
- </itemizedlist>
- <para>
- <emphasis role="bold">Permissions Management</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <emphasis role="bold">Extendable permissions API:</emphasis>
- Allows custom portlets
- permissions based on role definition.
- </listitem>
- <listitem>
- <emphasis role="bold">Administrative interface:</emphasis>
- Allows for permissions
- assignments to roles at any time for any deployed portlet, page, or portal instance.
- </listitem>
- </itemizedlist>
- <para>
- <emphasis role="bold">Content Management System</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <emphasis role="bold">JCR-compliant:</emphasis>
- The CMS is powered by Apache Jackrabbit, an open source implementation
- of the Java Content Repository API.
- </listitem>
- <listitem>
- <emphasis role="bold">DB or Filesystem store support:</emphasis>
- Configurable content store
- to either a filesystem or RDBMS.
- </listitem>
- <listitem>
- <emphasis role="bold">External Blob Support:</emphasis>
- Configurable content store allowing
- large blobs to reside on filesystem and content node references/properties to reside in
- RDBMS.
- </listitem>
- <listitem>
- <emphasis role="bold">Versioning support:</emphasis>
- All content edited/created is
- autoversioned with a history of edits that can be viewed at any time.
- </listitem>
- <listitem>
- <emphasis role="bold">Content Serving Search-engine-friendly URLS:</emphasis>
- http://yourdomain/portal/content/index.html (Does not apply to portlet actions.)
- </listitem>
- <listitem>
- <emphasis role="bold">No long portal URLS:</emphasis>
- Serve binaries with simple urls.
- (http://domain/files/products.pdf)
- </listitem>
- <listitem>
- <emphasis role="bold">Multiple HTML Portlet instance support:</emphasis>
- Allows for extra
- instances of static content from the CMS to be served under separate windows.
- </listitem>
- <listitem>
- <emphasis role="bold">Directory Support:</emphasis>
- create, move, delete, copy, and upload
- entire directory trees.
- </listitem>
- <listitem>
- <emphasis role="bold">File Functions:</emphasis>
- create, move, copy, upload, and delete
- files.
- </listitem>
- <listitem>
- <emphasis role="bold">Embedded directory-browser:</emphasis>
- When copying, moving,
- deleting, or creating files, administrators can simply navigate the directory tree to find
- the collection they want to perform the action on.
- </listitem>
- <listitem>
- <emphasis role="bold">Ease-of-use architecture:</emphasis>
- All actions to be performed on
- files and folder are one mouse-click away.
- </listitem>
- <listitem>
- <emphasis role="bold">Full-featured HTML editor:</emphasis>
- HTML Editor contains WYSIWYG
- mode, preview functionality, and HTML source editting mode. HTML commands support tables,
- fonts, zooming, image and url linking, flash movie support, bulleted and numbered list, and
- dozens more.
- </listitem>
- <listitem>
- <emphasis role="bold">Editor style-sheet support:</emphasis>
- WYSIWYG editor displays
- current Portal style-sheet, for easy choosing of classes.
- </listitem>
- <listitem>
- <emphasis role="bold">Internationalization Support:</emphasis>
- Content can be attributed to a specific locale and then served
- to the user based on his/her browser settings.
- </listitem>
- <listitem>
- <emphasis role="bold">Workflow Support:</emphasis>
- Basic submit for review and approval process.
- </listitem>
- </itemizedlist>
-</preface>
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/identity.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/identity.xml 2007-11-16 12:06:29 UTC (rev 8970)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/identity.xml 2007-11-16 12:11:07 UTC (rev 8971)
@@ -10,11 +10,6 @@
<para>This chapter addresses identity management in JBoss Portal 2.6</para>
<sect1 id="management_api">
<title>Identity management API</title>
- <para>
- <warning>
- JBoss Portal Identity API can evolve over time and is not officially supported.
- </warning>
- </para>
<para>Since JBoss Portal 2.6 there are 4 identity services and 2 identity related interfaces. The goal of
having such a fine grained API is to enable flexible implementations based on different
identity storage like relational databases or LDAP servers. The Membership service takes care of managing the relationship
Deleted: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/overview.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/overview.xml 2007-11-16 12:06:29 UTC (rev 8970)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/overview.xml 2007-11-16 12:11:07 UTC (rev 8971)
@@ -1,91 +0,0 @@
-<preface id="overview">
- <title>JBoss Portal - Overview</title>
- <para>
- <imageobject>
- <imagedata fileref="images/setup/default_ss.jpg" format="jpg" align="center"
- valign="middle"/>
- </imageobject>
- </para>
- <para>Many IT organizations look to achieve a competitive advantage for the enterprise by
- improving business productivity and reducing costs. Today's top enterprises are realizing this
- goal by deploying enterprise portals within their IT infrastructure. Enterprise portals
- simplify access to information by providing a single source of interaction with corporate
- information. Although today's packaged portal frameworks help enterprises launch portals more
- quickly, only JBoss Portal can deliver the benefits of a zero-cost open source license,
- combined with a flexible and scalable underlying platform.
- </para>
- <para>JBoss Portal provides an open source and standards-based environment for hosting and
- serving a portal's Web interface, publishing and managing its content, and customizing its
- experience. It is entirely standards-based and supports the JSR-168 portlet specification,
- which allows you to easily plug-in standards-compliant portlets to meet your specific portal
- needs. JBoss Portal is available through the business-friendly
- <ulink
- url="http://www.jboss.com/company/aboutopensource">LGPL
- </ulink>
- open source license and is
- supported by
- <ulink url="http://www.jboss.com/services/index">Red Hat Middleware, LLC Professional Support
- and Consulting
- </ulink>
- . JBoss support services are available to assist you in designing,
- developing, deploying, and ultimately managing your portal environment. JBoss Portal is
- currently developed by Red Hat Middleware, LLC developers and community contributors.
- </para>
- <para>The JBoss Portal framework and architecture includes the portal container and supports a
- wide range of features including standard portlets, single sign-on, clustering and
- internationalization. Portal themes and layouts are configurable. Fine-grained security
- administration down to portlet permissions rounds out the security model. JBoss Portal
- includes a rich content management system and message board support.
- </para>
- <para>
- <emphasis role="bold">JBoss Portal Resources:</emphasis>
- <orderedlist>
- <listitem>
- <para>
- <ulink url="http://www.jboss.org/products/jbossportal">JBoss Portal Home Page</ulink>
- </para>
- </listitem>
- <listitem>
- <para>Forums:
- <ulink
- url="http://www.jboss.org/index.html?module=bb&op=viewforum&f=215"
- >User
- </ulink>
- |
- <ulink
- url="http://www.jboss.org/index.html?module=bb&op=viewforum&f=205"
- >Developer
- </ulink>
- |
- <ulink url="http://jboss.org/index.html?module=bb&op=viewforum&f=232">WSRP</ulink>
- |
- <ulink url="http://jboss.org/index.html?module=bb&op=viewforum&f=239">Eclipse Portlet
- Plugin
- </ulink>
- </para>
- </listitem>
- <listitem>
- <para>
- <ulink url="http://www.jboss.com/wiki/Wiki.jsp?page=JBossPortal">Wiki</ulink>
- </para>
- </listitem>
- <listitem>
- <para>
- <ulink url="http://www.portletswap.com">PortletSwap.com portlet exchange</ulink>
- </para>
- </listitem>
- <listitem>
- <para>
- <ulink
- url="http://jira.jboss.com/jira/browse/JBPORTAL?report=com.atlassian.jira.plug..."
- >Our Roadmap
- </ulink>
- </para>
- </listitem>
- </orderedlist>
- </para>
- <para>The JBoss Portal team encourages you to use this guide to install and configure JBoss
- Portal. If you encounter any configuration issues or simply want to take part in our
- community, we would love to hear from you in our forums.
- </para>
-</preface>
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/sso.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/sso.xml 2007-11-16 12:06:29 UTC (rev 8970)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/sso.xml 2007-11-16 12:11:07 UTC (rev 8971)
@@ -376,7 +376,7 @@
]]>
</programlisting>
This will expose special service in JBoss Portal that can be leveraged by JOSSO Credential and Identity Stores if the server is deployed on the same
- application server instance.
+ application server instance.
</listitem>
<listitem>
Edit <emphasis>$JBOSS_HOME/server/default/deploy/josso.ear/josso.war/WEB-INF/classes/josso-gateway-config.xml</emphasis> and configure following elements:
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/tutorials.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/tutorials.xml 2007-11-16 12:06:29 UTC (rev 8970)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/tutorials.xml 2007-11-16 12:11:07 UTC (rev 8971)
@@ -246,7 +246,7 @@
portlet supports in the <literal>render</literal> method. This is accomplish via the
<literal>mime-type</literal> element, which is <emphasis>required</emphasis> for every
portlet. Of course, the declared MIME types must match the capability of the portlet.
-
+
It also allows you to pair
which modes and window states are supported for each markup type. In out case, as all
portlets must support the VIEW portlet mode, we didn't have to declare it. We did need
@@ -311,9 +311,9 @@
<literal>*-object.xml</literal> files are JBoss Portal specific descriptors and allow users to
define the structure of their portal instances as well as create/configure their windows and
pages. In our example, we create a portlet window, specify that it will display the markup
- generated by the <literal>HelloWorldPortletInstance</literal> portlet instance, assign it to the
+ generated by the <literal>HelloWorldPortletInstance</literal> portlet instance, assign it to the
<literal>default.default</literal> page, and specify where it should appear on that page.
-
+
<itemizedlist>
<listitem>
<para>
@@ -368,7 +368,7 @@
</imageobject>
</mediaobject>
</para>
-
+
<para>
Portal 2.6 introduces the notion of <emphasis>content type</emphasis>, which is a generic mechanism to
specify which content will be displayed by a given portlet window. The <literal>window</literal> section
@@ -438,7 +438,7 @@
easily modify the XML descriptors, resources files, JSF/JSP pages. A simple <literal>touch</literal>
operation (or equivalent) on the <literal>web.xml</literal> file will let any live JBoss Application
Server instance know that it needs to hot-redeploy your web application.
- </para>
+ </para>
</sect3>
<sect3>
<title>Deploying your portlet</title>
@@ -612,7 +612,7 @@
</listitem>
</itemizedlist>
</para>
- </sect3>
+ </sect3>
<sect3>
<title>JSP files and the portlet taglib</title>
<para>
@@ -709,7 +709,7 @@
</imageobject>
</mediaobject>
</para>
- </sect3>
+ </sect3>
</sect2>
<sect2 id="sunri_42x">
<title>A simple Sun's JSF Reference Implementation (RI) portlet on JBoss AS 4.2.x</title>
@@ -720,7 +720,7 @@
from PortletSwap.com, using this link:
<ulink url="http://anonsvn.jboss.org/repos/portletswap/portlets/2_6/bundles/HelloWorl...">http://anonsvn.jboss.org/repos/portletswap/portlets/2_6/bundles/HelloWorl...</ulink>.
</para>
- </sect3>
+ </sect3>
<sect3>
<title>Package Content</title>
<para>
@@ -847,7 +847,7 @@
</para>
</listitem>
<listitem>
- <para><literal>jsf-portlet.jar</literal> This library that can be downloaded here: <ulink url="https://jsfportletbridge.dev.java.net/servlets/ProjectDocumentList">https://jsfportletbridge.dev.java.net/servlets/ProjectDocumentList</ulink>
+ <para><literal>jsf-portlet.jar</literal> This library that can be downloaded here: <ulink url="https://jsfportletbridge.dev.java.net/servlets/ProjectDocumentList">https://jsfportletbridge.dev.java.net/servlets/ProjectDocumentList</ulink>
contains the classes for the JSF-Portlet bridge. Since they are not included with the JSF
implementation (unlike myfaces) neither in JBoss AS, it is required to have this library available
in the package.</para>
@@ -855,7 +855,7 @@
</itemizedlist>
</para>
</sect3>
- <!--
+ <!--
<sect3>
<title>JSP files</title>
<para>TODO!!</para>
@@ -868,7 +868,7 @@
<literal>helloworldjspportlet.war</literal> file in a way similar to what we saw in
<xref linkend="first_portlet_build"/>.
</para>
- <!--
+ <!--
<para>
The <literal>explode</literal> target will produce the following:
<mediaobject>
@@ -888,7 +888,7 @@
</imageobject>
</mediaobject>
</para>
- </sect3>
+ </sect3>
</sect2>
<sect2 id="myfaces_40x">
<title>A simple MyFaces JSF Portlet on JBoss AS 4.0.5+</title>
@@ -899,7 +899,7 @@
from PortletSwap.com, using this link:
<ulink url="http://anonsvn.jboss.org/repos/portletswap/portlets/2_6/bundles/HelloWorl...">http://anonsvn.jboss.org/repos/portletswap/portlets/2_6/bundles/HelloWorl...</ulink>.
</para>
- </sect3>
+ </sect3>
<sect3>
<title>Package Content</title>
<para>
@@ -1005,7 +1005,7 @@
</itemizedlist>
</para>
</sect3>
- <!--
+ <!--
<sect3>
<title>JSP files</title>
<para>TODO!!</para>
@@ -1018,7 +1018,7 @@
<literal>helloworldjsfportlet.war</literal> file in a way similar to what we saw in
<xref linkend="first_portlet_build"/>.
</para>
- <!--
+ <!--
<para>
The <literal>explode</literal> target will produce the following:
<mediaobject>
@@ -1038,7 +1038,7 @@
</imageobject>
</mediaobject>
</para>
- </sect3>
+ </sect3>
</sect2>
<sect2>
<title>Adapting MyFaces JSF Portlet to work on JBoss AS 4.2.x</title>
Deleted: docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/images/intro/user_portlet.gif
===================================================================
(Binary files differ)
Deleted: docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/images/intro/user_portlet_editinfo.gif
===================================================================
(Binary files differ)
Deleted: docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/images/role/createrole.gif
===================================================================
(Binary files differ)
Deleted: docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/images/role/createuser.gif
===================================================================
(Binary files differ)
Deleted: docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/images/role/editprofile.gif
===================================================================
(Binary files differ)
Deleted: docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/images/role/editrolemembers.gif
===================================================================
(Binary files differ)
Deleted: docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/images/role/editrolename.gif
===================================================================
(Binary files differ)
Deleted: docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/images/role/editroles.gif
===================================================================
(Binary files differ)
Deleted: docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/images/role/edituserroles.gif
===================================================================
(Binary files differ)
Deleted: docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/images/role/memberspage.gif
===================================================================
(Binary files differ)
Deleted: docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/images/role/normalstate.gif
===================================================================
(Binary files differ)
Deleted: docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/images/role/searchusers.gif
===================================================================
(Binary files differ)
Deleted: docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/images/role/user_ss.gif
===================================================================
(Binary files differ)
Deleted: docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/modules/acknowledgements.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/modules/acknowledgements.xml 2007-11-16 12:06:29 UTC (rev 8970)
+++ docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/modules/acknowledgements.xml 2007-11-16 12:11:07 UTC (rev 8971)
@@ -1,42 +0,0 @@
-<preface id="acknowledgements">
- <title>Acknowledgements</title>
- <para>We would like to thank the developers that participate in the JBoss Portal project effort.</para>
- <para>Specifically,</para>
- <para>
- <itemizedlist>
- <listitem>
- Antoine Herzog for his feedback, for writing Wikis and helping in the forums.
- </listitem>
- <listitem>
- Mark Fernandes and Paul Tamaro from Novell, for their hard work in supplying the
- portal project with usable and attractive themes and layouts in the 2.4 version of JBoss Portal.
- </listitem>
- <listitem>
- Martin Holzner from Novell, for his work on themes in the 2.4 version of JBoss Portal.
- </listitem>
- <listitem>
- Kev "kevs3d" Roast for supplying us with two working portlets that integrate existing
- frameworks in to the portal: Sun JSF-RI and Spring MVC Portlet.
- </listitem>
- <listitem>
- Swarn "sdhaliwal" Dhaliwal for supplying us with the Struts-Bridge, that will allow
- for existing struts applications to work with the Portal.
- </listitem>
- <listitem>
- A few Red Hat employees, Remy Maucherat for Tomcat configuration, Magesh Kumar Bojan and Martin Putz always there to help our customers,
- Prabhat Jha for making sure that JBoss Portal runs great everywhere. Noel Rocher for his early feedback on JBoss Portal 2.6
- and contributions. James Cobb for the Renaissance theme.
- </listitem>
- <listitem>
- The JBoss Labs (http://www.JBoss.org) team for building a great infrastructure on top of JBoss Portal 2.6, providing very useful feedback and
- giving us the initial Drag and Drop implementation.
- </listitem>
- <listitem>
- Everyone participating in the forums and Wiki in general.
- </listitem>
- </itemizedlist>
- </para>
- <para>Contributions of any kind are always welcome, you can contribute by providing ideas,
- filling bug reports, producing some code, designing a theme, writing some documentation,
- etc... If you think your name is missing from this page, please let us know.</para>
-</preface>
\ No newline at end of file
Deleted: docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/modules/featurelist.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/modules/featurelist.xml 2007-11-16 12:06:29 UTC (rev 8970)
+++ docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/modules/featurelist.xml 2007-11-16 12:11:07 UTC (rev 8971)
@@ -1,263 +0,0 @@
-<preface id="features">
- <title>Feature List</title>
- <para>The following list details features found in this document's related release. For a
- technical view of our features, view the
- <ulink
- url="http://jira.jboss.com/jira/browse/JBPORTAL">Project Roadmap and Task List</ulink>
- .
- </para>
- <para>
- <emphasis role="bold">Technology and Architecture</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <emphasis role="bold">JEMS:</emphasis>
- Leverages the power of JBoss Enterprise Middleware
- Services : JBoss Application Server, JBoss Cache, JGroups, and Hibernate.
- </listitem>
- <listitem>
- <emphasis role="bold">DB Agnostic:</emphasis>
- Will work with any RDBMS supported by Hibernate
- </listitem>
- <listitem>
- <emphasis role="bold">SSO/LDAP:</emphasis>
- Leverages Tomcat and JBoss single sign on (SSO)
- solutions.
- Identity mapping framework adaptable to the enterprise LDAP deployments.
- </listitem>
- <listitem>
- <emphasis role="bold">JAAS Authentication:</emphasis>
- Custom authentication via JAAS login modules.
- </listitem>
- <listitem>
- <emphasis role="bold">Cacheing:</emphasis>
- Utilizes render-view caching for improved performance.
- </listitem>
- <listitem>
- <emphasis role="bold">Clusterable:</emphasis>
- Cluster support allows for portal state to be
- clustered for all portal instances.
- </listitem>
- <listitem>
- <emphasis role="bold">Hot-Deployment:</emphasis>
- Leverages JBoss dynamic auto deployment
- features.
- </listitem>
- <listitem>
- <emphasis role="bold">SAR Installer:</emphasis>
- Browser-based installer makes installation
- and initial configuration a breeze.
- </listitem>
- </itemizedlist>
- <para>
- <emphasis role="bold">Supported Standards</emphasis>
- <itemizedlist>
- <listitem>
- <emphasis role="bold">Portlet Specification and API 1.0 (JSR-168)</emphasis>
- </listitem>
- <listitem>
- <emphasis role="bold">Content Repository for Java Technology API (JSR-170)</emphasis>
- </listitem>
- <listitem>
- <emphasis role="bold">Java Server Faces 1.2 (JSR-252)</emphasis>
- </listitem>
- <listitem>
- <emphasis role="bold">Java Management Extension (JMX) 1.2</emphasis>
- </listitem>
- <listitem>
- <emphasis role="bold">Web Services for Remote Portlets (WSRP) 1.0</emphasis>
- See <ulink url="http://docs.jboss.com/jbportal/v2.6/reference-guide/en/html/wsrp.html#wsr...">WSRP
- support in Portal</ulink> for more details.
- </listitem>
- <listitem>
- <emphasis role="bold">Full J2EE 1.4 compliance when used with JBoss AS</emphasis>
- </listitem>
- </itemizedlist>
- </para>
- <para>
- <emphasis role="bold">Portal and Portal Container</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <emphasis role="bold">Multiple Portal Instances:</emphasis>
- Ability to have multiple Portal
- instances running inside of one Portal container.
- </listitem>
- <listitem>
- <emphasis role="bold">IPC</emphasis>
- Inter-Portlet Communication API enables portlets to create links to other
- objects such as a page, portal or window .
- </listitem>
- <listitem>
- <emphasis role="bold">Dynamicity</emphasis>
- The ability for administrators and users to create and destroy objects such as
- portlets, pages, portals, themes, and layouts at runtime.
- </listitem>
- <listitem>
- <emphasis role="bold">Internationalization:</emphasis>
- Ability to use internationalization
- resource files for every portlet.
- </listitem>
- <listitem>
- <emphasis role="bold">Pluggable services:</emphasis>
- Authentication performed by the
- servlet container and JAAS make it possible to swap the authentication scheme.
- </listitem>
- <listitem>
- <emphasis role="bold">Page-based Architecture:</emphasis>
- Allows for the grouping/division
- of portlets on a per-page basis.
- </listitem>
- <listitem>
- <emphasis role="bold">Existing Framework support:</emphasis>
- Portlets utilizing Struts,
- Spring MVC, Sun JSF-RI, AJAX, or MyFaces are supported.
- </listitem>
- </itemizedlist>
- <para>
- <emphasis role="bold">Themes and Layouts</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <emphasis role="bold">Easily swappable themes/layouts:</emphasis>
- New themes and layouts
- containing images can be deployed in WAR archives.
- </listitem>
- <listitem>
- <emphasis role="bold">Flexible API:</emphasis>
- Theme and Layout API are designed to
- separate the business layer from the presentation layer.
- </listitem>
- <listitem>
- <emphasis role="bold">Per-page layout strategy:</emphasis>
- Different layouts can be
- assigned to different pages.
- </listitem>
- </itemizedlist>
- <para>
- <emphasis role="bold">User and Group Functionality</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <emphasis role="bold">User registration/validation:</emphasis>
- Configurable registration
- parameters allow for user email validation before activation.
- </listitem>
- <listitem>
- <emphasis role="bold">User login:</emphasis>
- Makes use of servlet container authentication.
- </listitem>
- <listitem>
- <emphasis role="bold">Create/Edit Users:</emphasis>
- Ability for administrators to
- create/edit user profiles.
- </listitem>
- <listitem>
- <emphasis role="bold">Create/Edit Roles:</emphasis>
- Ability for administrators create/edit
- roles.
- </listitem>
- <listitem>
- <emphasis role="bold">Role Assignment:</emphasis>
- Ability for administrators to assign
- users to roles.
- </listitem>
- </itemizedlist>
- <para>
- <emphasis role="bold">Permissions Management</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <emphasis role="bold">Extendable permissions API:</emphasis>
- Allows custom portlets
- permissions based on role definition.
- </listitem>
- <listitem>
- <emphasis role="bold">Administrative interface:</emphasis>
- Allows for permissions
- assignments to roles at any time for any deployed portlet, page, or portal instance.
- </listitem>
- </itemizedlist>
- <para>
- <emphasis role="bold">Content Management System</emphasis>
- </para>
- <itemizedlist>
- <listitem>
- <emphasis role="bold">JCR-compliant:</emphasis>
- The CMS is powered by Apache Jackrabbit, an open source implementation
- of the Java Content Repository API.
- </listitem>
- <listitem>
- <emphasis role="bold">DB or Filesystem store support:</emphasis>
- Configurable content store
- to either a filesystem or RDBMS.
- </listitem>
- <listitem>
- <emphasis role="bold">External Blob Support:</emphasis>
- Configurable content store allowing
- large blobs to reside on filesystem and content node references/properties to reside in
- RDBMS.
- </listitem>
- <listitem>
- <emphasis role="bold">Versioning support:</emphasis>
- All content edited/created is
- autoversioned with a history of edits that can be viewed at any time.
- </listitem>
- <listitem>
- <emphasis role="bold">Content Serving Search-engine-friendly URLS:</emphasis>
- http://yourdomain/portal/content/index.html (Does not apply to portlet actions.)
- </listitem>
- <listitem>
- <emphasis role="bold">No long portal URLS:</emphasis>
- Serve binaries with simple urls.
- (http://domain/files/products.pdf)
- </listitem>
- <listitem>
- <emphasis role="bold">Multiple HTML Portlet instance support:</emphasis>
- Allows for extra
- instances of static content from the CMS to be served under separate windows.
- </listitem>
- <listitem>
- <emphasis role="bold">Directory Support:</emphasis>
- create, move, delete, copy, and upload
- entire directory trees.
- </listitem>
- <listitem>
- <emphasis role="bold">File Functions:</emphasis>
- create, move, copy, upload, and delete
- files.
- </listitem>
- <listitem>
- <emphasis role="bold">Embedded directory-browser:</emphasis>
- When copying, moving,
- deleting, or creating files, administrators can simply navigate the directory tree to find
- the collection they want to perform the action on.
- </listitem>
- <listitem>
- <emphasis role="bold">Ease-of-use architecture:</emphasis>
- All actions to be performed on
- files and folder are one mouse-click away.
- </listitem>
- <listitem>
- <emphasis role="bold">Full-featured HTML editor:</emphasis>
- HTML Editor contains WYSIWYG
- mode, preview functionality, and HTML source editting mode. HTML commands support tables,
- fonts, zooming, image and url linking, flash movie support, bulleted and numbered list, and
- dozens more.
- </listitem>
- <listitem>
- <emphasis role="bold">Editor style-sheet support:</emphasis>
- WYSIWYG editor displays
- current Portal style-sheet, for easy choosing of classes.
- </listitem>
- <listitem>
- <emphasis role="bold">Internationalization Support:</emphasis>
- Content can be attributed to a specific locale and then served
- to the user based on his/her browser settings.
- </listitem>
- <listitem>
- <emphasis role="bold">Workflow Support:</emphasis>
- Basic submit for review and approval process.
- </listitem>
- </itemizedlist>
-</preface>
Modified: docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/modules/intro.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/modules/intro.xml 2007-11-16 12:06:29 UTC (rev 8970)
+++ docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/modules/intro.xml 2007-11-16 12:11:07 UTC (rev 8971)
@@ -20,7 +20,7 @@
</para>
<sect2>
<title>Portal Instances</title>
- <para>JBoss Portal supports mutliple portal instances running within one container. A portal instance can be
+ <para>JBoss Portal supports multiple portal instances running within one container. A portal instance can be
viewed as a 'bucket', containing portal objects such as, Portal Pages, Themes, Layouts, and Portlet Windows.
It also manages the
relationship between the user and the portal itself. The hierarchy of portal objects is depicted as follows:
@@ -330,7 +330,7 @@
<emphasis role="bold">View profile</emphasis>
</para>
<para>
- The default page after login is the view profile, which shows a summary of the most important properties of a user.
+ The default page after login is the view profile, which shows a summary of the most important properties of a user.
</para>
</listitem>
<listitem>
@@ -338,7 +338,7 @@
<emphasis role="bold">Edit personal information</emphasis>
</para>
<para>A user has the ability to edit his personal information, change his password and e-mail address at any time by clicking on the
- <emphasis>"Edit profile"</emphasis> link, when logged in.
+ <emphasis>"Edit profile"</emphasis> link, when logged in.
</para>
</listitem>
</itemizedlist>
@@ -522,7 +522,7 @@
location, if the administrator allows this functionality. Changes made in this fashion will also be persisted.
</para>
<para>
- It is also possible to copy the content of a shared page to your dashboard so you can customize it to your
+ It is also possible to copy the content of a shared page to your dashboard so you can customize it to your
liking. Just click the <emphasis>'Copy to my dashboard'</emphasis> link at the top right of the page.
This will clone the page and add it to your personal dashboard as a page with the same name.
<mediaobject>
Deleted: docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/modules/overview.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/modules/overview.xml 2007-11-16 12:06:29 UTC (rev 8970)
+++ docs/branches/JBoss_Portal_Branch_2_6/userGuide/en/modules/overview.xml 2007-11-16 12:11:07 UTC (rev 8971)
@@ -1,84 +0,0 @@
-<preface id="overview">
- <title>JBoss Portal - Overview</title>
- <para>
- <imageobject>
- <imagedata fileref="images/setup/default_ss.png" format="png" align="center"
- valign="middle"/>
- </imageobject>
- </para>
- <para>Many IT organizations look to achieve a competitive advantage for the enterprise by
- improving business productivity and reducing costs. Today's top enterprises are realizing this
- goal by deploying enterprise portals within their IT infrastructure. Enterprise portals
- simplify access to information by providing a single source of interaction with corporate
- information. Although today's packaged portal frameworks help enterprises launch portals more
- quickly, only JBoss Portal can deliver the benefits of a zero-cost open source license
- combined with a flexible and scalable underlying platform.</para>
- <para>JBoss Portal provides an open source and standards-based environment for hosting and
- serving a portal's Web interface, publishing and managing its content, and customizing its
- experience. It is entirely standards-based and supports the JSR-168 portlet specification,
- which allows you to easily plug-in standards-compliant portlets to meet your specific portal
- needs. JBoss Portal is available through the business-friendly
- <ulink
- url="http://www.jboss.com/company/aboutopensource">LGPL</ulink>
- open source license and is
- supported by
- <ulink url="http://www.jboss.com/services/index">Red Hat Middleware, LLC Professional Support
- and Consulting
- </ulink>
- . JBoss support services are available to assist you in designing,
- developing, deploying, and ultimately managing your portal environment. JBoss Portal is
- currently developed by Red Hat Middleware, LLC developers and community contributors.
- </para>
- <para>The JBoss Portal framework and architecture includes the portal container and supports a
- wide range of features including standard portlets, single sign-on, clustering and
- internationalization. Portal themes and layouts are configurable. Fine-grained security
- administration down to portlet permissions rounds out the security model. JBoss Portal
- includes a rich content management system and message board support.</para>
- <para>
- <emphasis role="bold">JBoss Portal Resources:</emphasis>
- <orderedlist>
- <listitem>
- <para>
- <ulink url="http://www.jboss.org/products/jbossportal">JBoss Portal Home Page</ulink>
- </para>
- </listitem>
- <listitem>
- <para>Forums:
- <ulink
- url="http://www.jboss.org/index.html?module=bb&op=viewforum&f=215"
- >User</ulink>
- |
- <ulink
- url="http://www.jboss.org/index.html?module=bb&op=viewforum&f=205"
- >Developer</ulink>
- |
- <ulink url="http://jboss.org/index.html?module=bb&op=viewforum&f=232">WSRP</ulink>
- |
- <ulink url="http://jboss.org/index.html?module=bb&op=viewforum&f=239">Eclipse Portlet
- Plugin</ulink>
- </para>
- </listitem>
- <listitem>
- <para>
- <ulink url="http://www.jboss.com/wiki/Wiki.jsp?page=JBossPortal">Wiki</ulink>
- </para>
- </listitem>
- <listitem>
- <para>
- <ulink url="http://www.portletswap.com">PortletSwap.com portlet exchange</ulink>
- </para>
- </listitem>
- <listitem>
- <para>
- <ulink
- url="http://jira.jboss.com/jira/browse/JBPORTAL?report=com.atlassian.jira.plug..."
- >Our Roadmap</ulink>
- </para>
- </listitem>
- </orderedlist>
- </para>
- <para>The JBoss Portal team encourages you to use this guide to install and configure JBoss
- Portal. If you encounter any configuration issues or simply want to take part in our
- community, we would love to hear from you in our forums.
- </para>
-</preface>
Modified: docs/trunk/quickstartuser/en/master.xml
===================================================================
--- docs/trunk/quickstartuser/en/master.xml 2007-11-16 12:06:29 UTC (rev 8970)
+++ docs/trunk/quickstartuser/en/master.xml 2007-11-16 12:11:07 UTC (rev 8971)
@@ -11,9 +11,9 @@
]>
<book lang="en">
<bookinfo>
- <title>JBoss Portal 2.6.2-GA</title>
+ <title>JBoss Portal 2.6.3-SNAPSHOT</title>
<subtitle>Quickstart User Guide</subtitle>
- <releaseinfo>Release 2.6.2-GA</releaseinfo>
+ <releaseinfo>Release 2.6.3-SNAPSHOT</releaseinfo>
<author>
<firstname>Kevin</firstname>
Modified: docs/trunk/readmeFiles/jboss-portal-bin.README
===================================================================
--- docs/trunk/readmeFiles/jboss-portal-bin.README 2007-11-16 12:06:29 UTC (rev 8970)
+++ docs/trunk/readmeFiles/jboss-portal-bin.README 2007-11-16 12:11:07 UTC (rev 8971)
@@ -1,5 +1,5 @@
- JBoss Portal 2.6.2
+ JBoss Portal 2.6.3-SNAPSHOT
LGPL Licensed (See http://www.gnu.org/copyleft/lesser.html for details on the product usage)
JBoss Portal is the next generation open source content management system (CMS) and portal
Modified: docs/trunk/readmeFiles/jboss-portal-ha-bin.README
===================================================================
--- docs/trunk/readmeFiles/jboss-portal-ha-bin.README 2007-11-16 12:06:29 UTC (rev 8970)
+++ docs/trunk/readmeFiles/jboss-portal-ha-bin.README 2007-11-16 12:11:07 UTC (rev 8971)
@@ -1,5 +1,5 @@
- JBoss Portal 2.6.2
+ JBoss Portal 2.6.3-SNAPSHOT
LGPL Licensed (See http://www.gnu.org/copyleft/lesser.html for details on the product usage)
JBoss Portal is the next generation open source content management system (CMS) and portal
Modified: docs/trunk/readmeFiles/jboss-portal-src.README
===================================================================
--- docs/trunk/readmeFiles/jboss-portal-src.README 2007-11-16 12:06:29 UTC (rev 8970)
+++ docs/trunk/readmeFiles/jboss-portal-src.README 2007-11-16 12:11:07 UTC (rev 8971)
@@ -1,5 +1,5 @@
- JBoss Portal 2.6.2
+ JBoss Portal 2.6.3-SNAPSHOT
LGPL Licensed (See http://www.gnu.org/copyleft/lesser.html for details on the product usage)
JBoss Portal is the next generation open source content management system (CMS) and portal
Modified: docs/trunk/referenceGuide/en/master.xml
===================================================================
--- docs/trunk/referenceGuide/en/master.xml 2007-11-16 12:06:29 UTC (rev 8970)
+++ docs/trunk/referenceGuide/en/master.xml 2007-11-16 12:11:07 UTC (rev 8971)
@@ -33,9 +33,9 @@
]>
<book lang="en">
<bookinfo>
- <title>JBoss Portal 2.6.2</title>
+ <title>JBoss Portal 2.6.3-SNAPSHOT</title>
<subtitle>Reference Guide</subtitle>
- <releaseinfo>Release 2.6.2</releaseinfo>
+ <releaseinfo>Release 2.6.3-SNAPSHOT</releaseinfo>
<releaseinfo>October 2007</releaseinfo>
<author>
<firstname>Thomas</firstname>
Modified: docs/trunk/referenceGuide/en/modules/configuration.xml
===================================================================
--- docs/trunk/referenceGuide/en/modules/configuration.xml 2007-11-16 12:06:29 UTC (rev 8970)
+++ docs/trunk/referenceGuide/en/modules/configuration.xml 2007-11-16 12:11:07 UTC (rev 8971)
@@ -67,7 +67,7 @@
<programlisting><![CDATA[
<?xml version="1.0"?>
<jboss-web>
- <context-root>/tomcat-root</context-root>
+ <context-root>/tomcat-root</context-root>
</jboss-web>]]></programlisting>
</note>
<para>You can accomplish this, with either a deployed jboss-portal.sar or before you build from source:
@@ -168,7 +168,7 @@
<sect1 id="emailConfiguration">
<title>Setting up the email service</title>
<para>To be able to use the email service (for example to verify user emails when someone subscribes or for CMS
- workflow notifications) it has to be configured correctly. To configure it, go to
+ workflow notifications) it has to be configured correctly. To configure it, go to
<literal>jboss-portal.sar/portal-core.sar/META-INF/jboss-service.xml</literal>.
In this file, the mail module is configured like this:
<programlisting><![CDATA[<mbean
Modified: docs/trunk/referenceGuide/en/modules/errorhandling.xml
===================================================================
--- docs/trunk/referenceGuide/en/modules/errorhandling.xml 2007-11-16 12:06:29 UTC (rev 8970)
+++ docs/trunk/referenceGuide/en/modules/errorhandling.xml 2007-11-16 12:11:07 UTC (rev 8971)
@@ -317,6 +317,6 @@
<imageobject>
<imagedata fileref="images/errorhandling/errorHandlingUI.png" format="png" align="center"/>
</imageobject>
- </para>
+ </para>
</sect1>
</chapter>
\ No newline at end of file
Modified: docs/trunk/referenceGuide/en/modules/installation.xml
===================================================================
--- docs/trunk/referenceGuide/en/modules/installation.xml 2007-11-16 12:06:29 UTC (rev 8970)
+++ docs/trunk/referenceGuide/en/modules/installation.xml 2007-11-16 12:11:07 UTC (rev 8971)
@@ -17,7 +17,7 @@
<para>If you need to install JBoss Portal on JBoss AS 4.0.x, please refer to the dedicated
<ulink url="http://wiki.jboss.org/wiki/Wiki.jsp?page=Portal26_AS40">wiki page</ulink>.</para>
</note>
-
+
</para>
<sect1 id="install_bundle">
<title>Installing from Bundled Download</title>
@@ -565,4 +565,4 @@
</imageobject>
</mediaobject>
</para>
-</chapter>
+</chapter>
Modified: docs/trunk/referenceGuide/en/modules/security.xml
===================================================================
--- docs/trunk/referenceGuide/en/modules/security.xml 2007-11-16 12:06:29 UTC (rev 8970)
+++ docs/trunk/referenceGuide/en/modules/security.xml 2007-11-16 12:11:07 UTC (rev 8971)
@@ -120,12 +120,12 @@
<xref linkend="desc_example_portal"/>
</para>
</sect1>
-
+
<sect1 id="security.security_cms">
<title>Securing the Content Management System</title>
<para>
The JBoss Portal CMS system consists of a directory structure of Files organized unto their respective Folders. Both Files and Folders are
- considered to be CMS resources that can be secured based on portal Roles and/or Users.
+ considered to be CMS resources that can be secured based on portal Roles and/or Users.
</para>
<para>
The following features are supported by the fine grained security system of Portal CMS:
@@ -155,7 +155,7 @@
<row>
<entry align="center">Permissions</entry>
<entry align="center">Allowed Actions</entry>
- <entry align="center">Implies</entry>
+ <entry align="center">Implies</entry>
</row>
</thead>
<tbody>
Modified: docs/trunk/referenceGuide/en/modules/wsrp.xml
===================================================================
--- docs/trunk/referenceGuide/en/modules/wsrp.xml 2007-11-16 12:06:29 UTC (rev 8970)
+++ docs/trunk/referenceGuide/en/modules/wsrp.xml 2007-11-16 12:11:07 UTC (rev 8971)
@@ -70,7 +70,7 @@
<para>
JBoss Portal provides a complete support of WSRP 1.0 standard interfaces and offers
both consumer and producer services. WSRP support is provided by the <emphasis>portal-wsrp.sar</emphasis>
- service archive, included in the main <emphasis>jboss-portal.sar</emphasis> service archive, if you've
+ service archive, included in the main <emphasis>jboss-portal.sar</emphasis> service archive, if you've
obtained JBoss Portal from a binary distribution. If you don't intend on using WSRP, we recommend that you
remove the <emphasis>portal-wspr.sar</emphasis> from the main <emphasis>jboss-portal.sar</emphasis> service
archive.</para>
@@ -487,7 +487,7 @@
<para>
<programlisting><![CDATA[
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE deployments PUBLIC "-//JBoss Portal//DTD WSRP Remote Producer Configuration 2.6//EN"
"http://www.jboss.org/portal/dtd/jboss-wsrp-consumer_2_6.dtd">
@@ -526,7 +526,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE deployments PUBLIC "-//JBoss Portal//DTD WSRP Remote Producer Configuration 2.6//EN"
"http://www.jboss.org/portal/dtd/jboss-wsrp-consumer_2_6.dtd">
-
+
<deployments>
<deployment>
<wsrp-producer id="MyProducer" expiration-cache="120">
@@ -557,7 +557,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE deployments PUBLIC "-//JBoss Portal//DTD WSRP Remote Producer Configuration 2.6//EN"
"http://www.jboss.org/portal/dtd/jboss-wsrp-consumer_2_6.dtd">
-
+
<deployments>
<deployment>
<wsrp-producer id="AnotherProducer" expiration-cache="60">
@@ -702,7 +702,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE producer-configuration PUBLIC "-//JBoss Portal//DTD WSRP Local Producer Configuration 2.6//EN"
"http://www.jboss.org/portal/dtd/jboss-wsrp-producer_2_6.dtd">
-
+
<producer-configuration>
<registration-configuration fullServiceDescriptionRequiresRegistration="true">
<registration-policy>com.example.portal.SomeCustomRegistrationPolicy</registration-policy>
Modified: docs/trunk/userGuide/en/master.xml
===================================================================
--- docs/trunk/userGuide/en/master.xml 2007-11-16 12:06:29 UTC (rev 8970)
+++ docs/trunk/userGuide/en/master.xml 2007-11-16 12:11:07 UTC (rev 8971)
@@ -13,15 +13,10 @@
]>
<book lang="en">
<bookinfo>
- <title>JBoss Portal 2.6.2-GA</title>
+ <title>JBoss Portal 2.6.3-SNAPSHOT</title>
<subtitle>User Guide</subtitle>
- <releaseinfo>Release 2.6.2-GA "Ninja"</releaseinfo>
+ <releaseinfo>Release 2.6.3-SNAPSHOT "Ninja"</releaseinfo>
<releaseinfo>October 2007</releaseinfo>
- <author>
- <firstname>Roy</firstname>
- <surname>Russo</surname>
- <email>roy(a)jboss.org</email>
- </author>
</bookinfo>
<toc/>
<!-- portal overview - marketing stuff --> &overview;
Modified: docs/trunk/userGuide/en/modules/dynamicity.xml
===================================================================
--- docs/trunk/userGuide/en/modules/dynamicity.xml 2007-11-16 12:06:29 UTC (rev 8970)
+++ docs/trunk/userGuide/en/modules/dynamicity.xml 2007-11-16 12:11:07 UTC (rev 8971)
@@ -31,7 +31,7 @@
portlet, allowing for dynamic customization of any of the above components.</listitem>
</itemizedlist>
</para>
- <!--
+ <!--
<note>
Many of the operations that can be done via the Management portlet are done in the context of the current
user session. In order to see the changes on the affected pages, please log out and log back in.
@@ -122,7 +122,7 @@
is displayed when Portal is first being accessed. Clicking on <literal>Make Default</literal> will
specify that the associated portal will be displayed to users by default. The portal list will be
refreshed and the selected portal status will be refreshed, its action now showing its
- <literal>Default</literal> status.
+ <literal>Default</literal> status.
</para>
<para>
@@ -220,7 +220,7 @@
<para>
Now that we have looked at portal level information, let's drill down the hierachy again and look at
- a page, more precisely the <literal>default</literal> page, by clicking its name in the pages list.
+ a page, more precisely the <literal>default</literal> page, by clicking its name in the pages list.
</para>
</sect3>
@@ -327,7 +327,7 @@
Note how the instances list is replaced by a list of Google widgets. The widget we want to use is
located in the <literal>Fun & Games</literal> category, so select it from the category drop-down menu:
<mediaobject>
- <imageobject>
+ <imageobject>
<imagedata fileref="images/management/layout_google2.png" format="png" align="center"
valign="middle"/>
</imageobject>
@@ -460,7 +460,7 @@
</imageobject>
</mediaobject>
</para>
-
+
<para>
Clicking on a portlet name in the list will display the portlet definition title, description, supported
languages and keywords.
16 years, 10 months
JBoss Portal SVN: r8970 - in modules/identity/trunk/identity: src/test/resources and 1 other directory.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-11-16 07:06:29 -0500 (Fri, 16 Nov 2007)
New Revision: 8970
Modified:
modules/identity/trunk/identity/pom.xml
modules/identity/trunk/identity/src/test/resources/jboss-unit.xml
Log:
try to fake hudson to use jboss unit reports
Modified: modules/identity/trunk/identity/pom.xml
===================================================================
--- modules/identity/trunk/identity/pom.xml 2007-11-16 11:58:05 UTC (rev 8969)
+++ modules/identity/trunk/identity/pom.xml 2007-11-16 12:06:29 UTC (rev 8970)
@@ -294,8 +294,8 @@
</testsuite>
</testsuites>
<reports>
- <xml>${basedir}/reports/xml</xml>
- <html>${basedir}/reports/html</html>
+ <xml>${basedir}/target/surefire-reports/xml</xml>
+ <html>${basedir}/target/surefire-reports/html</html>
</reports>
</configuration>
</plugin>
Modified: modules/identity/trunk/identity/src/test/resources/jboss-unit.xml
===================================================================
--- modules/identity/trunk/identity/src/test/resources/jboss-unit.xml 2007-11-16 11:58:05 UTC (rev 8969)
+++ modules/identity/trunk/identity/src/test/resources/jboss-unit.xml 2007-11-16 12:06:29 UTC (rev 8970)
@@ -26,9 +26,9 @@
<parameter name="directoryName">
<value>OpenDS</value>
- <value>Sun DS</value>
- <value>RedHatDS</value>
- <value>OpenLDAP</value>
+ <!--<value>Sun DS</value>-->
+ <!--<value>RedHatDS</value>-->
+ <!--<value>OpenLDAP</value>-->
</parameter>
<test>
@@ -72,8 +72,8 @@
<parameter name="directories" value="datasources/directories-staticrolemembership.xml"/>
<parameter name="directoryName">
<value>OpenDS</value>
- <value>Sun DS</value>
- <value>RedHatDS</value>
+ <!--<value>Sun DS</value>-->
+ <!--<value>RedHatDS</value>-->
</parameter>
</test>
16 years, 10 months
JBoss Portal SVN: r8969 - modules/identity/trunk/identity/src/test/resources.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-11-16 06:58:05 -0500 (Fri, 16 Nov 2007)
New Revision: 8969
Modified:
modules/identity/trunk/identity/src/test/resources/jboss-unit.xml
Log:
enable LDAP matrix
Modified: modules/identity/trunk/identity/src/test/resources/jboss-unit.xml
===================================================================
--- modules/identity/trunk/identity/src/test/resources/jboss-unit.xml 2007-11-16 11:07:25 UTC (rev 8968)
+++ modules/identity/trunk/identity/src/test/resources/jboss-unit.xml 2007-11-16 11:58:05 UTC (rev 8969)
@@ -26,9 +26,9 @@
<parameter name="directoryName">
<value>OpenDS</value>
- <!--<value>Sun DS</value>-->
- <!--<value>RedHatDS</value>-->
- <!--<value>OpenLDAP</value>-->
+ <value>Sun DS</value>
+ <value>RedHatDS</value>
+ <value>OpenLDAP</value>
</parameter>
<test>
@@ -72,9 +72,8 @@
<parameter name="directories" value="datasources/directories-staticrolemembership.xml"/>
<parameter name="directoryName">
<value>OpenDS</value>
- <!--<value>Sun DS</value>-->
- <!--<value>RedHatDS</value>-->
- <!--<value>OpenLDAP</value>-->
+ <value>Sun DS</value>
+ <value>RedHatDS</value>
</parameter>
</test>
16 years, 10 months