From portal-commits at lists.jboss.org Sat Nov 17 16:51:55 2007 Content-Type: multipart/mixed; boundary="===============0030870454664466488==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r8994 - in branches/UIServer: core/src/main/org/jboss/portal/core/presentation/server and 2 other directories. Date: Sat, 17 Nov 2007 16:51:55 -0500 Message-ID: --===============0030870454664466488== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: sohil.shah(a)jboss.com Date: 2007-11-17 16:51:55 -0500 (Sat, 17 Nov 2007) New Revision: 8994 Added: branches/UIServer/core/src/main/org/jboss/portal/core/controller/Control= lerContextFactory.java Modified: branches/UIServer/core/src/main/org/jboss/portal/core/controller/Control= ler.java branches/UIServer/core/src/main/org/jboss/portal/core/presentation/serve= r/PresentationServerImpl.java branches/UIServer/core/src/resources/portal-core-sar/META-INF/jboss-serv= ice.xml branches/UIServer/server/src/main/org/jboss/portal/server/RequestControl= ler.java Log: render hack Modified: branches/UIServer/core/src/main/org/jboss/portal/core/controller/= Controller.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/core/src/main/org/jboss/portal/core/controller/Contro= ller.java 2007-11-17 21:17:04 UTC (rev 8993) +++ branches/UIServer/core/src/main/org/jboss/portal/core/controller/Contro= ller.java 2007-11-17 21:51:55 UTC (rev 8994) @@ -56,7 +56,7 @@ * @author Julien Viet * @version $Revision: 1.1 $ */ -public class Controller extends AbstractJBossService implements RequestCon= troller +public class Controller extends AbstractJBossService implements RequestCon= troller, ControllerContextFactory { = /** . */ @@ -209,6 +209,11 @@ { this.pageControlPolicy =3D pageControlPolicy; } + = + public ControllerContext getControllerContext(ServerInvocation invocati= on) throws ServerException + { + return new ControllerContext(invocation, this); + } = public final void handle(ServerInvocation invocation) throws ServerExce= ption { Added: branches/UIServer/core/src/main/org/jboss/portal/core/controller/Con= trollerContextFactory.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/core/src/main/org/jboss/portal/core/controller/Contro= llerContextFactory.java (rev 0) +++ branches/UIServer/core/src/main/org/jboss/portal/core/controller/Contro= llerContextFactory.java 2007-11-17 21:51:55 UTC (rev 8994) @@ -0,0 +1,9 @@ +package org.jboss.portal.core.controller; + +import org.jboss.portal.server.ServerInvocation; +import org.jboss.portal.server.ServerException; + +public interface ControllerContextFactory +{ + public ControllerContext getControllerContext(ServerInvocation invocati= on) throws ServerException; +} Modified: branches/UIServer/core/src/main/org/jboss/portal/core/presentatio= n/server/PresentationServerImpl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/core/src/main/org/jboss/portal/core/presentation/serv= er/PresentationServerImpl.java 2007-11-17 21:17:04 UTC (rev 8993) +++ branches/UIServer/core/src/main/org/jboss/portal/core/presentation/serv= er/PresentationServerImpl.java 2007-11-17 21:51:55 UTC (rev 8994) @@ -30,10 +30,12 @@ import org.jboss.portal.presentation.model.state.ModelLoader; import org.jboss.portal.core.controller.Controller; import org.jboss.portal.core.controller.ControllerContext; +import org.jboss.portal.core.controller.ControllerContextFactory; import org.jboss.portal.core.controller.ControllerResponse; import org.jboss.portal.core.model.portal.command.render.RenderWindowComma= nd; import org.jboss.portal.core.model.portal.command.response.MarkupResponse; import org.jboss.portal.core.model.portal.PortalObjectId; +import org.jboss.portal.core.model.portal.PortalObjectPath; import org.jboss.portal.core.model.portal.content.WindowRendition; = /** @@ -45,7 +47,7 @@ = = /** . */ - private Controller controller; + private ControllerContextFactory controllerContextFactory; = /** * = @@ -117,12 +119,31 @@ { this.processor =3D processor; } + = + /** + * = + * @return + */ + public ControllerContextFactory getControllerContextFactory() + { + return controllerContextFactory; + } = + /** + * = + * @param controllerContextFactory + */ + public void setControllerContextFactory( + ControllerContextFactory controllerContextFactory) + { + this.controllerContextFactory =3D controllerContextFactory; + } + public WindowContent render(RequestContext context, UIWindow window) th= rows Exception { - /*PortalObjectId windowId =3D null; + PortalObjectId windowId =3D PortalObjectId.parse(window.getId(), Por= talObjectPath.CANONICAL_FORMAT); RenderWindowCommand rwc =3D new RenderWindowCommand(windowId); - ControllerContext ctx =3D new ControllerContext(context.getInvocatio= n(), controller); + ControllerContext ctx =3D this.controllerContextFactory.getControlle= rContext(context.getInvocation()); WindowRendition rendition =3D rwc.render(ctx); if (rendition !=3D null) { @@ -143,8 +164,8 @@ } } = - return null;*/ + return null; = - return new WindowContent(-1, "MockTitle", "
Mock Content
"); + //return new WindowContent(-1, "MockTitle", "
Mock Content
= "); } } Modified: branches/UIServer/core/src/resources/portal-core-sar/META-INF/jbo= ss-service.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/core/src/resources/portal-core-sar/META-INF/jboss-ser= vice.xml 2007-11-17 21:17:04 UTC (rev 8993) +++ branches/UIServer/core/src/resources/portal-core-sar/META-INF/jboss-ser= vice.xml 2007-11-17 21:51:55 UTC (rev 8994) @@ -1099,6 +1099,7 @@ = portal:service=3DProcessor portal:container=3DModelLoader = + portal:service=3DRequestController = portal:service=3DPageService portal:commandFactory=3DDefaultPortal portal:urlFactory=3DDelegating Modified: branches/UIServer/server/src/main/org/jboss/portal/server/Request= Controller.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/UIServer/server/src/main/org/jboss/portal/server/RequestContro= ller.java 2007-11-17 21:17:04 UTC (rev 8993) +++ branches/UIServer/server/src/main/org/jboss/portal/server/RequestContro= ller.java 2007-11-17 21:51:55 UTC (rev 8994) @@ -36,5 +36,5 @@ * * @param invocation the server invocation */ - void handle(ServerInvocation invocation) throws ServerException; + void handle(ServerInvocation invocation) throws ServerException; = } --===============0030870454664466488==--