From portal-commits at lists.jboss.org Sun Apr 29 18:11:01 2007 Content-Type: multipart/mixed; boundary="===============0876659503613121753==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r7135 - trunk/core/src/main/org/jboss/portal/core/impl/api/node. Date: Sun, 29 Apr 2007 18:11:01 -0400 Message-ID: --===============0876659503613121753== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2007-04-29 18:11:01 -0400 (Sun, 29 Apr 2007) New Revision: 7135 Added: trunk/core/src/main/org/jboss/portal/core/impl/api/node/AbstractPortalNo= deURL.java trunk/core/src/main/org/jboss/portal/core/impl/api/node/PageURL.java trunk/core/src/main/org/jboss/portal/core/impl/api/node/WindowURL.java Modified: trunk/core/src/main/org/jboss/portal/core/impl/api/node/PortalNodeURLFac= tory.java Log: transform inner classes into outter classes Added: trunk/core/src/main/org/jboss/portal/core/impl/api/node/AbstractPort= alNodeURL.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 --- trunk/core/src/main/org/jboss/portal/core/impl/api/node/AbstractPortalN= odeURL.java (rev 0) +++ trunk/core/src/main/org/jboss/portal/core/impl/api/node/AbstractPortalN= odeURL.java 2007-04-29 22:11:01 UTC (rev 7135) @@ -0,0 +1,93 @@ +/*************************************************************************= ***** + * 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.core.impl.api.node; + +import org.jboss.portal.api.node.PortalNodeURL; +import org.jboss.portal.core.model.portal.PortalObjectId; +import org.jboss.portal.core.controller.ControllerContext; +import org.jboss.portal.portlet.PortletParametersStateString; +import org.jboss.portal.server.request.URLContext; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class AbstractPortalNodeURL implements PortalNodeURL +{ + + /** . */ + protected PortalObjectId id; + + /** . */ + protected ControllerContext controllerContext; + + /** . */ + protected PortletParametersStateString parameters; + + /** . */ + protected Boolean wantSecure; + + /** . */ + protected Boolean wantAuthenticated; + + /** . */ + protected boolean relative; + + public AbstractPortalNodeURL(PortalObjectId id, ControllerContext contr= ollerContext) + { + this.id =3D id; + this.controllerContext =3D controllerContext; + this.relative =3D true; + this.parameters =3D new PortletParametersStateString(); + } + + public void setParameter(String name, String value) + { + parameters.setValue(name, value); + } + + public void setParameter(String name, String[] values) + { + parameters.setValues(name, values); + } + + public void setAuthenticated(Boolean authenticated) + { + this.wantAuthenticated =3D authenticated; + } + + public void setSecure(Boolean secure) + { + this.wantSecure =3D secure; + } + + public void setRelative(boolean relative) + { + this.relative =3D relative; + } + + protected URLContext getURLContext() + { + return controllerContext.getServerInvocation().getServerContext().ge= tURLContext(); + } +} Added: trunk/core/src/main/org/jboss/portal/core/impl/api/node/PageURL.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 --- trunk/core/src/main/org/jboss/portal/core/impl/api/node/PageURL.java = (rev 0) +++ trunk/core/src/main/org/jboss/portal/core/impl/api/node/PageURL.java 20= 07-04-29 22:11:01 UTC (rev 7135) @@ -0,0 +1,49 @@ +/*************************************************************************= ***** + * 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.core.impl.api.node; + +import org.jboss.portal.core.model.portal.PortalObjectId; +import org.jboss.portal.core.model.portal.command.view.ViewPageCommand; +import org.jboss.portal.core.controller.ControllerContext; +import org.jboss.portal.server.request.URLContext; +import org.jboss.portal.server.request.URLFormat; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class PageURL extends AbstractPortalNodeURL +{ + + public PageURL(PortalObjectId id, ControllerContext controllerContext) + { + super(id, controllerContext); + } + + public String toString() + { + ViewPageCommand cmd =3D new ViewPageCommand(id); + URLContext urlContext =3D getURLContext(); + return controllerContext.renderURL(cmd, urlContext, URLFormat.newIns= tance(relative, true)); + } +} Modified: trunk/core/src/main/org/jboss/portal/core/impl/api/node/PortalNod= eURLFactory.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 --- trunk/core/src/main/org/jboss/portal/core/impl/api/node/PortalNodeURLFa= ctory.java 2007-04-29 22:03:38 UTC (rev 7134) +++ trunk/core/src/main/org/jboss/portal/core/impl/api/node/PortalNodeURLFa= ctory.java 2007-04-29 22:11:01 UTC (rev 7135) @@ -63,97 +63,4 @@ throw new IllegalArgumentException("This kind of node does not= support render url " + node); } } - - private static class AbstractPortalNodeURL implements PortalNodeURL - { - - /** . */ - protected PortalObjectId id; - - /** . */ - protected ControllerContext controllerContext; - - /** . */ - protected PortletParametersStateString parameters; - - /** . */ - protected Boolean wantSecure; - - /** . */ - protected Boolean wantAuthenticated; - - /** . */ - protected boolean relative; - - public AbstractPortalNodeURL(PortalObjectId id, ControllerContext co= ntrollerContext) - { - this.id =3D id; - this.controllerContext =3D controllerContext; - this.relative =3D true; - this.parameters =3D new PortletParametersStateString(); - } - - public void setParameter(String name, String value) - { - parameters.setValue(name, value); - } - - public void setParameter(String name, String[] values) - { - parameters.setValues(name, values); - } - - public void setAuthenticated(Boolean authenticated) - { - this.wantAuthenticated =3D authenticated; - } - - public void setSecure(Boolean secure) - { - this.wantSecure =3D secure; - } - - public void setRelative(boolean relative) - { - this.relative =3D relative; - } - - protected URLContext getURLContext() - { - return controllerContext.getServerInvocation().getServerContext()= .getURLContext(); - } - - } - - private static class WindowURL extends AbstractPortalNodeURL - { - - public WindowURL(PortalObjectId id, ControllerContext controllerCont= ext) - { - super(id, controllerContext); - } - - public String toString() - { - InvokePortletWindowRenderCommand cmd =3D new InvokePortletWindowR= enderCommand(id, null, null, parameters); - URLContext urlContext =3D getURLContext(); - return controllerContext.renderURL(cmd, urlContext, URLFormat.new= Instance(relative, true)); - } - } - - private static class PageURL extends AbstractPortalNodeURL - { - - public PageURL(PortalObjectId id, ControllerContext controllerContex= t) - { - super(id, controllerContext); - } - - public String toString() - { - ViewPageCommand cmd =3D new ViewPageCommand(id); - URLContext urlContext =3D getURLContext(); - return controllerContext.renderURL(cmd, urlContext, URLFormat.new= Instance(relative, true)); - } - } } Added: trunk/core/src/main/org/jboss/portal/core/impl/api/node/WindowURL.ja= va =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 --- trunk/core/src/main/org/jboss/portal/core/impl/api/node/WindowURL.java = (rev 0) +++ trunk/core/src/main/org/jboss/portal/core/impl/api/node/WindowURL.java = 2007-04-29 22:11:01 UTC (rev 7135) @@ -0,0 +1,49 @@ +/*************************************************************************= ***** + * 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.core.impl.api.node; + +import org.jboss.portal.core.model.portal.PortalObjectId; +import org.jboss.portal.core.model.portal.command.action.InvokePortletWind= owRenderCommand; +import org.jboss.portal.core.controller.ControllerContext; +import org.jboss.portal.server.request.URLContext; +import org.jboss.portal.server.request.URLFormat; + +/** + * @author Julien Viet + * @version $Revision: 1.1 $ + */ +public class WindowURL extends AbstractPortalNodeURL +{ + + public WindowURL(PortalObjectId id, ControllerContext controllerContext) + { + super(id, controllerContext); + } + + public String toString() + { + InvokePortletWindowRenderCommand cmd =3D new InvokePortletWindowRend= erCommand(id, null, null, parameters); + URLContext urlContext =3D getURLContext(); + return controllerContext.renderURL(cmd, urlContext, URLFormat.newIns= tance(relative, true)); + } +} --===============0876659503613121753==--