gatein SVN: r3869 - in portal/branches/navcontroller: component/web/controller/src/main/java/org/exoplatform/web and 12 other directories.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2010-08-19 08:53:40 -0400 (Thu, 19 Aug 2010)
New Revision: 3869
Added:
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/Controller.java
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/ControllerContext.java
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/QualifiedName.java
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/metadata/
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/metadata/ControllerRefMetaData.java
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/metadata/RouterMetaData.java
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/metadata/controller.xml
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/protocol/
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/protocol/ControllerResponse.java
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/protocol/ProcessResponse.java
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/protocol/RedirectResponse.java
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/router/
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/router/PatternBuilder.java
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/router/PatternRoute.java
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/router/Route.java
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/router/Router.java
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/router/SimpleRoute.java
portal/branches/navcontroller/component/web/controller/src/test/
portal/branches/navcontroller/component/web/controller/src/test/java/
portal/branches/navcontroller/component/web/controller/src/test/java/org/
portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/
portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/
portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/
portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/
portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/AbstractTestController.java
portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestBuildRoute.java
portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestMatch.java
portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestPortalConfiguration.java
portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestRender.java
Modified:
portal/branches/navcontroller/webui/framework/pom.xml
Log:
front controller prototype commit
Added: portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/Controller.java
===================================================================
--- portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/Controller.java (rev 0)
+++ portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/Controller.java 2010-08-19 12:53:40 UTC (rev 3869)
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2010 eXo Platform SAS.
+ *
+ * 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.exoplatform.web.controller;
+
+import org.exoplatform.web.controller.protocol.ControllerResponse;
+
+import java.io.IOException;
+
+/**
+ * The controller is responsible for processing a controller context.
+ *
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public interface Controller
+{
+
+ /**
+ * Process an incoming context and returns a response.
+ *
+ * @param controllerContext the context to process
+ * @return the response
+ * @throws IOException any io exception
+ */
+ ControllerResponse process(ControllerContext controllerContext) throws IOException;
+
+
+}
Added: portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/ControllerContext.java
===================================================================
--- portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/ControllerContext.java (rev 0)
+++ portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/ControllerContext.java 2010-08-19 12:53:40 UTC (rev 3869)
@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 2010 eXo Platform SAS.
+ *
+ * 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.exoplatform.web.controller;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * <p>The controller context captures the state of a stage in the decoding of a request. The controller context
+ * should not be mutated, if a new controller with modified state is needed, a new controller should be created
+ * with the new state.</p>
+ *
+ * <p>The context augments the http request and response with additional state. Usually this state is obtained
+ * from a processing context and is used by a controller to create a response.</p>
+ *
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class ControllerContext
+{
+
+ /** The current path. */
+ final String path;
+
+ /** The current parameters. */
+ final Map<QualifiedName, String[]> parameters;
+
+ public ControllerContext(String path)
+ {
+ this.path = path;
+ this.parameters = new HashMap<QualifiedName, String[]>();
+ }
+
+ public ControllerContext(String path, Map<QualifiedName, String[]> parameters)
+ {
+ this.path = path;
+ this.parameters = parameters;
+ }
+
+ public Map<QualifiedName, String[]> getParameters()
+ {
+ return parameters;
+ }
+
+ public String getPath()
+ {
+ return path;
+ }
+}
Added: portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/QualifiedName.java
===================================================================
--- portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/QualifiedName.java (rev 0)
+++ portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/QualifiedName.java 2010-08-19 12:53:40 UTC (rev 3869)
@@ -0,0 +1,105 @@
+/*
+ * Copyright (C) 2010 eXo Platform SAS.
+ *
+ * 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.exoplatform.web.controller;
+
+/**
+ * A qualified name that is a qualifier and a name.
+ *
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class QualifiedName
+{
+
+ /** . */
+ private final String qualifier;
+
+ /** . */
+ private final String name;
+
+ /**
+ * Creates a qualified name with an empty qualifier.
+ *
+ * @param name the name
+ */
+ public QualifiedName(String name)
+ {
+ this("", name);
+ }
+
+ /**
+ * Creates a qualified name.
+ *
+ * @param qualifier the qualifier
+ * @param name the name
+ */
+ public QualifiedName(String qualifier, String name)
+ {
+ if (qualifier == null)
+ {
+ throw new NullPointerException("No null prefix accepted");
+ }
+ if (name == null)
+ {
+ throw new NullPointerException("No null prefix accepted");
+ }
+
+ //
+ this.qualifier = qualifier;
+ this.name = name;
+ }
+
+ public String getQualifier()
+ {
+ return qualifier;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ @Override
+ public int hashCode()
+ {
+ return qualifier.hashCode() ^ name.hashCode();
+ }
+
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (obj == this)
+ {
+ return true;
+ }
+ if (obj instanceof QualifiedName)
+ {
+ QualifiedName that = (QualifiedName)obj;
+ return qualifier.equals(that.qualifier) && name.equals(that.name);
+ }
+ return false;
+ }
+
+ @Override
+ public String toString()
+ {
+ return "QName[prefix=" + qualifier + ",name=" + name + "]";
+ }
+}
Added: portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/metadata/ControllerRefMetaData.java
===================================================================
--- portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/metadata/ControllerRefMetaData.java (rev 0)
+++ portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/metadata/ControllerRefMetaData.java 2010-08-19 12:53:40 UTC (rev 3869)
@@ -0,0 +1,70 @@
+/*
+ * Copyright (C) 2010 eXo Platform SAS.
+ *
+ * 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.exoplatform.web.controller.metadata;
+
+import org.exoplatform.web.controller.QualifiedName;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class ControllerRefMetaData
+{
+
+ /** . */
+ private String ref;
+
+ /** . */
+ private final Map<QualifiedName, String[]> parameters;
+
+ public ControllerRefMetaData()
+ {
+ this(null);
+ }
+
+ public ControllerRefMetaData(String ref)
+ {
+ this.ref = ref;
+ this.parameters = new HashMap<QualifiedName, String[]>();
+ }
+
+ public String getRef()
+ {
+ return ref;
+ }
+
+ public void setRef(String ref)
+ {
+ this.ref = ref;
+ }
+
+ public void setParameter(QualifiedName name, String... value)
+ {
+ parameters.put(name, value);
+ }
+
+ public Map<QualifiedName, String[]> getParameters()
+ {
+ return parameters;
+ }
+}
Added: portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/metadata/RouterMetaData.java
===================================================================
--- portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/metadata/RouterMetaData.java (rev 0)
+++ portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/metadata/RouterMetaData.java 2010-08-19 12:53:40 UTC (rev 3869)
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2010 eXo Platform SAS.
+ *
+ * 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.exoplatform.web.controller.metadata;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class RouterMetaData
+{
+
+ /** . */
+ private final Map<String, ControllerRefMetaData> routes;
+
+ public RouterMetaData()
+ {
+ this.routes = new HashMap<String, ControllerRefMetaData>();
+ }
+
+ public void addRoute(String pathTemplate, ControllerRefMetaData controller)
+ {
+ if (pathTemplate == null)
+ {
+ throw new NullPointerException();
+ }
+ if (controller == null)
+ {
+ throw new NullPointerException();
+ }
+
+ //
+ routes.put(pathTemplate, controller);
+ }
+
+ public Map<String, ControllerRefMetaData> getRoutes()
+ {
+ return routes;
+ }
+}
Added: portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/metadata/controller.xml
===================================================================
--- portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/metadata/controller.xml (rev 0)
+++ portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/metadata/controller.xml 2010-08-19 12:53:40 UTC (rev 3869)
@@ -0,0 +1,24 @@
+<router>
+
+ <route match="/private/{gtn:sitename}" to="SiteController">
+ <parameter name="gtn:sitetype" value="portal"/>
+ </route>
+
+ <route match="/groups/{gtn:sitename}" to="SiteController">
+ <parameter name="gtn:sitetype" value="group"/>
+ </route>
+
+ <route match="/users/{gtn:sitename}" to="SiteController">
+ <parameter name="gtn:sitetype" value="user"/>
+ </route>
+
+ <route match="/" to="foo"/>
+
+ <route match="/public" to="foo"/>
+
+ <route match="/download" to="DownloadController"/>
+
+ <route match="/upload" to="UploadController"/>
+
+</router>
+
Added: portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/protocol/ControllerResponse.java
===================================================================
--- portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/protocol/ControllerResponse.java (rev 0)
+++ portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/protocol/ControllerResponse.java 2010-08-19 12:53:40 UTC (rev 3869)
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2010 eXo Platform SAS.
+ *
+ * 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.exoplatform.web.controller.protocol;
+
+/**
+ * The base response returned by a controller processing.
+ *
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public abstract class ControllerResponse
+{
+
+
+
+}
Added: portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/protocol/ProcessResponse.java
===================================================================
--- portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/protocol/ProcessResponse.java (rev 0)
+++ portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/protocol/ProcessResponse.java 2010-08-19 12:53:40 UTC (rev 3869)
@@ -0,0 +1,87 @@
+/*
+ * Copyright (C) 2010 eXo Platform SAS.
+ *
+ * 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.exoplatform.web.controller.protocol;
+
+import org.exoplatform.web.controller.QualifiedName;
+
+import java.util.Collections;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public final class ProcessResponse extends ControllerResponse
+{
+
+ /** . */
+ private final String controllerId;
+
+ /** . */
+ private final String path;
+
+ /** . */
+ private final Map<QualifiedName, String[]> parameters;
+
+ public ProcessResponse(String controllerId)
+ {
+ this(controllerId, null, Collections.<QualifiedName, String[]>emptyMap());
+ }
+
+ public ProcessResponse(String controllerId, String path)
+ {
+ this(controllerId, path, Collections.<QualifiedName, String[]>emptyMap());
+ }
+
+ public ProcessResponse(String controllerId, Map<QualifiedName, String[]> parameters)
+ {
+ this(controllerId, null, parameters);
+ }
+
+ public ProcessResponse(String controllerId, String path, Map<QualifiedName, String[]> parameters)
+ {
+ if (controllerId == null)
+ {
+ throw new NullPointerException();
+ }
+ if (parameters == null)
+ {
+ throw new NullPointerException();
+ }
+ this.controllerId = controllerId;
+ this.path = path;
+ this.parameters = parameters;
+ }
+
+ public String getPath()
+ {
+ return path;
+ }
+
+ public String getControllerId()
+ {
+ return controllerId;
+ }
+
+ public Map<QualifiedName, String[]> getParameters()
+ {
+ return parameters;
+ }
+}
Added: portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/protocol/RedirectResponse.java
===================================================================
--- portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/protocol/RedirectResponse.java (rev 0)
+++ portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/protocol/RedirectResponse.java 2010-08-19 12:53:40 UTC (rev 3869)
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2010 eXo Platform SAS.
+ *
+ * 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.exoplatform.web.controller.protocol;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class RedirectResponse extends ControllerResponse
+{
+
+ /** . */
+ private final String url;
+
+ public RedirectResponse(String url)
+ {
+ if (url == null)
+ {
+ throw new NullPointerException("No null URL accepted");
+ }
+
+ //
+ this.url = url;
+ }
+
+ public String getURL()
+ {
+ return url;
+ }
+}
Added: portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/router/PatternBuilder.java
===================================================================
--- portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/router/PatternBuilder.java (rev 0)
+++ portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/router/PatternBuilder.java 2010-08-19 12:53:40 UTC (rev 3869)
@@ -0,0 +1,70 @@
+/*
+ * Copyright (C) 2010 eXo Platform SAS.
+ *
+ * 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.exoplatform.web.controller.router;
+
+import java.util.regex.Pattern;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class PatternBuilder
+{
+
+ /** . */
+ private static final char[] TABLE = "0123456789ABCDEF".toCharArray();
+
+ /** . */
+ private final StringBuilder buffer = new StringBuilder();
+
+ public void appendExpression(String s)
+ {
+ buffer.append(s);
+ }
+
+ public void append(String s, int from, int to)
+ {
+ for (int i = from;i < to;i++)
+ {
+ char c = s.charAt(i);
+ append(c);
+ }
+ }
+
+ public void append(String s, int from)
+ {
+ append(s, from, s.length());
+ }
+
+ public void append(char c)
+ {
+ buffer.append("\\u");
+ buffer.append(TABLE[(c & 0xF000) >> 12]);
+ buffer.append(TABLE[(c & 0x0F00) >> 8]);
+ buffer.append(TABLE[(c & 0x00F0) >> 4]);
+ buffer.append(TABLE[c & 0x000F]);
+ }
+
+ public Pattern build()
+ {
+ return Pattern.compile(buffer.toString());
+ }
+
+}
Added: portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/router/PatternRoute.java
===================================================================
--- portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/router/PatternRoute.java (rev 0)
+++ portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/router/PatternRoute.java 2010-08-19 12:53:40 UTC (rev 3869)
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2010 eXo Platform SAS.
+ *
+ * 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.exoplatform.web.controller.router;
+
+import org.exoplatform.web.controller.QualifiedName;
+
+import java.util.List;
+import java.util.regex.Pattern;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class PatternRoute extends Route
+{
+
+ /** . */
+ final Pattern pattern;
+
+ /** . */
+ final List<QualifiedName> parameterNames;
+
+ /** . */
+ final List<Pattern> parameterPatterns;
+
+ /** . */
+ final List<String> chunks;
+
+ public PatternRoute(
+ Pattern pattern,
+ List<QualifiedName> parameterNames,
+ List<Pattern> parameterPatterns,
+ List<String> chunks)
+ {
+ if (chunks.size() != parameterNames.size() + 1)
+ {
+ throw new AssertionError("Was expecting chunk size " + chunks.size() + " to be equals to " + parameterNames.size() + 1);
+ }
+
+ //
+ this.pattern = pattern;
+ this.parameterNames = parameterNames;
+ this.parameterPatterns = parameterPatterns;
+ this.chunks = chunks;
+ }
+}
Added: portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/router/Route.java
===================================================================
--- portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/router/Route.java (rev 0)
+++ portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/router/Route.java 2010-08-19 12:53:40 UTC (rev 3869)
@@ -0,0 +1,365 @@
+/*
+ * Copyright (C) 2010 eXo Platform SAS.
+ *
+ * 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.exoplatform.web.controller.router;
+
+import org.exoplatform.web.controller.ControllerContext;
+import org.exoplatform.web.controller.QualifiedName;
+import org.exoplatform.web.controller.protocol.ProcessResponse;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * The implementation of the routing algorithm.
+ * It should but does not yet implement:
+ * - check JAX-RS algorithm (compare)
+ * - should somehow validate regular expression
+ * - nice to have '*' equivalent to {path:.*}
+ *
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+class Route
+{
+
+ /** . */
+ String controllerRef;
+
+ /** . */
+ final Map<String, SimpleRoute> simpleRoutes;
+
+ /** . */
+ final List<PatternRoute> patternRoutes;
+
+ /** . */
+ final Map<QualifiedName, String[]> routeParameters;
+
+ Route()
+ {
+ this.simpleRoutes = new HashMap<String, SimpleRoute>();
+ this.patternRoutes = new ArrayList<PatternRoute>();
+ this.routeParameters = new HashMap<QualifiedName, String[]>();
+ }
+
+ String render(String controllerId, Map<QualifiedName, String[]> blah)
+ {
+ if (controllerRef != null && controllerRef.equals(controllerId))
+ {
+ for (Map.Entry<QualifiedName, String[]> entry : routeParameters.entrySet())
+ {
+ String[] a = blah.get(entry.getKey());
+ if (a == null || !Arrays.equals(entry.getValue(), a))
+ {
+ return null;
+ }
+ }
+ return "";
+ }
+ else
+ {
+ for (Map.Entry<String, SimpleRoute> a : simpleRoutes.entrySet())
+ {
+ String b = a.getValue().render(controllerId, blah);
+ if (b != null)
+ {
+ if (b.length() > 0)
+ {
+ return a.getKey() + "/" + b;
+ }
+ else
+ {
+ return a.getKey();
+ }
+ }
+ }
+ there:
+ for (PatternRoute a : patternRoutes)
+ {
+ int i = 0;
+ while (i < a.parameterNames.size())
+ {
+ String[] value = blah.get(a.parameterNames.get(i));
+ if (value == null || value.length < 1)
+ {
+ continue there;
+ }
+ if (!a.parameterPatterns.get(i).matcher(value[0]).matches())
+ {
+ continue there;
+ }
+ i++;
+ }
+
+ //
+ i = 0;
+ StringBuilder sb = new StringBuilder();
+ while (i < a.parameterNames.size())
+ {
+ sb.append(a.chunks.get(i));
+ String[] value = blah.get(a.parameterNames.get(i));
+ sb.append(value[0]);
+ i++;
+ }
+ sb.append(a.chunks.get(i));
+
+ //
+ String bilto = a.render(controllerId, blah);
+ if (bilto != null)
+ {
+ if (bilto.length() > 0)
+ {
+ return sb + "/" + bilto;
+ }
+ else
+ {
+ return sb.toString();
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ ProcessResponse route(ControllerContext context)
+ {
+ String path = context.getPath();
+
+ // Remove any leading '/'
+ while (path.length() > 0 && path.charAt(0) == '/')
+ {
+ path = path.substring(1);
+ }
+
+ //
+ if (path.isEmpty())
+ {
+ if (controllerRef != null)
+ {
+ return new ProcessResponse(controllerRef, context.getPath(), context.getParameters());
+ }
+ }
+ else
+ {
+ int pos = path.indexOf('/');
+ String segment;
+ if (pos == -1)
+ {
+ segment = path;
+ }
+ else
+ {
+ segment = path.substring(0, pos);
+ }
+ Route route = simpleRoutes.get(segment);
+ if (route != null)
+ {
+ Map<QualifiedName, String[]> parameters = context.getParameters();
+ if (route.routeParameters.size() > 0)
+ {
+ parameters = new HashMap<QualifiedName, String[]>(parameters);
+ // julien : do a safe put all here on String[]
+ parameters.putAll(route.routeParameters);
+ }
+ ControllerContext nextContext = new ControllerContext(
+ path.substring(segment.length()),
+ parameters
+ );
+ ProcessResponse response = route.route(nextContext);
+ if (response != null)
+ {
+ return response;
+ }
+ }
+ }
+
+ // Try to find a pattern matching route
+ for (PatternRoute route : patternRoutes)
+ {
+ Matcher matcher = route.pattern.matcher(path);
+
+ boolean matched = false;
+ if (matcher.find())
+ {
+ int end = matcher.end();
+ if (end >= path.length())
+ {
+ matched = true;
+ }
+ else if (path.charAt(end) == '/')
+ {
+ matched = true;
+ }
+ }
+
+ // We match
+ if (matched)
+ {
+ Map<QualifiedName, String[]> parameters = new HashMap<QualifiedName, String[]>(context.getParameters());
+ // julien : do a safe put all here on String[]
+ parameters.putAll(route.routeParameters);
+ int group = 1;
+ for (QualifiedName parameterName : route.parameterNames)
+ {
+ parameters.put(parameterName, new String[]{matcher.group(group++)});
+ }
+ ControllerContext nextContext = new ControllerContext(
+ path.substring(matcher.end()),
+ parameters
+ );
+ return route.route(nextContext);
+ }
+ }
+
+ //
+ return null;
+ }
+
+ /** . */
+ private static final Pattern PARAMETER_REGEX = Pattern.compile("^(?:\\{([^\\}]*)\\})?(.*)$");
+
+ Route append(String path)
+ {
+ int pos = path.length();
+ int level = 0;
+ List<Integer> start = new ArrayList<Integer>();
+ List<Integer> end = new ArrayList<Integer>();
+ for (int i = 0;i < path.length();i++)
+ {
+ char c = path.charAt(i);
+ if (c == '{')
+ {
+ if (level++ == 0)
+ {
+ start.add(i);
+ }
+ }
+ else if (c == '}')
+ {
+ if (--level == 0)
+ {
+ end.add(i);
+ }
+ }
+ else if (c == '/')
+ {
+ if (level == 0)
+ {
+ pos = i;
+ break;
+ }
+ }
+ }
+
+ //
+ Route next;
+ if (start.isEmpty())
+ {
+ if (pos == 0)
+ {
+ next = this;
+ }
+ else
+ {
+ SimpleRoute route = new SimpleRoute(path.substring(0, pos));
+ simpleRoutes.put(route.value, route);
+ next = route;
+ }
+ }
+ else
+ {
+ if (start.size() == end.size())
+ {
+ List<QualifiedName> parameterNames = new ArrayList<QualifiedName>();
+ PatternBuilder builder = new PatternBuilder();
+ builder.appendExpression("^");
+ List<String> chunks = new ArrayList<String>();
+ List<Pattern> parameterPatterns = new ArrayList<Pattern>();
+ int previous = 0;
+ for (int i = 0;i < start.size();i++)
+ {
+ builder.append(path, previous, start.get(i));
+ chunks.add(path.substring(previous, start.get(i)));
+ String parameterDef = path.substring(start.get(i) + 1, end.get(i));
+ int colon = parameterDef.indexOf(':');
+ String regex;
+ String parameterName;
+ if (colon == -1)
+ {
+ regex = "([^/]+)";
+ parameterName = parameterDef;
+ }
+ else
+ {
+ regex = "(" + parameterDef.substring(colon + 1) + ")";
+ parameterName = parameterDef.substring(0, colon);
+ }
+
+ //
+ QualifiedName parameterQName;
+ Matcher parameterMatcher = PARAMETER_REGEX.matcher(parameterName);
+ if (parameterMatcher.matches())
+ {
+ String qualifier = parameterMatcher.group(1);
+ String name = parameterMatcher.group(2);
+ parameterQName = new QualifiedName(qualifier == null ? "" : qualifier, name);
+ }
+ else
+ {
+ throw new AssertionError();
+ }
+
+
+ //
+ builder.appendExpression(regex);
+ parameterNames.add(parameterQName);
+ parameterPatterns.add(Pattern.compile("^" + regex + "$"));
+ previous = end.get(i) + 1;
+ }
+ builder.append(path, previous, pos);
+ chunks.add(path.substring(previous, pos));
+ // Julien : should the pattern end with a $ ?????? I don't see that for now
+ // we need to figure out clearly
+ Pattern pattern = builder.build();
+ PatternRoute route = new PatternRoute(pattern, parameterNames, parameterPatterns, chunks);
+ patternRoutes.add(route);
+ next = route;
+ }
+ else
+ {
+ throw new UnsupportedOperationException("Report error");
+ }
+ }
+
+ //
+ if (pos < path.length())
+ {
+ return next.append(path.substring(pos + 1));
+ }
+ else
+ {
+ return next;
+ }
+ }
+}
Added: portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/router/Router.java
===================================================================
--- portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/router/Router.java (rev 0)
+++ portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/router/Router.java 2010-08-19 12:53:40 UTC (rev 3869)
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2010 eXo Platform SAS.
+ *
+ * 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.exoplatform.web.controller.router;
+
+import org.exoplatform.web.controller.Controller;
+import org.exoplatform.web.controller.ControllerContext;
+import org.exoplatform.web.controller.QualifiedName;
+import org.exoplatform.web.controller.metadata.ControllerRefMetaData;
+import org.exoplatform.web.controller.metadata.RouterMetaData;
+import org.exoplatform.web.controller.protocol.ControllerResponse;
+import org.exoplatform.web.controller.protocol.ProcessResponse;
+
+import java.io.IOException;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class Router implements Controller
+{
+
+ /** . */
+ final Route root;
+
+ public Router(RouterMetaData metaData)
+ {
+ Route root = new Route();
+
+ //
+ for (Map.Entry<String, ControllerRefMetaData> routeMetaData : metaData.getRoutes().entrySet())
+ {
+ String path = routeMetaData.getKey();
+ Route route = root.append(path);
+ route.controllerRef = routeMetaData.getValue().getRef();
+ route.routeParameters.putAll(routeMetaData.getValue().getParameters());
+ }
+
+ //
+ this.root = root;
+ }
+
+ public String render(String controllerId, Map<QualifiedName, String[]> blah)
+ {
+ return root.render(controllerId, blah);
+ }
+
+ public ControllerResponse process(ControllerContext controllerContext) throws IOException
+ {
+ return root.route(controllerContext);
+ }
+}
Added: portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/router/SimpleRoute.java
===================================================================
--- portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/router/SimpleRoute.java (rev 0)
+++ portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/router/SimpleRoute.java 2010-08-19 12:53:40 UTC (rev 3869)
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2010 eXo Platform SAS.
+ *
+ * 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.exoplatform.web.controller.router;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+class SimpleRoute extends Route
+{
+
+ /** . */
+ final String value;
+
+ public SimpleRoute(String value)
+ {
+ this.value = value;
+ }
+}
Added: portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/AbstractTestController.java
===================================================================
--- portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/AbstractTestController.java (rev 0)
+++ portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/AbstractTestController.java 2010-08-19 12:53:40 UTC (rev 3869)
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2010 eXo Platform SAS.
+ *
+ * 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.exoplatform.web.controller.router;
+
+import junit.framework.Assert;
+import junit.framework.TestCase;
+import org.exoplatform.web.controller.QualifiedName;
+import org.exoplatform.web.controller.protocol.ControllerResponse;
+import org.exoplatform.web.controller.protocol.ProcessResponse;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public abstract class AbstractTestController extends TestCase
+{
+
+ public void assertProcessResponse(String controllerId, String path, Map<QualifiedName, String[]> parameters, ControllerResponse response)
+ {
+ assertNotNull(response);
+ assertEquals(ProcessResponse.class, response.getClass());
+ assertEquals(controllerId, ((ProcessResponse)response).getControllerId());
+ // todo check path and define semantic
+ // assertEquals(path, ((ProcessResponse)response).getPath());
+ assertEquals(parameters, ((ProcessResponse)response).getParameters());
+ }
+
+ public void assertProcessResponse(String controllerId, ControllerResponse response)
+ {
+ assertProcessResponse(controllerId, null, Collections.<QualifiedName, String[]>emptyMap(), response);
+ }
+
+ public void assertProcessResponse(String controllerId, String path, ControllerResponse response)
+ {
+ assertProcessResponse(controllerId, path, Collections.<QualifiedName, String[]>emptyMap(), response);
+ }
+
+ public void assertProcessResponse(String controllerId, Map<QualifiedName, String[]> parameters, ControllerResponse response)
+ {
+ assertProcessResponse(controllerId, null, parameters, response);
+ }
+
+ public void assertEquals(Map<QualifiedName, String[]> expectedParameters, Map<QualifiedName, String[]> parameters)
+ {
+ Assert.assertEquals(expectedParameters.keySet(), parameters.keySet());
+ for (Map.Entry<QualifiedName, String[]> expectedEntry : expectedParameters.entrySet())
+ {
+ Assert.assertEquals(Arrays.asList(expectedEntry.getValue()), Arrays.asList(parameters.get(expectedEntry.getKey())));
+ }
+ }
+}
Added: portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestBuildRoute.java
===================================================================
--- portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestBuildRoute.java (rev 0)
+++ portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestBuildRoute.java 2010-08-19 12:53:40 UTC (rev 3869)
@@ -0,0 +1,144 @@
+/*
+ * Copyright (C) 2010 eXo Platform SAS.
+ *
+ * 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.exoplatform.web.controller.router;
+
+import junit.framework.TestCase;
+import org.exoplatform.web.controller.QualifiedName;
+import org.exoplatform.web.controller.metadata.ControllerRefMetaData;
+import org.exoplatform.web.controller.metadata.RouterMetaData;
+
+import java.util.Arrays;
+import java.util.Map;
+import java.util.regex.Pattern;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class TestBuildRoute extends TestCase
+{
+
+ private ControllerRefMetaData ref1 = new ControllerRefMetaData("ref1");
+
+ public void testRoot()
+ {
+ String[] paths = {"/",""};
+ for (String path : paths)
+ {
+ RouterMetaData routerMD = new RouterMetaData();
+ routerMD.addRoute(path, ref1);
+ Router router = new Router(routerMD);
+ Route expectedRoute = new Route();
+ expectedRoute.controllerRef = "ref1";
+ assertEquals(expectedRoute, router.root);
+ }
+ }
+
+ public void testSimpleSegment()
+ {
+ String[] paths = {"/a","a"};
+ for (String path : paths)
+ {
+ RouterMetaData routerMD = new RouterMetaData();
+ routerMD.addRoute(path, ref1);
+ Router router = new Router(routerMD);
+ Route expectedRoute = new Route();
+ SimpleRoute a = new SimpleRoute("a");
+ a.controllerRef = "ref1";
+ expectedRoute.simpleRoutes.put("a", a);
+ assertEquals(expectedRoute, router.root);
+ }
+ }
+
+/*
+ public void testParameterSegment()
+ {
+ String[] paths = {"/{a}","{a}"};
+ for (String path : paths)
+ {
+ RouterMetaData routerMD = new RouterMetaData();
+ routerMD.addRoute(path, ref1);
+ Router router = new Router(routerMD);
+ Route expectedRoute = new Route();
+ PatternRoute a = new PatternRoute(Pattern.compile("^([^/]+)"), Arrays.asList(new QualifiedName("a")));
+ a.controllerRef = "ref1";
+ expectedRoute.patternRoutes.add(a);
+ assertEquals(expectedRoute, router.root);
+ }
+ }
+
+ public void testQualifiedParameterSegment()
+ {
+ String[] paths = {"/{{q}a}","{{q}a}"};
+ for (String path : paths)
+ {
+ RouterMetaData routerMD = new RouterMetaData();
+ routerMD.addRoute(path, ref1);
+ Router router = new Router(routerMD);
+ Route expectedRoute = new Route();
+ PatternRoute a = new PatternRoute(Pattern.compile("^([^/]+)"), Arrays.asList(new QualifiedName("q", "a")));
+ a.controllerRef = "ref1";
+ expectedRoute.patternRoutes.add(a);
+ assertEquals(expectedRoute, router.root);
+ }
+ }
+
+ public void testPatternSegment()
+ {
+ String[] paths = {"/{a:.*}","{a:.*}"};
+ for (String path : paths)
+ {
+ RouterMetaData routerMD = new RouterMetaData();
+ routerMD.addRoute(path, ref1);
+ Router router = new Router(routerMD);
+ Route expectedRoute = new Route();
+ PatternRoute a = new PatternRoute(Pattern.compile("^(.*)"), Arrays.asList(new QualifiedName("a")));
+ a.controllerRef = "ref1";
+ expectedRoute.patternRoutes.add(a);
+ assertEquals(expectedRoute, router.root);
+ }
+ }
+*/
+
+ private void assertEquals(Route expectedRoute, Route route)
+ {
+ assertEquals(expectedRoute.getClass(), route.getClass());
+ assertEquals(expectedRoute.controllerRef, route.controllerRef);
+ assertEquals(expectedRoute.simpleRoutes.keySet(), route.simpleRoutes.keySet());
+ for (Map.Entry<String, SimpleRoute> entry : expectedRoute.simpleRoutes.entrySet())
+ {
+ assertEquals(entry.getValue(), expectedRoute.simpleRoutes.get(entry.getKey()));
+ }
+ assertEquals(expectedRoute.patternRoutes.size(), route.patternRoutes.size());
+ for (int i = 0;i < expectedRoute.patternRoutes.size();i++)
+ {
+ assertEquals(expectedRoute.patternRoutes.get(i), route.patternRoutes.get(i));
+ }
+ if (route instanceof PatternRoute)
+ {
+ assertEquals(((PatternRoute)expectedRoute).pattern.toString(), ((PatternRoute)route).pattern.toString());
+ assertEquals(((PatternRoute)expectedRoute).parameterNames, ((PatternRoute)route).parameterNames);
+ }
+ else if (route instanceof SimpleRoute)
+ {
+ assertEquals(((SimpleRoute)expectedRoute).value, ((SimpleRoute)route).value);
+ }
+ }
+}
Added: portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestMatch.java
===================================================================
--- portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestMatch.java (rev 0)
+++ portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestMatch.java 2010-08-19 12:53:40 UTC (rev 3869)
@@ -0,0 +1,188 @@
+/*
+ * Copyright (C) 2010 eXo Platform SAS.
+ *
+ * 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.exoplatform.web.controller.router;
+
+import org.exoplatform.web.controller.ControllerContext;
+import org.exoplatform.web.controller.QualifiedName;
+import org.exoplatform.web.controller.metadata.ControllerRefMetaData;
+import org.exoplatform.web.controller.metadata.RouterMetaData;
+
+import java.util.Collections;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class TestMatch extends AbstractTestController
+{
+
+ public void testRoot() throws Exception
+ {
+ RouterMetaData routerMD = new RouterMetaData();
+ routerMD.addRoute("/", new ControllerRefMetaData("ref1"));
+ Router router = new Router(routerMD);
+
+ //
+ assertProcessResponse("ref1", Collections.<QualifiedName, String[]>emptyMap(), router.process(new ControllerContext("")));
+
+ //
+ assertProcessResponse("ref1", Collections.<QualifiedName, String[]>emptyMap(), router.process(new ControllerContext("/")));
+
+ //
+ assertNull(router.process(new ControllerContext("/a")));
+
+ //
+ assertNull(router.process(new ControllerContext("a")));
+ }
+
+ public void testA() throws Exception
+ {
+ RouterMetaData routerMD = new RouterMetaData();
+ routerMD.addRoute("/a", new ControllerRefMetaData("ref1"));
+ Router router = new Router(routerMD);
+
+ //
+ assertProcessResponse("ref1", Collections.<QualifiedName, String[]>emptyMap(), router.process(new ControllerContext("/a")));
+
+ //
+ assertProcessResponse("ref1", Collections.<QualifiedName, String[]>emptyMap(), router.process(new ControllerContext("a")));
+
+ //
+ assertProcessResponse("ref1", Collections.<QualifiedName, String[]>emptyMap(), router.process(new ControllerContext("a/")));
+
+ //
+ assertProcessResponse("ref1", Collections.<QualifiedName, String[]>emptyMap(), router.process(new ControllerContext("/a/")));
+
+ //
+ assertNull(router.process(new ControllerContext("")));
+
+ //
+ assertNull(router.process(new ControllerContext("/")));
+
+ //
+ assertNull(router.process(new ControllerContext("/b")));
+
+ //
+ assertNull(router.process(new ControllerContext("b")));
+
+ //
+ assertNull(router.process(new ControllerContext("/a/b")));
+ }
+
+ public void testAB() throws Exception
+ {
+ RouterMetaData routerMD = new RouterMetaData();
+ routerMD.addRoute("/a/b", new ControllerRefMetaData("ref1"));
+ Router router = new Router( routerMD);
+
+ //
+ assertProcessResponse("ref1", Collections.<QualifiedName, String[]>emptyMap(), router.process(new ControllerContext("a/b")));
+
+ //
+ assertProcessResponse("ref1", Collections.<QualifiedName, String[]>emptyMap(), router.process(new ControllerContext("/a/b")));
+
+ //
+ assertProcessResponse("ref1", Collections.<QualifiedName, String[]>emptyMap(), router.process(new ControllerContext("/a/b/")));
+
+ //
+ assertProcessResponse("ref1", Collections.<QualifiedName, String[]>emptyMap(), router.process(new ControllerContext("a/b/")));
+
+ //
+ assertNull(router.process(new ControllerContext("")));
+
+ //
+ assertNull(router.process(new ControllerContext("/")));
+
+ //
+ assertNull(router.process(new ControllerContext("/b")));
+
+ //
+ assertNull(router.process(new ControllerContext("b")));
+
+ //
+ assertNull(router.process(new ControllerContext("/a/b/c")));
+ }
+
+ public void testParameter() throws Exception
+ {
+ RouterMetaData routerMD = new RouterMetaData();
+ routerMD.addRoute("/{p}", new ControllerRefMetaData("ref1"));
+ Router router = new Router(routerMD);
+ assertProcessResponse("ref1", Collections.singletonMap(new QualifiedName("p"), new String[]{"a"}), router.process(new ControllerContext("/a")));
+ }
+
+ public void testWildcardPattern() throws Exception
+ {
+ RouterMetaData routerMD = new RouterMetaData();
+ routerMD.addRoute("/{p:.*}", new ControllerRefMetaData("ref1"));
+ Router router = new Router(routerMD);
+
+ //
+ assertProcessResponse("ref1", Collections.singletonMap(new QualifiedName("p"), new String[]{""}), router.process(new ControllerContext("/")));
+
+ //
+ assertProcessResponse("ref1", Collections.singletonMap(new QualifiedName("p"), new String[]{"a"}), router.process(new ControllerContext("/a")));
+
+ //
+ assertProcessResponse("ref1", Collections.singletonMap(new QualifiedName("p"), new String[]{"a"}), router.process(new ControllerContext("a")));
+
+ //
+ assertProcessResponse("ref1", Collections.singletonMap(new QualifiedName("p"), new String[]{"a/b"}), router.process(new ControllerContext("/a/b")));
+ }
+
+ public void testSimplePattern() throws Exception
+ {
+ RouterMetaData routerMD = new RouterMetaData();
+ routerMD.addRoute("/{p:a}", new ControllerRefMetaData("ref1"));
+ Router router = new Router(routerMD);
+
+ //
+ assertProcessResponse("ref1", Collections.singletonMap(new QualifiedName("p"), new String[]{"a"}), router.process(new ControllerContext("/a")));
+
+ //
+ assertProcessResponse("ref1", Collections.singletonMap(new QualifiedName("p"), new String[]{"a"}), router.process(new ControllerContext("a")));
+
+ //
+ assertNull(router.process(new ControllerContext("/ab")));
+
+ //
+ assertNull(router.process(new ControllerContext("ab")));
+ }
+
+ public void testPrecedence() throws Exception
+ {
+ RouterMetaData routerMD = new RouterMetaData();
+ routerMD.addRoute("/a", new ControllerRefMetaData("ref1"));
+ routerMD.addRoute("/{p:a}/b", new ControllerRefMetaData("ref2"));
+ Router router = new Router(routerMD);
+
+ //
+ assertProcessResponse("ref1", Collections.<QualifiedName, String[]>emptyMap(), router.process(new ControllerContext("a")));
+
+ //
+ assertProcessResponse("ref1", Collections.<QualifiedName, String[]>emptyMap(), router.process(new ControllerContext("/a")));
+
+ //
+ assertProcessResponse("ref1", Collections.<QualifiedName, String[]>emptyMap(), router.process(new ControllerContext("/a/")));
+
+ //
+ assertProcessResponse("ref2", Collections.singletonMap(new QualifiedName("p"), new String[]{"a"}), router.process(new ControllerContext("/a/b")));
+ }
+}
Added: portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestPortalConfiguration.java
===================================================================
--- portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestPortalConfiguration.java (rev 0)
+++ portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestPortalConfiguration.java 2010-08-19 12:53:40 UTC (rev 3869)
@@ -0,0 +1,81 @@
+/*
+ * Copyright (C) 2010 eXo Platform SAS.
+ *
+ * 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.exoplatform.web.controller.router;
+
+import org.exoplatform.web.controller.ControllerContext;
+import org.exoplatform.web.controller.QualifiedName;
+import org.exoplatform.web.controller.metadata.ControllerRefMetaData;
+import org.exoplatform.web.controller.metadata.RouterMetaData;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class TestPortalConfiguration extends AbstractTestController
+{
+
+ /** . */
+ private Router router;
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ RouterMetaData routerMD = new RouterMetaData();
+ ControllerRefMetaData portalControllerRef = new ControllerRefMetaData("site");
+ portalControllerRef.setParameter(new QualifiedName("gtn", "sitetype"), "portal");
+ routerMD.addRoute("/private/{{gtn}sitename}/{{gtn}path:.*}", portalControllerRef);
+ routerMD.addRoute("/groups/{{gtn}sitename}/{{gtn}path:.*}", new ControllerRefMetaData("site"));
+ routerMD.addRoute("/users/{{gtn}sitename}/{{gtn}path:.*}", new ControllerRefMetaData("site"));
+
+ //
+ this.router = new Router(routerMD);
+ }
+
+ public void testPrivateClassic() throws Exception
+ {
+ Map<QualifiedName, String[]> expectedParameters = new HashMap<QualifiedName, String[]>();
+ expectedParameters.put(new QualifiedName("gtn", "sitename"), new String[]{"classic"});
+ expectedParameters.put(new QualifiedName("gtn", "sitetype"), new String[]{"portal"});
+ expectedParameters.put(new QualifiedName("gtn", "path"), new String[]{""});
+ assertProcessResponse("site", expectedParameters, router.process(new ControllerContext("/private/classic")));
+ }
+
+ public void testPrivateClassicSlash() throws Exception
+ {
+ router.process(new ControllerContext("/private/classic/"));
+ Map<QualifiedName, String[]> expectedParameters = new HashMap<QualifiedName, String[]>();
+ expectedParameters.put(new QualifiedName("gtn", "sitename"), new String[]{"classic"});
+ expectedParameters.put(new QualifiedName("gtn", "sitetype"), new String[]{"portal"});
+ expectedParameters.put(new QualifiedName("gtn", "path"), new String[]{""});
+ assertProcessResponse("site", expectedParameters, router.process(new ControllerContext("/private/classic/")));
+ }
+
+ public void testPrivateClassicHome() throws Exception
+ {
+ Map<QualifiedName, String[]> expectedParameters = new HashMap<QualifiedName, String[]>();
+ expectedParameters.put(new QualifiedName("gtn", "sitename"), new String[]{"classic"});
+ expectedParameters.put(new QualifiedName("gtn", "sitetype"), new String[]{"portal"});
+ expectedParameters.put(new QualifiedName("gtn", "path"), new String[]{"home"});
+ assertProcessResponse("site", expectedParameters, router.process(new ControllerContext("/private/classic/home")));
+ }
+}
Added: portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestRender.java
===================================================================
--- portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestRender.java (rev 0)
+++ portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestRender.java 2010-08-19 12:53:40 UTC (rev 3869)
@@ -0,0 +1,117 @@
+/*
+ * Copyright (C) 2010 eXo Platform SAS.
+ *
+ * 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.exoplatform.web.controller.router;
+
+import org.exoplatform.web.controller.QualifiedName;
+import org.exoplatform.web.controller.metadata.ControllerRefMetaData;
+import org.exoplatform.web.controller.metadata.RouterMetaData;
+
+import java.util.Collections;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class TestRender extends AbstractTestController
+{
+
+ public void testRoot() throws Exception
+ {
+ RouterMetaData routerMD = new RouterMetaData();
+ routerMD.addRoute("/", new ControllerRefMetaData("ref1"));
+ Router router = new Router(routerMD);
+
+ //
+ assertEquals("", router.render("ref1", Collections.<QualifiedName, String[]>emptyMap()));
+ }
+
+ public void testA() throws Exception
+ {
+ RouterMetaData routerMD = new RouterMetaData();
+ routerMD.addRoute("/a", new ControllerRefMetaData("ref1"));
+ Router router = new Router(routerMD);
+
+ //
+ assertEquals("a", router.render("ref1", Collections.<QualifiedName, String[]>emptyMap()));
+ }
+
+ public void testAB() throws Exception
+ {
+ RouterMetaData routerMD = new RouterMetaData();
+ routerMD.addRoute("/a/b", new ControllerRefMetaData("ref1"));
+ Router router = new Router( routerMD);
+
+ //
+ assertEquals("a/b", router.render("ref1", Collections.<QualifiedName, String[]>emptyMap()));
+ }
+
+ public void testParameter() throws Exception
+ {
+ RouterMetaData routerMD = new RouterMetaData();
+ routerMD.addRoute("/{p}", new ControllerRefMetaData("ref1"));
+ Router router = new Router(routerMD);
+
+ //
+ assertEquals("a", router.render("ref1", Collections.singletonMap(new QualifiedName("p"), new String[]{"a"})));
+ }
+
+ public void testWildcardPattern() throws Exception
+ {
+ RouterMetaData routerMD = new RouterMetaData();
+ routerMD.addRoute("/{p:.*}", new ControllerRefMetaData("ref1"));
+ Router router = new Router(routerMD);
+
+ //
+ assertEquals("", router.render("ref1", Collections.singletonMap(new QualifiedName("p"), new String[]{""})));
+
+ //
+ assertEquals("a", router.render("ref1", Collections.singletonMap(new QualifiedName("p"), new String[]{"a"})));
+
+ //
+ assertEquals("a/b", router.render("ref1", Collections.singletonMap(new QualifiedName("p"), new String[]{"a/b"})));
+ }
+
+ public void testSimplePattern() throws Exception
+ {
+ RouterMetaData routerMD = new RouterMetaData();
+ routerMD.addRoute("/{p:a}", new ControllerRefMetaData("ref1"));
+ Router router = new Router(routerMD);
+
+ //
+ assertEquals("a", router.render("ref1", Collections.singletonMap(new QualifiedName("p"), new String[]{"a"})));
+
+ //
+ assertNull(router.render("ref1", Collections.singletonMap(new QualifiedName("p"), new String[]{"ab"})));
+ }
+
+ public void testPrecedence() throws Exception
+ {
+ RouterMetaData routerMD = new RouterMetaData();
+ routerMD.addRoute("/a", new ControllerRefMetaData("ref1"));
+ routerMD.addRoute("/{p:a}/b", new ControllerRefMetaData("ref2"));
+ Router router = new Router(routerMD);
+
+ //
+ assertEquals("a", router.render("ref1", Collections.<QualifiedName, String[]>emptyMap()));
+
+ //
+ assertEquals("a/b", router.render("ref2", Collections.singletonMap(new QualifiedName("p"), new String[]{"a"})));
+ }
+}
Modified: portal/branches/navcontroller/webui/framework/pom.xml
===================================================================
--- portal/branches/navcontroller/webui/framework/pom.xml 2010-08-19 09:17:49 UTC (rev 3868)
+++ portal/branches/navcontroller/webui/framework/pom.xml 2010-08-19 12:53:40 UTC (rev 3869)
@@ -33,6 +33,10 @@
<dependencies>
<dependency>
+ <groupId>org.gatein.common</groupId>
+ <artifactId>common-logging</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.exoplatform.portal</groupId>
<artifactId>exo.portal.component.web.controller</artifactId>
</dependency>
@@ -44,6 +48,11 @@
<groupId>org.exoplatform.portal</groupId>
<artifactId>exo.portal.component.scripting</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.component.test.core</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
13 years, 10 months
gatein SVN: r3868 - in portal/branches/navcontroller: portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component and 10 other directories.
by do-not-reply@jboss.org
Author: trong.tran
Date: 2010-08-19 05:17:49 -0400 (Thu, 19 Aug 2010)
New Revision: 3868
Modified:
portal/branches/navcontroller/portlet/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UITabPaneDashboard.java
portal/branches/navcontroller/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIApplicationOrganizer.java
portal/branches/navcontroller/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UISiteManagement.java
portal/branches/navcontroller/portlet/exoadmin/src/main/java/org/exoplatform/toolbar/webui/component/UIAdminToolbarPortlet.java
portal/branches/navcontroller/portlet/web/src/main/java/org/exoplatform/portal/webui/component/UIBreadcumbsPortlet.java
portal/branches/navcontroller/portlet/web/src/main/java/org/exoplatform/portal/webui/component/UILogoPortlet.java
portal/branches/navcontroller/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js
portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestContext.java
portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestHandler.java
portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/application/PortalStateManager.java
portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationNodeSelector.java
portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UIPageNodeSelector.java
portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UIPortalNavigation.java
portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UIPortalNavigation2.java
portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/page/PageUtils.java
portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIDesktopPage.java
portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageActionListener.java
portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageBrowser.java
portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageCreationWizard.java
portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageForm.java
portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIWizardPageSetInfo.java
portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/PageNodeEvent.java
portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortal.java
portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalActionListener.java
portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComposer.java
portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/util/Util.java
portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIMainActionListener.java
portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIPortalApplication.java
Log:
GTNPORTAL-1388 Determine navigation/node target before entering webui layer
Modified: portal/branches/navcontroller/portlet/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UITabPaneDashboard.java
===================================================================
--- portal/branches/navcontroller/portlet/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UITabPaneDashboard.java 2010-08-19 08:18:22 UTC (rev 3867)
+++ portal/branches/navcontroller/portlet/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UITabPaneDashboard.java 2010-08-19 09:17:49 UTC (rev 3868)
@@ -93,7 +93,7 @@
//String remoteUser = Util.getPortalRequestContext().getRemoteUser();
//pageNavigation = getPageNavigation(PortalConfig.USER_TYPE + "::" + remoteUser);
//TODO: Check this part carefully
- this.pageNavigation = uiPortal.getSelectedNavigation();
+ this.pageNavigation = uiPortal.getNavigation();
}
/*
Modified: portal/branches/navcontroller/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIApplicationOrganizer.java
===================================================================
--- portal/branches/navcontroller/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIApplicationOrganizer.java 2010-08-19 08:18:22 UTC (rev 3867)
+++ portal/branches/navcontroller/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIApplicationOrganizer.java 2010-08-19 09:17:49 UTC (rev 3868)
@@ -98,6 +98,7 @@
PortalRequestContext portalContext = org.exoplatform.portal.webui.util.Util.getPortalRequestContext();
UIPortal uiPortal = org.exoplatform.portal.webui.util.Util.getUIPortal();
+ //TODO why use MonitorEvent that not just Event
MonitorEvent<UIPortal> pnevent = new MonitorEvent<UIPortal>(uiPortal, "ChangeApplicationList", portalContext);
uiPortal.broadcast(pnevent, Event.Phase.PROCESS);
}
Modified: portal/branches/navcontroller/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UISiteManagement.java
===================================================================
--- portal/branches/navcontroller/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UISiteManagement.java 2010-08-19 08:18:22 UTC (rev 3867)
+++ portal/branches/navcontroller/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UISiteManagement.java 2010-08-19 09:17:49 UTC (rev 3868)
@@ -300,7 +300,7 @@
uiComposer.setCollapse(false);
uiComposer.setShowControl(true);
uiComposer.setComponentConfig(UIPortalComposer.class, null);
- uiComposer.setId("UIPortalComposer");
+ uiComposer.setId(UIPortalComposer.UIPORTAL_COMPOSER);
UIPortal uiPortal = Util.getUIPortal();
uiWorkingWS.setBackupUIPortal(uiPortal);
@@ -312,9 +312,8 @@
// Check if edit current portal
if (uiPortal.getName().equals(editPortal.getName()))
{
+ editPortal.setNavigation(uiPortal.getNavigation());
editPortal.setSelectedNode(uiPortal.getSelectedNode());
- editPortal.setSelectedNavigation(uiPortal.getSelectedNavigation());
- editPortal.setSelectedPath(uiPortal.getSelectedPath());
UISiteBody siteBody = uiWorkingWS.findFirstComponentOfType(UISiteBody.class);
siteBody.setUIComponent(null);
}
Modified: portal/branches/navcontroller/portlet/exoadmin/src/main/java/org/exoplatform/toolbar/webui/component/UIAdminToolbarPortlet.java
===================================================================
--- portal/branches/navcontroller/portlet/exoadmin/src/main/java/org/exoplatform/toolbar/webui/component/UIAdminToolbarPortlet.java 2010-08-19 08:18:22 UTC (rev 3867)
+++ portal/branches/navcontroller/portlet/exoadmin/src/main/java/org/exoplatform/toolbar/webui/component/UIAdminToolbarPortlet.java 2010-08-19 09:17:49 UTC (rev 3868)
@@ -50,7 +50,7 @@
public PageNavigation getSelectedNavigation() throws Exception
{
- return Util.getUIPortal().getSelectedNavigation();
+ return Util.getUIPortal().getNavigation();
}
@Override
Modified: portal/branches/navcontroller/portlet/web/src/main/java/org/exoplatform/portal/webui/component/UIBreadcumbsPortlet.java
===================================================================
--- portal/branches/navcontroller/portlet/web/src/main/java/org/exoplatform/portal/webui/component/UIBreadcumbsPortlet.java 2010-08-19 08:18:22 UTC (rev 3867)
+++ portal/branches/navcontroller/portlet/web/src/main/java/org/exoplatform/portal/webui/component/UIBreadcumbsPortlet.java 2010-08-19 09:17:49 UTC (rev 3868)
@@ -30,7 +30,6 @@
import org.exoplatform.webui.core.UIBreadcumbs;
import org.exoplatform.webui.core.UIPortletApplication;
import org.exoplatform.webui.core.UIBreadcumbs.LocalPath;
-import org.exoplatform.webui.core.UIBreadcumbs.SelectPathActionListener;
import org.exoplatform.webui.core.lifecycle.UIApplicationLifecycle;
import org.exoplatform.webui.event.Event;
import org.exoplatform.webui.event.EventListener;
Modified: portal/branches/navcontroller/portlet/web/src/main/java/org/exoplatform/portal/webui/component/UILogoPortlet.java
===================================================================
--- portal/branches/navcontroller/portlet/web/src/main/java/org/exoplatform/portal/webui/component/UILogoPortlet.java 2010-08-19 08:18:22 UTC (rev 3867)
+++ portal/branches/navcontroller/portlet/web/src/main/java/org/exoplatform/portal/webui/component/UILogoPortlet.java 2010-08-19 09:17:49 UTC (rev 3868)
@@ -54,7 +54,7 @@
public String getNavigationTitle() throws Exception
{
- PageNavigation navigation = Util.getUIPortal().getSelectedNavigation();
+ PageNavigation navigation = Util.getUIPortal().getNavigation();
if (navigation.getOwnerType().equals(PortalConfig.GROUP_TYPE))
{
return OrganizationUtils.getGroupLabel(navigation.getOwnerId());
Modified: portal/branches/navcontroller/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js
===================================================================
--- portal/branches/navcontroller/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js 2010-08-19 08:18:22 UTC (rev 3867)
+++ portal/branches/navcontroller/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js 2010-08-19 09:17:49 UTC (rev 3868)
@@ -671,27 +671,6 @@
}
return true;
};
-
-/*
-* This method will start the creation of a new javascript application such as a widget
-*
-* - The application parameter is the full javascript class for the application (for example "eXo.widget.web.info.UIInfoWidget")
-* - The application id is an id shared among all the application instance
-* - The instance id is unique among all the javascript application deployed in the layout
-* - The appLocation is the root path location of the jstmpl file on the server (for example /eXoWidgetWeb/javascript/)
-*
-* If the application class name is not null, the associated .js file on the server is loaded using the eXo.require() method
-*
-* Once loaded the initApplication() method is called; in other words, the application is lazy instantiated and initialized
-* on the client browser
-*/
-//UIPortal.prototype.createJSApplication = function(application, applicationId, instanceId, appLocation) {
-// if(application) {
-// eXo.require(application, appLocation);
-// var createApplication = application + '.initApplication(\''+applicationId+'\',\''+instanceId+'\');' ;
-// eval(createApplication);
-// }
-//} ;
eXo.portal.UIPortalComponent = UIComponent.prototype.constructor ;
eXo.portal.UIPortal = new UIPortal() ;
Modified: portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestContext.java
===================================================================
--- portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestContext.java 2010-08-19 08:18:22 UTC (rev 3867)
+++ portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestContext.java 2010-08-19 09:17:49 UTC (rev 3868)
@@ -24,7 +24,9 @@
import org.exoplatform.container.ExoContainer;
import org.exoplatform.portal.config.UserPortalConfigService;
import org.exoplatform.portal.config.model.Page;
+import org.exoplatform.portal.config.model.PageNavigation;
import org.exoplatform.portal.config.model.PageNode;
+import org.exoplatform.portal.webui.portal.PageNodeEvent;
import org.exoplatform.portal.webui.portal.UIPortal;
import org.exoplatform.portal.webui.util.Util;
import org.exoplatform.portal.webui.workspace.UIPortalApplication;
@@ -36,22 +38,16 @@
import org.exoplatform.webui.application.WebuiApplication;
import org.exoplatform.webui.application.WebuiRequestContext;
import org.exoplatform.webui.core.UIComponent;
+import org.exoplatform.webui.event.Event;
import org.gatein.common.http.QueryStringParser;
import org.w3c.dom.Element;
-import javax.xml.transform.OutputKeys;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-
import java.io.IOException;
import java.io.StringWriter;
import java.io.UnsupportedEncodingException;
import java.io.Writer;
import java.net.URLDecoder;
import java.util.ArrayList;
-import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
@@ -61,6 +57,11 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
/**
* This class extends the abstract WebuiRequestContext which itself extends the RequestContext one
@@ -69,7 +70,6 @@
*/
public class PortalRequestContext extends WebuiRequestContext
{
-
protected static Log log = ExoLogger.getLogger("portal:PortalRequestContext");
final static public int PUBLIC_ACCESS = 0;
@@ -113,28 +113,44 @@
private List<Element> extraMarkupHeaders;
private final PortalURLBuilder urlBuilder;
+
+ private Map<String, String[]> parameterMap;
- private Map<String, String[]> parameterMap;
-
private Locale locale = Locale.ENGLISH;
+ private PageNavigation targetNav;
+
+ private PageNode targetNode_;
+
public JavascriptManager getJavascriptManager()
{
return jsmanager_;
}
+ /**
+ * Analyze a request and split this request's URI to get useful information
+ * then keep it in following properties of PortalRequestContext :<br/>
+ * 1. <code>requestURI</code> : The decoded URI of this request <br/>
+ * 2. <code>portalOwner</code> : The portal name ( "classic" for instance )<br/>
+ * 3. <code>portalURI</code> : The URI to current portal ( "/portal/classic/ for instance )<br/>
+ * 4. <code>nodePath</code> : The path that is used to reflect to a navigation node
+ *
+ * @param app an instance of {@link PortalApplication}
+ * @param req the {@ HttpServletRequest} object that is sent to the {@link PortalController} servlet
+ * @param res
+ * @throws Exception
+ */
public PortalRequestContext(WebuiApplication app, HttpServletRequest req, HttpServletResponse res) throws Exception
{
super(app);
request_ = req;
response_ = res;
response_.setBufferSize(1024 * 100);
- setSessionId(req.getSession().getId());
-
-
+ setSessionId(request_.getSession().getId());
+
//The encoding needs to be set before reading any of the parameters since the parameters's encoding
//is set at the first access.
-
+
//TODO use the encoding from the locale-config.xml file
response_.setContentType("text/html; charset=UTF-8");
try
@@ -145,36 +161,36 @@
{
log.error("Encoding not supported", e);
}
-
+
// Query parameters from the request will be set in the servlet container url encoding and not
// necessarly in utf-8 format. So we need to directly parse the parameters from the query string.
parameterMap = new HashMap<String, String[]>();
parameterMap.putAll(request_.getParameterMap());
- String queryString = req.getQueryString();
+ String queryString = request_.getQueryString();
if (queryString != null)
{
Map<String, String[]> queryParams = QueryStringParser.getInstance().parseQueryString(queryString);
parameterMap.putAll(queryParams);
}
-
- ajaxRequest_ = "true".equals(req.getParameter("ajaxRequest"));
- String cache = req.getParameter(CACHE_LEVEL);
+
+ ajaxRequest_ = "true".equals(request_.getParameter("ajaxRequest"));
+ String cache = request_.getParameter(CACHE_LEVEL);
if (cache != null)
{
cacheLevel_ = cache;
}
- requestURI_ = URLDecoder.decode(req.getRequestURI(), "UTF-8");
-
+ requestURI_ = URLDecoder.decode(request_.getRequestURI(), "UTF-8");
+
// req.getPathInfo will already have the encoding set from the server.
// We need to use the UTF-8 value since this is how we store the portal name.
// Reconstructing the getPathInfo from the non server decoded values.
- String servletPath = URLDecoder.decode(req.getServletPath(), "UTF-8");
- String contextPath = URLDecoder.decode(req.getContextPath(), "UTF-8");
+ String servletPath = URLDecoder.decode(request_.getServletPath(), "UTF-8");
+ String contextPath = URLDecoder.decode(request_.getContextPath(), "UTF-8");
String pathInfo = "/";
if (requestURI_.length() > servletPath.length() + contextPath.length())
pathInfo = requestURI_.substring(servletPath.length() + contextPath.length());
-
+
int colonIndex = pathInfo.indexOf("/", 1);
if (colonIndex < 0)
{
@@ -217,7 +233,8 @@
{
ExoContainer container = getApplication().getApplicationServiceContainer();
container.getComponentInstanceOfType(UserPortalConfigService.class);
- UserPortalConfigService configService = (UserPortalConfigService)container.getComponentInstanceOfType(UserPortalConfigService.class);
+ UserPortalConfigService configService =
+ (UserPortalConfigService)container.getComponentInstanceOfType(UserPortalConfigService.class);
Page page = configService.getPage(node.getPageReference(), getRemoteUser());
//
@@ -236,6 +253,43 @@
return title;
}
+ /**
+ * Process current Portal Request URI. if current require uri is not equal to last one then
+ * an event of type UIPortalApplication.CHANGE_NODE will be retuned, otherwise it returns <code>null</code>
+ *
+ * @return
+ * @throws Exception
+ */
+ public Event<UIComponent> processPortalURI() throws Exception
+ {
+ UIPortalApplication uiPortalApp = (UIPortalApplication)uiApplication_;
+ List<PageNavigation> navigations = uiPortalApp.getNavigations();
+
+ String lastNodePath = uiPortalApp.getLastNodePath();
+
+ // Do not need to process if the request uri is not changed from last one
+ if(nodePath_.equals(lastNodePath))
+ {
+ // Should set the last navi & node to this instance of PortalRequestContext to be used subsequently
+ return null;
+ }
+
+ uiPortalApp.setLastNodePath(nodePath_);
+
+ Object[] targets = Util.findBestMatchNavigationAndNode(navigations, nodePath_);
+ if(targets == null)
+ {
+ targetNav = navigations.get(0);
+ targetNode_ = Util.findFirstAvailableNode(targetNav, this);
+ }
+ else
+ {
+ targetNav = (PageNavigation)targets[0];
+ targetNode_ = (PageNode)targets[1];
+ }
+ return uiPortalApp.createEvent(PageNodeEvent.CHANGE_NODE, Event.Phase.PROCESS, this);
+ }
+
public Orientation getOrientation()
{
return ((UIPortalApplication)uiApplication_).getOrientation();
@@ -335,6 +389,26 @@
return portalURI;
}
+ public PageNavigation getTargetNav()
+ {
+ return targetNav;
+ }
+
+ public void setTargetNav(PageNavigation targetNav)
+ {
+ this.targetNav = targetNav;
+ }
+
+ public PageNode getTargetNode()
+ {
+ return targetNode_;
+ }
+
+ public void setTargetNode(PageNode naviNode)
+ {
+ targetNode_ = naviNode;
+ }
+
public URLBuilder<UIComponent> getURLBuilder()
{
return urlBuilder;
@@ -363,10 +437,10 @@
}
return writer_;
}
-
+
final public void setWriter(Writer writer)
{
- this.writer_ = writer;
+ this.writer_ = writer;
}
final public boolean useAjax()
@@ -426,11 +500,11 @@
response_.setHeader(key, headers.get(key));
}
}
-
+
public List<String> getExtraMarkupHeadersAsStrings() throws Exception
{
List<String> markupHeaders = new ArrayList<String>();
-
+
if (extraMarkupHeaders != null && !extraMarkupHeaders.isEmpty())
{
Transformer transformer = TransformerFactory.newInstance().newTransformer();
@@ -457,31 +531,30 @@
markupHeaders.add(result.getWriter().toString());
}
}
-
- return markupHeaders;
+
+ return markupHeaders;
}
-
+
/**
* Get the extra markup headers to add to the head of the html.
* @return The markup to be added.
*/
public List<Element> getExtraMarkupHeaders()
{
- return this.extraMarkupHeaders;
+ return this.extraMarkupHeaders;
}
-
+
/**
* Add an extra markup to the head of the html page.
* @param element The element to add
*/
public void addExtraMarkupHeader(Element element)
{
- if (this.extraMarkupHeaders == null)
- {
- this.extraMarkupHeaders = new ArrayList<Element>();
- }
- this.extraMarkupHeaders.add(element);
+ if (this.extraMarkupHeaders == null)
+ {
+ this.extraMarkupHeaders = new ArrayList<Element>();
+ }
+ this.extraMarkupHeaders.add(element);
}
-
}
Modified: portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestHandler.java
===================================================================
--- portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestHandler.java 2010-08-19 08:18:22 UTC (rev 3867)
+++ portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestHandler.java 2010-08-19 09:17:49 UTC (rev 3868)
@@ -31,6 +31,8 @@
import org.exoplatform.web.application.RequestFailure;
import org.exoplatform.webui.application.WebuiRequestContext;
import org.exoplatform.webui.core.UIApplication;
+import org.exoplatform.webui.core.UIComponent;
+import org.exoplatform.webui.event.Event;
import java.util.List;
@@ -100,10 +102,19 @@
UIApplication uiApp = app.getStateManager().restoreUIRootComponent(context);
if (context.getUIApplication() != uiApp)
context.setUIApplication(uiApp);
-
+
if (uiApp != null)
+ {
uiApp.processDecode(context);
-
+
+ Event<UIComponent> changeNodeEvent = context.processPortalURI();
+ if(changeNodeEvent != null)
+ {
+ changeNodeEvent.broadcast();
+ System.out.println("\nLoading node : " + context.getTargetNav() + "==>" + context.getTargetNode().getUri() + "\n");
+ }
+ }
+
if (!context.isResponseComplete() && !context.getProcessRender())
{
startRequestPhaseLifecycle(app, context, lifecycles, Phase.ACTION);
Modified: portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/application/PortalStateManager.java
===================================================================
--- portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/application/PortalStateManager.java 2010-08-19 08:18:22 UTC (rev 3867)
+++ portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/application/PortalStateManager.java 2010-08-19 09:17:49 UTC (rev 3868)
@@ -63,46 +63,37 @@
appState = (ApplicationState)session.getAttribute(APPLICATION_ATTRIBUTE_PREFIX + key);
}
- //
-
- //
UIApplication uiapp = null;
if (appState != null)
{
+ log.debug("Found application " + key + " :" + appState.getApplication());
if (Safe.equals(context.getRemoteUser(), appState.getUserName()))
{
uiapp = appState.getApplication();
}
}
-
- //
- if (appState != null)
- {
- log.debug("Found application " + key + " :" + appState.getApplication());
- }
else
{
log.debug("Application " + key + " not found");
}
- // Looks like some necessary hacking
- if (context instanceof PortalRequestContext)
- {
- PortalRequestContext portalRC = (PortalRequestContext)context;
- UserPortalConfig config = getUserPortalConfig(portalRC);
- if (config == null)
- {
- HttpServletResponse response = portalRC.getResponse();
- response.sendRedirect(portalRC.getRequest().getContextPath() + "/portal-unavailable.jsp");
- portalRC.setResponseComplete(true);
- return null;
- }
- portalRC.setAttribute(UserPortalConfig.class, config);
- }
-
//
if (uiapp == null)
{
+ if (context instanceof PortalRequestContext)
+ {
+ PortalRequestContext portalRC = (PortalRequestContext)context;
+ UserPortalConfig config = getUserPortalConfig(portalRC);
+ if (config == null)
+ {
+ HttpServletResponse response = portalRC.getResponse();
+ response.sendRedirect(portalRC.getRequest().getContextPath() + "/portal-unavailable.jsp");
+ portalRC.setResponseComplete(true);
+ return null;
+ }
+ portalRC.setAttribute(UserPortalConfig.class, config);
+ }
+
ConfigurationManager cmanager = app.getConfigurationManager();
String uirootClass = cmanager.getApplication().getUIRootComponent();
Class<? extends UIApplication> type = (Class<UIApplication>) Thread.currentThread().getContextClassLoader().loadClass(uirootClass);
Modified: portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationNodeSelector.java
===================================================================
--- portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationNodeSelector.java 2010-08-19 08:18:22 UTC (rev 3867)
+++ portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationNodeSelector.java 2010-08-19 09:17:49 UTC (rev 3868)
@@ -431,7 +431,7 @@
uiApp.setModeState(UIPortalApplication.APP_BLOCK_EDIT_MODE);
//uiWorkingWS.setRenderedChild(UIPortalToolPanel.class);
- //uiWorkingWS.addChild(UIPortalComposer.class, "UIPageEditor", null);
+ //uiWorkingWS.addChild(UIPortalComposer.class, UIPortalComposer.UIPAGE_EDITOR, null);
uiWorkingWS.setRenderedChild(UIEditInlineWorkspace.class);
@@ -440,14 +440,13 @@
portalComposer.setShowControl(true);
portalComposer.setEditted(false);
portalComposer.setCollapse(false);
- portalComposer.setId("UIPageEditor");
- portalComposer.setComponentConfig(UIPortalComposer.class, "UIPageEditor");
+ portalComposer.setId(UIPortalComposer.UIPAGE_EDITOR);
+ portalComposer.setComponentConfig(UIPortalComposer.class, UIPortalComposer.UIPAGE_EDITOR);
uiToolPanel.setShowMaskLayer(false);
uiToolPanel.setWorkingComponent(UIPage.class, null);
UIPage uiPage = (UIPage)uiToolPanel.getUIComponent();
- WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
if(selectPage.getTitle() == null)
selectPage.setTitle(selectedPageNode.getLabel());
Modified: portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UIPageNodeSelector.java
===================================================================
--- portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UIPageNodeSelector.java 2010-08-19 08:18:22 UTC (rev 3867)
+++ portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UIPageNodeSelector.java 2010-08-19 09:17:49 UTC (rev 3868)
@@ -67,7 +67,7 @@
private void loadNavigations() throws Exception
{
- PageNavigation portalSelectedNav = Util.getUIPortal().getSelectedNavigation();
+ PageNavigation portalSelectedNav = Util.getUIPortal().getNavigation();
if (portalSelectedNav != null)
{
selectNavigation(portalSelectedNav);
Modified: portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UIPortalNavigation.java
===================================================================
--- portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UIPortalNavigation.java 2010-08-19 08:18:22 UTC (rev 3867)
+++ portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UIPortalNavigation.java 2010-08-19 09:17:49 UTC (rev 3868)
@@ -25,7 +25,6 @@
import org.exoplatform.portal.webui.portal.PageNodeEvent;
import org.exoplatform.portal.webui.portal.UIPortal;
import org.exoplatform.portal.webui.util.Util;
-import org.exoplatform.web.application.JavascriptManager;
import org.exoplatform.webui.application.WebuiRequestContext;
import org.exoplatform.webui.core.UIComponent;
import org.exoplatform.webui.event.Event;
@@ -188,12 +187,7 @@
public PageNavigation getSelectedNavigation() throws Exception
{
- PageNavigation nav = Util.getUIPortal().getSelectedNavigation();
- if (nav != null)
- return nav;
- if (Util.getUIPortal().getNavigations().size() < 1)
- return null;
- return Util.getUIPortal().getNavigations().get(0);
+ return Util.getUIPortal().getNavigation();
}
public Object getSelectedParent()
@@ -264,13 +258,13 @@
PageNavigation selectNav = null;
if (index <= 0)
{
- selectNav = uiPortal.getSelectedNavigation();
+ selectNav = uiPortal.getNavigation();
}
else
{
String navId = uri.substring(0, index);
//selectNav = uiPortal.getPageNavigation(Integer.parseInt(navId));
- selectNav = uiPortal.getSelectedNavigation();
+ selectNav = uiPortal.getNavigation();
}
PageNode selectNode = PageNavigationUtils.searchPageNodeByUri(selectNav, id);
uiNavigation.selectedNode_ = selectNode;
@@ -353,7 +347,7 @@
//TODO: Minh Hoang TO
//selectNav = uiPortal.getPageNavigation(Integer.parseInt(navId));
- selectNav = uiPortal.getSelectedNavigation();
+ selectNav = uiPortal.getNavigation();
// get PageNode by uri
PageNode expandNode = PageNavigationUtils.searchPageNodeByUri(selectNav, id);
Modified: portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UIPortalNavigation2.java
===================================================================
--- portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UIPortalNavigation2.java 2010-08-19 08:18:22 UTC (rev 3867)
+++ portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UIPortalNavigation2.java 2010-08-19 09:17:49 UTC (rev 3868)
@@ -72,21 +72,13 @@
{
WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
List<PageNavigation> result = new ArrayList<PageNavigation>();
- for (PageNavigation nav : Util.getUIPortal().getNavigations())
- {
- result.add(PageNavigationUtils.filter(nav, context.getRemoteUser()));
- }
+ result.add(PageNavigationUtils.filter(Util.getUIPortal().getNavigation(), context.getRemoteUser()));
return result;
}
public PageNavigation getSelectedNavigation() throws Exception
{
- PageNavigation nav = Util.getUIPortal().getSelectedNavigation();
- if (nav != null)
- return nav;
- if (Util.getUIPortal().getNavigations().size() < 1)
- return null;
- return Util.getUIPortal().getNavigations().get(0);
+ return Util.getUIPortal().getNavigation();
}
public Object getSelectedParent()
@@ -157,7 +149,7 @@
PageNavigation selectNav = null;
if (index <= 0)
{
- selectNav = uiPortal.getSelectedNavigation();
+ selectNav = uiPortal.getNavigation();
}
else
{
@@ -165,7 +157,7 @@
//TODO: Minh Hoang TO
//selectNav = uiPortal.getPageNavigation(Integer.parseInt(navId));
- selectNav = uiPortal.getSelectedNavigation();
+ selectNav = uiPortal.getNavigation();
}
PageNode selectNode = PageNavigationUtils.searchPageNodeByUri(selectNav, id);
uiNavigation.selectedNode_ = selectNode;
Modified: portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/page/PageUtils.java
===================================================================
--- portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/page/PageUtils.java 2010-08-19 08:18:22 UTC (rev 3867)
+++ portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/page/PageUtils.java 2010-08-19 09:17:49 UTC (rev 3868)
@@ -29,7 +29,6 @@
import org.exoplatform.portal.webui.workspace.UIPortalApplication;
import java.util.ArrayList;
-import java.util.List;
/**
* Created by The eXo Platform SAS
@@ -79,19 +78,5 @@
DataStorage dataService = uiPortal.getApplicationComponent(DataStorage.class);
dataService.save(navi);
- setNavigation(uiPortal.getNavigations(), navi);
}
-
- private static void setNavigation(List<PageNavigation> navs, PageNavigation nav)
- {
- for (int i = 0; i < navs.size(); i++)
- {
- if (navs.get(i).getId() == nav.getId())
- {
- navs.set(i, nav);
- return;
- }
- }
- }
-
}
Modified: portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIDesktopPage.java
===================================================================
--- portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIDesktopPage.java 2010-08-19 08:18:22 UTC (rev 3867)
+++ portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIDesktopPage.java 2010-08-19 09:17:49 UTC (rev 3868)
@@ -77,13 +77,9 @@
public List<PageNavigation> getNavigations() throws Exception
{
- List<PageNavigation> allNav = Util.getUIPortal().getNavigations();
String removeUser = Util.getPortalRequestContext().getRemoteUser();
List<PageNavigation> result = new ArrayList<PageNavigation>();
- for (PageNavigation nav : allNav)
- {
- result.add(PageNavigationUtils.filter(nav, removeUser));
- }
+ result.add(PageNavigationUtils.filter(Util.getUIPortal().getNavigation(), removeUser));
return result;
}
Modified: portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageActionListener.java
===================================================================
--- portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageActionListener.java 2010-08-19 08:18:22 UTC (rev 3867)
+++ portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageActionListener.java 2010-08-19 09:17:49 UTC (rev 3868)
@@ -19,11 +19,9 @@
package org.exoplatform.portal.webui.page;
-import org.exoplatform.container.ExoContainer;
import org.exoplatform.portal.application.PortalRequestContext;
import org.exoplatform.portal.config.DataStorage;
import org.exoplatform.portal.config.UserPortalConfig;
-import org.exoplatform.portal.config.UserPortalConfigService;
import org.exoplatform.portal.config.model.Container;
import org.exoplatform.portal.config.model.ModelObject;
import org.exoplatform.portal.config.model.Page;
@@ -47,88 +45,79 @@
import java.util.List;
/**
- * Created by The eXo Platform SAS Author : Tran The Trong trongtt(a)gmail.com Jun
- * 14, 2006
+ * Just a class that contains the Page related action listeners
+ *
+ * @author <a href="mailto:trongtt@gmail.com">Tran The Trong</a>
+ * @version $Revision$
*/
public class UIPageActionListener
{
-
- static public class ChangePageNodeActionListener extends EventListener<UIPortal>
+ private static UIPortal buildUIPortal(PageNavigation newPageNav, UIPortalApplication uiPortalApp, UserPortalConfig userPortalConfig) throws Exception
{
+ DataStorage storage = uiPortalApp.getApplicationComponent(DataStorage.class);
+ if(storage == null){
+ return null;
+ }
+ PortalConfig portalConfig = storage.getPortalConfig(newPageNav.getOwnerType(), newPageNav.getOwnerId());
+ Container layout = portalConfig.getPortalLayout();
+ if(layout != null)
+ {
+ userPortalConfig.setPortal(portalConfig);
+ }
+ UIPortal uiPortal = uiPortalApp.createUIComponent(UIPortal.class, null, null);
+ //Reset selected navigation on userPortalConfig
+ userPortalConfig.setSelectedNavigation(newPageNav);
+ PortalDataMapper.toUIPortal(uiPortal, userPortalConfig);
+ return uiPortal;
+ }
+
+ /**
+ * Navigate to a page node base on the input parameters <code>nav</code> PageNavigaton and <code>pageNode</code> PageNode
+ *
+ * @author <a href="mailto:trongtt@gmail.com">Tran The Trong</a>
+ * @version $Revision$
+ */
+ static public class ChangeNodeActionListener extends EventListener<UIPortalApplication>
+ {
@Override
- public void execute(Event<UIPortal> event) throws Exception
+ public void execute(Event<UIPortalApplication> event) throws Exception
{
- UIPortal showedUIPortal = event.getSource();
- UIPortalApplication uiPortalApp = showedUIPortal.getAncestorOfType(UIPortalApplication.class);
+ PortalRequestContext pcontext = (PortalRequestContext)event.getRequestContext();
+ PageNavigation targetNav = pcontext.getTargetNav();
+ PageNode newPageNode = pcontext.getTargetNode();
- //This code snippet is to make sure that Javascript/Skin is fully loaded at the first request
- UIWorkingWorkspace uiWorkingWS = uiPortalApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
- PortalRequestContext pcontext = Util.getPortalRequestContext();
- pcontext.setFullRender(true);
- pcontext.addUIComponentToUpdateByAjax(uiWorkingWS);
-
- PageNavigation currentNav = showedUIPortal.getSelectedNavigation();
- String currentUri = showedUIPortal.getSelectedNode().getUri();
- if(currentUri.startsWith("/"))
+ UIPortalApplication uiPortalApp = event.getSource();
+ UIPortal uiPortal = uiPortalApp.getShowedUIPortal();
+ PageNavigation currentNav = uiPortal.getNavigation();
+ if(currentNav.getOwnerType().equals(targetNav.getOwnerType()) & currentNav.getOwnerId().equals(targetNav.getOwnerId()))
{
- currentUri = currentUri.substring(1);
- }
-
- //This if branche is to make sure that the first time user logs in, showedUIPortal has selectedPaths
- //Otherwise, there will be NPE on BreadcumbsPortlet
- if(showedUIPortal.getSelectedPath() == null)
- {
- List<PageNode> currentSelectedPath = findPath(currentNav, currentUri.split("/"));
- showedUIPortal.setSelectedPath(currentSelectedPath);
- }
-
- String targetedUri = ((PageNodeEvent<UIPortal>)event).getTargetNodeUri();
- if(targetedUri.startsWith("/"))
- {
- targetedUri = targetedUri.substring(1);
- }
-
- PageNavigation targetedNav = getTargetedNav(uiPortalApp, targetedUri);
-
- if(targetedNav == null)
- {
- return;
- }
-
- String formerNavType = currentNav.getOwnerType();
- String formerNavId = currentNav.getOwnerId();
- String newNavType = targetedNav.getOwnerType();
- String newNavId = targetedNav.getOwnerId();
-
- String[] targetPath = targetedUri.split("/");
- PageNode targetPageNode = getTargetedNode(targetedNav, targetPath);
- List<PageNode> targetedPathNodes = findPath(targetedNav, targetPath);
-
- if(formerNavType.equals(newNavType) && formerNavId.equals(newNavId))
- {
- //Case 1: Both navigation type and id are not changed, but current page node is changed
- if(!currentUri.equals(targetedUri))
+ if(!uiPortal.getSelectedNode().getUri().equals(newPageNode.getUri()))
{
- showedUIPortal.setSelectedNode(targetPageNode);
- showedUIPortal.setSelectedPath(targetedPathNodes);
+ uiPortal.setSelectedNode(newPageNode);
}
}
else
{
- // Case 2: Either navigation type or id has been changed
- // First, we try to find a cached UIPortal
- uiWorkingWS.setRenderedChild(UIPortalApplication.UI_VIEWING_WS_ID);
- uiPortalApp.setModeState(UIPortalApplication.NORMAL_MODE);
- showedUIPortal = uiPortalApp.getCachedUIPortal(newNavType, newNavId);
- if (showedUIPortal != null)
+ uiPortal = uiPortalApp.getCachedUIPortal(targetNav.getOwnerType(), targetNav.getOwnerId());
+ if(uiPortal == null)
{
- showedUIPortal.setSelectedNode(targetPageNode);
- showedUIPortal.setSelectedPath(targetedPathNodes);
- uiPortalApp.setShowedUIPortal(showedUIPortal);
+ uiPortal = buildUIPortal(targetNav, uiPortalApp, uiPortalApp.getUserPortalConfig());
+ if(uiPortal == null)
+ {
+ return;
+ }
+ uiPortal.setSelectedNode(newPageNode);
+ uiPortalApp.setShowedUIPortal(uiPortal);
+ uiPortalApp.putCachedUIPortal(uiPortal);
+ }
+ else
+ {
+ uiPortal.setSelectedNode(newPageNode);
+ uiPortalApp.setShowedUIPortal(uiPortal);
//Temporary solution to fix edit inline error while switching between navigations
DataStorage storageService = uiPortalApp.getApplicationComponent(DataStorage.class);
- PortalConfig associatedPortalConfig = storageService.getPortalConfig(newNavType, newNavId);
+ PortalConfig associatedPortalConfig = storageService.getPortalConfig(targetNav.getOwnerType(), targetNav.getOwnerId());
UserPortalConfig userPortalConfig = uiPortalApp.getUserPortalConfig();
//Update layout-related data on UserPortalConfig
@@ -136,250 +125,98 @@
//Update selected navigation on UserPortalConfig, that is mandatory as at the moment the PortalConfig
//does not hold any navigation data.
- userPortalConfig.updateSelectedNavigation(newNavType, newNavId);
+ userPortalConfig.setSelectedNavigation(targetNav);
}
- else
- {
- showedUIPortal = buildUIPortal(targetedNav, uiPortalApp, uiPortalApp.getUserPortalConfig());
- if(showedUIPortal == null)
- {
- return;
- }
- showedUIPortal.setSelectedNode(targetPageNode);
- showedUIPortal.setSelectedPath(targetedPathNodes);
- uiPortalApp.setShowedUIPortal(showedUIPortal);
- uiPortalApp.putCachedUIPortal(showedUIPortal);
- }
}
- showedUIPortal.refreshUIPage();
+ uiPortal.refreshUIPage();
}
-
- /**
- * Get the targeted <code>PageNavigation</code>
- *
- * @param uiPortalApp
- * @param targetedUri
- * @return
- */
- private PageNavigation getTargetedNav(UIPortalApplication uiPortalApp, String targetedUri)
+ }
+
+ /**
+ * Navigate to a page node in current navigation of UIPortal.
+ *
+ * @author <a href="mailto:trongtt@gmail.com">Tran The Trong</a>
+ * @version $Revision$
+ */
+ static public class ChangePageNodeActionListener extends EventListener<UIPortal>
+ {
+ @Override
+ public void execute(Event<UIPortal> event) throws Exception
{
- List<PageNavigation> allNavs = uiPortalApp.getUserPortalConfig().getNavigations();
+ UIPortal uiPortal = event.getSource();
+ UIPortalApplication uiPortalApp = uiPortal.getAncestorOfType(UIPortalApplication.class);
- //That happens when user browses to an empty-nodeUri URL like ../portal/public/classic/
- //In this case, we returns default navigation
- if(targetedUri.length() == 0)
- {
- return uiPortalApp.getNavigations().get(0);
- }
+ //This code snippet is to make sure that Javascript/Skin is fully loaded at the first request
+ UIWorkingWorkspace uiWorkingWS = uiPortalApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
+ PortalRequestContext pcontext = Util.getPortalRequestContext();
+ pcontext.setFullRender(true);
+ pcontext.addUIComponentToUpdateByAjax(uiWorkingWS);
+
- String[] pathNodes = targetedUri.split("/");
+ String targetedUri = ((PageNodeEvent<UIPortal>)event).getTargetNodeUri();
- return getBestMatchNavigation(allNavs, pathNodes);
- }
-
- /**
- * Get the navigation containing longest subpath of 'pathNodes'
- *
- * @param listNav
- * @param pathNodes
- * @return
- */
- private PageNavigation getBestMatchNavigation(List<PageNavigation> listNav, String[] pathNodes)
- {
- int temporalMaximalMatching = 0;
- PageNavigation temporalBestNavigation = listNav.get(0);
+ /////////////////////////////
- for(PageNavigation nav : listNav)
+ PageNode targetPageNode;
+ PageNavigation targetedNav;
+ List<PageNavigation> navigations = uiPortalApp.getNavigations();
+
+ Object[] targets = Util.findBestMatchNavigationAndNode(navigations, targetedUri);
+ if(targets == null)
{
- int currentNumberOfMatching = countNumberOfMatchedPathNodes(nav, pathNodes);
-
- //The whole pathNodes matches current navigation
- if(currentNumberOfMatching == pathNodes.length)
- {
- return nav;
- }
-
- if(currentNumberOfMatching > temporalMaximalMatching)
- {
- temporalMaximalMatching = currentNumberOfMatching;
- temporalBestNavigation = nav;
- }
+ targetedNav = navigations.get(0);
+ targetPageNode = Util.findFirstAvailableNode(targetedNav, pcontext);
}
- return temporalBestNavigation;
- }
-
- /**
- * Count the maximal number of nodes matching the pathNodes while descending the navigation 'nav'
- *
- * @param nav
- * @param pathNodes
- * @return
- */
- private int countNumberOfMatchedPathNodes(PageNavigation nav, String[] pathNodes)
- {
- if(pathNodes.length == 0)
+ else
{
- return 0;
+ targetedNav = (PageNavigation)targets[0];
+ targetPageNode = (PageNode)targets[1];
}
- PageNode currentNode = nav.getNode(pathNodes[0]);
- int numberOfMatch = (currentNode != null)? 1 : 0 ;
+ /////////////////////////////
- for(int i = 1; i < pathNodes.length; i++)
+ PageNavigation currentNav = uiPortal.getNavigation();
+ if(currentNav.getOwnerType().equals(targetedNav.getOwnerType()) & currentNav.getOwnerId().equals(targetedNav.getOwnerId()))
{
- if(currentNode == null)
+ if(!uiPortal.getSelectedNode().getUri().equals(targetPageNode.getUri()))
{
- break;
+ uiPortal.setSelectedNode(targetPageNode);
}
- currentNode = currentNode.getChild(pathNodes[i]);
}
- return numberOfMatch;
- }
-
- /**
- * Fetch the currently selected pageNode under a PageNavigation. It is the last node encountered
- * while descending the pathNodes
- *
- * This method returns <code>null</code> iff only 'notfound' node remains in the navigation
- *
- * @param targetedNav
- * @param pathNodes
- * @return
- */
- private PageNode getTargetedNode(PageNavigation targetedNav, String[] pathNodes)
- {
- //Case users browses to a URL of the form */portal/public/classic
- if(pathNodes.length == 0)
+ else
{
- return getDefaultNode(targetedNav);
- }
-
- PageNode currentNode = targetedNav.getNode(pathNodes[0]);
- if(currentNode == null)
- {
- return getDefaultNode(targetedNav);
- }
-
- PageNode tempNode = null;
-
- for(int i = 1; i < pathNodes.length; i++)
- {
- tempNode = currentNode.getChild(pathNodes[i]);
- if (tempNode == null)
+ uiPortal = uiPortalApp.getCachedUIPortal(targetedNav.getOwnerType(), targetedNav.getOwnerId());
+ if(uiPortal == null)
{
- break;
- }
- else
- {
- currentNode = tempNode;
- }
- }
- return currentNode;
- }
-
- /**
- * Default node of a navigation. This method returns
- *
- * 1. The first node in the list of 'nav' 's children if the list contains
- * at least one child other than 'notfound'
- *
- * 2. <code>null</code> otherwise
- *
- * @param nav
- * @return
- */
- private PageNode getDefaultNode(PageNavigation nav)
- {
- PageNode defaultNode = null;
- try
- {
- if (nav != null && nav.getNodes().size() > 0)
- {
- WebuiRequestContext context = Util.getPortalRequestContext();
- ExoContainer appContainer = context.getApplication().getApplicationServiceContainer();
- UserPortalConfigService userPortalConfigService = (UserPortalConfigService)appContainer.getComponentInstanceOfType(UserPortalConfigService.class);
-
- for (PageNode pageNode : nav.getNodes())
+ uiPortal = buildUIPortal(targetedNav, uiPortalApp, uiPortalApp.getUserPortalConfig());
+ if(uiPortal == null)
{
- Page page = userPortalConfigService.getPage(pageNode.getPageReference(), context.getRemoteUser());
- if (page != null)
- {
- defaultNode = pageNode;
- break;
- }
+ return;
}
+ uiPortal.setSelectedNode(targetPageNode);
+ uiPortalApp.setShowedUIPortal(uiPortal);
+ uiPortalApp.putCachedUIPortal(uiPortal);
}
else
{
- return null;
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- return null;
- }
- if (defaultNode != null && !("notfound".equals(defaultNode.getName())))
- {
- return defaultNode;
- }
- else
- {
- return null;
- }
- }
-
- private List<PageNode> findPath(PageNavigation nav, String[] pathNodes)
- {
- List<PageNode> nodes = new ArrayList<PageNode>(4);
-
- //That happens when user browses to a URL like /portal/public/classic
- if(pathNodes.length == 0)
- {
- nodes.add(getDefaultNode(nav));
- return nodes;
- }
- PageNode startNode = nav.getNode(pathNodes[0]);
- if (startNode == null)
- {
- nodes.add(getDefaultNode(nav));
- return nodes;
- }
- nodes.add(startNode);
+ uiPortal.setSelectedNode(targetPageNode);
+ uiPortalApp.setShowedUIPortal(uiPortal);
+
+ //Temporary solution to fix edit inline error while switching between navigations
+ DataStorage storageService = uiPortalApp.getApplicationComponent(DataStorage.class);
+ PortalConfig associatedPortalConfig = storageService.getPortalConfig(targetedNav.getOwnerType(), targetedNav.getOwnerId());
+ UserPortalConfig userPortalConfig = uiPortalApp.getUserPortalConfig();
+
+ //Update layout-related data on UserPortalConfig
+ userPortalConfig.setPortal(associatedPortalConfig);
- for (int i = 1; i < pathNodes.length; i++)
- {
- startNode = startNode.getChild(pathNodes[i]);
- if(startNode == null)
- {
- break;
+ //Update selected navigation on UserPortalConfig, that is mandatory as at the moment the PortalConfig
+ //does not hold any navigation data.
+ userPortalConfig.setSelectedNavigation(targetedNav);
}
- else
- {
- nodes.add(startNode);
- }
}
- return nodes;
+ uiPortal.refreshUIPage();
}
-
- private UIPortal buildUIPortal(PageNavigation newPageNav, UIPortalApplication uiPortalApp, UserPortalConfig userPortalConfig) throws Exception
- {
- DataStorage storage = uiPortalApp.getApplicationComponent(DataStorage.class);
- if(storage == null){
- return null;
- }
- PortalConfig portalConfig = storage.getPortalConfig(newPageNav.getOwnerType(), newPageNav.getOwnerId());
- Container layout = portalConfig.getPortalLayout();
- if(layout != null)
- {
- userPortalConfig.setPortal(portalConfig);
- }
- UIPortal uiPortal = uiPortalApp.createUIComponent(UIPortal.class, null, null);
- //Reset selected navigation on userPortalConfig
- userPortalConfig.setSelectedNavigation(newPageNav);
- PortalDataMapper.toUIPortal(uiPortal, userPortalConfig);
- return uiPortal;
- }
}
Modified: portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageBrowser.java
===================================================================
--- portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageBrowser.java 2010-08-19 08:18:22 UTC (rev 3867)
+++ portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageBrowser.java 2010-08-19 09:17:49 UTC (rev 3868)
@@ -436,16 +436,16 @@
editInlineWS.setUIComponent(uiPage);
UIPortalComposer portalComposer = editInlineWS.getChild(UIPortalComposer.class).setRendered(true);
- portalComposer.setComponentConfig(UIPortalComposer.class, "UIPageEditor");
+ portalComposer.setComponentConfig(UIPortalComposer.class, UIPortalComposer.UIPAGE_EDITOR);
portalComposer.setShowControl(true);
portalComposer.setEditted(false);
portalComposer.setCollapse(false);
- portalComposer.setId("UIPageEditor");
+ portalComposer.setId(UIPortalComposer.UIPAGE_EDITOR);
//toolPanel.setUIComponent(uiPage);
//toolPanel.setShowMaskLayer(false);
//uiWorkingWS.setRenderedChild(UIPortalToolPanel.class);
- //uiWorkingWS.addChild(UIPortalComposer.class, "UIPageEditor", null);
+ //uiWorkingWS.addChild(UIPortalComposer.class, UIPortalComposer.UIPAGE_EDITOR, null);
uiWorkingWS.setRenderedChild(UIPortalApplication.UI_EDITTING_WS_ID);
pcontext.addUIComponentToUpdateByAjax(uiWorkingWS);
pcontext.setFullRender(true);
Modified: portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageCreationWizard.java
===================================================================
--- portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageCreationWizard.java 2010-08-19 08:18:22 UTC (rev 3867)
+++ portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageCreationWizard.java 2010-08-19 09:17:49 UTC (rev 3868)
@@ -36,7 +36,6 @@
import org.exoplatform.portal.webui.workspace.UIPortalToolPanel;
import org.exoplatform.portal.webui.workspace.UIWorkingWorkspace;
import org.exoplatform.web.application.ApplicationMessage;
-import org.exoplatform.web.application.JavascriptManager;
import org.exoplatform.webui.application.WebuiRequestContext;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.ComponentConfigs;
@@ -75,7 +74,7 @@
setNumberSteps(NUMBER_OF_STEPs);
viewStep(FIRST_STEP);
setShowWelcomeComponent(false);
- boolean isUserNav = Util.getUIPortal().getSelectedNavigation().getOwnerType().equals(PortalConfig.USER_TYPE);
+ boolean isUserNav = Util.getUIPortal().getNavigation().getOwnerType().equals(PortalConfig.USER_TYPE);
if (isUserNav)
{
uiPageInfo.getChild(UIPageNodeSelector.class).setRendered(false);
@@ -117,22 +116,8 @@
DataStorage dataService = getApplicationComponent(DataStorage.class);
dataService.create(page);
dataService.save(pageNav);
- UIPortal uiPortal = Util.getUIPortal();
- setNavigation(uiPortal.getNavigations(), uiNodeSelector.getSelectedNavigation());
}
- private void setNavigation(List<PageNavigation> navs, PageNavigation nav)
- {
- for (int i = 0; i < navs.size(); i++)
- {
- if (navs.get(i).getId() == nav.getId())
- {
- navs.set(i, nav);
- return;
- }
- }
- }
-
/**
* Returns <code>true</code> if the creating node is existing already.
* Otherwise it returns <code>false</code>
Modified: portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageForm.java
===================================================================
--- portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageForm.java 2010-08-19 08:18:22 UTC (rev 3867)
+++ portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageForm.java 2010-08-19 09:17:49 UTC (rev 3868)
@@ -32,7 +32,6 @@
import org.exoplatform.portal.config.model.PortalConfig;
import org.exoplatform.portal.webui.application.UIPortlet;
import org.exoplatform.portal.webui.container.UIContainer;
-import org.exoplatform.portal.webui.portal.UIPortalComponent;
import org.exoplatform.portal.webui.portal.UIPortalComposer;
import org.exoplatform.portal.webui.util.PortalDataMapper;
import org.exoplatform.portal.webui.util.Util;
@@ -41,16 +40,13 @@
import org.exoplatform.portal.webui.workspace.UIPortalToolPanel;
import org.exoplatform.portal.webui.workspace.UIWorkingWorkspace;
import org.exoplatform.web.application.ApplicationMessage;
-import org.exoplatform.webui.application.WebuiRequestContext;
import org.exoplatform.webui.config.InitParams;
-import org.exoplatform.webui.config.Param;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.ComponentConfigs;
import org.exoplatform.webui.config.annotation.EventConfig;
import org.exoplatform.webui.config.annotation.ParamConfig;
import org.exoplatform.webui.core.UIComponent;
import org.exoplatform.webui.core.lifecycle.UIFormLifecycle;
-import org.exoplatform.webui.core.model.SelectItemCategory;
import org.exoplatform.webui.core.model.SelectItemOption;
import org.exoplatform.webui.event.Event;
import org.exoplatform.webui.event.EventListener;
@@ -355,7 +351,7 @@
PortalDataMapper.toUIPage(uiPage, page);
} catch(NoSuchDataException de){
uiPortalApp.addMessage(new ApplicationMessage("UIPageForm.msg.notExistOrDeleted", null, ApplicationMessage.ERROR));
- UIPortalComposer uiPortalComposer = (UIPortalComposer)uiPortalApp.findComponentById("UIPageEditor");
+ UIPortalComposer uiPortalComposer = (UIPortalComposer)uiPortalApp.findComponentById(UIPortalComposer.UIPAGE_EDITOR);
if(uiPortalComposer != null){
Event aboutEvent = new Event<UIPortalComposer>(uiPortalComposer, "Abort", event.getRequestContext());
uiPortalComposer.broadcast(aboutEvent, event.getExecutionPhase());
Modified: portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIWizardPageSetInfo.java
===================================================================
--- portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIWizardPageSetInfo.java 2010-08-19 08:18:22 UTC (rev 3867)
+++ portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIWizardPageSetInfo.java 2010-08-19 09:17:49 UTC (rev 3868)
@@ -274,7 +274,7 @@
uiForm.setShowPublicationDate(false);
uiForm.setFirstTime(false);
UIPortal uiPortal = Util.getUIPortal();
- uiPageNodeSelector.selectNavigation(uiPortal.getSelectedNavigation());
+ uiPageNodeSelector.selectNavigation(uiPortal.getNavigation());
if (uiPortal.getSelectedNode() != null)
{
uiPageNodeSelector.selectPageNodeByUri(uiPortal.getSelectedNode().getUri());
Modified: portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/PageNodeEvent.java
===================================================================
--- portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/PageNodeEvent.java 2010-08-19 08:18:22 UTC (rev 3867)
+++ portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/PageNodeEvent.java 2010-08-19 09:17:49 UTC (rev 3868)
@@ -19,6 +19,8 @@
package org.exoplatform.portal.webui.portal;
+import org.exoplatform.portal.config.model.PageNavigation;
+import org.exoplatform.portal.config.model.PageNode;
import org.exoplatform.webui.core.UIComponent;
import org.exoplatform.webui.event.Event;
@@ -27,19 +29,42 @@
*/
public class PageNodeEvent<T extends UIComponent> extends Event<T>
{
-
+ public static final String CHANGE_NODE = "ChangeNode";
+
final static public String CHANGE_PAGE_NODE = "ChangePageNode";
private String targetNodeUri;
-
+
+ private PageNavigation navi;
+
+ private PageNode pageNode;
+
public PageNodeEvent(T source, String name, String targetNodeUri)
{
super(source, name, null);
this.targetNodeUri = targetNodeUri;
}
+ public PageNodeEvent(T source, String name, PageNavigation targetNavi, PageNode _pageNode)
+ {
+ super(source, name, null);
+ this.navi = targetNavi;
+ this.pageNode = _pageNode;
+ this.targetNodeUri = _pageNode.getUri();
+ }
+
public String getTargetNodeUri()
{
return targetNodeUri;
}
+
+ public PageNavigation getNavigation()
+ {
+ return navi;
+ }
+
+ public PageNode getPageNode()
+ {
+ return pageNode;
+ }
}
\ No newline at end of file
Modified: portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortal.java
===================================================================
--- portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortal.java 2010-08-19 08:18:22 UTC (rev 3867)
+++ portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortal.java 2010-08-19 09:17:49 UTC (rev 3868)
@@ -30,6 +30,7 @@
import org.exoplatform.portal.webui.container.UIContainer;
import org.exoplatform.portal.webui.page.UIPage;
import org.exoplatform.portal.webui.page.UIPageBody;
+import org.exoplatform.portal.webui.page.UIPageActionListener.ChangeNodeActionListener;
import org.exoplatform.portal.webui.page.UIPageActionListener.ChangePageNodeActionListener;
import org.exoplatform.portal.webui.portal.UIPortalComponentActionListener.ChangeApplicationListActionListener;
import org.exoplatform.portal.webui.portal.UIPortalComponentActionListener.ChangeLanguageActionListener;
@@ -68,6 +69,7 @@
import javax.servlet.http.HttpServletRequest;
@ComponentConfig(lifecycle = UIPortalLifecycle.class, template = "system:/groovy/portal/webui/portal/UIPortal.gtmpl", events = {
+ @EventConfig(listeners = ChangeNodeActionListener.class),
@EventConfig(listeners = ChangePageNodeActionListener.class),
@EventConfig(listeners = ChangeApplicationListActionListener.class),
@EventConfig(listeners = MoveChildActionListener.class),
@@ -97,8 +99,6 @@
private PageNavigation navigation;
- private List<PageNode> selectedPath;
-
private PageNode selectedNode_;
private Map<String, UIPage> all_UIPages;
@@ -167,7 +167,13 @@
publicParameters_ = publicParams;
}
- /** At the moment, this method ensure compatibility with legacy code */
+ /**
+ * @deprecated the list of navigation now is located in {@link UIPortalApplication} instead of {@link UIPortal}
+ * So using {@link UIPortalApplication#getNavigations()} instead
+ *
+ * @return
+ * @throws Exception
+ */
public List<PageNavigation> getNavigations() throws Exception
{
List<PageNavigation> listNavs = new ArrayList<PageNavigation>();
@@ -211,6 +217,11 @@
this.navigation = _navigation;
}
+ public PageNavigation getNavigation()
+ {
+ return navigation;
+ }
+
/**
* Refresh the UIPage under UIPortal
*
@@ -246,19 +257,6 @@
{
selectedNode_ = node;
}
-
- /*
- public PageNode getSelectedNode() throws Exception
- {
- if (selectedNode_ != null)
- return selectedNode_;
- if (getSelectedNavigation() == null || selectedNavigation_.getNodes() == null
- || selectedNavigation_.getNodes().size() < 1)
- return null;
- selectedNode_ = selectedNavigation_.getNodes().get(0);
- return selectedNode_;
- }
- */
public PageNode getSelectedNode() throws Exception
{
@@ -275,22 +273,43 @@
public List<PageNode> getSelectedPath()
{
- return selectedPath;
+ String[] pathNodes = selectedNode_.getUri().split("/");
+ PageNode tempNode = navigation.getNode(pathNodes[0]);
+ List<PageNode> nodes = new ArrayList<PageNode>(4);
+ nodes.add(tempNode);
+
+ for (int i = 1; i < pathNodes.length; i++)
+ {
+ tempNode = tempNode.getChild(pathNodes[i]);
+ if(tempNode == null)
+ {
+ break;
+ }
+ else
+ {
+ nodes.add(tempNode);
+ }
+ }
+ return nodes;
}
+ /**
+ * @deprecated Do not use
+ *
+ * @param nodes
+ */
public void setSelectedPath(List<PageNode> nodes)
{
- selectedPath = nodes;
}
- public PageNavigation getSelectedNavigation() throws Exception
- {
- return navigation;
- }
-
+ /**
+ * @deprecated use {@link #setNavigation(PageNavigation)} instead
+ *
+ * @param _navigation
+ */
public void setSelectedNavigation(PageNavigation _navigation)
{
- this.navigation = _navigation;
+ setNavigation(_navigation);
}
/**
Modified: portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalActionListener.java
===================================================================
--- portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalActionListener.java 2010-08-19 08:18:22 UTC (rev 3867)
+++ portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalActionListener.java 2010-08-19 09:17:49 UTC (rev 3868)
@@ -54,6 +54,7 @@
}
}
+ //TODO This method seems not to be used
static public class ChangeWindowStateActionListener extends EventListener<UIPortal>
{
public void execute(Event<UIPortal> event) throws Exception
Modified: portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComposer.java
===================================================================
--- portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComposer.java 2010-08-19 08:18:22 UTC (rev 3867)
+++ portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComposer.java 2010-08-19 09:17:49 UTC (rev 3868)
@@ -66,16 +66,16 @@
/** Created by The eXo Platform SAS Author : Pham Thanh Tung thanhtungty(a)gmail.com Jun 10, 2009 */
@ComponentConfigs({
@ComponentConfig(template = "app:/groovy/portal/webui/portal/UIPortalComposer.gtmpl", events = {
- @EventConfig(listeners = UIPortalComposer.ViewPropertiesActionListener.class),
- @EventConfig(listeners = UIPortalComposer.AbortActionListener.class),
- @EventConfig(listeners = UIPortalComposer.FinishActionListener.class),
+ @EventConfig(name = "ViewProperties", listeners = UIPortalComposer.ViewSitePropertiesActionListener.class),
+ @EventConfig(name = "Abort", listeners = UIPortalComposer.AbortSiteEditionActionListener.class),
+ @EventConfig(name = "Finish", listeners = UIPortalComposer.FinishSiteEditionActionListener.class),
@EventConfig(listeners = UIPortalComposer.SwitchModeActionListener.class),
@EventConfig(listeners = UIPortalComposer.ChangeEdittedStateActionListener.class),
@EventConfig(listeners = UIPortalComposer.ToggleActionListener.class)}),
- @ComponentConfig(id = "UIPageEditor", template = "app:/groovy/portal/webui/portal/UIPortalComposer.gtmpl", events = {
- @EventConfig(name = "ViewProperties", listeners = UIPortalComposer.ViewProperties2ActionListener.class),
- @EventConfig(name = "Abort", listeners = UIPortalComposer.Abort2ActionListener.class),
- @EventConfig(name = "Finish", listeners = UIPortalComposer.Finish2ActionListener.class),
+ @ComponentConfig(id = UIPortalComposer.UIPAGE_EDITOR, template = "app:/groovy/portal/webui/portal/UIPortalComposer.gtmpl", events = {
+ @EventConfig(name = "ViewProperties", listeners = UIPortalComposer.ViewPagePropertiesActionListener.class),
+ @EventConfig(name = "Abort", listeners = UIPortalComposer.AbortPageEditionActionListener.class),
+ @EventConfig(name = "Finish", listeners = UIPortalComposer.FinishPageEditionActionListener.class),
@EventConfig(name = "Back", listeners = UIPortalComposer.BackActionListener.class),
@EventConfig(listeners = UIPortalComposer.SwitchModeActionListener.class),
@EventConfig(listeners = UIPortalComposer.ChangeEdittedStateActionListener.class),
@@ -83,7 +83,10 @@
@ComponentConfig(id = "UIPortalComposerTab", type = UITabPane.class, template = "app:/groovy/portal/webui/portal/UIPortalComposerContent.gtmpl", events = {@EventConfig(listeners = UIPortalComposer.SelectTabActionListener.class)})})
public class UIPortalComposer extends UIContainer
{
-
+ final static public String UIPORTAL_COMPOSER = "UIPortalComposer";
+
+ final static public String UIPAGE_EDITOR = "UIPageEditor";
+
private boolean isEditted = false;
private boolean isCollapsed = false;
@@ -351,7 +354,7 @@
super.processRender(context);
}
- static public class ViewPropertiesActionListener extends EventListener<UIPortalComposer>
+ static public class ViewSitePropertiesActionListener extends EventListener<UIPortalComposer>
{
public void execute(Event<UIPortalComposer> event) throws Exception
@@ -393,7 +396,7 @@
}
}
- static public class AbortActionListener extends EventListener<UIPortalComposer>
+ static public class AbortSiteEditionActionListener extends EventListener<UIPortalComposer>
{
public void execute(Event<UIPortalComposer> event) throws Exception
{
@@ -405,15 +408,14 @@
uiEditWS.getComposer().setEditted(false);
uiEditWS.setRendered(false);
uiWorkingWS.setRenderedChild(UIPortalApplication.UI_VIEWING_WS_ID);
- prContext.setFullRender(true);
UISiteBody siteBody = uiWorkingWS.findFirstComponentOfType(UISiteBody.class);
UIPortal uiPortal = uiWorkingWS.getBackupUIPortal();
siteBody.setUIComponent(uiPortal);
- String uri = uiPortal.getSelectedNode() != null ? uiPortal.getSelectedNode().getUri() : null;
- PageNodeEvent<UIPortal> pnevent = new PageNodeEvent<UIPortal>(uiPortal, PageNodeEvent.CHANGE_PAGE_NODE, uri);
- uiPortal.broadcast(pnevent, Event.Phase.PROCESS);
+ uiPortal.refreshUIPage();
+
+ prContext.setFullRender(true);
prContext.addUIComponentToUpdateByAjax(uiWorkingWS);
JavascriptManager jsManager = prContext.getJavascriptManager();
jsManager.addJavascript("eXo.portal.portalMode=" + UIPortalApplication.NORMAL_MODE + ";");
@@ -427,7 +429,7 @@
* @author <a href="trong.tran(a)exoplatform.com">Trong Tran</a>
* @version $Revision$
*/
- static public class FinishActionListener extends EventListener<UIPortalComposer>
+ static public class FinishSiteEditionActionListener extends EventListener<UIPortalComposer>
{
public void execute(Event<UIPortalComposer> event) throws Exception
@@ -464,8 +466,8 @@
{
DataStorage storage = uiPortalApp.getApplicationComponent(DataStorage.class);
PortalConfig pConfig =
- storage.getPortalConfig(uiPortal.getSelectedNavigation().getOwnerType(), uiPortal
- .getSelectedNavigation().getOwnerId());
+ storage.getPortalConfig(uiPortal.getNavigation().getOwnerType(), uiPortal
+ .getNavigation().getOwnerId());
if (pConfig != null)
{
uiPortalApp.getUserPortalConfig().setPortal(pConfig);
@@ -602,7 +604,7 @@
}
}
- static public class ViewProperties2ActionListener extends EventListener<UIPortalComposer>
+ static public class ViewPagePropertiesActionListener extends EventListener<UIPortalComposer>
{
public void execute(Event<UIPortalComposer> event) throws Exception
{
@@ -620,7 +622,7 @@
}
}
- static public class Abort2ActionListener extends EventListener<UIPortalComposer>
+ static public class AbortPageEditionActionListener extends EventListener<UIPortalComposer>
{
public void execute(Event<UIPortalComposer> event) throws Exception
{
@@ -631,7 +633,6 @@
UIPortalApplication uiPortalApp = Util.getUIPortalApplication();
uiPortalApp.setModeState(UIPortalApplication.NORMAL_MODE);
uiWorkingWS.setRenderedChild(UIPortalApplication.UI_VIEWING_WS_ID);
- Util.getPortalRequestContext().setFullRender(true);
UIPortal uiPortal = uiPortalApp.getShowedUIPortal();
uiPortal.setRenderSibling(UIPortal.class);
@@ -639,11 +640,10 @@
composer.setEditted(false);
uiPortal.refreshUIPage();
-
- PageNodeEvent<UIPortal> pnevent =
- new PageNodeEvent<UIPortal>(uiPortal, PageNodeEvent.CHANGE_PAGE_NODE, (uiPortal.getSelectedNode() != null
- ? uiPortal.getSelectedNode().getUri() : null));
- uiPortal.broadcast(pnevent, Event.Phase.PROCESS);
+ PortalRequestContext pcontext = Util.getPortalRequestContext();
+ pcontext.setFullRender(true);
+ pcontext.addUIComponentToUpdateByAjax(uiWorkingWS);
+
JavascriptManager jsManager = event.getRequestContext().getJavascriptManager();
jsManager.addJavascript("eXo.portal.portalMode=" + UIPortalApplication.NORMAL_MODE + ";");
}
@@ -655,7 +655,7 @@
* @author <a href="trong.tran(a)exoplatform.com">Trong Tran</a>
* @version $Revision$
*/
- static public class Finish2ActionListener extends EventListener<UIPortalComposer>
+ static public class FinishPageEditionActionListener extends EventListener<UIPortalComposer>
{
public void execute(Event<UIPortalComposer> event) throws Exception
{
@@ -673,14 +673,15 @@
uiWorkingWS.getApplicationComponent(UserPortalConfigService.class);
/*
- * if it is a edition of the current page
+ * if it is a edition of the current page and it is not available to current remote user anymore.
*/
+ PortalRequestContext pContext = Util.getPortalRequestContext();
if (page.getStorageId() != null && portalConfigService.getPage(pageId) == null)
{
uiPortalApp.addMessage(new ApplicationMessage("UIPageBrowser.msg.PageNotExist", new String[]{pageId}, 1));
uiPortalApp.setModeState(UIPortalApplication.NORMAL_MODE);
uiWorkingWS.setRenderedChild(UIPortalApplication.UI_VIEWING_WS_ID);
- Util.getPortalRequestContext().setFullRender(true);
+ pContext.setFullRender(true);
PageNodeEvent<UIPortal> pnevent =
new PageNodeEvent<UIPortal>(uiPortal, PageNodeEvent.CHANGE_PAGE_NODE,
(uiPortal.getSelectedNode() != null ? uiPortal.getSelectedNode().getUri() : null));
@@ -737,7 +738,7 @@
}
uiPortalApp.setModeState(UIPortalApplication.NORMAL_MODE);
uiWorkingWS.setRenderedChild(UIPortalApplication.UI_VIEWING_WS_ID);
- Util.getPortalRequestContext().setFullRender(true);
+ pContext.setFullRender(true);
PageNodeEvent<UIPortal> pnevent =
new PageNodeEvent<UIPortal>(uiPortal, PageNodeEvent.CHANGE_PAGE_NODE, (uiPortal.getSelectedNode() != null
? uiPortal.getSelectedNode().getUri() : null));
Modified: portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/util/Util.java
===================================================================
--- portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/util/Util.java 2010-08-19 08:18:22 UTC (rev 3867)
+++ portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/util/Util.java 2010-08-19 09:17:49 UTC (rev 3868)
@@ -19,11 +19,12 @@
package org.exoplatform.portal.webui.util;
+import org.exoplatform.container.ExoContainer;
import org.exoplatform.portal.application.PortalRequestContext;
import org.exoplatform.portal.config.UserPortalConfigService;
import org.exoplatform.portal.config.model.Page;
+import org.exoplatform.portal.config.model.PageNavigation;
import org.exoplatform.portal.config.model.PageNode;
-import org.exoplatform.portal.webui.application.UIPortlet;
import org.exoplatform.portal.webui.container.UIContainer;
import org.exoplatform.portal.webui.page.UIDesktopPage;
import org.exoplatform.portal.webui.page.UIPage;
@@ -38,6 +39,7 @@
import org.exoplatform.webui.core.UIComponentDecorator;
import org.exoplatform.webui.event.Event;
+import java.util.ArrayList;
import java.util.List;
/**
@@ -45,6 +47,144 @@
*/
public class Util
{
+ /**
+ * Split given <code>path</code> into an array of valid node's names.
+ * The node names in the <code>path</code> parameter are separated by the "/" forward slash.
+ * An empty node name is not accepted and will be ignored
+ * <p> For examples:</p>
+ * <table cellpadding=1 cellspacing=0>
+ * <tr>
+ * <th>Path</th>
+ * <th>Result</th>
+ * </tr>
+ * <tr>
+ * <td align=center>administration/registry</td>
+ * <td><tt>{ "administration", "registry" }</tt></td>
+ * </tr>
+ * <tr>
+ * <td align=center>/administration/registry/</td>
+ * <td><tt>{ "administration", "registry" }</tt></td>
+ * </tr>
+ * <tr>
+ * <td align=center>/administration//registry</td>
+ * <td><tt>{ "administration", "registry" }</tt></td>
+ * </tr>
+ * </table>
+ * <p/>
+ * @param path
+ * @return
+ */
+ static private String[] splitPath(String path)
+ {
+ String[] split = path.split("/", 0);
+ List<String> nodeNames = new ArrayList<String>();
+
+ for (String name : split)
+ {
+ if (name.trim().length() > 0)
+ {
+ nodeNames.add(name);
+ }
+ }
+ return nodeNames.toArray(new String[nodeNames.size()]);
+ }
+
+
+ /**
+ * Return the first available child node from the <code>nav</code> parameter
+ * that the current remote user can view its page.
+ * <p/>
+ * If there is not any an available node in the <code>nav</code> navigation.
+ * The method will returns the "notfound"node if it's existing, otherwise is the <code>null</code> value
+ *
+ * @param nav
+ * @return
+ * @throws Exception
+ */
+ static public PageNode findFirstAvailableNode(PageNavigation nav, PortalRequestContext context) throws Exception
+ {
+ PageNode node = null;
+ if (nav != null && nav.getNodes().size() > 0)
+ {
+ ExoContainer appContainer = context.getApplication().getApplicationServiceContainer();
+ UserPortalConfigService userPortalConfigService =
+ (UserPortalConfigService)appContainer.getComponentInstanceOfType(UserPortalConfigService.class);
+
+ for (PageNode pageNode : nav.getNodes())
+ {
+ Page page = userPortalConfigService.getPage(pageNode.getPageReference(), context.getRemoteUser());
+ if (page != null)
+ {
+ node = pageNode;
+ if (!"notfound".equals(node.getName()))
+ break;
+ }
+ }
+ }
+ else
+ {
+ return null;
+ }
+ return node;
+ }
+
+ static public Object[] findBestMatchNavigationAndNode(List<PageNavigation> navigations, String nodePath_)
+ {
+ PageNavigation targetNav = null;
+ PageNode targetNode = null;
+
+ if (nodePath_.length() > 0)
+ {
+ String[] pathNodes = splitPath(nodePath_);
+ if (pathNodes.length > 0)
+ {
+ int lastDeepMatchNumber = 0;
+
+ for (PageNavigation nav : navigations)
+ {
+ int deepMatchNumber = 0;
+ PageNode currentNode = nav.getNode(pathNodes[deepMatchNumber++]);
+ if (currentNode == null) {
+ continue;
+ }
+ while (deepMatchNumber < pathNodes.length)
+ {
+ PageNode tempNode = currentNode.getChild(pathNodes[deepMatchNumber]);
+ if (tempNode == null)
+ {
+ break;
+ }
+ ++deepMatchNumber;
+ currentNode = tempNode;
+ }
+
+ //The whole pathNodes matches current navigation
+ if (deepMatchNumber == pathNodes.length)
+ {
+ targetNav = nav;
+ targetNode = currentNode;
+ break;
+ }
+
+ if (deepMatchNumber > lastDeepMatchNumber)
+ {
+ lastDeepMatchNumber = deepMatchNumber;
+ targetNav = nav;
+ targetNode = currentNode;
+ }
+ }
+ }
+ }
+ Object[] results = null;
+ if(targetNav != null)
+ {
+ results = new Object[2];
+ results[0] = targetNav;
+ results[1] = targetNode;
+ }
+ return results;
+ }
+
static public PortalRequestContext getPortalRequestContext()
{
WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
@@ -121,56 +261,6 @@
return uiWork;
}
- static public void showPortalComponentLayoutMode(UIPortalApplication uiPortalApp)
- {
- UIWorkingWorkspace uiWorkingWS = uiPortalApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
- uiWorkingWS.setRenderedChild(UIPortal.class);
- UIPortal uiPortal = uiWorkingWS.findFirstComponentOfType(UIPortal.class);
-
- UIContainer uiContainer = Util.findUIComponent(uiPortal, UIContainer.class, UIPage.class);
- UIPage uiPage = uiPortal.findFirstComponentOfType(UIPage.class);
- UIPortlet uiPortlet = Util.findUIComponent(uiPortal, UIPortlet.class, UIPage.class);
-
- String name = "";
- if (uiContainer != null && uiContainer.isShowEditControl())
- name = "'UIContainer'";
- else if (uiPage != null && uiPage.isShowEditControl())
- name = "'UIPage'";
- else if (uiPortlet != null && uiPortlet.isShowEditControl())
- name = "'UIPortlet'";
-
- getPortalRequestContext().getJavascriptManager().addCustomizedOnLoadScript(
- "eXo.portal.UIPortal.showLayoutModeForPortal(" + name + ");");
- }
-
- // public UIPortlet getFirstUIPortlet(UIContainer uiContainer){
- // return
- // }
-
- // public UIContainer getFirstUIContainer(){
- // return (UIContainer)Util.findUIComponent(UIContainer uiContainer, UIContainer.class, UIPage.class);
- // }
-
- static public void showPageComponentLayoutMode(UIPortalApplication uiPortalApp)
- {
- UIWorkingWorkspace uiWorkingWS = uiPortalApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
- uiWorkingWS.setRenderedChild(UIPortalToolPanel.class);
- UIPortalToolPanel uiPortalToolPanel = uiWorkingWS.findFirstComponentOfType(UIPortalToolPanel.class);
-
- UIPage uiPage = uiPortalToolPanel.findFirstComponentOfType(UIPage.class);
- UIContainer uiContainer = uiPage.findFirstComponentOfType(UIContainer.class);
- UIPortlet uiPortlet = uiPage.findFirstComponentOfType(UIPortlet.class);
-
- String name = "";
- if (uiContainer != null && uiContainer.isShowEditControl())
- name = "UIContainer";
- else if (uiPortlet != null && uiPortlet.isShowEditControl())
- name = "UIPortlet";
-
- getPortalRequestContext().getJavascriptManager().addCustomizedOnLoadScript(
- "eXo.portal.UIPortal.showLayoutModeForPage('" + name + "');");
- }
-
@SuppressWarnings("unchecked")
static public <T extends UIComponent> T findUIComponent(UIComponent uiComponent, Class<T> clazz, Class ignoreClazz)
{
Modified: portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIMainActionListener.java
===================================================================
--- portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIMainActionListener.java 2010-08-19 08:18:22 UTC (rev 3867)
+++ portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIMainActionListener.java 2010-08-19 09:17:49 UTC (rev 3868)
@@ -77,8 +77,8 @@
UIPortalComposer portalComposer =
uiWorkingWS.findFirstComponentOfType(UIPortalComposer.class).setRendered(true);
- portalComposer.setComponentConfig(UIPortalComposer.class, "UIPageEditor");
- portalComposer.setId("UIPageEditor");
+ portalComposer.setComponentConfig(UIPortalComposer.class, UIPortalComposer.UIPAGE_EDITOR);
+ portalComposer.setId(UIPortalComposer.UIPAGE_EDITOR);
portalComposer.setShowControl(true);
portalComposer.setEditted(false);
portalComposer.setCollapse(false);
@@ -119,8 +119,8 @@
UIPortalComposer portalComposer = uiWorkingWS.findFirstComponentOfType(UIPortalComposer.class);
portalComposer.setRendered(false);
- portalComposer.setComponentConfig(UIPortalComposer.class, "UIPageEditor");
- portalComposer.setId("UIPageEditor");
+ portalComposer.setComponentConfig(UIPortalComposer.class, UIPortalComposer.UIPAGE_EDITOR);
+ portalComposer.setId(UIPortalComposer.UIPAGE_EDITOR);
portalComposer.setShowControl(true);
portalComposer.setEditted(true);
portalComposer.setCollapse(false);
@@ -138,7 +138,7 @@
{
UIPortal currentPortal = Util.getUIPortal();
UserACL userACL = Util.getUIPortalApplication().getApplicationComponent(UserACL.class);
- PageNavigation selectedNavigation = currentPortal.getSelectedNavigation();
+ PageNavigation selectedNavigation = currentPortal.getNavigation();
if (PortalConfig.PORTAL_TYPE.equals(selectedNavigation.getOwnerType()))
{
return userACL.hasEditPermissionOnPortal(currentPortal.getOwnerType(), currentPortal.getOwner(), currentPortal.getEditPermission());
@@ -184,8 +184,7 @@
UIPortal newPortal = uiWorkingWS.createUIComponent(UIPortal.class, null, null);
PortalDataMapper.toUIPortal(newPortal, userConfig);
newPortal.setSelectedNode(uiPortal.getSelectedNode());
- newPortal.setSelectedNavigation(uiPortal.getSelectedNavigation());
- newPortal.setSelectedPath(uiPortal.getSelectedPath());
+ newPortal.setNavigation(uiPortal.getNavigation());
newPortal.refreshUIPage();
UIEditInlineWorkspace uiEditWS = uiWorkingWS.getChild(UIEditInlineWorkspace.class);
@@ -198,7 +197,7 @@
uiComposer.setShowControl(true);
uiComposer.setEditted(false);
uiComposer.setCollapse(false);
- uiComposer.setId("UIPortalComposer");
+ uiComposer.setId(UIPortalComposer.UIPORTAL_COMPOSER);
uiWorkingWS.setRenderedChild(UIEditInlineWorkspace.class);
pcontext.addUIComponentToUpdateByAjax(uiWorkingWS);
Modified: portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIPortalApplication.java
===================================================================
--- portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIPortalApplication.java 2010-08-19 08:18:22 UTC (rev 3867)
+++ portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIPortalApplication.java 2010-08-19 09:17:49 UTC (rev 3868)
@@ -36,8 +36,8 @@
import org.exoplatform.portal.resource.SkinURL;
import org.exoplatform.portal.webui.application.UIPortlet;
import org.exoplatform.portal.webui.navigation.PageNavigationUtils;
+import org.exoplatform.portal.webui.page.UIPageActionListener.ChangeNodeActionListener;
import org.exoplatform.portal.webui.page.UISiteBody;
-import org.exoplatform.portal.webui.portal.PageNodeEvent;
import org.exoplatform.portal.webui.portal.UIPortal;
import org.exoplatform.portal.webui.util.PortalDataMapper;
import org.exoplatform.portal.webui.util.Util;
@@ -52,11 +52,11 @@
import org.exoplatform.web.application.javascript.JavascriptConfigService;
import org.exoplatform.webui.application.WebuiRequestContext;
import org.exoplatform.webui.config.annotation.ComponentConfig;
+import org.exoplatform.webui.config.annotation.EventConfig;
import org.exoplatform.webui.core.UIApplication;
import org.exoplatform.webui.core.UIComponent;
import org.exoplatform.webui.core.UIComponentDecorator;
import org.exoplatform.webui.core.UIContainer;
-import org.exoplatform.webui.event.Event;
import java.io.Writer;
import java.util.ArrayList;
@@ -68,7 +68,6 @@
import java.util.Map;
import java.util.Set;
-
/**
* This extends the UIApplication and hence is a sibling of UIPortletApplication
* (used by any eXo Portlets as the Parent class to build the portlet component
@@ -78,7 +77,8 @@
* display the normal or webos portal layouts - UIPopupWindow: a popup window
* that display or not
*/
-@ComponentConfig(lifecycle = UIPortalApplicationLifecycle.class, template = "system:/groovy/portal/webui/workspace/UIPortalApplication.gtmpl")
+@ComponentConfig(lifecycle = UIPortalApplicationLifecycle.class, template = "system:/groovy/portal/webui/workspace/UIPortalApplication.gtmpl", events = {
+ @EventConfig(listeners = ChangeNodeActionListener.class)})
public class UIPortalApplication extends UIApplication
{
public static final int NORMAL_MODE = 0;
@@ -93,7 +93,7 @@
private int modeState = NORMAL_MODE;
- private String nodePath_;
+ private String lastNodePath;
private Orientation orientation_ = Orientation.LT;
@@ -326,6 +326,16 @@
return (modeState != NORMAL_MODE);
}
+ public String getLastNodePath()
+ {
+ return lastNodePath;
+ }
+
+ public void setLastNodePath(String lastNodePath)
+ {
+ this.lastNodePath = lastNodePath;
+ }
+
public Collection<String> getJavascriptURLs()
{
JavascriptConfigService service = getApplicationComponent(JavascriptConfigService.class);
@@ -512,30 +522,6 @@
}
/**
- * The processDecode() method is doing 3 actions:
- * 1) if the nodePath is null (case of the first request) a call to
- * super.processDecode(context) is made and we end the method here
- * 2) if the nodePath exist but is equals to the current one
- * then we also call super and stops here
- * 3) if the requested nodePath is not equals to the current one or current
- * page no longer exists, then an event of type PageNodeEvent.CHANGE_PAGE_NODE
- * is sent to the associated EventListener; a call to super is then done
- */
- public void processDecode(WebuiRequestContext context) throws Exception
- {
- PortalRequestContext pcontext = (PortalRequestContext)context;
- String nodePath = pcontext.getNodePath().trim();
-
- if (!nodePath.equals(nodePath_) || !isPageExist())
- {
- nodePath_ = nodePath;
- PageNodeEvent<UIPortal> pnevent = new PageNodeEvent<UIPortal>(showedUIPortal, PageNodeEvent.CHANGE_PAGE_NODE, nodePath_);
- showedUIPortal.broadcast(pnevent, Event.Phase.PROCESS);
- }
- super.processDecode(context);
- }
-
- /**
* The processrender() method handles the creation of the returned HTML
* either for a full page render or in the case of an AJAX call The first
* request, Ajax is not enabled (means no ajaxRequest parameter in the
13 years, 10 months
gatein SVN: r3867 - exo/portal/branches/3.1.x.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2010-08-19 04:18:22 -0400 (Thu, 19 Aug 2010)
New Revision: 3867
Modified:
exo/portal/branches/3.1.x/pom.xml
Log:
- better maven impl for database test profile
- update stable profile to latest release
Modified: exo/portal/branches/3.1.x/pom.xml
===================================================================
--- exo/portal/branches/3.1.x/pom.xml 2010-08-19 07:10:47 UTC (rev 3866)
+++ exo/portal/branches/3.1.x/pom.xml 2010-08-19 08:18:22 UTC (rev 3867)
@@ -797,17 +797,19 @@
<profile>
<id>stable</id>
<properties>
- <org.exoplatform.kernel.version>2.2.2-GA</org.exoplatform.kernel.version>
- <org.exoplatform.core.version>2.3.2-GA</org.exoplatform.core.version>
- <org.exoplatform.ws.version>2.1.2-GA</org.exoplatform.ws.version>
- <org.exoplatform.jcr.version>1.12.2-GA</org.exoplatform.jcr.version>
+ <org.exoplatform.kernel.version>2.2.3-GA</org.exoplatform.kernel.version>
+ <org.exoplatform.core.version>2.3.3-GA</org.exoplatform.core.version>
+ <org.exoplatform.ws.version>2.1.3-GA</org.exoplatform.ws.version>
+ <org.exoplatform.jcr.version>1.12.3-GA</org.exoplatform.jcr.version>
</properties>
</profile>
<profile>
<id>hsqldb</id>
<activation>
- <activeByDefault>true</activeByDefault>
+ <property>
+ <name>!nohsqldb</name>
+ </property>
</activation>
<dependencies>
<dependency>
@@ -853,6 +855,7 @@
</plugins>
</build>
</profile>
+ <!-- To activate mysql5 profile use: "-Pmysql5 -Dnohsqldb" -->
<profile>
<id>mysql5</id>
<dependencies>
13 years, 10 months
gatein SVN: r3866 - portal/trunk/testsuite/testdefinitions.
by do-not-reply@jboss.org
Author: arthurpeltier
Date: 2010-08-19 03:10:47 -0400 (Thu, 19 Aug 2010)
New Revision: 3866
Added:
portal/trunk/testsuite/testdefinitions/eXo_SniffTest_GateIn_3.1.0_TestDefinition.ods
Removed:
portal/trunk/testsuite/testdefinitions/eXo_SniffTest_GateIn_3.1.0_TestDefinition.ods.ods
Log:
TESTVN-1381 : New sniff test format
Added: portal/trunk/testsuite/testdefinitions/eXo_SniffTest_GateIn_3.1.0_TestDefinition.ods
===================================================================
(Binary files differ)
Property changes on: portal/trunk/testsuite/testdefinitions/eXo_SniffTest_GateIn_3.1.0_TestDefinition.ods
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: portal/trunk/testsuite/testdefinitions/eXo_SniffTest_GateIn_3.1.0_TestDefinition.ods.ods
===================================================================
(Binary files differ)
13 years, 10 months
gatein SVN: r3865 - in portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin: portal/webui/component/control/UIWorkspace/background and 17 other directories.
by do-not-reply@jboss.org
Author: thuy.nguyen
Date: 2010-08-19 00:01:39 -0400 (Thu, 19 Aug 2010)
New Revision: 3865
Removed:
portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/control/UIExoStart/
portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/control/UIWorkspace/background/No-Repeat.gif
portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/control/UIWorkspace/background/Repeat-y.gif
portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/customization/UIChangePortalForm/
portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/customization/UIPortalBrowser/
portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/customization/UIPortalSettingForm/
portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/customization/UIPortletForm/
portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/UIWidgets/
portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/widget/UIWelcomeComponent/
portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/widget/UIWidgetContainerManagement/
portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIBarDecorator/UIAction/background/BtnBg.gif
portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIBarDecorator/UIAction/background/DisabledStyle.gif
portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIBarDecorator/UIAction/background/NormalStyle.gif
portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIBarDecorator/UIBarStyle/background/ControlBar.gif
portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIBarDecorator/UIBarStyle/background/NavyBluePolygonBar32Style.gif
portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIBarDecorator/UIBarStyle/background/RoundedBarStyle.gif
portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIBarDecorator/UIBarStyle/background/Style3.gif
portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIBarDecorator/UIBarStyle/background/WhiteRoundedBarStyle.gif
portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIBarDecorator/UIBoxDecorator/background/MRBarDecorator.gif
portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIBarDecorator/UIDecorator/
portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIBarDecorator/UIInfoBar/background/MRoundedStyle1x21.gif
portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIBarDecorator/UIInfoBar/background/MSmoothStyle1x22.gif
portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIBarDecorator/UIInfoBar/background/RoundedStyle.gif
portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UICombobox/
portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIForms/UIFormInputDecoratorSelector/
portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIToolbar/background/ControlToolbar.gif
portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIToolbar/background/EditToolbar.gif
portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIWizard/background/WelcomeImage197x233.png
Modified:
portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/customization/Stylesheet.css
portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/customization/UIAccountSettingForm/Stylesheet.css
portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/Stylesheet.css
portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/widget/Stylesheet.css
portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/Stylesheet.css
portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIBarDecorator/Stylesheet.css
portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIBarDecorator/UIAction/Stylesheet.css
portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIBarDecorator/UIBarStyle/Stylesheet.css
portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIBarDecorator/UIInfoBar/Stylesheet.css
portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIForms/Stylesheet.css
portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIToolbar/Stylesheet.css
Log:
GTNPORTAL-1251: eview and clean up CSS in GateIn
Deleted: portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/control/UIWorkspace/background/No-Repeat.gif
===================================================================
(Binary files differ)
Deleted: portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/control/UIWorkspace/background/Repeat-y.gif
===================================================================
(Binary files differ)
Modified: portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/customization/Stylesheet.css
===================================================================
--- portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/customization/Stylesheet.css 2010-08-19 02:24:35 UTC (rev 3864)
+++ portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/customization/Stylesheet.css 2010-08-19 04:01:39 UTC (rev 3865)
@@ -19,12 +19,9 @@
@import url(UIContainerList/Stylesheet.css);
@import url(UIPageBrowser/Stylesheet.css);
-@import url(UIPortalBrowser/Stylesheet.css);
@import url(UIPageSelector/Stylesheet.css);
@import url(UIPortalToolPanel/Stylesheet.css);
@import url(UIDescription/Stylesheet.css);
@import url(UIChangeSkinForm/Stylesheet.css);
@import url(UIChangeLanguageForm/Stylesheet.css);
-@import url(UIChangePortalForm/Stylesheet.css);
-@import url(UIAccountSettingForm/Stylesheet.css);
-@import url(UIPortalSettingForm/Stylesheet.css);
\ No newline at end of file
+@import url(UIAccountSettingForm/Stylesheet.css);
Modified: portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/customization/UIAccountSettingForm/Stylesheet.css
===================================================================
--- portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/customization/UIAccountSettingForm/Stylesheet.css 2010-08-19 02:24:35 UTC (rev 3864)
+++ portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/customization/UIAccountSettingForm/Stylesheet.css 2010-08-19 04:01:39 UTC (rev 3865)
@@ -134,14 +134,10 @@
}
.UIAccountSettingForm .UIForm .HorizontalLayout {
- border-top: 1px solid white;
- border-right: none;
- border-left: none;
- border-bottom: none;
height: 165px;
padding: 25px 0px;
}
.UIAccountSettingForm .UIForm .UIAction {
padding-top: 18px;
-}
\ No newline at end of file
+}
Modified: portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/Stylesheet.css
===================================================================
--- portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/Stylesheet.css 2010-08-19 02:24:35 UTC (rev 3864)
+++ portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/view/Stylesheet.css 2010-08-19 04:01:39 UTC (rev 3865)
@@ -20,7 +20,6 @@
@import url(UIPortalComponent/Stylesheet.css);
@import url(UIPage/Stylesheet.css);
@import url(UITabContainer/Stylesheet.css);
-@import url(UIWidgets/Stylesheet.css);
@import url(UIGadget/Stylesheet.css);
@import url(UIDashboard/Stylesheet.css);
-@import url(UIToolbarContainer/Stylesheet.css);
\ No newline at end of file
+@import url(UIToolbarContainer/Stylesheet.css);
Modified: portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/widget/Stylesheet.css
===================================================================
--- portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/widget/Stylesheet.css 2010-08-19 02:24:35 UTC (rev 3864)
+++ portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/widget/Stylesheet.css 2010-08-19 04:01:39 UTC (rev 3865)
@@ -18,6 +18,4 @@
*/
@import url(UIUserSpace/Stylesheet.css);
-@import url(UILoginForm/Stylesheet.css);
-@import url(UIWelcomeComponent/Stylesheet.css);
-@import url(UIWidgetContainerManagement/Stylesheet.css);
\ No newline at end of file
+@import url(UILoginForm/Stylesheet.css);
Modified: portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/Stylesheet.css
===================================================================
--- portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/Stylesheet.css 2010-08-19 02:24:35 UTC (rev 3864)
+++ portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/Stylesheet.css 2010-08-19 04:01:39 UTC (rev 3865)
@@ -21,7 +21,6 @@
@import url(UIBreadcumbs/Stylesheet.css);
@import url(UICalendar/Stylesheet.css);
-@import url(UICombobox/Stylesheet.css);
@import url(UIColorPicker/Stylesheet.css);
@import url(UIMouseActionBackground/Stylesheet.css);
@import url(UIGrid/Stylesheet.css);
Modified: portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIBarDecorator/Stylesheet.css
===================================================================
--- portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIBarDecorator/Stylesheet.css 2010-08-19 02:24:35 UTC (rev 3864)
+++ portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIBarDecorator/Stylesheet.css 2010-08-19 04:01:39 UTC (rev 3865)
@@ -20,5 +20,4 @@
@import url(UIAction/Stylesheet.css);
@import url(UIBarStyle/Stylesheet.css);
@import url(UIBoxDecorator/Stylesheet.css);
-@import url(UIDecorator/Stylesheet.css);
-@import url(UIInfoBar/Stylesheet.css);
\ No newline at end of file
+@import url(UIInfoBar/Stylesheet.css);
Modified: portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIBarDecorator/UIAction/Stylesheet.css
===================================================================
--- portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIBarDecorator/UIAction/Stylesheet.css 2010-08-19 02:24:35 UTC (rev 3864)
+++ portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIBarDecorator/UIAction/Stylesheet.css 2010-08-19 04:01:39 UTC (rev 3865)
@@ -52,52 +52,6 @@
background-repeat: no-repeat;
}
-/*##############################-Normal ActionButton-################################*/
-
-.UIAction .NormalStyle {
-}
-
-.UIAction .NormalStyle .ButtonLeft {
- background: url('background/NormalStyle.gif') no-repeat left top;
- padding: 0px 0px 0px 3px;
-}
-
-.UIAction .NormalStyle .ButtonRight {
- background: url('background/NormalStyle.gif') no-repeat right top;
- padding: 0px 3px 0px 0px ;
-}
-
-.UIAction .NormalStyle .ButtonMiddle {
- line-height: 22px;
- background: url('background/NormalStyle.gif') repeat-x bottom;
- padding: 0px 12px;
- display: table-cell;
- white-space: nowrap;
-}
-
-/*##############################-Disabled ActionButton-################################*/
-
-.UIAction .DisabledStyle {
-}
-
-.UIAction .DisabledStyle .ButtonLeft {
- background: url('background/DisabledStyle.gif') no-repeat left top;
- padding: 0px 0px 0px 3px;
-}
-
-.UIAction .DisabledStyle .ButtonRight {
- background: url('background/DisabledStyle.gif') no-repeat right top;
- padding: 0px 3px 0px 0px ;
-}
-
-.UIAction .DisabledStyle .ButtonMiddle {
- height: 22px; text-align: center;
- background: url('background/DisabledStyle.gif') repeat-x bottom;
- padding: 0px 12px;
- display: table-cell;
-}
-
-
/*##############################-LightBlueStyle ActionButton-################################*/
.UIAction .LightBlueStyle .ButtonLeft {
@@ -184,62 +138,4 @@
line-height: 20px;
padding-left: 22px; /* orientation=lt */
padding-right: 22px; /* orientation=rt */
-}
-
-/***************************** BlueButton ***************************/
-
-.UIAction .BlueButton .ButtonLeft {
- background: url('background/BtnBg.gif') no-repeat left top;
- padding-left: 8px;
-}
-
-.UIAction .BlueButton .ButtonRight {
- background: url('background/BtnBg.gif') no-repeat right top;
- padding-right: 9px;
-}
-
-.UIAction .BlueButton .ButtonMiddle {
- background: url('background/BtnBg.gif') repeat-x left -32px;
- line-height: 32px;
- font-size: 12px;
- display: block;
- padding: 0px 15px 0px 15px;
-}
-
-.UIAction .BlueButton .ButtonMiddle a {
- font-weight: bold;
- color: #1d1d1d;
-}
-
-.UIAction .BlueButton .ButtonMiddle a:hover {
- color: white;
-}
-
-/**********************DarkGrayButton***********************/
-
-.UIAction .DarkGrayButton .ButtonLeft {
- background: url('background/BtnBg.gif') no-repeat left -64px;
- padding-left: 7px;
-}
-
-.UIAction .DarkGrayButton .ButtonRight{
- background: url('background/BtnBg.gif') no-repeat right -64px;
- padding-right: 6px;
-}
-
-.UIAction .DarkGrayButton .ButtonMiddle {
- background: url('background/BtnBg.gif') repeat-x left -96px;
- line-height: 32px;
- padding: 0px 15px 0px 15px;
- font-size: 12px;
- display: block;
-}
-
-.UIAction .DarkGrayButton .ButtonMiddle a {
- font-weight: bold;
- color: #1d1d1d;
-}
-
-.UIAction .DarkGrayButton .ButtonMiddle a:hover {
- color: white;
-}
\ No newline at end of file
+}
Deleted: portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIBarDecorator/UIAction/background/BtnBg.gif
===================================================================
(Binary files differ)
Deleted: portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIBarDecorator/UIAction/background/DisabledStyle.gif
===================================================================
(Binary files differ)
Deleted: portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIBarDecorator/UIAction/background/NormalStyle.gif
===================================================================
(Binary files differ)
Modified: portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIBarDecorator/UIBarStyle/Stylesheet.css
===================================================================
--- portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIBarDecorator/UIBarStyle/Stylesheet.css 2010-08-19 02:24:35 UTC (rev 3864)
+++ portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIBarDecorator/UIBarStyle/Stylesheet.css 2010-08-19 04:01:39 UTC (rev 3865)
@@ -16,53 +16,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-
-/*###########################-RoundedBarStyle-###########################*/
-
-.UIBarStyle .RoundedBarStyle {
- height: 25px;
-}
-.UIBarStyle .RoundedBarStyle .LeftBar {
- background: url('background/RoundedBarStyle.gif') no-repeat top left;
- padding: 0px 0px 0px 8px;
-}
-
-.UIBarStyle .RoundedBarStyle .RightBar {
- background: url('background/RoundedBarStyle.gif') no-repeat top right;
- padding: 0px 8px 0px 0px;
-}
-
-.UIBarStyle .RoundedBarStyle .MiddleBar {
- height: 25px;
- line-height: 25px;
- background: url('background/RoundedBarStyle.gif') repeat-x bottom;
-}
-
-/*###########################-WhiteRoundedBarStyle-###########################*/
-
-.UIBarStyle .WhiteRoundedBarStyle {
- height: 25px;
-}
-
-.UIBarStyle .WhiteRoundedBarStyle .LeftBar {
- background: url('background/WhiteRoundedBarStyle.gif') no-repeat left;
- padding: 0px 0px 0px 12px;
-}
-
-.UIBarStyle .WhiteRoundedBarStyle .RightBar {
- background: url('background/WhiteRoundedBarStyle.gif') no-repeat right;
- padding: 0px 12px 0px 0px;
-}
-
-.UIBarStyle .WhiteRoundedBarStyle .MiddleBar {
- height: 25px;
- line-height: 25px;
- background: white;
- border-top: solid 1px #c0bfbf;
- border-bottom: solid 1px #c0bfbf;
-}
-
/*###########################-BarStyle2-###########################*/
.UIBarStyle .BarStyle2 {
@@ -86,50 +40,6 @@
line-height: 39px;
background: url('background/BarStyle2.gif') repeat-x bottom;
}
-
-/*###########################-NavyBluePolygonBar32Style-###########################*/
-
-.UIBarStyle .NavyBluePolygonBar32Style {
- height: 32px;
-}
-
-.UIBarStyle .NavyBluePolygonBar32Style .LeftBar {
- background: url('background/NavyBluePolygonBar32Style.gif') no-repeat top left;
- padding: 0px 0px 0px 3px;
-}
-
-.UIBarStyle .NavyBluePolygonBar32Style .RightBar {
- background: url('background/NavyBluePolygonBar32Style.gif') no-repeat top right;
- padding: 0px 3px 0px 0px;
-}
-
-.UIBarStyle .NavyBluePolygonBar32Style .MiddleBar {
- line-height: 32px;
- background: url('background/NavyBluePolygonBar32Style.gif') repeat-x bottom;
-}
-
-/*###########################-Style3Bar-###########################*/
-
-.UIBarStyle .Style3 {
- height: 26px;
-}
-
-.UIBarStyle .Style3 .LeftBar {
- background: url('background/Style3.gif') no-repeat top left;
- padding: 0px 0px 0px 3px;
-}
-
-.UIBarStyle .Style3 .RightBar {
- background: url('background/Style3.gif') no-repeat top right;
- padding: 0px 3px 0px 0px;
-}
-
-.UIBarStyle .Style3 .MiddleBar {
- height: 26px;
- line-height: 26px;
- background: url('background/Style3.gif') repeat-x bottom;
-}
-
/*###########################-SmoothNavy40Style-###########################*/
.UIBarStyle .SmoothNavy40Style {
@@ -153,23 +63,6 @@
background: url('background/SmoothNavy40Style.gif') repeat-x bottom;
}
-/*###########################-ControlBar-###########################*/
-
-.UIBarStyle .ControlBar .LeftBar {
- background: url('background/ControlBar.gif') no-repeat top left;
- padding: 0px 0px 0px 12px;
-}
-
-.UIBarStyle .ControlBar .RightBar {
- padding: 0px;
-}
-
-.UIBarStyle .ControlBar .MiddleBar {
- background: url('background/ControlBar.gif') repeat-x bottom;
- padding: 0px 5px 0px 0px;
- height: 27px;
-}
-
/*============================== Title Bar ========================================*/
.UIBarStyle .TitleBar .LeftBar {
@@ -212,4 +105,4 @@
background: url('background/NormalBarStyle.gif') repeat-x bottom;
height: 38px;
line-height: 38px;
-}
\ No newline at end of file
+}
Deleted: portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIBarDecorator/UIBarStyle/background/ControlBar.gif
===================================================================
(Binary files differ)
Deleted: portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIBarDecorator/UIBarStyle/background/NavyBluePolygonBar32Style.gif
===================================================================
(Binary files differ)
Deleted: portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIBarDecorator/UIBarStyle/background/RoundedBarStyle.gif
===================================================================
(Binary files differ)
Deleted: portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIBarDecorator/UIBarStyle/background/Style3.gif
===================================================================
(Binary files differ)
Deleted: portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIBarDecorator/UIBarStyle/background/WhiteRoundedBarStyle.gif
===================================================================
(Binary files differ)
Deleted: portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIBarDecorator/UIBoxDecorator/background/MRBarDecorator.gif
===================================================================
(Binary files differ)
Modified: portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIBarDecorator/UIInfoBar/Stylesheet.css
===================================================================
--- portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIBarDecorator/UIInfoBar/Stylesheet.css 2010-08-19 02:24:35 UTC (rev 3864)
+++ portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIBarDecorator/UIInfoBar/Stylesheet.css 2010-08-19 04:01:39 UTC (rev 3865)
@@ -20,40 +20,6 @@
.UIInfoBar {
}
-/*######################-Rounded Style-######################*/
-
-.UIInfoBar .RoundedStyle .LeftBar {
- background: url('background/RoundedStyle.gif') no-repeat left top;
- padding: 0px 0px 0px 6px;
-}
-
-.UIInfoBar .RoundedStyle .RightBar {
- background: url('background/RoundedStyle.gif') no-repeat right top;
- padding: 0px 6px 0px 0px;
-}
-
-.UIInfoBar .RoundedStyle .MiddleBar {
- height: 25px;
- background: url('background/RoundedStyle.gif') repeat-x center bottom;
-}
-
-.UIInfoBar .RoundedStyle .MiddleBar .Icon {
- float: left; /* orientation=lt */
- float: right; /* orientation=rt */
- margin: 5px 4px 0px 6px;
-}
-
-.UIInfoBar .RoundedStyle .Title {
- float: left; /* orientation=lt */
- float: right; /* orientation=rt */
- height: 24px;
- line-height: 24px;
- font-weight: bold;
- overflow: visible;
- margin: 0px 0px 0px 5px; /* orientation=lt */
- margin: 0px 5px 0px 0px; /* orientation=rt */
-}
-
/*######################-Blue Rounded Style-######################*/
.UIInfoBar .BlueRoundedStyle {
@@ -114,45 +80,6 @@
color: black;
}
-/*######################-Simple Style-######################*/
-
-.UIInfoBar .SimpleStyle {
- background: url('background/MRoundedStyle1x21.gif') repeat-x;
- border-right: solid 1px #5f90ba; border-left: solid 1px #5f90ba;
- overflow: hidden;
-}
-
-.UIInfoBar .SimpleStyle .LeftBar {
- float: left; /* orientation=lt */
- float: right; /* orientation=rt */
- height: 21px;
- background: none;
- border-left: solid 1px #4e7180;
-}
-
-.UIInfoBar .SimpleStyle .RightBar {
- float: right; /* orientation=lt */
- float: left; /* orientation=rt */
- height: 21px;
- background: none;
- border-right: solid 1px #4e7180;
-}
-
-.UIInfoBar .SimpleStyle .MiddleBar {
- height: 21px;
- text-align: left; /* orientation=lt */
- text-align: right; /* orientation=rt */
- padding: 0px 0px 0px 10px;
-}
-
-.UIInfoBar .SimpleStyle .Title {
- float: left; /* orientation=lt */
- float: right; /* orientation=rt */
- height: 21px; line-height: 21px;
- text-align: left;
- margin: 0px 0px 0px 5px;
-}
-
/*######################-Polygon Navyblue Style-######################*/
.UIInfoBar .PolygonNavyBlueStyle {
@@ -175,19 +102,6 @@
padding: 0px 0px 0px 2px;
}
-/*######################-SmoothStyle-######################*/
-
-.UIInfoBar .SmoothStyle {
- height: 22px;
- border-left: 1px solid #7c7c7c;
- border-right: 1px solid #7c7c7c;
-}
-
-.UIInfoBar .SmoothStyle .MiddleBar {
- height: 22px;
- background: url('background/MSmoothStyle1x22.gif') repeat-x;
-}
-
/*######################-Smooth Style 26 -######################*/
.UIInfoBar .SmoothStyle26 {
@@ -207,4 +121,4 @@
.UIInfoBar .SmoothStyle26 .MiddleBar {
height: 26px;
background: url('background/SmoothStyle26.gif') repeat-x center bottom;
-}
\ No newline at end of file
+}
Deleted: portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIBarDecorator/UIInfoBar/background/MRoundedStyle1x21.gif
===================================================================
(Binary files differ)
Deleted: portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIBarDecorator/UIInfoBar/background/MSmoothStyle1x22.gif
===================================================================
(Binary files differ)
Deleted: portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIBarDecorator/UIInfoBar/background/RoundedStyle.gif
===================================================================
(Binary files differ)
Modified: portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIForms/Stylesheet.css
===================================================================
--- portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIForms/Stylesheet.css 2010-08-19 02:24:35 UTC (rev 3864)
+++ portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIForms/Stylesheet.css 2010-08-19 04:01:39 UTC (rev 3865)
@@ -18,6 +18,5 @@
*/
@import url(UIForm/Stylesheet.css);
-@import url(UIFormInputDecoratorSelector/Stylesheet.css);
@import url(UIFormTabPane/Stylesheet.css);
@import url(UIFormWithTitle/Stylesheet.css);
Modified: portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIToolbar/Stylesheet.css
===================================================================
--- portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIToolbar/Stylesheet.css 2010-08-19 02:24:35 UTC (rev 3864)
+++ portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIToolbar/Stylesheet.css 2010-08-19 04:01:39 UTC (rev 3865)
@@ -257,159 +257,6 @@
background: url('background/LightToolbar.gif') repeat-x bottom;
}
-/*#################################- EditToolbar -##############################*/
-
-.UIToolbar .EditToolbar {
- height: 31px;
- padding: 0px 10px 0px 10px;
-}
-
-.UIToolbar .EditToolbar .Icon {
- float: left; /* orientation=lt */
- float: right; /* orientation=rt */
- cursor: pointer;
-}
-
-.UIToolbar .EditToolbar .LeftBar {
- background: url('background/EditToolbar.gif') no-repeat left top;
- padding-left: 2px;
- height: 30px;
-}
-
-.UIToolbar .EditToolbar .RightBar {
- padding-right: 2px;
- height: 30px;
- background: url('background/EditToolbar.gif') no-repeat right top;
-}
-
-.UIToolbar .EditToolbar .MiddleBar {
- height: 30px; line-height: 30px;
- background: url('background/EditToolbar.gif') repeat-x left -30px;
-}
-
-
-
-.UIToolbar .EditToolbar .EditContainerIcon {
- width: 27px; height: 23px;
- background: url('background/EditToolbar.gif') no-repeat left -60px;
-}
-
-.UIToolbar .EditToolbar .EditPortletIcon {
- width: 27px; height: 23px;
- background: url('background/EditToolbar.gif') no-repeat left -83px;
-}
-
-.UIToolbar .EditToolbar .EditPortalIcon {
- width: 27px; height: 23px;
- background: url('background/EditToolbar.gif') no-repeat left -106px;
-}
-
-.UIToolbar .EditToolbar .LayoutModeIcon {
- width: 27px; height: 23px;
- background: url('background/EditToolbar.gif') no-repeat left -129px;
-}
-
-.UIToolbar .EditToolbar .PreviewIcon {
- width: 27px; height: 23px;
- background: url('background/EditToolbar.gif') no-repeat left -152px;
-}
-
-.UIToolbar .EditToolbar .SavePortalIcon {
- width: 21px; height: 23px;
- background: url('background/EditToolbar.png') no-repeat left -175px;
-}
-
-.UIToolbar .EditToolbar .EditPageIcon {
- width: 24px; height: 23px;
- background: url('background/EditToolbar.gif') no-repeat left -194px;
-}
-
-.UIToolbar .EditToolbar .PageLayoutModeIcon {
- width: 24px; height: 23px;
- background: url('background/EditToolbar.gif') no-repeat left -217px;
-}
-
-.UIToolbar .EditToolbar .PagePreviewIcon {
- width: 24px; height: 23px;
- background: url('background/EditToolbar.gif') no-repeat left -241px;
-}
-
-.UIToolbar .EditToolbar .SavePageIcon {
- width: 24px; height: 23px;
- background: url('background/EditToolbar.gif') no-repeat left -264px;
-}
-
-/*#################################- ControlToolbar -##############################*/
-
-.UIToolbar .ControlToolbar {
- margin: 10px 2px 0px 95px; /* orientation=lt */
- margin: 10px 95px 0px 2px; /* orientation=rt */
-}
-
-.UIToolbar .ControlToolbar .LeftBar {
- padding-left: 12px; /* orientation=lt */
- padding-right: 12px; /* orientation=rt */
- background: url('background/ControlToolbar.gif') no-repeat left top; /* orientation=lt */
- background: url('background/ControlToolbar-rt.gif') no-repeat right top; /* orientation=rt */
-}
-
-.UIToolbar .ControlToolbar .RightBar {
- padding-right: 1px; /* orientation=lt */
- padding-left: 1px; /* orientation=rt */
- background: url('background/ControlToolbar.gif') no-repeat right -27px; /* orientation=lt */
- background: url('background/ControlToolbar-rt.gif') no-repeat left -27px; /* orientation=rt */
-}
-
-.UIToolbar .ControlToolbar .MiddleBar {
- height: 27px; line-height: 27px;
- background: url('background/ControlToolbar.gif') repeat-x left -27px; /* orientation=lt */
- background: url('background/ControlToolbar-rt.gif') repeat-x right -27px; /* orientation=rt */
-}
-
-.UIToolbar .ControlToolbar .SeparateLine{
- float: left; /* orientation=lt */
- float: right; /* orientation=rt */
- width: 2px; height: 20px;
- background: url('background/SeparateLine2x1.gif') repeat-y;
- margin: 2px 2px 0px 3px;
-}
-
-.UIToolbar .ControlToolbar .Icon {
- float: left; /* orientation=lt */
- float: right; /* orientation=rt */
- margin: 3px 4px 0px 4px;
-}
-
-.UIToolbar .ControlToolbar .RollbackIcon {
- width: 24px; height: 20px;
- background: url('background/ControlToolbar.gif') no-repeat left -55px; /* orientation=lt */
- background: url('background/ControlToolbar-rt.gif') no-repeat left -55px; /* orientation=rt */
-}
-
-.UIToolbar .ControlToolbar .BackIcon {
- width: 24px; height: 20px;
- background: url('background/ControlToolbar.gif') no-repeat left -178px; /* orientation=lt */
- background: url('background/ControlToolbar-rt.gif') no-repeat left -178px; /* orientation=rt */
-}
-
-.UIToolbar .ControlToolbar .FinishIcon {
- width: 24px; height: 20px;
- background: url('background/ControlToolbar.gif') no-repeat left -76px; /* orientation=lt */
- background: url('background/ControlToolbar-rt.gif') no-repeat left -76px; /* orientation=rt */
-}
-
-.UIToolbar .ControlToolbar .SaveIcon {
- width: 24px; height: 19px;
- background: url('background/ControlToolbar.gif') no-repeat left -96px; /* orientation=lt */
- background: url('background/ControlToolbar-rt.gif') no-repeat left -96px; /* orientation=rt */
-}
-
-.UIToolbar .ControlToolbar .AbortIcon {
- width: 24px; height: 20px;
- background: url('background/ControlToolbar.gif') no-repeat left -116px; /* orientation=lt */
- background: url('background/ControlToolbar-rt.gif') no-repeat left -116px; /* orientation=rt */
-}
-
/*#################################- HeaderToolbar-##############################*/
.UIToolbar .HeaderToolbar {
Deleted: portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIToolbar/background/ControlToolbar.gif
===================================================================
(Binary files differ)
Deleted: portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIToolbar/background/EditToolbar.gif
===================================================================
(Binary files differ)
Deleted: portal/branches/branched-r3845/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIWizard/background/WelcomeImage197x233.png
===================================================================
(Binary files differ)
13 years, 10 months
gatein SVN: r3864 - exo/portal/branches/3.1.x.
by do-not-reply@jboss.org
Author: paristote
Date: 2010-08-18 22:24:35 -0400 (Wed, 18 Aug 2010)
New Revision: 3864
Modified:
exo/portal/branches/3.1.x/pom.xml
Log:
EXOGTN-39 connect the branch to snapshots dependencies
Modified: exo/portal/branches/3.1.x/pom.xml
===================================================================
--- exo/portal/branches/3.1.x/pom.xml 2010-08-18 19:22:14 UTC (rev 3863)
+++ exo/portal/branches/3.1.x/pom.xml 2010-08-19 02:24:35 UTC (rev 3864)
@@ -37,10 +37,10 @@
<name>GateIn - Portal</name>
<properties>
- <org.exoplatform.kernel.version>2.2.3-GA</org.exoplatform.kernel.version>
- <org.exoplatform.core.version>2.3.3-GA</org.exoplatform.core.version>
- <org.exoplatform.ws.version>2.1.3-GA</org.exoplatform.ws.version>
- <org.exoplatform.jcr.version>1.12.3-GA</org.exoplatform.jcr.version>
+ <org.exoplatform.kernel.version>2.2.4-GA-SNAPSHOT</org.exoplatform.kernel.version>
+ <org.exoplatform.core.version>2.3.4-GA-SNAPSHOT</org.exoplatform.core.version>
+ <org.exoplatform.ws.version>2.1.4-GA-SNAPSHOT</org.exoplatform.ws.version>
+ <org.exoplatform.jcr.version>1.12.4-GA-SNAPSHOT</org.exoplatform.jcr.version>
<org.jibx.version>1.2.1</org.jibx.version>
<org.shindig.version>1.0-r790473-Patch02</org.shindig.version>
<nl.captcha.simplecaptcha.version>1.1.1-GA-Patch01</nl.captcha.simplecaptcha.version>
13 years, 10 months
gatein SVN: r3863 - in components/wsrp/trunk: admin-gui and 9 other directories.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-08-18 15:22:14 -0400 (Wed, 18 Aug 2010)
New Revision: 3863
Modified:
components/wsrp/trunk/admin-gui/pom.xml
components/wsrp/trunk/api/pom.xml
components/wsrp/trunk/common/pom.xml
components/wsrp/trunk/consumer/pom.xml
components/wsrp/trunk/hibernate-impl/pom.xml
components/wsrp/trunk/pom.xml
components/wsrp/trunk/producer/pom.xml
components/wsrp/trunk/test/pom.xml
components/wsrp/trunk/wsrp-producer-war/pom.xml
components/wsrp/trunk/wsrp1-ws/pom.xml
components/wsrp/trunk/wsrp2-ws/pom.xml
Log:
[maven-release-plugin] prepare for next development iteration
Modified: components/wsrp/trunk/admin-gui/pom.xml
===================================================================
--- components/wsrp/trunk/admin-gui/pom.xml 2010-08-18 19:21:54 UTC (rev 3862)
+++ components/wsrp/trunk/admin-gui/pom.xml 2010-08-18 19:22:14 UTC (rev 3863)
@@ -25,7 +25,7 @@
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.0.0-Alpha01</version>
+ <version>\</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-admin-gui</artifactId>
Modified: components/wsrp/trunk/api/pom.xml
===================================================================
--- components/wsrp/trunk/api/pom.xml 2010-08-18 19:21:54 UTC (rev 3862)
+++ components/wsrp/trunk/api/pom.xml 2010-08-18 19:22:14 UTC (rev 3863)
@@ -25,7 +25,7 @@
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.0.0-Alpha01</version>
+ <version>\</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-integration-api</artifactId>
Modified: components/wsrp/trunk/common/pom.xml
===================================================================
--- components/wsrp/trunk/common/pom.xml 2010-08-18 19:21:54 UTC (rev 3862)
+++ components/wsrp/trunk/common/pom.xml 2010-08-18 19:22:14 UTC (rev 3863)
@@ -24,7 +24,7 @@
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.0.0-Alpha01</version>
+ <version>\</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-common</artifactId>
Modified: components/wsrp/trunk/consumer/pom.xml
===================================================================
--- components/wsrp/trunk/consumer/pom.xml 2010-08-18 19:21:54 UTC (rev 3862)
+++ components/wsrp/trunk/consumer/pom.xml 2010-08-18 19:22:14 UTC (rev 3863)
@@ -25,7 +25,7 @@
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.0.0-Alpha01</version>
+ <version>\</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-consumer</artifactId>
Modified: components/wsrp/trunk/hibernate-impl/pom.xml
===================================================================
--- components/wsrp/trunk/hibernate-impl/pom.xml 2010-08-18 19:21:54 UTC (rev 3862)
+++ components/wsrp/trunk/hibernate-impl/pom.xml 2010-08-18 19:22:14 UTC (rev 3863)
@@ -28,7 +28,7 @@
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.0.0-Alpha01</version>
+ <version>\</version>
</parent>
<groupId>org.gatein.wsrp</groupId>
Modified: components/wsrp/trunk/pom.xml
===================================================================
--- components/wsrp/trunk/pom.xml 2010-08-18 19:21:54 UTC (rev 3862)
+++ components/wsrp/trunk/pom.xml 2010-08-18 19:22:14 UTC (rev 3863)
@@ -29,7 +29,7 @@
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.0.0-Alpha01</version>
+ <version>\</version>
<packaging>pom</packaging>
@@ -40,9 +40,9 @@
</parent>
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/gatein/components/wsrp/tags/2.0.0-...</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/gatein/components/wsrp/tags/2.0.0-Alp...</developerConnection>
- <url>http://fisheye.jboss.org/browse/gatein/components/wsrp/tags/2.0.0-Alpha01</url>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/gatein/components/wsrp/trunk/</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/gatein/components/wsrp/trunk/</developerConnection>
+ <url>http://fisheye.jboss.org/browse/gatein/components/wsrp/trunk/</url>
</scm>
<properties>
Modified: components/wsrp/trunk/producer/pom.xml
===================================================================
--- components/wsrp/trunk/producer/pom.xml 2010-08-18 19:21:54 UTC (rev 3862)
+++ components/wsrp/trunk/producer/pom.xml 2010-08-18 19:22:14 UTC (rev 3863)
@@ -25,7 +25,7 @@
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.0.0-Alpha01</version>
+ <version>\</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-producer-lib</artifactId>
Modified: components/wsrp/trunk/test/pom.xml
===================================================================
--- components/wsrp/trunk/test/pom.xml 2010-08-18 19:21:54 UTC (rev 3862)
+++ components/wsrp/trunk/test/pom.xml 2010-08-18 19:22:14 UTC (rev 3863)
@@ -26,7 +26,7 @@
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.0.0-Alpha01</version>
+ <version>\</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: components/wsrp/trunk/wsrp-producer-war/pom.xml
===================================================================
--- components/wsrp/trunk/wsrp-producer-war/pom.xml 2010-08-18 19:21:54 UTC (rev 3862)
+++ components/wsrp/trunk/wsrp-producer-war/pom.xml 2010-08-18 19:22:14 UTC (rev 3863)
@@ -26,7 +26,7 @@
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.0.0-Alpha01</version>
+ <version>\</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: components/wsrp/trunk/wsrp1-ws/pom.xml
===================================================================
--- components/wsrp/trunk/wsrp1-ws/pom.xml 2010-08-18 19:21:54 UTC (rev 3862)
+++ components/wsrp/trunk/wsrp1-ws/pom.xml 2010-08-18 19:22:14 UTC (rev 3863)
@@ -25,7 +25,7 @@
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.0.0-Alpha01</version>
+ <version>\</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-wsrp1-ws</artifactId>
Modified: components/wsrp/trunk/wsrp2-ws/pom.xml
===================================================================
--- components/wsrp/trunk/wsrp2-ws/pom.xml 2010-08-18 19:21:54 UTC (rev 3862)
+++ components/wsrp/trunk/wsrp2-ws/pom.xml 2010-08-18 19:22:14 UTC (rev 3863)
@@ -26,7 +26,7 @@
<parent>
<artifactId>wsrp-parent</artifactId>
<groupId>org.gatein.wsrp</groupId>
- <version>2.0.0-Alpha01</version>
+ <version>\</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-wsrp2-ws</artifactId>
13 years, 10 months
gatein SVN: r3862 - components/wsrp/tags.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-08-18 15:21:54 -0400 (Wed, 18 Aug 2010)
New Revision: 3862
Added:
components/wsrp/tags/2.0.0-Alpha01/
Log:
[maven-scm] copy for tag 2.0.0-Alpha01
Copied: components/wsrp/tags/2.0.0-Alpha01 (from rev 3861, components/wsrp/trunk)
13 years, 10 months
gatein SVN: r3861 - in components/wsrp/trunk: admin-gui and 9 other directories.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-08-18 15:21:34 -0400 (Wed, 18 Aug 2010)
New Revision: 3861
Modified:
components/wsrp/trunk/admin-gui/pom.xml
components/wsrp/trunk/api/pom.xml
components/wsrp/trunk/common/pom.xml
components/wsrp/trunk/consumer/pom.xml
components/wsrp/trunk/hibernate-impl/pom.xml
components/wsrp/trunk/pom.xml
components/wsrp/trunk/producer/pom.xml
components/wsrp/trunk/test/pom.xml
components/wsrp/trunk/wsrp-producer-war/pom.xml
components/wsrp/trunk/wsrp1-ws/pom.xml
components/wsrp/trunk/wsrp2-ws/pom.xml
Log:
[maven-release-plugin] prepare release 2.0.0-Alpha01
Modified: components/wsrp/trunk/admin-gui/pom.xml
===================================================================
--- components/wsrp/trunk/admin-gui/pom.xml 2010-08-18 19:05:23 UTC (rev 3860)
+++ components/wsrp/trunk/admin-gui/pom.xml 2010-08-18 19:21:34 UTC (rev 3861)
@@ -21,12 +21,11 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.0.0-Alpha01-SNAPSHOT</version>
+ <version>2.0.0-Alpha01</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-admin-gui</artifactId>
Modified: components/wsrp/trunk/api/pom.xml
===================================================================
--- components/wsrp/trunk/api/pom.xml 2010-08-18 19:05:23 UTC (rev 3860)
+++ components/wsrp/trunk/api/pom.xml 2010-08-18 19:21:34 UTC (rev 3861)
@@ -21,12 +21,11 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.0.0-Alpha01-SNAPSHOT</version>
+ <version>2.0.0-Alpha01</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-integration-api</artifactId>
Modified: components/wsrp/trunk/common/pom.xml
===================================================================
--- components/wsrp/trunk/common/pom.xml 2010-08-18 19:05:23 UTC (rev 3860)
+++ components/wsrp/trunk/common/pom.xml 2010-08-18 19:21:34 UTC (rev 3861)
@@ -20,12 +20,11 @@
~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.0.0-Alpha01-SNAPSHOT</version>
+ <version>2.0.0-Alpha01</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-common</artifactId>
Modified: components/wsrp/trunk/consumer/pom.xml
===================================================================
--- components/wsrp/trunk/consumer/pom.xml 2010-08-18 19:05:23 UTC (rev 3860)
+++ components/wsrp/trunk/consumer/pom.xml 2010-08-18 19:21:34 UTC (rev 3861)
@@ -21,12 +21,11 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.0.0-Alpha01-SNAPSHOT</version>
+ <version>2.0.0-Alpha01</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-consumer</artifactId>
Modified: components/wsrp/trunk/hibernate-impl/pom.xml
===================================================================
--- components/wsrp/trunk/hibernate-impl/pom.xml 2010-08-18 19:05:23 UTC (rev 3860)
+++ components/wsrp/trunk/hibernate-impl/pom.xml 2010-08-18 19:21:34 UTC (rev 3861)
@@ -22,14 +22,13 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.0.0-Alpha01-SNAPSHOT</version>
+ <version>2.0.0-Alpha01</version>
</parent>
<groupId>org.gatein.wsrp</groupId>
Modified: components/wsrp/trunk/pom.xml
===================================================================
--- components/wsrp/trunk/pom.xml 2010-08-18 19:05:23 UTC (rev 3860)
+++ components/wsrp/trunk/pom.xml 2010-08-18 19:21:34 UTC (rev 3861)
@@ -21,8 +21,7 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
@@ -30,7 +29,7 @@
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.0.0-Alpha01-SNAPSHOT</version>
+ <version>2.0.0-Alpha01</version>
<packaging>pom</packaging>
@@ -41,9 +40,9 @@
</parent>
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/gatein/components/wsrp/trunk/</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/gatein/components/wsrp/trunk/</developerConnection>
- <url>http://fisheye.jboss.org/browse/gatein/components/wsrp/trunk/</url>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/gatein/components/wsrp/tags/2.0.0-...</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/gatein/components/wsrp/tags/2.0.0-Alp...</developerConnection>
+ <url>http://fisheye.jboss.org/browse/gatein/components/wsrp/tags/2.0.0-Alpha01</url>
</scm>
<properties>
Modified: components/wsrp/trunk/producer/pom.xml
===================================================================
--- components/wsrp/trunk/producer/pom.xml 2010-08-18 19:05:23 UTC (rev 3860)
+++ components/wsrp/trunk/producer/pom.xml 2010-08-18 19:21:34 UTC (rev 3861)
@@ -21,12 +21,11 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.0.0-Alpha01-SNAPSHOT</version>
+ <version>2.0.0-Alpha01</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-producer-lib</artifactId>
Modified: components/wsrp/trunk/test/pom.xml
===================================================================
--- components/wsrp/trunk/test/pom.xml 2010-08-18 19:05:23 UTC (rev 3860)
+++ components/wsrp/trunk/test/pom.xml 2010-08-18 19:21:34 UTC (rev 3861)
@@ -22,12 +22,11 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.0.0-Alpha01-SNAPSHOT</version>
+ <version>2.0.0-Alpha01</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: components/wsrp/trunk/wsrp-producer-war/pom.xml
===================================================================
--- components/wsrp/trunk/wsrp-producer-war/pom.xml 2010-08-18 19:05:23 UTC (rev 3860)
+++ components/wsrp/trunk/wsrp-producer-war/pom.xml 2010-08-18 19:21:34 UTC (rev 3861)
@@ -22,12 +22,11 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.0.0-Alpha01-SNAPSHOT</version>
+ <version>2.0.0-Alpha01</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: components/wsrp/trunk/wsrp1-ws/pom.xml
===================================================================
--- components/wsrp/trunk/wsrp1-ws/pom.xml 2010-08-18 19:05:23 UTC (rev 3860)
+++ components/wsrp/trunk/wsrp1-ws/pom.xml 2010-08-18 19:21:34 UTC (rev 3861)
@@ -21,12 +21,11 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.0.0-Alpha01-SNAPSHOT</version>
+ <version>2.0.0-Alpha01</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-wsrp1-ws</artifactId>
Modified: components/wsrp/trunk/wsrp2-ws/pom.xml
===================================================================
--- components/wsrp/trunk/wsrp2-ws/pom.xml 2010-08-18 19:05:23 UTC (rev 3860)
+++ components/wsrp/trunk/wsrp2-ws/pom.xml 2010-08-18 19:21:34 UTC (rev 3861)
@@ -22,13 +22,11 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>wsrp-parent</artifactId>
<groupId>org.gatein.wsrp</groupId>
- <version>2.0.0-Alpha01-SNAPSHOT</version>
+ <version>2.0.0-Alpha01</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-wsrp2-ws</artifactId>
13 years, 10 months
gatein SVN: r3860 - in components/wsrp/trunk: admin-gui and 9 other directories.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-08-18 15:05:23 -0400 (Wed, 18 Aug 2010)
New Revision: 3860
Modified:
components/wsrp/trunk/admin-gui/pom.xml
components/wsrp/trunk/api/pom.xml
components/wsrp/trunk/common/pom.xml
components/wsrp/trunk/consumer/pom.xml
components/wsrp/trunk/hibernate-impl/pom.xml
components/wsrp/trunk/pom.xml
components/wsrp/trunk/producer/pom.xml
components/wsrp/trunk/test/pom.xml
components/wsrp/trunk/wsrp-producer-war/pom.xml
components/wsrp/trunk/wsrp1-ws/pom.xml
components/wsrp/trunk/wsrp2-ws/pom.xml
Log:
Updated version to 2.0.0-Alpha01-SNAPSHOT to conform to conventions.
Modified: components/wsrp/trunk/admin-gui/pom.xml
===================================================================
--- components/wsrp/trunk/admin-gui/pom.xml 2010-08-18 18:06:03 UTC (rev 3859)
+++ components/wsrp/trunk/admin-gui/pom.xml 2010-08-18 19:05:23 UTC (rev 3860)
@@ -26,7 +26,7 @@
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.0.0-Alpha-01-SNAPSHOT</version>
+ <version>2.0.0-Alpha01-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-admin-gui</artifactId>
Modified: components/wsrp/trunk/api/pom.xml
===================================================================
--- components/wsrp/trunk/api/pom.xml 2010-08-18 18:06:03 UTC (rev 3859)
+++ components/wsrp/trunk/api/pom.xml 2010-08-18 19:05:23 UTC (rev 3860)
@@ -26,7 +26,7 @@
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.0.0-Alpha-01-SNAPSHOT</version>
+ <version>2.0.0-Alpha01-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-integration-api</artifactId>
Modified: components/wsrp/trunk/common/pom.xml
===================================================================
--- components/wsrp/trunk/common/pom.xml 2010-08-18 18:06:03 UTC (rev 3859)
+++ components/wsrp/trunk/common/pom.xml 2010-08-18 19:05:23 UTC (rev 3860)
@@ -25,7 +25,7 @@
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.0.0-Alpha-01-SNAPSHOT</version>
+ <version>2.0.0-Alpha01-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-common</artifactId>
Modified: components/wsrp/trunk/consumer/pom.xml
===================================================================
--- components/wsrp/trunk/consumer/pom.xml 2010-08-18 18:06:03 UTC (rev 3859)
+++ components/wsrp/trunk/consumer/pom.xml 2010-08-18 19:05:23 UTC (rev 3860)
@@ -26,7 +26,7 @@
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.0.0-Alpha-01-SNAPSHOT</version>
+ <version>2.0.0-Alpha01-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-consumer</artifactId>
Modified: components/wsrp/trunk/hibernate-impl/pom.xml
===================================================================
--- components/wsrp/trunk/hibernate-impl/pom.xml 2010-08-18 18:06:03 UTC (rev 3859)
+++ components/wsrp/trunk/hibernate-impl/pom.xml 2010-08-18 19:05:23 UTC (rev 3860)
@@ -29,7 +29,7 @@
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.0.0-Alpha-01-SNAPSHOT</version>
+ <version>2.0.0-Alpha01-SNAPSHOT</version>
</parent>
<groupId>org.gatein.wsrp</groupId>
Modified: components/wsrp/trunk/pom.xml
===================================================================
--- components/wsrp/trunk/pom.xml 2010-08-18 18:06:03 UTC (rev 3859)
+++ components/wsrp/trunk/pom.xml 2010-08-18 19:05:23 UTC (rev 3860)
@@ -30,7 +30,7 @@
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.0.0-Alpha-01-SNAPSHOT</version>
+ <version>2.0.0-Alpha01-SNAPSHOT</version>
<packaging>pom</packaging>
Modified: components/wsrp/trunk/producer/pom.xml
===================================================================
--- components/wsrp/trunk/producer/pom.xml 2010-08-18 18:06:03 UTC (rev 3859)
+++ components/wsrp/trunk/producer/pom.xml 2010-08-18 19:05:23 UTC (rev 3860)
@@ -26,7 +26,7 @@
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.0.0-Alpha-01-SNAPSHOT</version>
+ <version>2.0.0-Alpha01-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-producer-lib</artifactId>
Modified: components/wsrp/trunk/test/pom.xml
===================================================================
--- components/wsrp/trunk/test/pom.xml 2010-08-18 18:06:03 UTC (rev 3859)
+++ components/wsrp/trunk/test/pom.xml 2010-08-18 19:05:23 UTC (rev 3860)
@@ -27,7 +27,7 @@
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.0.0-Alpha-01-SNAPSHOT</version>
+ <version>2.0.0-Alpha01-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: components/wsrp/trunk/wsrp-producer-war/pom.xml
===================================================================
--- components/wsrp/trunk/wsrp-producer-war/pom.xml 2010-08-18 18:06:03 UTC (rev 3859)
+++ components/wsrp/trunk/wsrp-producer-war/pom.xml 2010-08-18 19:05:23 UTC (rev 3860)
@@ -27,7 +27,7 @@
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.0.0-Alpha-01-SNAPSHOT</version>
+ <version>2.0.0-Alpha01-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: components/wsrp/trunk/wsrp1-ws/pom.xml
===================================================================
--- components/wsrp/trunk/wsrp1-ws/pom.xml 2010-08-18 18:06:03 UTC (rev 3859)
+++ components/wsrp/trunk/wsrp1-ws/pom.xml 2010-08-18 19:05:23 UTC (rev 3860)
@@ -26,7 +26,7 @@
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>2.0.0-Alpha-01-SNAPSHOT</version>
+ <version>2.0.0-Alpha01-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-wsrp1-ws</artifactId>
Modified: components/wsrp/trunk/wsrp2-ws/pom.xml
===================================================================
--- components/wsrp/trunk/wsrp2-ws/pom.xml 2010-08-18 18:06:03 UTC (rev 3859)
+++ components/wsrp/trunk/wsrp2-ws/pom.xml 2010-08-18 19:05:23 UTC (rev 3860)
@@ -28,7 +28,7 @@
<parent>
<artifactId>wsrp-parent</artifactId>
<groupId>org.gatein.wsrp</groupId>
- <version>2.0.0-Alpha-01-SNAPSHOT</version>
+ <version>2.0.0-Alpha01-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-wsrp2-ws</artifactId>
13 years, 10 months