gatein SVN: r3879 - in portal/trunk: component/wsrp/src/main/java/org/gatein/portal/wsrp/state/consumer/mapping and 1 other directory.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-08-20 08:45:16 -0400 (Fri, 20 Aug 2010)
New Revision: 3879
Modified:
portal/trunk/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/consumer/mapping/RegistrationInfoMapping.java
portal/trunk/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/consumer/mapping/RegistrationPropertyMapping.java
portal/trunk/pom.xml
Log:
- Use WSRP 2.0.0-Alpha01 and common 2.0.3-GA.
- Adapated JCR mapping to changes in WSRP. Shouldn't change anything persistence-wise.
Modified: portal/trunk/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/consumer/mapping/RegistrationInfoMapping.java
===================================================================
--- portal/trunk/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/consumer/mapping/RegistrationInfoMapping.java 2010-08-20 12:16:49 UTC (rev 3878)
+++ portal/trunk/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/consumer/mapping/RegistrationInfoMapping.java 2010-08-20 12:45:16 UTC (rev 3879)
@@ -87,7 +87,7 @@
for (RegistrationProperty property : regInfo.getRegistrationProperties().values())
{
// create new RegistrationPropertyMapping for this RegistrationInfoMapping
- RegistrationPropertyMapping rpm = createRegistrationProperty(property.getName());
+ RegistrationPropertyMapping rpm = createRegistrationProperty(property.getName().toString());
// add newly created RegistrationPropertyMapping to parent then initialize for JCR
rpms.add(rpm);
Modified: portal/trunk/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/consumer/mapping/RegistrationPropertyMapping.java
===================================================================
--- portal/trunk/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/consumer/mapping/RegistrationPropertyMapping.java 2010-08-20 12:16:49 UTC (rev 3878)
+++ portal/trunk/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/consumer/mapping/RegistrationPropertyMapping.java 2010-08-20 12:45:16 UTC (rev 3879)
@@ -65,7 +65,7 @@
public void initFrom(RegistrationProperty property)
{
// set properties
- setName(property.getName());
+ setName(property.getName().toString());
setStatus(property.getStatus());
setValue(property.getValue());
Modified: portal/trunk/pom.xml
===================================================================
--- portal/trunk/pom.xml 2010-08-20 12:16:49 UTC (rev 3878)
+++ portal/trunk/pom.xml 2010-08-20 12:45:16 UTC (rev 3879)
@@ -44,11 +44,11 @@
<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>
- <org.gatein.common.version>2.0.2-GA</org.gatein.common.version>
+ <org.gatein.common.version>2.0.3-GA</org.gatein.common.version>
<org.gatein.wci.version>2.0.1-GA</org.gatein.wci.version>
<org.gatein.pc.version>2.1.1-GA</org.gatein.pc.version>
<org.picketlink.idm>1.1.5.CR01</org.picketlink.idm>
- <org.gatein.wsrp.version>1.1.1-GA</org.gatein.wsrp.version>
+ <org.gatein.wsrp.version>2.0.0-Alpha01</org.gatein.wsrp.version>
<org.gatein.mop.version>1.0.3-GA</org.gatein.mop.version>
<org.slf4j.version>1.5.6</org.slf4j.version>
<rhino.version>1.6R5</rhino.version>
14 years, 4 months
gatein SVN: r3878 - components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-08-20 08:16:49 -0400 (Fri, 20 Aug 2010)
New Revision: 3878
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/EndpointConfigurationInfo.java
Log:
- Forgot to commit this change. :(
Modified: components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/EndpointConfigurationInfo.java
===================================================================
--- components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/EndpointConfigurationInfo.java 2010-08-20 07:46:53 UTC (rev 3877)
+++ components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/EndpointConfigurationInfo.java 2010-08-20 12:16:49 UTC (rev 3878)
@@ -58,7 +58,7 @@
serviceFactory = new SOAPServiceFactory();
}
- protected EndpointConfigurationInfo(ServiceFactory serviceFactory)
+ public EndpointConfigurationInfo(ServiceFactory serviceFactory)
{
ParameterValidation.throwIllegalArgExceptionIfNull(serviceFactory, "ServiceFactory");
this.serviceFactory = serviceFactory;
14 years, 4 months
gatein SVN: r3877 - in portal/branches/branched-r3845: component/web/resources/src/main/java/org/exoplatform/portal/resource/compressor and 3 other directories.
by do-not-reply@jboss.org
Author: hoang_to
Date: 2010-08-20 03:46:53 -0400 (Fri, 20 Aug 2010)
New Revision: 3877
Added:
portal/branches/branched-r3845/component/web/resources/src/main/java/org/exoplatform/portal/resource/compressor/
portal/branches/branched-r3845/component/web/resources/src/main/java/org/exoplatform/portal/resource/compressor/BaseResourceCompressorPlugin.java
portal/branches/branched-r3845/component/web/resources/src/main/java/org/exoplatform/portal/resource/compressor/ResourceCompressor.java
portal/branches/branched-r3845/component/web/resources/src/main/java/org/exoplatform/portal/resource/compressor/ResourceCompressorException.java
portal/branches/branched-r3845/component/web/resources/src/main/java/org/exoplatform/portal/resource/compressor/ResourceCompressorPlugin.java
portal/branches/branched-r3845/component/web/resources/src/main/java/org/exoplatform/portal/resource/compressor/ResourceType.java
portal/branches/branched-r3845/component/web/resources/src/main/java/org/exoplatform/portal/resource/compressor/impl/
portal/branches/branched-r3845/component/web/resources/src/main/java/org/exoplatform/portal/resource/compressor/impl/JSMinCompressorPlugin.java
portal/branches/branched-r3845/component/web/resources/src/main/java/org/exoplatform/portal/resource/compressor/impl/ResourceCompressorService.java
portal/branches/branched-r3845/web/portal/src/main/webapp/WEB-INF/conf/common/compressor-configuration.xml
Modified:
portal/branches/branched-r3845/web/portal/src/main/webapp/WEB-INF/conf/configuration.xml
Log:
GTNPORTAL-1420: Implement a resource compressor service that allow compressor pluggable
Added: portal/branches/branched-r3845/component/web/resources/src/main/java/org/exoplatform/portal/resource/compressor/BaseResourceCompressorPlugin.java
===================================================================
--- portal/branches/branched-r3845/component/web/resources/src/main/java/org/exoplatform/portal/resource/compressor/BaseResourceCompressorPlugin.java (rev 0)
+++ portal/branches/branched-r3845/component/web/resources/src/main/java/org/exoplatform/portal/resource/compressor/BaseResourceCompressorPlugin.java 2010-08-20 07:46:53 UTC (rev 3877)
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2009 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.portal.resource.compressor;
+
+import java.io.IOException;
+import java.io.Reader;
+import java.io.Writer;
+
+import org.exoplatform.container.component.BaseComponentPlugin;
+
+/**
+ * @author <a href="mailto:hoang281283@gmail.com">Minh Hoang TO</a>
+ * Aug 19, 2010
+ */
+
+public abstract class BaseResourceCompressorPlugin extends BaseComponentPlugin implements ResourceCompressorPlugin
+{
+
+ abstract public ResourceType getResourceType();
+
+ @Override
+ public int getPriority()
+ {
+ return 0;
+ }
+
+ @Override
+ public void compress(Reader input, Writer output) throws ResourceCompressorException, IOException
+ {
+ }
+
+ @Override
+ public String getName()
+ {
+ return this.getClass().getCanonicalName().toString();
+ }
+}
Added: portal/branches/branched-r3845/component/web/resources/src/main/java/org/exoplatform/portal/resource/compressor/ResourceCompressor.java
===================================================================
--- portal/branches/branched-r3845/component/web/resources/src/main/java/org/exoplatform/portal/resource/compressor/ResourceCompressor.java (rev 0)
+++ portal/branches/branched-r3845/component/web/resources/src/main/java/org/exoplatform/portal/resource/compressor/ResourceCompressor.java 2010-08-20 07:46:53 UTC (rev 3877)
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2009 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.portal.resource.compressor;
+
+import java.io.IOException;
+import java.io.Reader;
+import java.io.Writer;
+
+/**
+ * ResourceCompressor acts as a router of compression to compressor plugin
+ *
+ * @author <a href="mailto:hoang281283@gmail.com">Minh Hoang TO</a>
+ * Aug 19, 2010
+ */
+
+public interface ResourceCompressor
+{
+
+ public void compress(Reader input, Writer output, ResourceType resourceType) throws ResourceCompressorException,
+ IOException;
+
+}
Added: portal/branches/branched-r3845/component/web/resources/src/main/java/org/exoplatform/portal/resource/compressor/ResourceCompressorException.java
===================================================================
--- portal/branches/branched-r3845/component/web/resources/src/main/java/org/exoplatform/portal/resource/compressor/ResourceCompressorException.java (rev 0)
+++ portal/branches/branched-r3845/component/web/resources/src/main/java/org/exoplatform/portal/resource/compressor/ResourceCompressorException.java 2010-08-20 07:46:53 UTC (rev 3877)
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2009 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.portal.resource.compressor;
+
+/**
+ * @author <a href="mailto:hoang281283@gmail.com">Minh Hoang TO</a>
+ * Aug 19, 2010
+ */
+
+public class ResourceCompressorException extends RuntimeException
+{
+
+}
Added: portal/branches/branched-r3845/component/web/resources/src/main/java/org/exoplatform/portal/resource/compressor/ResourceCompressorPlugin.java
===================================================================
--- portal/branches/branched-r3845/component/web/resources/src/main/java/org/exoplatform/portal/resource/compressor/ResourceCompressorPlugin.java (rev 0)
+++ portal/branches/branched-r3845/component/web/resources/src/main/java/org/exoplatform/portal/resource/compressor/ResourceCompressorPlugin.java 2010-08-20 07:46:53 UTC (rev 3877)
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2009 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.portal.resource.compressor;
+
+import java.io.IOException;
+import java.io.Reader;
+import java.io.Writer;
+
+/**
+ * @author <a href="mailto:hoang281283@gmail.com">Minh Hoang TO</a>
+ * Aug 19, 2010
+ */
+
+public interface ResourceCompressorPlugin
+{
+
+ /**
+ * Return resource type this plugin could compress.
+ *
+ * @return
+ */
+ public ResourceType getResourceType();
+
+ /**
+ * Return priority of plugin.
+ *
+ * @return
+ */
+ public int getPriority();
+
+ /**
+ * Return name of the plugin
+ *
+ * @return
+ */
+ public String getName();
+
+ /**
+ *
+ * Compress the specified input and produce compressed output.
+ *
+ * @param input
+ * @param output
+ * @throws ResourceCompressorException
+ * @throws IOException
+ */
+ public void compress(Reader input, Writer output) throws ResourceCompressorException, IOException;
+}
Added: portal/branches/branched-r3845/component/web/resources/src/main/java/org/exoplatform/portal/resource/compressor/ResourceType.java
===================================================================
--- portal/branches/branched-r3845/component/web/resources/src/main/java/org/exoplatform/portal/resource/compressor/ResourceType.java (rev 0)
+++ portal/branches/branched-r3845/component/web/resources/src/main/java/org/exoplatform/portal/resource/compressor/ResourceType.java 2010-08-20 07:46:53 UTC (rev 3877)
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2009 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.portal.resource.compressor;
+
+/**
+ * @author <a href="mailto:hoang281283@gmail.com">Minh Hoang TO</a>
+ * Aug 19, 2010
+ */
+
+public enum ResourceType {
+
+ JAVASCRIPT, STYLESHEET;
+
+}
Added: portal/branches/branched-r3845/component/web/resources/src/main/java/org/exoplatform/portal/resource/compressor/impl/JSMinCompressorPlugin.java
===================================================================
--- portal/branches/branched-r3845/component/web/resources/src/main/java/org/exoplatform/portal/resource/compressor/impl/JSMinCompressorPlugin.java (rev 0)
+++ portal/branches/branched-r3845/component/web/resources/src/main/java/org/exoplatform/portal/resource/compressor/impl/JSMinCompressorPlugin.java 2010-08-20 07:46:53 UTC (rev 3877)
@@ -0,0 +1,76 @@
+/*
+ * Copyright (C) 2009 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.portal.resource.compressor.impl;
+
+import java.io.IOException;
+import java.io.Reader;
+import java.io.Writer;
+
+import org.exoplatform.container.xml.InitParams;
+import org.exoplatform.container.xml.ValueParam;
+import org.exoplatform.portal.resource.compressor.BaseResourceCompressorPlugin;
+import org.exoplatform.portal.resource.compressor.ResourceCompressorException;
+import org.exoplatform.portal.resource.compressor.ResourceType;
+
+/**
+ * @author <a href="mailto:hoang281283@gmail.com">Minh Hoang TO</a>
+ * Aug 19, 2010
+ */
+
+public class JSMinCompressorPlugin extends BaseResourceCompressorPlugin
+{
+
+ private int priority;
+
+ public JSMinCompressorPlugin(InitParams params) throws Exception
+ {
+ ValueParam priorityParam = params.getValueParam("plugin.priority");
+ try
+ {
+ this.priority = Integer.parseInt(priorityParam.getValue());
+ }
+ catch (NumberFormatException NBFEx)
+ {
+ this.priority = -1;
+ }
+ }
+
+ @Override
+ public String getName()
+ {
+ return "JSMinCompressorPlugin";
+ }
+
+ public int getPriority()
+ {
+ return priority;
+ }
+
+ @Override
+ public ResourceType getResourceType()
+ {
+ return ResourceType.JAVASCRIPT;
+ }
+
+ @Override
+ public void compress(Reader input, Writer output) throws ResourceCompressorException, IOException
+ {
+ super.compress(input, output);
+ }
+}
Added: portal/branches/branched-r3845/component/web/resources/src/main/java/org/exoplatform/portal/resource/compressor/impl/ResourceCompressorService.java
===================================================================
--- portal/branches/branched-r3845/component/web/resources/src/main/java/org/exoplatform/portal/resource/compressor/impl/ResourceCompressorService.java (rev 0)
+++ portal/branches/branched-r3845/component/web/resources/src/main/java/org/exoplatform/portal/resource/compressor/impl/ResourceCompressorService.java 2010-08-20 07:46:53 UTC (rev 3877)
@@ -0,0 +1,164 @@
+/*
+ * Copyright (C) 2009 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.portal.resource.compressor.impl;
+
+import java.io.IOException;
+import java.io.Reader;
+import java.io.Writer;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.exoplatform.container.component.ComponentPlugin;
+import org.exoplatform.container.xml.InitParams;
+import org.exoplatform.portal.resource.compressor.ResourceCompressor;
+import org.exoplatform.portal.resource.compressor.ResourceCompressorException;
+import org.exoplatform.portal.resource.compressor.ResourceCompressorPlugin;
+import org.exoplatform.portal.resource.compressor.ResourceType;
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
+
+/**
+ * @author <a href="mailto:hoang281283@gmail.com">Minh Hoang TO</a>
+ * Aug 19, 2010
+ */
+
+public class ResourceCompressorService implements ResourceCompressor
+{
+
+ private Log log = ExoLogger.getLogger(ResourceCompressorService.class);
+
+ private Map<ResourceType, List<ResourceCompressorPlugin>> plugins;
+
+ private Map<ResourceType, String> defaultType_Key_Mapping;
+
+ public ResourceCompressorService(InitParams params) throws Exception
+ {
+
+ plugins = new HashMap<ResourceType, List<ResourceCompressorPlugin>>();
+ }
+
+ public void loadCompressorPlugin(ComponentPlugin plugin)
+ {
+ if(plugin != null && plugin instanceof ResourceCompressorPlugin)
+ {
+ registerCompressorPlugin((ResourceCompressorPlugin)plugin);
+ }
+ }
+
+ private void registerCompressorPlugin(ResourceCompressorPlugin plugin)
+ {
+ ResourceType type = plugin.getResourceType();
+ List<ResourceCompressorPlugin> sameResourceTypePlugins = plugins.get(type);
+
+ if(sameResourceTypePlugins != null)
+ {
+ sameResourceTypePlugins.add(plugin);
+ log.debug("Loaded compressor plugin: " + plugin.getName() + " for resource type " + type.toString());
+ }
+ else{
+ List<ResourceCompressorPlugin> newListOfPlugins = new ArrayList<ResourceCompressorPlugin>();
+ newListOfPlugins.add(plugin);
+ log.debug("Loaded compressor plugin: " + plugin.getName() + " for new resource type " + type.toString());
+ plugins.put(type, newListOfPlugins);
+ }
+ }
+
+ public void unloadCompressorPlugin(ComponentPlugin plugin)
+ {
+
+ }
+
+
+ @Override
+ final public void compress(Reader input, Writer output, ResourceType resourceType) throws ResourceCompressorException,
+ IOException
+ {
+ ResourceCompressorPlugin plugin = getHighestPriorityCompressorPlugin(resourceType);
+ if(plugin != null)
+ {
+ plugin.compress(input, output);
+ }
+
+ //ResourceCompressorPlugin defaultPlugin = getDefaultCompressorPlugin(resourceType);
+ //if(defaultPlugin != null)
+ //{
+ // defaultPlugin.compress(input, output);
+ //}
+ }
+
+ private ResourceCompressorPlugin getHighestPriorityCompressorPlugin(ResourceType resourceType)
+ {
+ List<ResourceCompressorPlugin> candidates = plugins.get(resourceType);
+ if(candidates == null || candidates.size() == 0)
+ {
+ return null;
+ }
+
+ //Loop the list instead of invoking sort method
+ int highestPriorityIndex = 0;
+ int maxPriority = -1;
+
+ for(int i = 0; i < candidates.size(); i++)
+ {
+ int currentPriority = candidates.get(i).getPriority();
+ if(currentPriority > maxPriority)
+ {
+ highestPriorityIndex = i;
+ maxPriority = currentPriority;
+ }
+ }
+
+ return candidates.get(highestPriorityIndex);
+ }
+
+ private ResourceCompressorPlugin getDefaultCompressorPlugin(ResourceType resourceType)
+ {
+ String key = this.defaultType_Key_Mapping.get(resourceType);
+ return getDefaultCompressorPlugin(resourceType, key);
+ }
+
+ private ResourceCompressorPlugin getDefaultCompressorPlugin(ResourceType resourceType, String key)
+ {
+ List<ResourceCompressorPlugin> candidates = plugins.get(resourceType);
+ if(candidates == null)
+ {
+ return null;
+ }
+
+ for(ResourceCompressorPlugin plugin : candidates)
+ {
+ if(plugin.getName().equals(key))
+ {
+ return plugin;
+ }
+ }
+
+ if (candidates.size() > 0)
+ {
+ return candidates.get(0);
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+}
Added: portal/branches/branched-r3845/web/portal/src/main/webapp/WEB-INF/conf/common/compressor-configuration.xml
===================================================================
--- portal/branches/branched-r3845/web/portal/src/main/webapp/WEB-INF/conf/common/compressor-configuration.xml (rev 0)
+++ portal/branches/branched-r3845/web/portal/src/main/webapp/WEB-INF/conf/common/compressor-configuration.xml 2010-08-20 07:46:53 UTC (rev 3877)
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (C) 2009 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.
+
+-->
+
+<configuration
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd http://www.exoplaform.org/xml/ns/kernel_1_1.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd">
+
+
+ <component>
+ <key>org.exoplatform.portal.resource.compressor.ResourceCompressor</key>
+ <type>org.exoplatform.portal.resource.compressor.impl.ResourceCompressorService</type>
+ <component-plugins>
+ <component-plugin>
+ <name>JSMinCompressorPlugin</name>
+ <set-method>loadCompressorPlugin</set-method>
+ <type>org.exoplatform.portal.resource.compressor.impl.JSMinCompressorPlugin</type>
+ <description>Javascript Compressor Plugin leveraging JSMin</description>
+ <init-params>
+ <value-param>
+ <name>plugin.priority</name>
+ <value>1</value>
+ </value-param>
+ </init-params>
+ </component-plugin>
+ </component-plugins>
+ <init-params>
+ <value-param>
+ <name>JAVASCRIPT</name>
+ <value>JSMinCompressorPlugin</value>
+ </value-param>
+ <value-param>
+ <name>STYLESHEET</name>
+ <value>CSSMinCompressorPlugin</value>
+ </value-param>
+ </init-params>
+
+ </component>
+
+
+</configuration>
Modified: portal/branches/branched-r3845/web/portal/src/main/webapp/WEB-INF/conf/configuration.xml
===================================================================
--- portal/branches/branched-r3845/web/portal/src/main/webapp/WEB-INF/conf/configuration.xml 2010-08-19 17:57:41 UTC (rev 3876)
+++ portal/branches/branched-r3845/web/portal/src/main/webapp/WEB-INF/conf/configuration.xml 2010-08-20 07:46:53 UTC (rev 3877)
@@ -25,6 +25,7 @@
xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd http://www.exoplaform.org/xml/ns/kernel_1_1.xsd"
xmlns="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd">
<import>war:/conf/common/common-configuration.xml</import>
+ <import>war:/conf/common/compressor-configuration.xml</import>
<import>war:/conf/common/portlet-container-configuration.xml</import>
<import profiles="jboss">war:/conf/wsrp/wsrp-configuration.xml</import>
<import>war:/conf/common/logs-configuration.xml</import>
14 years, 4 months
gatein SVN: r3876 - in components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp: protocol and 6 other directories.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-08-19 13:57:41 -0400 (Thu, 19 Aug 2010)
New Revision: 3876
Added:
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v1/WSRP1ConsumerBaseTest.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v2/
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v2/InteropServiceDescriptionTestCase.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v2/MarkupTestCase.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v2/PortletManagementTestCase.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v2/ServiceDescriptionTestCase.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v2/V2ConsumerBaseTest.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v2/WSRP2ConsumerBaseTest.java
Removed:
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/consumer/WSRPConsumerBaseTest.java
Modified:
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v1/V1ConsumerBaseTest.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/BehaviorBackedServiceFactory.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/behaviors/PerUserInitCookieMarkupBehavior.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/BehaviorBackedServiceFactory.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/MarkupBehavior.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/behaviors/BasicPortletManagementBehavior.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/behaviors/PerUserInitCookieMarkupBehavior.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/behaviors/SessionMarkupBehavior.java
Log:
- Added WSRP 2 test cases (right now, simply a copy of the WSRP 1 tests sightly adapted to WSRP 2).
- Moved WSRPConsumerBaseTest to protocol/v1/WSRP1ConsumerBaseTest as it was full of version 1 specific code. Duplicated it for WSRP 2.
- Fixed WSRP 2 behaviors which were not up to date for some reason.
Deleted: components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/consumer/WSRPConsumerBaseTest.java
===================================================================
--- components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/consumer/WSRPConsumerBaseTest.java 2010-08-19 16:17:17 UTC (rev 3875)
+++ components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/consumer/WSRPConsumerBaseTest.java 2010-08-19 17:57:41 UTC (rev 3876)
@@ -1,252 +0,0 @@
-/*
- * JBoss, a division of Red Hat
- * Copyright 2010, Red Hat Middleware, LLC, and individual
- * contributors as indicated by the @authors tag. See the
- * copyright.txt in the distribution for a full listing of
- * individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.gatein.wsrp.consumer;
-
-import junit.framework.TestCase;
-import org.gatein.wsrp.test.ExtendedAssert;
-import org.gatein.wsrp.test.protocol.v1.BehaviorBackedServiceFactory;
-import org.gatein.wsrp.test.protocol.v1.BehaviorRegistry;
-import org.gatein.wsrp.test.protocol.v1.MarkupBehavior;
-import org.gatein.wsrp.test.protocol.v1.PortletManagementBehavior;
-import org.gatein.wsrp.test.protocol.v1.RegistrationBehavior;
-import org.gatein.wsrp.test.protocol.v1.ServiceDescriptionBehavior;
-import org.gatein.wsrp.test.protocol.v1.TestProducerBehavior;
-import org.gatein.wsrp.test.protocol.v1.TestWSRPProducer;
-import org.gatein.wsrp.test.protocol.v1.TestWSRPProducerImpl;
-import org.gatein.wsrp.test.protocol.v1.behaviors.BasicMarkupBehavior;
-import org.gatein.wsrp.test.protocol.v1.behaviors.BasicPortletManagementBehavior;
-import org.gatein.wsrp.test.protocol.v1.behaviors.BasicServiceDescriptionBehavior;
-import org.gatein.wsrp.test.protocol.v1.behaviors.EmptyMarkupBehavior;
-import org.gatein.wsrp.test.protocol.v1.behaviors.InitCookieNotRequiredMarkupBehavior;
-import org.gatein.wsrp.test.protocol.v1.behaviors.NullMarkupBehavior;
-import org.gatein.wsrp.test.protocol.v1.behaviors.PerGroupInitCookieMarkupBehavior;
-import org.gatein.wsrp.test.protocol.v1.behaviors.PerUserInitCookieMarkupBehavior;
-import org.gatein.wsrp.test.protocol.v1.behaviors.ResourceMarkupBehavior;
-import org.gatein.wsrp.test.protocol.v1.behaviors.SessionMarkupBehavior;
-import org.gatein.wsrp.test.support.MockConsumerRegistry;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.Set;
-
-/**
- * @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw Dawidowicz</a>
- * @version $Revision: 11344 $
- */
-public abstract class WSRPConsumerBaseTest extends TestCase
-{
- private static Logger log = LoggerFactory.getLogger(WSRPConsumerBaseTest.class);
-
- /** . */
- private static final String TEST_PRODUCER_ID = "test_producer";
-
- /** . */
- protected TestWSRPProducer producer = new TestWSRPProducerImpl();
-
- /** . */
- protected WSRPConsumerImpl consumer = new WSRPConsumerImpl();
-
- private boolean strict = true;
- private String sdClassName;
- private String mClassName;
- private String pmClassName;
- private String rClassName;
- protected static String requestedMarkupBehavior;
-
-
- public void setUp() throws Exception
- {
- // reset producer state
- producer.reset();
-
- // set the test producer identifier
- ProducerInfo producerInfo = consumer.getProducerInfo();
- producerInfo.setId(TEST_PRODUCER_ID);
-
- // reset the behaviors
- BehaviorRegistry registry = producer.getBehaviorRegistry();
- setSDClassName(sdClassName);
- setMClassName(mClassName);
- setPMClassName(pmClassName);
- setRClassName(rClassName);
- registerAdditionalMarkupBehaviors(registry);
-
- // use a fresh ConsumerRegistry
- producerInfo.setRegistry(new MockConsumerRegistry());
-
- // use
- producerInfo.setEndpointConfigurationInfo(new EndpointConfigurationInfo(new BehaviorBackedServiceFactory(registry)));
-
- // make sure we use clean producer info for each test
- consumer.refreshProducerInfo();
-
- // use cache to avoid un-necessary calls
- producerInfo.setExpirationCacheSeconds(120);
- }
-
- protected void setRegistrationBehavior(RegistrationBehavior behavior)
- {
- producer.getBehaviorRegistry().setRegistrationBehavior(behavior);
- }
-
- protected void setServiceDescriptionBehavior(ServiceDescriptionBehavior behavior)
- {
- if (behavior == null)
- {
- log.info("Given service description behavior was null, using the default one instead!");
- behavior = new BasicServiceDescriptionBehavior();
- }
-
- producer.getBehaviorRegistry().setServiceDescriptionBehavior(behavior);
- }
-
- protected void setPortletManagementBehavior(PortletManagementBehavior behavior)
- {
- BehaviorRegistry registry = producer.getBehaviorRegistry();
-
- if (behavior == null)
- {
- log.info("Given portlet management behavior was null, using the default one instead!");
- behavior = new BasicPortletManagementBehavior(registry);
- }
-
- registry.setPortletManagementBehavior(behavior);
- }
-
- public void testProducerId()
- {
- ExtendedAssert.assertEquals(TEST_PRODUCER_ID, consumer.getProducerId());
- }
-
- public void setSDClassName(String behaviorClassName)
- {
- sdClassName = behaviorClassName;
- setServiceDescriptionBehavior(createBehavior(behaviorClassName, ServiceDescriptionBehavior.class));
- }
-
- public void setMClassName(String behaviorClassName)
- {
- mClassName = behaviorClassName;
- if (behaviorClassName != null)
- {
- producer.getBehaviorRegistry().registerMarkupBehavior(createBehavior(behaviorClassName, MarkupBehavior.class));
- }
- }
-
- public void setPMClassName(String behaviorClassName)
- {
- pmClassName = behaviorClassName;
- setPortletManagementBehavior(createBehavior(behaviorClassName, PortletManagementBehavior.class));
- }
-
- public void setRClassName(String behaviorClassName)
- {
- rClassName = behaviorClassName;
- setRegistrationBehavior(createBehavior(behaviorClassName, RegistrationBehavior.class));
- }
-
- public void setStrict(boolean strict)
- {
- this.strict = strict;
- producer.usingStrictModeChangedTo(strict);
- }
-
- public boolean isStrict()
- {
- return strict;
- }
-
- private <T extends TestProducerBehavior> T createBehavior(String behaviorClassName, Class<T> expectedBehaviorClass)
- {
- if (behaviorClassName != null)
- {
- try
- {
- Class behaviorClass = getClass().getClassLoader().loadClass(behaviorClassName);
- if (expectedBehaviorClass.isAssignableFrom(behaviorClass))
- {
- return expectedBehaviorClass.cast(behaviorClass.newInstance());
- }
- else
- {
- throw new IllegalArgumentException(behaviorClassName + " is not a " + expectedBehaviorClass.getSimpleName());
- }
- }
- catch (ClassNotFoundException e)
- {
- throw new IllegalArgumentException("Could not find behavior: " + behaviorClassName, e);
- }
- catch (IllegalAccessException e)
- {
- throw new IllegalArgumentException("Could not access behavior: " + behaviorClassName, e);
- }
- catch (InstantiationException e)
- {
- throw new IllegalArgumentException("Could not instantiate behavior: " + behaviorClassName, e);
- }
- }
-
- return null;
- }
-
- protected void registerAdditionalMarkupBehaviors(BehaviorRegistry registry)
- {
- registry.registerMarkupBehavior(new BasicMarkupBehavior(registry));
- registry.registerMarkupBehavior(new EmptyMarkupBehavior(registry));
- registry.registerMarkupBehavior(new InitCookieNotRequiredMarkupBehavior(registry));
- registry.registerMarkupBehavior(new PerGroupInitCookieMarkupBehavior(registry));
- registry.registerMarkupBehavior(new PerUserInitCookieMarkupBehavior(registry));
- registry.registerMarkupBehavior(new NullMarkupBehavior(registry));
- registry.registerMarkupBehavior(new SessionMarkupBehavior(registry));
- registry.registerMarkupBehavior(new ResourceMarkupBehavior(registry));
- }
-
- protected Set<String> getPortletHandles()
- {
- return producer.getBehaviorRegistry().getServiceDescriptionBehavior().getPortletHandles();
- }
-
- protected int getPortletNumber()
- {
- return producer.getBehaviorRegistry().getServiceDescriptionBehavior().getPortletNumber();
- }
-
- /**
- * So that BehaviorBackedServiceFactory can retrieve the proper behavior when retrieving the markup service for
- * invocation.
- *
- * @return
- */
- public static String getRequestedMarkupBehavior()
- {
- return requestedMarkupBehavior;
- }
-
- @Override
- protected void tearDown() throws Exception
- {
- // reset the requested markup behavior
- requestedMarkupBehavior = null;
- }
-}
Modified: components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v1/V1ConsumerBaseTest.java
===================================================================
--- components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v1/V1ConsumerBaseTest.java 2010-08-19 16:17:17 UTC (rev 3875)
+++ components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v1/V1ConsumerBaseTest.java 2010-08-19 17:57:41 UTC (rev 3876)
@@ -1,30 +1,29 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2010, Red Hat Middleware, LLC, and individual
+ * contributors as indicated by the @authors tag. See the
+ * copyright.txt in the distribution for a full listing of
+ * individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.gatein.wsrp.protocol.v1;
import org.gatein.pc.api.Portlet;
import org.gatein.pc.api.info.MetaInfo;
-import org.gatein.wsrp.consumer.WSRPConsumerBaseTest;
import org.gatein.wsrp.test.ExtendedAssert;
import org.gatein.wsrp.test.protocol.v1.TestProducerBehavior;
@@ -32,7 +31,7 @@
* @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw Dawidowicz</a>
* @version $Revision: 11320 $
*/
-public class V1ConsumerBaseTest extends WSRPConsumerBaseTest
+public class V1ConsumerBaseTest extends WSRP1ConsumerBaseTest
{
public V1ConsumerBaseTest() throws Exception
{
Copied: components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v1/WSRP1ConsumerBaseTest.java (from rev 3841, components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/consumer/WSRPConsumerBaseTest.java)
===================================================================
--- components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v1/WSRP1ConsumerBaseTest.java (rev 0)
+++ components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v1/WSRP1ConsumerBaseTest.java 2010-08-19 17:57:41 UTC (rev 3876)
@@ -0,0 +1,222 @@
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2010, Red Hat Middleware, LLC, and individual
+ * contributors as indicated by the @authors tag. See the
+ * copyright.txt in the distribution for a full listing of
+ * individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.gatein.wsrp.protocol.v1;
+
+import junit.framework.TestCase;
+import org.gatein.wsrp.consumer.EndpointConfigurationInfo;
+import org.gatein.wsrp.consumer.ProducerInfo;
+import org.gatein.wsrp.consumer.WSRPConsumerImpl;
+import org.gatein.wsrp.test.ExtendedAssert;
+import org.gatein.wsrp.test.protocol.v1.BehaviorBackedServiceFactory;
+import org.gatein.wsrp.test.protocol.v1.BehaviorRegistry;
+import org.gatein.wsrp.test.protocol.v1.PortletManagementBehavior;
+import org.gatein.wsrp.test.protocol.v1.RegistrationBehavior;
+import org.gatein.wsrp.test.protocol.v1.ServiceDescriptionBehavior;
+import org.gatein.wsrp.test.protocol.v1.TestProducerBehavior;
+import org.gatein.wsrp.test.protocol.v1.TestWSRPProducer;
+import org.gatein.wsrp.test.protocol.v1.TestWSRPProducerImpl;
+import org.gatein.wsrp.test.protocol.v1.behaviors.BasicMarkupBehavior;
+import org.gatein.wsrp.test.protocol.v1.behaviors.BasicPortletManagementBehavior;
+import org.gatein.wsrp.test.protocol.v1.behaviors.BasicServiceDescriptionBehavior;
+import org.gatein.wsrp.test.protocol.v1.behaviors.EmptyMarkupBehavior;
+import org.gatein.wsrp.test.protocol.v1.behaviors.InitCookieNotRequiredMarkupBehavior;
+import org.gatein.wsrp.test.protocol.v1.behaviors.NullMarkupBehavior;
+import org.gatein.wsrp.test.protocol.v1.behaviors.PerGroupInitCookieMarkupBehavior;
+import org.gatein.wsrp.test.protocol.v1.behaviors.PerUserInitCookieMarkupBehavior;
+import org.gatein.wsrp.test.protocol.v1.behaviors.ResourceMarkupBehavior;
+import org.gatein.wsrp.test.protocol.v1.behaviors.SessionMarkupBehavior;
+import org.gatein.wsrp.test.support.MockConsumerRegistry;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Set;
+
+/**
+ * @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw Dawidowicz</a>
+ * @version $Revision: 11344 $
+ */
+public abstract class WSRP1ConsumerBaseTest extends TestCase
+{
+ private static Logger log = LoggerFactory.getLogger(WSRP1ConsumerBaseTest.class);
+
+ /** . */
+ private static final String TEST_PRODUCER_ID = "test_producer";
+
+ /** . */
+ protected TestWSRPProducer producer = new TestWSRPProducerImpl();
+
+ /** . */
+ protected WSRPConsumerImpl consumer = new WSRPConsumerImpl();
+
+ private boolean strict = true;
+ protected static String requestedMarkupBehavior;
+
+
+ public void setUp() throws Exception
+ {
+ // reset producer state
+ producer.reset();
+
+ // set the test producer identifier
+ ProducerInfo producerInfo = consumer.getProducerInfo();
+ producerInfo.setId(TEST_PRODUCER_ID);
+
+ // reset the behaviors
+ BehaviorRegistry registry = producer.getBehaviorRegistry();
+ setServiceDescriptionBehavior(null);
+ setPortletManagementBehavior(null);
+ setRegistrationBehavior(null);
+ registerAdditionalMarkupBehaviors(registry);
+
+ // use a fresh ConsumerRegistry
+ producerInfo.setRegistry(new MockConsumerRegistry());
+
+ // use
+ producerInfo.setEndpointConfigurationInfo(new EndpointConfigurationInfo(new BehaviorBackedServiceFactory(registry)));
+
+ // make sure we use clean producer info for each test
+ consumer.refreshProducerInfo();
+
+ // use cache to avoid un-necessary calls
+ producerInfo.setExpirationCacheSeconds(120);
+ }
+
+ protected void setRegistrationBehavior(RegistrationBehavior behavior)
+ {
+ producer.getBehaviorRegistry().setRegistrationBehavior(behavior);
+ }
+
+ protected void setServiceDescriptionBehavior(ServiceDescriptionBehavior behavior)
+ {
+ if (behavior == null)
+ {
+ log.debug("Given service description behavior was null, using the default one instead!");
+ behavior = new BasicServiceDescriptionBehavior();
+ }
+
+ producer.getBehaviorRegistry().setServiceDescriptionBehavior(behavior);
+ }
+
+ protected void setPortletManagementBehavior(PortletManagementBehavior behavior)
+ {
+ BehaviorRegistry registry = producer.getBehaviorRegistry();
+
+ if (behavior == null)
+ {
+ log.debug("Given portlet management behavior was null, using the default one instead!");
+ behavior = new BasicPortletManagementBehavior(registry);
+ }
+
+ registry.setPortletManagementBehavior(behavior);
+ }
+
+ public void testProducerId()
+ {
+ ExtendedAssert.assertEquals(TEST_PRODUCER_ID, consumer.getProducerId());
+ }
+
+ public void setStrict(boolean strict)
+ {
+ this.strict = strict;
+ producer.usingStrictModeChangedTo(strict);
+ }
+
+ public boolean isStrict()
+ {
+ return strict;
+ }
+
+ private <T extends TestProducerBehavior> T createBehavior(String behaviorClassName, Class<T> expectedBehaviorClass)
+ {
+ if (behaviorClassName != null)
+ {
+ try
+ {
+ Class behaviorClass = getClass().getClassLoader().loadClass(behaviorClassName);
+ if (expectedBehaviorClass.isAssignableFrom(behaviorClass))
+ {
+ return expectedBehaviorClass.cast(behaviorClass.newInstance());
+ }
+ else
+ {
+ throw new IllegalArgumentException(behaviorClassName + " is not a " + expectedBehaviorClass.getSimpleName());
+ }
+ }
+ catch (ClassNotFoundException e)
+ {
+ throw new IllegalArgumentException("Could not find behavior: " + behaviorClassName, e);
+ }
+ catch (IllegalAccessException e)
+ {
+ throw new IllegalArgumentException("Could not access behavior: " + behaviorClassName, e);
+ }
+ catch (InstantiationException e)
+ {
+ throw new IllegalArgumentException("Could not instantiate behavior: " + behaviorClassName, e);
+ }
+ }
+
+ return null;
+ }
+
+ protected void registerAdditionalMarkupBehaviors(BehaviorRegistry registry)
+ {
+ registry.registerMarkupBehavior(new BasicMarkupBehavior(registry));
+ registry.registerMarkupBehavior(new EmptyMarkupBehavior(registry));
+ registry.registerMarkupBehavior(new InitCookieNotRequiredMarkupBehavior(registry));
+ registry.registerMarkupBehavior(new PerGroupInitCookieMarkupBehavior(registry));
+ registry.registerMarkupBehavior(new PerUserInitCookieMarkupBehavior(registry));
+ registry.registerMarkupBehavior(new NullMarkupBehavior(registry));
+ registry.registerMarkupBehavior(new SessionMarkupBehavior(registry));
+ registry.registerMarkupBehavior(new ResourceMarkupBehavior(registry));
+ }
+
+ protected Set<String> getPortletHandles()
+ {
+ return producer.getBehaviorRegistry().getServiceDescriptionBehavior().getPortletHandles();
+ }
+
+ protected int getPortletNumber()
+ {
+ return producer.getBehaviorRegistry().getServiceDescriptionBehavior().getPortletNumber();
+ }
+
+ /**
+ * So that BehaviorBackedServiceFactory can retrieve the proper behavior when retrieving the markup service for
+ * invocation.
+ *
+ * @return
+ */
+ public static String getRequestedMarkupBehavior()
+ {
+ return requestedMarkupBehavior;
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ // reset the requested markup behavior
+ requestedMarkupBehavior = null;
+ }
+}
Property changes on: components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v1/WSRP1ConsumerBaseTest.java
___________________________________________________________________
Name: svn:executable
+ *
Copied: components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v2/InteropServiceDescriptionTestCase.java (from rev 3841, components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v1/InteropServiceDescriptionTestCase.java)
===================================================================
--- components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v2/InteropServiceDescriptionTestCase.java (rev 0)
+++ components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v2/InteropServiceDescriptionTestCase.java 2010-08-19 17:57:41 UTC (rev 3876)
@@ -0,0 +1,80 @@
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2010, Red Hat Middleware, LLC, and individual
+ * contributors as indicated by the @authors tag. See the
+ * copyright.txt in the distribution for a full listing of
+ * individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.gatein.wsrp.protocol.v2;
+
+import org.gatein.pc.api.Portlet;
+import org.gatein.pc.api.PortletInvokerException;
+import org.gatein.wsrp.test.ExtendedAssert;
+import org.gatein.wsrp.test.protocol.v2.BehaviorRegistry;
+
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+public class InteropServiceDescriptionTestCase extends V2ConsumerBaseTest
+{
+ public InteropServiceDescriptionTestCase() throws Exception
+ {
+ super();
+ }
+
+ @Override
+ public void setUp() throws Exception
+ {
+ setStrict(false);
+ super.setUp();
+ }
+
+ public void testUsesRelaxedMode()
+ {
+ ExtendedAssert.assertFalse(isStrict());
+ }
+
+ public void testGetPortlets() throws PortletInvokerException
+ {
+ //invoke consumer
+ Set returnedPortlets = consumer.getPortlets();
+
+ int portletNumber = returnedPortlets.size();
+ ExtendedAssert.assertEquals(getPortletNumber(), portletNumber);
+ Set<String> handles = getPortletHandles();
+ Set<String> consumerHandles = new HashSet<String>(portletNumber);
+ for (Object o : returnedPortlets)
+ {
+ Portlet portlet = (Portlet)o;
+ consumerHandles.add(portlet.getContext().getId());
+ }
+
+ ExtendedAssert.assertTrue(handles.containsAll(consumerHandles));
+ }
+
+ @Override
+ protected void registerAdditionalMarkupBehaviors(BehaviorRegistry registry)
+ {
+ // do nothing so that we don't pollute the service description with markup behaviors
+ }
+}
Copied: components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v2/MarkupTestCase.java (from rev 3841, components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v1/MarkupTestCase.java)
===================================================================
--- components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v2/MarkupTestCase.java (rev 0)
+++ components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v2/MarkupTestCase.java 2010-08-19 17:57:41 UTC (rev 3876)
@@ -0,0 +1,332 @@
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2010, Red Hat Middleware, LLC, and individual
+ * contributors as indicated by the @authors tag. See the
+ * copyright.txt in the distribution for a full listing of
+ * individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.gatein.wsrp.protocol.v2;
+
+import org.gatein.pc.api.Mode;
+import org.gatein.pc.api.OpaqueStateString;
+import org.gatein.pc.api.PortletContext;
+import org.gatein.pc.api.PortletInvokerException;
+import org.gatein.pc.api.WindowState;
+import org.gatein.pc.api.invocation.ActionInvocation;
+import org.gatein.pc.api.invocation.RenderInvocation;
+import org.gatein.pc.api.invocation.response.ErrorResponse;
+import org.gatein.pc.api.invocation.response.FragmentResponse;
+import org.gatein.pc.api.invocation.response.PortletInvocationResponse;
+import org.gatein.pc.api.invocation.response.UpdateNavigationalStateResponse;
+import org.gatein.pc.portlet.impl.spi.AbstractInstanceContext;
+import org.gatein.pc.portlet.impl.spi.AbstractPortalContext;
+import org.gatein.pc.portlet.impl.spi.AbstractSecurityContext;
+import org.gatein.pc.portlet.impl.spi.AbstractUserContext;
+import org.gatein.pc.portlet.impl.spi.AbstractWindowContext;
+import org.gatein.wsrp.WSRPResourceURL;
+import org.gatein.wsrp.consumer.handlers.ProducerSessionInformation;
+import org.gatein.wsrp.test.ExtendedAssert;
+import org.gatein.wsrp.test.protocol.v2.BehaviorRegistry;
+import org.gatein.wsrp.test.protocol.v2.behaviors.BasicMarkupBehavior;
+import org.gatein.wsrp.test.protocol.v2.behaviors.EmptyMarkupBehavior;
+import org.gatein.wsrp.test.protocol.v2.behaviors.GroupedPortletsServiceDescriptionBehavior;
+import org.gatein.wsrp.test.protocol.v2.behaviors.InitCookieMarkupBehavior;
+import org.gatein.wsrp.test.protocol.v2.behaviors.InitCookieNotRequiredMarkupBehavior;
+import org.gatein.wsrp.test.protocol.v2.behaviors.NullMarkupBehavior;
+import org.gatein.wsrp.test.protocol.v2.behaviors.PerGroupInitCookieMarkupBehavior;
+import org.gatein.wsrp.test.protocol.v2.behaviors.PerUserInitCookieMarkupBehavior;
+import org.gatein.wsrp.test.protocol.v2.behaviors.ResourceMarkupBehavior;
+import org.gatein.wsrp.test.protocol.v2.behaviors.SessionMarkupBehavior;
+import org.gatein.wsrp.test.support.MockHttpServletRequest;
+import org.gatein.wsrp.test.support.TestPortletInvocationContext;
+import org.oasis.wsrp.v2.CookieProtocol;
+import org.oasis.wsrp.v2.EventDescription;
+import org.oasis.wsrp.v2.ExportDescription;
+import org.oasis.wsrp.v2.Extension;
+import org.oasis.wsrp.v2.InvalidHandle;
+import org.oasis.wsrp.v2.InvalidRegistration;
+import org.oasis.wsrp.v2.ItemDescription;
+import org.oasis.wsrp.v2.ModelDescription;
+import org.oasis.wsrp.v2.ModelTypes;
+import org.oasis.wsrp.v2.ModifyRegistrationRequired;
+import org.oasis.wsrp.v2.OperationFailed;
+import org.oasis.wsrp.v2.PortletDescription;
+import org.oasis.wsrp.v2.ResourceList;
+import org.oasis.wsrp.v2.ResourceSuspended;
+
+import javax.servlet.http.HttpSession;
+import javax.xml.ws.Holder;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Collections;
+import java.util.List;
+import java.util.Locale;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision: 11320 $
+ * @since 2.4 (May 4, 2006)
+ */
+public class MarkupTestCase extends V2ConsumerBaseTest
+{
+
+ public MarkupTestCase() throws Exception
+ {
+ super();
+ }
+
+ public void testInvalidHandle()
+ {
+ try
+ {
+ consumer.invoke(createRenderInvocation("Invalid portlet handle"));
+ ExtendedAssert.fail("Should have failed on invalid portlet handle");
+ }
+ catch (PortletInvokerException expected)
+ {
+ // expected
+ }
+ }
+
+ public void testEmptyRender() throws Exception
+ {
+ checkRenderResult(consumer.invoke(createRenderInvocation(EmptyMarkupBehavior.PORTLET_HANDLE)), "");
+ }
+
+ public void testNullAction() throws Exception
+ {
+ ExtendedAssert.assertTrue(consumer.invoke(createActionInvocation(NullMarkupBehavior.PORTLET_HANDLE)) instanceof ErrorResponse);
+ }
+
+ public void testNullRender() throws Exception
+ {
+ ExtendedAssert.assertTrue(consumer.invoke(createRenderInvocation(NullMarkupBehavior.PORTLET_HANDLE)) instanceof ErrorResponse);
+ }
+
+ public void testRender() throws Exception
+ {
+ RenderInvocation render = createRenderInvocation(BasicMarkupBehavior.PORTLET_HANDLE, Mode.EDIT,
+ WindowState.NORMAL, "someNS");
+ FragmentResponse result = checkRenderResult(consumer.invoke(render), "portlet1:edit:normal:someNS");
+ ExtendedAssert.assertEquals(15, result.getCacheControl().getExpirationSecs());
+
+ render = createRenderInvocation(SessionMarkupBehavior.PORTLET_HANDLE);
+ result = checkRenderResult(consumer.invoke(render), "portlet2:0:view:maximized");
+ ExtendedAssert.assertEquals(0, result.getCacheControl().getExpirationSecs());
+ }
+
+ public void testAction() throws Exception
+ {
+ ActionInvocation action = createActionInvocation(BasicMarkupBehavior.PORTLET_HANDLE);
+
+ PortletInvocationResponse response = consumer.invoke(action);
+ ExtendedAssert.assertNotNull(response);
+ ExtendedAssert.assertTrue("Was expecting a RenderResponse. Got: " + response, response instanceof UpdateNavigationalStateResponse);
+ UpdateNavigationalStateResponse render = (UpdateNavigationalStateResponse)response;
+ ExtendedAssert.assertEquals(BasicMarkupBehavior.NS, render.getNavigationalState().getStringValue());
+ }
+
+ public void testSessionHandling() throws Exception
+ {
+ RenderInvocation render = createRenderInvocation(SessionMarkupBehavior.PORTLET_HANDLE);
+
+ PortletInvocationResponse response = consumer.invoke(render);
+
+ checkRenderResult(response, "portlet2:0:view:maximized");
+
+ // checking session information
+ ProducerSessionInformation sessionInfo = consumer.getProducerSessionInformationFrom(render);
+ String sessionId = sessionInfo.getSessionIdForPortlet(SessionMarkupBehavior.PORTLET_HANDLE);
+ ExtendedAssert.assertNotNull(sessionId);
+ ExtendedAssert.assertEquals(SessionMarkupBehavior.SESSION_ID, sessionId);
+ ExtendedAssert.assertFalse(sessionInfo.isPerGroupCookies());
+ ExtendedAssert.assertFalse(sessionInfo.isInitCookieDone());
+
+ response = consumer.invoke(render);
+ checkRenderResult(response, "portlet2:1:view:maximized");
+ }
+
+ public void testInitCookieNotCalledWhenNotNeeded() throws Exception
+ {
+ String handle = InitCookieNotRequiredMarkupBehavior.INIT_COOKIE_NOT_REQUIRED_HANDLE;
+ InitCookieMarkupBehavior behavior = (InitCookieMarkupBehavior)producer.getBehaviorRegistry().getMarkupBehaviorFor(handle);
+
+ ProducerSessionInformation sessionInfo = commonInitCookieTest(handle, behavior, CookieProtocol.NONE.value());
+
+ ExtendedAssert.assertNotNull(sessionInfo);
+ ExtendedAssert.assertFalse(sessionInfo.isPerGroupCookies());
+ ExtendedAssert.assertFalse(sessionInfo.isInitCookieDone());
+
+ ExtendedAssert.assertEquals(0, behavior.getInitCookieCallCount());
+ }
+
+ public void testInitCookiePerUser() throws PortletInvokerException, InvalidHandle
+ {
+ String handle = PerUserInitCookieMarkupBehavior.PER_USER_INIT_COOKIE_HANDLE;
+ InitCookieMarkupBehavior behavior = (InitCookieMarkupBehavior)producer.getBehaviorRegistry().getMarkupBehaviorFor(handle);
+
+
+ ProducerSessionInformation sessionInfo = commonInitCookieTest(handle, behavior, CookieProtocol.PER_USER.value());
+
+ ExtendedAssert.assertFalse(sessionInfo.isPerGroupCookies());
+ ExtendedAssert.assertTrue(sessionInfo.isInitCookieDone());
+
+ ExtendedAssert.assertNotNull(sessionInfo.getUserCookie());
+
+ ExtendedAssert.assertEquals(1, behavior.getInitCookieCallCount());
+ }
+
+ public void testInitCookiePerGroup() throws PortletInvokerException, OperationFailed, ResourceSuspended, ModifyRegistrationRequired, InvalidRegistration, InvalidHandle
+ {
+ BehaviorRegistry registry = producer.getBehaviorRegistry();
+
+ // need to setup with a specific service description behavior: we wrap the current service description
+ Holder<List<PortletDescription>> offeredPortlets = new Holder<List<PortletDescription>>();
+ registry.getServiceDescriptionBehavior().getServiceDescription(null, null, null, null, new Holder<Boolean>(),
+ offeredPortlets, new Holder<List<ItemDescription>>(),
+ null, new Holder<List<ItemDescription>>(), new Holder<List<ItemDescription>>(), new Holder<CookieProtocol>(), new Holder<ModelDescription>(), new Holder<List<String>>(),
+ new Holder<ResourceList>(), new Holder<List<EventDescription>>(), new Holder<ModelTypes>(), new Holder<List<String>>(), new Holder<ExportDescription>(), new Holder<Boolean>(), new Holder<List<Extension>>());
+ setServiceDescriptionBehavior(new GroupedPortletsServiceDescriptionBehavior(offeredPortlets.value));
+
+ String handle = PerGroupInitCookieMarkupBehavior.PER_GROUP_INIT_COOKIE_HANDLE;
+ InitCookieMarkupBehavior behavior = (InitCookieMarkupBehavior)registry.getMarkupBehaviorFor(handle);
+
+ ProducerSessionInformation sessionInfo = commonInitCookieTest(handle, behavior, CookieProtocol.PER_GROUP.value());
+ ExtendedAssert.assertTrue(sessionInfo.isPerGroupCookies());
+ ExtendedAssert.assertTrue(sessionInfo.isInitCookieDone());
+ ExtendedAssert.assertNull(sessionInfo.getUserCookie());
+
+ ExtendedAssert.assertEquals(3, behavior.getInitCookieCallCount());
+ }
+
+ public void testResource() throws PortletInvokerException, MalformedURLException
+ {
+ RenderInvocation render = createRenderInvocation(ResourceMarkupBehavior.PORTLET_HANDLE);
+ PortletInvocationResponse response = consumer.invoke(render);
+
+ String resourceID = WSRPResourceURL.encodeResource(null, new URL("http://localhost:8080/test-resource-portlet/gif/logo.gif"), false);
+ String expectedResult = "<img src='Resource id=" + resourceID + " ns=null ws=null m=null'/>";
+
+ //NOTE: the value we get back is from the TestPortletInvocationContext, not what we would normally receive
+ checkRenderResult(response, expectedResult);
+ }
+
+ private ProducerSessionInformation commonInitCookieTest(String handle, InitCookieMarkupBehavior behavior, String cookieProtocol)
+ throws PortletInvokerException
+ {
+ RenderInvocation render = createRenderInvocation(handle);
+ TestPortletInvocationContext invocationContext = (TestPortletInvocationContext)render.getContext();
+ HttpSession session = invocationContext.getClientRequest().getSession();
+
+ // set init cookie requirement
+ producer.setRequiresInitCookie(CookieProtocol.fromValue(cookieProtocol));
+
+ // tell the producer which markup behavior we want to use
+ producer.setCurrentMarkupBehaviorHandle(handle);
+
+ render = createRenderInvocation(handle, invocationContext);
+
+ ExtendedAssert.assertEquals(0, behavior.getInitCookieCallCount());
+
+ consumer.invoke(render);
+
+ ExtendedAssert.assertEquals(cookieProtocol, consumer.getProducerInfo().getRequiresInitCookie().value());
+
+ return consumer.getProducerSessionInformationFrom(session);
+ }
+
+ private FragmentResponse checkRenderResult(PortletInvocationResponse response, String markup)
+ {
+ ExtendedAssert.assertNotNull(response);
+ if (response instanceof ErrorResponse)
+ {
+ ErrorResponse errorResponse = (ErrorResponse)response;
+ ExtendedAssert.fail("Got an ErrorResponse instead of a FragmentResponse. Message: " + errorResponse.getMessage());
+ }
+ ExtendedAssert.assertTrue("Was expecting a FragmentResponse. Got: " + response, response instanceof FragmentResponse);
+ FragmentResponse fragment = (FragmentResponse)response;
+ ExtendedAssert.assertEquals(markup, fragment.getChars().toString());
+ return fragment;
+ }
+
+ private RenderInvocation createRenderInvocation(String portletHandle)
+ {
+ return createRenderInvocation(portletHandle, null);
+ }
+
+ private RenderInvocation createRenderInvocation(String portletHandle, TestPortletInvocationContext invocationContext)
+ {
+ return createRenderInvocation(portletHandle, Mode.VIEW, WindowState.MAXIMIZED, null, invocationContext);
+ }
+
+ private RenderInvocation createRenderInvocation(String portletHandle, Mode mode, WindowState state, String navigationalState)
+ {
+ return createRenderInvocation(portletHandle, mode, state, navigationalState, null);
+ }
+
+ private RenderInvocation createRenderInvocation(String portletHandle, Mode mode, WindowState state, String navigationalState, TestPortletInvocationContext invocationContext)
+ {
+ if (invocationContext == null)
+ {
+ invocationContext = new TestPortletInvocationContext();
+ }
+
+ RenderInvocation render = new RenderInvocation(invocationContext);
+ render.setTarget(PortletContext.createPortletContext(portletHandle));
+ render.setMode(mode);
+ render.setWindowState(state);
+ if (navigationalState != null)
+ {
+ render.setNavigationalState(new OpaqueStateString(navigationalState));
+ }
+
+ render.setInstanceContext(new AbstractInstanceContext(portletHandle));
+ render.setSecurityContext(new AbstractSecurityContext(MockHttpServletRequest.createMockRequest(null)));
+ render.setUserContext(new MockUserContext());
+ render.setWindowContext(new AbstractWindowContext("windowcontext"));
+ render.setPortalContext(new AbstractPortalContext());
+
+ requestedMarkupBehavior = portletHandle;
+
+ return render;
+ }
+
+ private ActionInvocation createActionInvocation(String portletHandle)
+ {
+ TestPortletInvocationContext ac = new TestPortletInvocationContext();
+ ActionInvocation action = new ActionInvocation(ac);
+ action.setInstanceContext(new AbstractInstanceContext(portletHandle));
+ action.setSecurityContext(new AbstractSecurityContext(MockHttpServletRequest.createMockRequest(null)));
+ action.setUserContext(new MockUserContext());
+ action.setTarget(PortletContext.createPortletContext(portletHandle));
+
+ requestedMarkupBehavior = portletHandle;
+
+ return action;
+ }
+
+ static class MockUserContext extends AbstractUserContext
+ {
+ @Override
+ public List<Locale> getLocales()
+ {
+ return Collections.singletonList(Locale.ENGLISH);
+ }
+ }
+}
Copied: components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v2/PortletManagementTestCase.java (from rev 3841, components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v1/PortletManagementTestCase.java)
===================================================================
--- components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v2/PortletManagementTestCase.java (rev 0)
+++ components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v2/PortletManagementTestCase.java 2010-08-19 17:57:41 UTC (rev 3876)
@@ -0,0 +1,160 @@
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2010, Red Hat Middleware, LLC, and individual
+ * contributors as indicated by the @authors tag. See the
+ * copyright.txt in the distribution for a full listing of
+ * individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.gatein.wsrp.protocol.v2;
+
+import org.gatein.pc.api.Portlet;
+import org.gatein.pc.api.PortletContext;
+import org.gatein.pc.api.PortletInvokerException;
+import org.gatein.pc.api.PortletStateType;
+import org.gatein.pc.api.state.DestroyCloneFailure;
+import org.gatein.wsrp.test.ExtendedAssert;
+import org.gatein.wsrp.test.protocol.v2.BehaviorRegistry;
+import org.gatein.wsrp.test.protocol.v2.behaviors.BasicMarkupBehavior;
+import org.gatein.wsrp.test.protocol.v2.behaviors.BasicPortletManagementBehavior;
+import org.gatein.wsrp.test.protocol.v2.behaviors.DestroyClonesPortletManagementBehavior;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision: 8784 $
+ * @since 2.6
+ */
+public class PortletManagementTestCase extends V2ConsumerBaseTest
+{
+ public PortletManagementTestCase() throws Exception
+ {
+ }
+
+ /*public void testClone() throws Exception
+ {
+ PortletContext original = PortletContext.createPortletContext(BasicMarkupBehavior.PORTLET_HANDLE);
+ PortletContext clone = consumer.createClone(original);
+ ExtendedAssert.assertNotNull(clone);
+ ExtendedAssert.assertFalse(original.equals(clone));
+ ExtendedAssert.assertEquals(BasicPortletManagementBehavior.CLONED_HANDLE, clone.getId());
+
+ Portlet originalPortlet = consumer.getPortlet(original);
+ Portlet clonePortlet = consumer.getPortlet(clone);
+ ExtendedAssert.assertNotNull(clonePortlet);
+ ExtendedAssert.assertFalse(originalPortlet.getContext().equals(clonePortlet.getContext()));
+
+ // information about the portlet should be the same
+ MetaInfo originalInfo = originalPortlet.getInfo().getMeta();
+ MetaInfo cloneInfo = clonePortlet.getInfo().getMeta();
+ ExtendedAssert.assertEquals(originalInfo.getMetaValue(MetaInfo.TITLE), cloneInfo.getMetaValue(MetaInfo.TITLE));
+ ExtendedAssert.assertEquals(originalInfo.getMetaValue(MetaInfo.DESCRIPTION), cloneInfo.getMetaValue(MetaInfo.DESCRIPTION));
+ }
+
+ public void testGetSetProperties() throws Exception
+ {
+ PortletContext original = PortletContext.createPortletContext(BasicMarkupBehavior.PORTLET_HANDLE);
+ PropertyMap props = consumer.getProperties(original);
+ checkProperties(props, BasicPortletManagementBehavior.PROPERTY_VALUE);
+
+ PortletContext clone = consumer.createClone(original);
+ props = consumer.getProperties(clone);
+ checkProperties(props, BasicPortletManagementBehavior.PROPERTY_VALUE);
+
+ consumer.setProperties(clone, new PropertyChange[]
+ {
+ PropertyChange.newUpdate(BasicPortletManagementBehavior.PROPERTY_NAME,
+ new StringValue(BasicPortletManagementBehavior.PROPERTY_NEW_VALUE))
+ });
+ checkProperties(consumer.getProperties(clone), BasicPortletManagementBehavior.PROPERTY_NEW_VALUE);
+
+ consumer.setProperties(clone, new PropertyChange[]
+ {
+ PropertyChange.newReset(BasicPortletManagementBehavior.PROPERTY_NAME)
+ });
+ checkProperties(consumer.getProperties(clone), BasicPortletManagementBehavior.PROPERTY_VALUE);
+ }
+
+ private void checkProperties(PropertyMap props, String expectedValue)
+ {
+ ExtendedAssert.assertNotNull(props);
+ ExtendedAssert.assertEquals(1, props.size());
+ ExtendedAssert.assertEquals(expectedValue,
+ props.getProperty(BasicPortletManagementBehavior.PROPERTY_NAME).asString());
+ }*/
+
+ public void testDestroyClones() throws Exception
+ {
+ // switch the behavior for portlet management
+ BehaviorRegistry behaviorRegistry = producer.getBehaviorRegistry();
+ behaviorRegistry.setPortletManagementBehavior(new DestroyClonesPortletManagementBehavior(behaviorRegistry));
+
+ PortletContext original = PortletContext.createPortletContext(BasicMarkupBehavior.PORTLET_HANDLE);
+ PortletContext clone = consumer.createClone(PortletStateType.OPAQUE, original);
+ ExtendedAssert.assertNotNull(clone);
+ Portlet portlet = consumer.getPortlet(clone);
+ ExtendedAssert.assertNotNull(portlet);
+ ExtendedAssert.assertEquals(BasicPortletManagementBehavior.CLONED_HANDLE, portlet.getContext().getId());
+
+ List clones = new ArrayList(1);
+ clones.add(clone);
+ List result = consumer.destroyClones(clones);
+ ExtendedAssert.assertTrue(result.isEmpty());
+ try
+ {
+ consumer.getPortlet(clone);
+ ExtendedAssert.fail("Should have failed: clone should not exist anymore!");
+ }
+ catch (PortletInvokerException expected)
+ {
+ }
+
+ // re-create clone and try again with an added invalid portlet context
+ clone = consumer.createClone(PortletStateType.OPAQUE, original);
+ PortletContext invalidContext = PortletContext.createPortletContext("invalid");
+ clones.add(invalidContext);
+ result = consumer.destroyClones(clones);
+ ExtendedAssert.assertEquals(1, result.size());
+ DestroyCloneFailure failure = (DestroyCloneFailure)result.get(0);
+ ExtendedAssert.assertEquals("invalid", failure.getPortletId());
+ try
+ {
+ consumer.getPortlet(clone);
+ ExtendedAssert.fail("Should have failed: clone should not exist anymore!");
+ }
+ catch (PortletInvokerException expected)
+ {
+ }
+ }
+
+ /*public void testInvalidSetProperties() throws Exception
+ {
+ PortletContext original = PortletContext.createPortletContext(BasicMarkupBehavior.PORTLET_HANDLE);
+ try
+ {
+ consumer.setProperties(original, null);
+ ExtendedAssert.fail("Shouldn't be possible to set properties with null changes");
+ }
+ catch (IllegalArgumentException expected)
+ {
+ //expected
+ }
+ }*/
+}
Copied: components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v2/ServiceDescriptionTestCase.java (from rev 3841, components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v1/ServiceDescriptionTestCase.java)
===================================================================
--- components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v2/ServiceDescriptionTestCase.java (rev 0)
+++ components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v2/ServiceDescriptionTestCase.java 2010-08-19 17:57:41 UTC (rev 3876)
@@ -0,0 +1,69 @@
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2010, Red Hat Middleware, LLC, and individual
+ * contributors as indicated by the @authors tag. See the
+ * copyright.txt in the distribution for a full listing of
+ * individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.gatein.wsrp.protocol.v2;
+
+import org.gatein.pc.api.Portlet;
+import org.gatein.pc.api.PortletContext;
+import org.gatein.wsrp.test.ExtendedAssert;
+import org.gatein.wsrp.test.protocol.v1.behaviors.BasicMarkupBehavior;
+import org.gatein.wsrp.test.protocol.v1.behaviors.SessionMarkupBehavior;
+
+/**
+ * @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw Dawidowicz</a>
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision: 11320 $
+ * @since 2.4
+ */
+public class ServiceDescriptionTestCase extends InteropServiceDescriptionTestCase
+{
+
+ public ServiceDescriptionTestCase() throws Exception
+ {
+ super();
+ }
+
+
+ @Override
+ public void setUp() throws Exception
+ {
+ super.setUp();
+
+ // use strict mode
+ setStrict(true);
+ }
+
+ public void testUsesRelaxedMode()
+ {
+ ExtendedAssert.assertTrue(isStrict());
+ }
+
+ public void testGetPortlet() throws Exception
+ {
+ //obtain one portlet
+ Portlet portlet = consumer.getPortlet(PortletContext.createPortletContext(BasicMarkupBehavior.PORTLET_HANDLE));
+ checkPortlet(portlet, "", BasicMarkupBehavior.PORTLET_HANDLE);
+
+ portlet = consumer.getPortlet(PortletContext.createPortletContext(SessionMarkupBehavior.PORTLET_HANDLE));
+ checkPortlet(portlet, "2", SessionMarkupBehavior.PORTLET_HANDLE);
+ }
+}
Copied: components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v2/V2ConsumerBaseTest.java (from rev 3841, components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v1/V1ConsumerBaseTest.java)
===================================================================
--- components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v2/V2ConsumerBaseTest.java (rev 0)
+++ components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v2/V2ConsumerBaseTest.java 2010-08-19 17:57:41 UTC (rev 3876)
@@ -0,0 +1,56 @@
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2010, Red Hat Middleware, LLC, and individual
+ * contributors as indicated by the @authors tag. See the
+ * copyright.txt in the distribution for a full listing of
+ * individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.gatein.wsrp.protocol.v2;
+
+import org.gatein.pc.api.Portlet;
+import org.gatein.pc.api.info.MetaInfo;
+import org.gatein.wsrp.test.ExtendedAssert;
+import org.gatein.wsrp.test.protocol.v2.TestProducerBehavior;
+
+/**
+ * @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw Dawidowicz</a>
+ * @version $Revision: 11320 $
+ */
+public class V2ConsumerBaseTest extends WSRP2ConsumerBaseTest
+{
+ public V2ConsumerBaseTest() throws Exception
+ {
+ }
+
+ protected void checkPortlet(Portlet portlet, String suffix, String handle)
+ {
+ MetaInfo meta = portlet.getInfo().getMeta();
+ ExtendedAssert.assertEquals(handle, portlet.getContext().getId());
+ ExtendedAssert.assertEquals(TestProducerBehavior.SAMPLE_DESCRIPTION + suffix, TestProducerBehavior.extractString(meta.getMetaValue(MetaInfo.DESCRIPTION)));
+ ExtendedAssert.assertEquals(TestProducerBehavior.SAMPLE_TITLE + suffix, TestProducerBehavior.extractString(meta.getMetaValue(MetaInfo.TITLE)));
+ ExtendedAssert.assertEquals(TestProducerBehavior.SAMPLE_SHORTTITLE + suffix, TestProducerBehavior.extractString(meta.getMetaValue(MetaInfo.SHORT_TITLE)));
+ ExtendedAssert.assertEquals(TestProducerBehavior.SAMPLE_DISPLAYNAME + suffix, TestProducerBehavior.extractString(meta.getMetaValue(MetaInfo.DISPLAY_NAME)));
+ ExtendedAssert.assertEquals(TestProducerBehavior.SAMPLE_KEYWORD + suffix, TestProducerBehavior.extractString(meta.getMetaValue(MetaInfo.KEYWORDS)));
+ }
+
+
+ public void setUp() throws Exception
+ {
+ super.setUp();
+ }
+}
Property changes on: components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v2/V2ConsumerBaseTest.java
___________________________________________________________________
Name: svn:executable
+ *
Added: components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v2/WSRP2ConsumerBaseTest.java
===================================================================
--- components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v2/WSRP2ConsumerBaseTest.java (rev 0)
+++ components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v2/WSRP2ConsumerBaseTest.java 2010-08-19 17:57:41 UTC (rev 3876)
@@ -0,0 +1,222 @@
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2010, Red Hat Middleware, LLC, and individual
+ * contributors as indicated by the @authors tag. See the
+ * copyright.txt in the distribution for a full listing of
+ * individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.gatein.wsrp.protocol.v2;
+
+import junit.framework.TestCase;
+import org.gatein.wsrp.consumer.EndpointConfigurationInfo;
+import org.gatein.wsrp.consumer.ProducerInfo;
+import org.gatein.wsrp.consumer.WSRPConsumerImpl;
+import org.gatein.wsrp.test.ExtendedAssert;
+import org.gatein.wsrp.test.protocol.v2.BehaviorBackedServiceFactory;
+import org.gatein.wsrp.test.protocol.v2.BehaviorRegistry;
+import org.gatein.wsrp.test.protocol.v2.PortletManagementBehavior;
+import org.gatein.wsrp.test.protocol.v2.RegistrationBehavior;
+import org.gatein.wsrp.test.protocol.v2.ServiceDescriptionBehavior;
+import org.gatein.wsrp.test.protocol.v2.TestProducerBehavior;
+import org.gatein.wsrp.test.protocol.v2.TestWSRPProducer;
+import org.gatein.wsrp.test.protocol.v2.TestWSRPProducerImpl;
+import org.gatein.wsrp.test.protocol.v2.behaviors.BasicMarkupBehavior;
+import org.gatein.wsrp.test.protocol.v2.behaviors.BasicPortletManagementBehavior;
+import org.gatein.wsrp.test.protocol.v2.behaviors.BasicServiceDescriptionBehavior;
+import org.gatein.wsrp.test.protocol.v2.behaviors.EmptyMarkupBehavior;
+import org.gatein.wsrp.test.protocol.v2.behaviors.InitCookieNotRequiredMarkupBehavior;
+import org.gatein.wsrp.test.protocol.v2.behaviors.NullMarkupBehavior;
+import org.gatein.wsrp.test.protocol.v2.behaviors.PerGroupInitCookieMarkupBehavior;
+import org.gatein.wsrp.test.protocol.v2.behaviors.PerUserInitCookieMarkupBehavior;
+import org.gatein.wsrp.test.protocol.v2.behaviors.ResourceMarkupBehavior;
+import org.gatein.wsrp.test.protocol.v2.behaviors.SessionMarkupBehavior;
+import org.gatein.wsrp.test.support.MockConsumerRegistry;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Set;
+
+/**
+ * @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw Dawidowicz</a>
+ * @version $Revision: 11344 $
+ */
+public abstract class WSRP2ConsumerBaseTest extends TestCase
+{
+ private static Logger log = LoggerFactory.getLogger(WSRP2ConsumerBaseTest.class);
+
+ /** . */
+ private static final String TEST_PRODUCER_ID = "test_producer";
+
+ /** . */
+ protected TestWSRPProducer producer = new TestWSRPProducerImpl();
+
+ /** . */
+ protected WSRPConsumerImpl consumer = new WSRPConsumerImpl();
+
+ private boolean strict = true;
+ protected static String requestedMarkupBehavior;
+
+
+ public void setUp() throws Exception
+ {
+ // reset producer state
+ producer.reset();
+
+ // set the test producer identifier
+ ProducerInfo producerInfo = consumer.getProducerInfo();
+ producerInfo.setId(TEST_PRODUCER_ID);
+
+ // reset the behaviors
+ BehaviorRegistry registry = producer.getBehaviorRegistry();
+ setServiceDescriptionBehavior(null);
+ setPortletManagementBehavior(null);
+ setRegistrationBehavior(null);
+ registerAdditionalMarkupBehaviors(registry);
+
+ // use a fresh ConsumerRegistry
+ producerInfo.setRegistry(new MockConsumerRegistry());
+
+ // use
+ producerInfo.setEndpointConfigurationInfo(new EndpointConfigurationInfo(new BehaviorBackedServiceFactory(registry)));
+
+ // make sure we use clean producer info for each test
+ consumer.refreshProducerInfo();
+
+ // use cache to avoid un-necessary calls
+ producerInfo.setExpirationCacheSeconds(120);
+ }
+
+ protected void setRegistrationBehavior(RegistrationBehavior behavior)
+ {
+ producer.getBehaviorRegistry().setRegistrationBehavior(behavior);
+ }
+
+ protected void setServiceDescriptionBehavior(ServiceDescriptionBehavior behavior)
+ {
+ if (behavior == null)
+ {
+ log.debug("Given service description behavior was null, using the default one instead!");
+ behavior = new BasicServiceDescriptionBehavior();
+ }
+
+ producer.getBehaviorRegistry().setServiceDescriptionBehavior(behavior);
+ }
+
+ protected void setPortletManagementBehavior(PortletManagementBehavior behavior)
+ {
+ BehaviorRegistry registry = producer.getBehaviorRegistry();
+
+ if (behavior == null)
+ {
+ log.debug("Given portlet management behavior was null, using the default one instead!");
+ behavior = new BasicPortletManagementBehavior(registry);
+ }
+
+ registry.setPortletManagementBehavior(behavior);
+ }
+
+ public void testProducerId()
+ {
+ ExtendedAssert.assertEquals(TEST_PRODUCER_ID, consumer.getProducerId());
+ }
+
+ public void setStrict(boolean strict)
+ {
+ this.strict = strict;
+ producer.usingStrictModeChangedTo(strict);
+ }
+
+ public boolean isStrict()
+ {
+ return strict;
+ }
+
+ private <T extends TestProducerBehavior> T createBehavior(String behaviorClassName, Class<T> expectedBehaviorClass)
+ {
+ if (behaviorClassName != null)
+ {
+ try
+ {
+ Class behaviorClass = getClass().getClassLoader().loadClass(behaviorClassName);
+ if (expectedBehaviorClass.isAssignableFrom(behaviorClass))
+ {
+ return expectedBehaviorClass.cast(behaviorClass.newInstance());
+ }
+ else
+ {
+ throw new IllegalArgumentException(behaviorClassName + " is not a " + expectedBehaviorClass.getSimpleName());
+ }
+ }
+ catch (ClassNotFoundException e)
+ {
+ throw new IllegalArgumentException("Could not find behavior: " + behaviorClassName, e);
+ }
+ catch (IllegalAccessException e)
+ {
+ throw new IllegalArgumentException("Could not access behavior: " + behaviorClassName, e);
+ }
+ catch (InstantiationException e)
+ {
+ throw new IllegalArgumentException("Could not instantiate behavior: " + behaviorClassName, e);
+ }
+ }
+
+ return null;
+ }
+
+ protected void registerAdditionalMarkupBehaviors(BehaviorRegistry registry)
+ {
+ registry.registerMarkupBehavior(new BasicMarkupBehavior(registry));
+ registry.registerMarkupBehavior(new EmptyMarkupBehavior(registry));
+ registry.registerMarkupBehavior(new InitCookieNotRequiredMarkupBehavior(registry));
+ registry.registerMarkupBehavior(new PerGroupInitCookieMarkupBehavior(registry));
+ registry.registerMarkupBehavior(new PerUserInitCookieMarkupBehavior(registry));
+ registry.registerMarkupBehavior(new NullMarkupBehavior(registry));
+ registry.registerMarkupBehavior(new SessionMarkupBehavior(registry));
+ registry.registerMarkupBehavior(new ResourceMarkupBehavior(registry));
+ }
+
+ protected Set<String> getPortletHandles()
+ {
+ return producer.getBehaviorRegistry().getServiceDescriptionBehavior().getPortletHandles();
+ }
+
+ protected int getPortletNumber()
+ {
+ return producer.getBehaviorRegistry().getServiceDescriptionBehavior().getPortletNumber();
+ }
+
+ /**
+ * So that BehaviorBackedServiceFactory can retrieve the proper behavior when retrieving the markup service for
+ * invocation.
+ *
+ * @return
+ */
+ public static String getRequestedMarkupBehavior()
+ {
+ return requestedMarkupBehavior;
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ // reset the requested markup behavior
+ requestedMarkupBehavior = null;
+ }
+}
Modified: components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/BehaviorBackedServiceFactory.java
===================================================================
--- components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/BehaviorBackedServiceFactory.java 2010-08-19 16:17:17 UTC (rev 3875)
+++ components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/BehaviorBackedServiceFactory.java 2010-08-19 17:57:41 UTC (rev 3876)
@@ -26,7 +26,7 @@
import org.gatein.common.NotYetImplemented;
import org.gatein.pc.api.Mode;
import org.gatein.pc.api.WindowState;
-import org.gatein.wsrp.consumer.WSRPConsumerBaseTest;
+import org.gatein.wsrp.protocol.v1.WSRP1ConsumerBaseTest;
import org.gatein.wsrp.services.MarkupService;
import org.gatein.wsrp.services.PortletManagementService;
import org.gatein.wsrp.services.RegistrationService;
@@ -64,10 +64,6 @@
{
private BehaviorRegistry registry;
private final static String MARKUP = "markup";
- private final static String SD_URL = "sd";
- private final static String M_URL = "m";
- private final static String PM_URL = "pm";
- private final static String R_URL = "r";
private boolean initialized = false;
private String wsdl = DEFAULT_WSDL_URL;
public static final String DEFAULT_WSDL_URL = "http://example.com/producer?wsdl";
@@ -98,7 +94,7 @@
}
if (WSRPV1MarkupPortType.class.isAssignableFrom(serviceClass))
{
- String requestedMarkupBehavior = WSRPConsumerBaseTest.getRequestedMarkupBehavior();
+ String requestedMarkupBehavior = WSRP1ConsumerBaseTest.getRequestedMarkupBehavior();
if (requestedMarkupBehavior == null)
{
requestedMarkupBehavior = MARKUP;
Modified: components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/behaviors/PerUserInitCookieMarkupBehavior.java
===================================================================
--- components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/behaviors/PerUserInitCookieMarkupBehavior.java 2010-08-19 16:17:17 UTC (rev 3875)
+++ components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/behaviors/PerUserInitCookieMarkupBehavior.java 2010-08-19 17:57:41 UTC (rev 3876)
@@ -23,11 +23,6 @@
package org.gatein.wsrp.test.protocol.v1.behaviors;
-import java.util.List;
-
-import javax.xml.soap.MimeHeaders;
-import javax.xml.ws.handler.soap.SOAPMessageContext;
-
import org.gatein.wsrp.handler.RequestHeaderClientHandler;
import org.gatein.wsrp.test.handler.MockSOAPMessage;
import org.gatein.wsrp.test.handler.MockSOAPMessageContext;
@@ -38,6 +33,10 @@
import org.oasis.wsrp.v1.V1OperationFailed;
import org.oasis.wsrp.v1.V1RegistrationContext;
+import javax.xml.soap.MimeHeaders;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+import java.util.List;
+
/**
* @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
* @version $Revision$
@@ -55,10 +54,10 @@
{
portletHandle = PER_USER_INIT_COOKIE_HANDLE;
}
-
+
@Override
public List<V1Extension> initCookie(V1RegistrationContext registrationContext) throws V1InvalidRegistration,
- V1AccessDenied, V1OperationFailed
+ V1AccessDenied, V1OperationFailed
{
//Set the Cookie through the RequestHeaderClientHandler manually here since we use a test BehaviourBackedServiceFactory instead
//of the real SOAPServiceFactory.
@@ -67,12 +66,10 @@
MimeHeaders headers = new MimeHeaders();
headers.setHeader("Set-Cookie", "name=value");
message.setMimeHeaders(headers);
-
+
RequestHeaderClientHandler rhch = new RequestHeaderClientHandler();
rhch.handleResponse(msgContext);
-
+
return super.initCookie(registrationContext);
}
-
-
}
Modified: components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/BehaviorBackedServiceFactory.java
===================================================================
--- components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/BehaviorBackedServiceFactory.java 2010-08-19 16:17:17 UTC (rev 3875)
+++ components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/BehaviorBackedServiceFactory.java 2010-08-19 17:57:41 UTC (rev 3876)
@@ -26,6 +26,7 @@
import org.gatein.common.NotYetImplemented;
import org.gatein.pc.api.Mode;
import org.gatein.pc.api.WindowState;
+import org.gatein.wsrp.protocol.v2.WSRP2ConsumerBaseTest;
import org.gatein.wsrp.services.MarkupService;
import org.gatein.wsrp.services.PortletManagementService;
import org.gatein.wsrp.services.RegistrationService;
@@ -63,10 +64,6 @@
{
private BehaviorRegistry registry;
private final static String MARKUP = "markup";
- private final static String SD_URL = "sd";
- private final static String M_URL = "m";
- private final static String PM_URL = "pm";
- private final static String R_URL = "r";
private boolean initialized = false;
private String wsdl = DEFAULT_WSDL_URL;
public static final String DEFAULT_WSDL_URL = "http://example.com/producer?wsdl";
@@ -75,7 +72,12 @@
public BehaviorBackedServiceFactory()
{
- registry = new BehaviorRegistry();
+ this(new BehaviorRegistry());
+ }
+
+ public BehaviorBackedServiceFactory(BehaviorRegistry registry)
+ {
+ this.registry = registry;
registry.registerMarkupBehavior(new SimpleMarkupBehavior());
}
@@ -92,7 +94,12 @@
}
if (WSRPV2MarkupPortType.class.isAssignableFrom(serviceClass))
{
- return (T)registry.getMarkupBehaviorFor(MARKUP);
+ String requestedMarkupBehavior = WSRP2ConsumerBaseTest.getRequestedMarkupBehavior();
+ if (requestedMarkupBehavior == null)
+ {
+ requestedMarkupBehavior = MARKUP;
+ }
+ return (T)registry.getMarkupBehaviorFor(requestedMarkupBehavior);
}
if (WSRPV2PortletManagementPortType.class.isAssignableFrom(serviceClass))
{
Modified: components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/MarkupBehavior.java
===================================================================
--- components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/MarkupBehavior.java 2010-08-19 16:17:17 UTC (rev 3875)
+++ components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/MarkupBehavior.java 2010-08-19 17:57:41 UTC (rev 3876)
@@ -160,7 +160,14 @@
throw new NotYetImplemented();
}
- public void getMarkup(@WebParam(name = "registrationContext", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types") RegistrationContext registrationContext, @WebParam(name = "portletContext", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types") PortletContext portletContext, @WebParam(name = "runtimeContext", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types") RuntimeContext runtimeContext, @WebParam(name = "userContext", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types") UserContext userContext, @WebParam(name = "markupParams", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types") MarkupParams markupParams, @WebParam(name = "markupContext", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types", mode = WebParam.Mode.OUT) Holder<MarkupContext> markupContext, @WebParam(name = "sessionContext", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types", mode = WebParam.Mode.OUT) Holder<SessionContext> sessionContext, @WebParam(name = "extensions", targetNamespace = "urn:oasi!
s:names:tc:wsrp:v2:types", mode = WebParam.Mode.OUT) Holder<List<Extension>> extensions) throws AccessDenied, InconsistentParameters, InvalidCookie, InvalidHandle, InvalidRegistration, InvalidSession, InvalidUserCategory, MissingParameters, ModifyRegistrationRequired, OperationFailed, ResourceSuspended, UnsupportedLocale, UnsupportedMimeType, UnsupportedMode, UnsupportedWindowState
+ public void getMarkup(@WebParam(name = "registrationContext", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types") RegistrationContext registrationContext,
+ @WebParam(name = "portletContext", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types") PortletContext portletContext,
+ @WebParam(name = "runtimeContext", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types") RuntimeContext runtimeContext,
+ @WebParam(name = "userContext", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types") UserContext userContext,
+ @WebParam(name = "markupParams", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types") MarkupParams markupParams,
+ @WebParam(name = "markupContext", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types", mode = WebParam.Mode.OUT) Holder<MarkupContext> markupContext,
+ @WebParam(name = "sessionContext", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types", mode = WebParam.Mode.OUT) Holder<SessionContext> sessionContext,
+ @WebParam(name = "extensions", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types", mode = WebParam.Mode.OUT) Holder<List<Extension>> extensions) throws AccessDenied, InconsistentParameters, InvalidCookie, InvalidHandle, InvalidRegistration, InvalidSession, InvalidUserCategory, MissingParameters, ModifyRegistrationRequired, OperationFailed, ResourceSuspended, UnsupportedLocale, UnsupportedMimeType, UnsupportedMode, UnsupportedWindowState
{
GetMarkup gm = new GetMarkup();
gm.setMarkupParams(markupParams);
@@ -181,6 +188,9 @@
MarkupResponse markupResponse = WSRPTypeFactory.createMarkupResponse(markupContext.value);
modifyResponseIfNeeded(markupResponse);
+
+ markupContext.value = markupResponse.getMarkupContext();
+ sessionContext.value = markupResponse.getSessionContext();
}
public List<Extension> initCookie(@WebParam(name = "registrationContext", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types") RegistrationContext registrationContext, @WebParam(name = "userContext", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types") UserContext userContext) throws AccessDenied, InvalidRegistration, ModifyRegistrationRequired, OperationFailed, OperationNotSupported, ResourceSuspended
Modified: components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/behaviors/BasicPortletManagementBehavior.java
===================================================================
--- components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/behaviors/BasicPortletManagementBehavior.java 2010-08-19 16:17:17 UTC (rev 3875)
+++ components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/behaviors/BasicPortletManagementBehavior.java 2010-08-19 17:57:41 UTC (rev 3876)
@@ -143,13 +143,20 @@
WSRP2ExceptionFactory.throwMissingParametersIfValueIsMissing(portletHandles, "portlet handles", "DestroyPortlets");
}
+ List<FailedPortlets> failedPortletsList = failedPortlets.value;
+ if (failedPortletsList == null)
+ {
+ failedPortletsList = new ArrayList<FailedPortlets>();
+ failedPortlets.value = failedPortletsList;
+ }
+
for (String handle : portletHandles)
{
if (!CLONED_HANDLE.equals(handle))
{
ArrayList<String> failed = new ArrayList<String>();
failed.add(handle);
- failedPortlets.value.add(WSRPTypeFactory.createFailedPortlets(failed, ErrorCodes.Codes.OPERATIONFAILED, "Handle '" + handle + "' doesn't exist"));
+ failedPortletsList.add(WSRPTypeFactory.createFailedPortlets(failed, ErrorCodes.Codes.OPERATIONFAILED, "Handle '" + handle + "' doesn't exist"));
}
}
}
Modified: components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/behaviors/PerUserInitCookieMarkupBehavior.java
===================================================================
--- components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/behaviors/PerUserInitCookieMarkupBehavior.java 2010-08-19 16:17:17 UTC (rev 3875)
+++ components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/behaviors/PerUserInitCookieMarkupBehavior.java 2010-08-19 17:57:41 UTC (rev 3876)
@@ -23,8 +23,25 @@
package org.gatein.wsrp.test.protocol.v2.behaviors;
+import org.gatein.wsrp.handler.RequestHeaderClientHandler;
+import org.gatein.wsrp.test.handler.MockSOAPMessage;
+import org.gatein.wsrp.test.handler.MockSOAPMessageContext;
import org.gatein.wsrp.test.protocol.v2.BehaviorRegistry;
+import org.oasis.wsrp.v2.AccessDenied;
+import org.oasis.wsrp.v2.Extension;
+import org.oasis.wsrp.v2.InvalidRegistration;
+import org.oasis.wsrp.v2.ModifyRegistrationRequired;
+import org.oasis.wsrp.v2.OperationFailed;
+import org.oasis.wsrp.v2.OperationNotSupported;
+import org.oasis.wsrp.v2.RegistrationContext;
+import org.oasis.wsrp.v2.ResourceSuspended;
+import org.oasis.wsrp.v2.UserContext;
+import javax.jws.WebParam;
+import javax.xml.soap.MimeHeaders;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+import java.util.List;
+
/**
* @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
* @version $Revision$
@@ -42,4 +59,21 @@
{
portletHandle = PER_USER_INIT_COOKIE_HANDLE;
}
+
+ @Override
+ public List<Extension> initCookie(@WebParam(name = "registrationContext", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types") RegistrationContext registrationContext, @WebParam(name = "userContext", targetNamespace = "urn:oasis:names:tc:wsrp:v2:types") UserContext userContext) throws AccessDenied, InvalidRegistration, ModifyRegistrationRequired, OperationFailed, OperationNotSupported, ResourceSuspended
+ {
+ //Set the Cookie through the RequestHeaderClientHandler manually here since we use a test BehaviourBackedServiceFactory instead
+ //of the real SOAPServiceFactory.
+ MockSOAPMessage message = new MockSOAPMessage();
+ SOAPMessageContext msgContext = MockSOAPMessageContext.createMessageContext(message, getClass().getClassLoader());
+ MimeHeaders headers = new MimeHeaders();
+ headers.setHeader("Set-Cookie", "name=value");
+ message.setMimeHeaders(headers);
+
+ RequestHeaderClientHandler rhch = new RequestHeaderClientHandler();
+ rhch.handleResponse(msgContext);
+
+ return super.initCookie(registrationContext, userContext);
+ }
}
Modified: components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/behaviors/SessionMarkupBehavior.java
===================================================================
--- components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/behaviors/SessionMarkupBehavior.java 2010-08-19 16:17:17 UTC (rev 3875)
+++ components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/behaviors/SessionMarkupBehavior.java 2010-08-19 17:57:41 UTC (rev 3876)
@@ -50,6 +50,7 @@
import org.oasis.wsrp.v2.ResourceSuspended;
import org.oasis.wsrp.v2.RuntimeContext;
import org.oasis.wsrp.v2.SessionContext;
+import org.oasis.wsrp.v2.SessionParams;
import org.oasis.wsrp.v2.UnsupportedLocale;
import org.oasis.wsrp.v2.UnsupportedMimeType;
import org.oasis.wsrp.v2.UnsupportedMode;
@@ -86,7 +87,15 @@
public String getMarkupString(Mode mode, WindowState windowState, String navigationalState, GetMarkup getMarkup)
{
StringBuffer markupString = new StringBuffer("portlet2:");
- sessionId = getMarkup.getRuntimeContext().getSessionParams().getSessionID();
+ SessionParams sessionParams = getMarkup.getRuntimeContext().getSessionParams();
+ if (sessionParams != null)
+ {
+ sessionId = sessionParams.getSessionID();
+ }
+ else
+ {
+ sessionId = null;
+ }
// if we have a session, increments count to simulate session usage
if (SESSION_ID.equals(sessionId))
14 years, 4 months
gatein SVN: r3875 - in portal/branches/portalsecurity/portal/src: test/java/org/exoplatform/portal/config/security and 3 other directories.
by do-not-reply@jboss.org
Author: sohil.shah(a)jboss.com
Date: 2010-08-19 12:17:17 -0400 (Thu, 19 Aug 2010)
New Revision: 3875
Modified:
portal/branches/portalsecurity/portal/src/main/java/org/exoplatform/portal/config/security/plugin/ExoPolicyProvisioner.java
portal/branches/portalsecurity/portal/src/test/java/org/exoplatform/portal/config/security/AbstractTestUserACL.java
portal/branches/portalsecurity/portal/src/test/java/org/exoplatform/portal/config/security/nav/TestGroupNavACL.java
portal/branches/portalsecurity/portal/src/test/java/org/exoplatform/portal/config/security/nav/TestPortalNavACL.java
portal/branches/portalsecurity/portal/src/test/java/org/exoplatform/portal/config/security/nav/TestUserNavACL.java
portal/branches/portalsecurity/portal/src/test/java/org/exoplatform/portal/config/security/page/TestUserPageACL.java
portal/branches/portalsecurity/portal/src/test/java/org/exoplatform/portal/config/security/plugin/BaseSharedPageACL.java
Log:
testsuite success for rule based UserACL
Modified: portal/branches/portalsecurity/portal/src/main/java/org/exoplatform/portal/config/security/plugin/ExoPolicyProvisioner.java
===================================================================
--- portal/branches/portalsecurity/portal/src/main/java/org/exoplatform/portal/config/security/plugin/ExoPolicyProvisioner.java 2010-08-19 14:57:41 UTC (rev 3874)
+++ portal/branches/portalsecurity/portal/src/main/java/org/exoplatform/portal/config/security/plugin/ExoPolicyProvisioner.java 2010-08-19 16:17:17 UTC (rev 3875)
@@ -257,10 +257,63 @@
}
}
else
- {
+ {
+ //SuperUser Access
+ org.jboss.security.authz.components.subject.Identity superuser = new org.jboss.security.authz.components.subject.Identity();
+ superuser.setName(this.superuser);
+ context.addPolicyRule(Effect.PERMIT, new Read(), superuser);
+
+ //Sets up access for the owner of the page
Identity identity = new Identity();
identity.setName(page.getOwnerId());
context.addPolicyRule(Effect.PERMIT, identity, identity);
+
+ //Sets up ReadAccess based on specified group access
+ if (page.getAccessPermissions() != null
+ && page.getAccessPermissions().length > 0)
+ {
+ ExoRoles readRoles = new ExoRoles();
+ String[] accessPermissions = page.getAccessPermissions();
+ for (String accessPermission : accessPermissions)
+ {
+ if(!this.isGuestGroup(accessPermission))
+ {
+ readRoles.addName(accessPermission);
+ }
+ else
+ {
+ //GuestGroup
+ readRoles.addName("*:"+this.guestGroup);
+ }
+ }
+ if(!readRoles.isEmpty())
+ {
+ context.addPolicyRule(Effect.PERMIT, new Read(), readRoles,
+ "allowExpression");
+ }
+ }
+
+ // Write Access
+ /*String editPermission = page.getEditPermission();
+ if (editPermission != null && editPermission.trim().length() > 0)
+ {
+ ExoRoles writeRoles = new ExoRoles();
+
+ if(!this.isGuestGroup(editPermission))
+ {
+ writeRoles.addName(editPermission);
+ }
+ else
+ {
+ //Guest
+ writeRoles.addName("*:"+this.guestGroup);
+ }
+ if(!writeRoles.isEmpty())
+ {
+ context.addPolicyRule(Effect.PERMIT, new Write(), writeRoles,
+ "allowExpression");
+ }
+ }*/
}
this.policyProvisioner.deploy(context);
Modified: portal/branches/portalsecurity/portal/src/test/java/org/exoplatform/portal/config/security/AbstractTestUserACL.java
===================================================================
--- portal/branches/portalsecurity/portal/src/test/java/org/exoplatform/portal/config/security/AbstractTestUserACL.java 2010-08-19 14:57:41 UTC (rev 3874)
+++ portal/branches/portalsecurity/portal/src/test/java/org/exoplatform/portal/config/security/AbstractTestUserACL.java 2010-08-19 16:17:17 UTC (rev 3875)
@@ -97,6 +97,17 @@
//Debug
exoPolicyProvisioner.debug();
}
+
+ protected void provisionPageNavPolicy(PageNavigation pageNav) throws Exception
+ {
+ ExoPolicyProvisioner exoPolicyProvisioner = this.securityPlugin.getExoPolicyProvisioner();
+
+ //Provision the Policy for this Resource
+ exoPolicyProvisioner.provision(pageNav);
+
+ //Debug
+ exoPolicyProvisioner.debug();
+ }
public class User
{
Modified: portal/branches/portalsecurity/portal/src/test/java/org/exoplatform/portal/config/security/nav/TestGroupNavACL.java
===================================================================
--- portal/branches/portalsecurity/portal/src/test/java/org/exoplatform/portal/config/security/nav/TestGroupNavACL.java 2010-08-19 14:57:41 UTC (rev 3874)
+++ portal/branches/portalsecurity/portal/src/test/java/org/exoplatform/portal/config/security/nav/TestGroupNavACL.java 2010-08-19 16:17:17 UTC (rev 3875)
@@ -29,11 +29,12 @@
public class TestGroupNavACL extends AbstractTestUserACL
{
- public void testNavEditByManager()
+ public void testNavEditByManager() throws Exception
{
PageNavigation nav = new PageNavigation();
nav.setOwnerType("group");
nav.setOwnerId("manageable");
+ this.provisionPageNavPolicy(nav);
//
assertTrue(root.hasEditPermission(nav));
@@ -44,6 +45,7 @@
//
nav.setOwnerId("foo");
+ this.provisionPageNavPolicy(nav);
//
assertTrue(root.hasEditPermission(nav));
Modified: portal/branches/portalsecurity/portal/src/test/java/org/exoplatform/portal/config/security/nav/TestPortalNavACL.java
===================================================================
--- portal/branches/portalsecurity/portal/src/test/java/org/exoplatform/portal/config/security/nav/TestPortalNavACL.java 2010-08-19 14:57:41 UTC (rev 3874)
+++ portal/branches/portalsecurity/portal/src/test/java/org/exoplatform/portal/config/security/nav/TestPortalNavACL.java 2010-08-19 16:17:17 UTC (rev 3875)
@@ -29,11 +29,12 @@
public class TestPortalNavACL extends AbstractTestUserACL
{
- public void testNavEditByRoot()
+ public void testNavEditByRoot() throws Exception
{
PageNavigation nav = new PageNavigation();
nav.setOwnerType("portal");
nav.setOwnerId("foo");
+ this.provisionPageNavPolicy(nav);
//
assertTrue(root.hasEditPermission(nav));
Modified: portal/branches/portalsecurity/portal/src/test/java/org/exoplatform/portal/config/security/nav/TestUserNavACL.java
===================================================================
--- portal/branches/portalsecurity/portal/src/test/java/org/exoplatform/portal/config/security/nav/TestUserNavACL.java 2010-08-19 14:57:41 UTC (rev 3874)
+++ portal/branches/portalsecurity/portal/src/test/java/org/exoplatform/portal/config/security/nav/TestUserNavACL.java 2010-08-19 16:17:17 UTC (rev 3875)
@@ -29,12 +29,13 @@
public class TestUserNavACL extends AbstractTestUserACL
{
- public void testNav()
+ public void testNav() throws Exception
{
PageNavigation nav = new PageNavigation();
nav.setOwnerType("user");
nav.setOwnerId("user");
+ this.provisionPageNavPolicy(nav);
assertTrue(root.hasEditPermission(nav));
assertFalse(administrator.hasEditPermission(nav));
Modified: portal/branches/portalsecurity/portal/src/test/java/org/exoplatform/portal/config/security/page/TestUserPageACL.java
===================================================================
--- portal/branches/portalsecurity/portal/src/test/java/org/exoplatform/portal/config/security/page/TestUserPageACL.java 2010-08-19 14:57:41 UTC (rev 3874)
+++ portal/branches/portalsecurity/portal/src/test/java/org/exoplatform/portal/config/security/page/TestUserPageACL.java 2010-08-19 16:17:17 UTC (rev 3875)
@@ -20,6 +20,7 @@
package org.exoplatform.portal.config.security.page;
import org.exoplatform.portal.config.model.Page;
+import org.exoplatform.portal.config.model.PortalConfig;
import org.exoplatform.portal.config.security.AbstractTestUserACL;
/**
@@ -31,7 +32,7 @@
public void testUserPageIsAlwaysUsableOnlyByItsOwner() throws Exception
{
Page page = new Page();
- page.setOwnerType("user");
+ page.setOwnerType(PortalConfig.USER_TYPE);
page.setOwnerId("user");
page.setAccessPermissions(new String[0]);
this.provisionPagePolicy(page);
@@ -41,6 +42,7 @@
assertFalse(manager.hasPermission(page));
assertTrue(user.hasPermission(page));
assertFalse(guest.hasPermission(page));
+
assertFalse(root.hasEditPermission(page));
assertFalse(administrator.hasEditPermission(page));
assertFalse(manager.hasEditPermission(page));
@@ -49,7 +51,7 @@
//
page = new Page();
- page.setOwnerType("user");
+ page.setOwnerType(PortalConfig.USER_TYPE);
page.setOwnerId("user");
page.setAccessPermissions(new String[]{"manager:/manageable"});
this.provisionPagePolicy(page);
@@ -59,6 +61,7 @@
assertTrue(manager.hasPermission(page));
assertTrue(user.hasPermission(page));
assertFalse(guest.hasPermission(page));
+
assertFalse(root.hasEditPermission(page));
assertFalse(administrator.hasEditPermission(page));
assertFalse(manager.hasEditPermission(page));
@@ -67,7 +70,7 @@
//
page = new Page();
- page.setOwnerType("user");
+ page.setOwnerType(PortalConfig.USER_TYPE);
page.setOwnerId("user");
page.setEditPermission("manager:/manageable");
this.provisionPagePolicy(page);
@@ -75,9 +78,9 @@
assertTrue(root.hasPermission(page));
assertFalse(administrator.hasPermission(page));
assertFalse(manager.hasPermission(page));
- assertFalse(manager.hasPermission(page));
assertTrue(user.hasPermission(page));
assertFalse(guest.hasPermission(page));
+
assertFalse(root.hasEditPermission(page));
assertFalse(administrator.hasEditPermission(page));
assertFalse(manager.hasEditPermission(page));
@@ -86,7 +89,7 @@
//
page = new Page();
- page.setOwnerType("user");
+ page.setOwnerType(PortalConfig.USER_TYPE);
page.setOwnerId("user");
page.setAccessPermissions(new String[]{"Everyone"});
this.provisionPagePolicy(page);
@@ -96,6 +99,7 @@
assertTrue(manager.hasPermission(page));
assertTrue(user.hasPermission(page));
assertTrue(guest.hasPermission(page));
+
assertFalse(root.hasEditPermission(page));
assertFalse(administrator.hasEditPermission(page));
assertFalse(manager.hasEditPermission(page));
@@ -104,7 +108,7 @@
//
page = new Page();
- page.setOwnerType("user");
+ page.setOwnerType(PortalConfig.USER_TYPE);
page.setOwnerId("user");
page.setAccessPermissions(new String[0]);
page.setEditPermission("Everyone");
@@ -115,6 +119,7 @@
assertFalse(manager.hasPermission(page));
assertTrue(user.hasPermission(page));
assertFalse(guest.hasPermission(page));
+
assertFalse(root.hasEditPermission(page));
assertFalse(administrator.hasEditPermission(page));
assertFalse(manager.hasEditPermission(page));
Modified: portal/branches/portalsecurity/portal/src/test/java/org/exoplatform/portal/config/security/plugin/BaseSharedPageACL.java
===================================================================
--- portal/branches/portalsecurity/portal/src/test/java/org/exoplatform/portal/config/security/plugin/BaseSharedPageACL.java 2010-08-19 14:57:41 UTC (rev 3874)
+++ portal/branches/portalsecurity/portal/src/test/java/org/exoplatform/portal/config/security/plugin/BaseSharedPageACL.java 2010-08-19 16:17:17 UTC (rev 3875)
@@ -55,7 +55,7 @@
this.checkWriteAccess(this.guest, page, false);
- this.checkReadAccess(this.root, page, false);
+ this.checkReadAccess(this.root, page, true);
this.checkReadAccess(this.administrator, page, false);
this.checkReadAccess(this.manager, page, false);
this.checkReadAccess(this.user, page, true);
@@ -103,11 +103,11 @@
this.checkWriteAccess(this.guest, page, false);
- this.checkReadAccess(this.root, page, false);
- this.checkReadAccess(this.administrator, page, false);
- this.checkReadAccess(this.manager, page, false);
+ this.checkReadAccess(this.root, page, true);
+ this.checkReadAccess(this.administrator, page, true);
+ this.checkReadAccess(this.manager, page, true);
this.checkReadAccess(this.user, page, true);
- this.checkReadAccess(this.guest, page, false);
+ this.checkReadAccess(this.guest, page, true);
}
}
@@ -152,7 +152,7 @@
this.checkWriteAccess(this.guest, page, false);
- this.checkReadAccess(this.root, page, false);
+ this.checkReadAccess(this.root, page, true);
this.checkReadAccess(this.administrator, page, false);
this.checkReadAccess(this.manager, page, false);
this.checkReadAccess(this.user, page, true);
@@ -168,7 +168,7 @@
page.setName("index");
page.setOwnerType(this.getOwnerType());
page.setOwnerId("user");
- page.setAccessPermissions(new String[]{exoPolicyProvisioner.getGuestGroup()});
+ page.setAccessPermissions(new String[]{exoPolicyProvisioner.getGuestGroup()});
//Provision the Policy for this Resource
exoPolicyProvisioner.provision(page);
@@ -200,11 +200,11 @@
this.checkWriteAccess(this.guest, page, false);
- this.checkReadAccess(this.root, page, false);
+ this.checkReadAccess(this.root, page, true);
this.checkReadAccess(this.administrator, page, false);
this.checkReadAccess(this.manager, page, false);
this.checkReadAccess(this.user, page, true);
- this.checkReadAccess(this.guest, page, false);
+ this.checkReadAccess(this.guest, page, true);
}
}
@@ -249,7 +249,7 @@
this.checkWriteAccess(this.guest, page, false);
- this.checkReadAccess(this.root, page, false);
+ this.checkReadAccess(this.root, page, true);
this.checkReadAccess(this.administrator, page, false);
this.checkReadAccess(this.manager, page, false);
this.checkReadAccess(this.user, page, true);
@@ -297,11 +297,11 @@
this.checkWriteAccess(this.guest, page, false);
- this.checkReadAccess(this.root, page, false);
- this.checkReadAccess(this.administrator, page, false);
- this.checkReadAccess(this.manager, page, false);
+ this.checkReadAccess(this.root, page, true);
+ this.checkReadAccess(this.administrator, page, true);
+ this.checkReadAccess(this.manager, page, true);
this.checkReadAccess(this.user, page, true);
- this.checkReadAccess(this.guest, page, false);
+ this.checkReadAccess(this.guest, page, true);
}
}
@@ -345,11 +345,11 @@
this.checkWriteAccess(this.guest, page, false);
- this.checkReadAccess(this.root, page, false);
+ this.checkReadAccess(this.root, page, true);
this.checkReadAccess(this.administrator, page, false);
this.checkReadAccess(this.manager, page, false);
this.checkReadAccess(this.user, page, true);
- this.checkReadAccess(this.guest, page, false);
+ this.checkReadAccess(this.guest, page, true);
}
}
@@ -392,9 +392,9 @@
this.checkWriteAccess(this.guest, page, false);
- this.checkReadAccess(this.root, page, false);
+ this.checkReadAccess(this.root, page, true);
this.checkReadAccess(this.administrator, page, false);
- this.checkReadAccess(this.manager, page, false);
+ this.checkReadAccess(this.manager, page, true);
this.checkReadAccess(this.user, page, true);
this.checkReadAccess(this.guest, page, false);
}
@@ -440,7 +440,7 @@
this.checkWriteAccess(this.guest, page, false);
- this.checkReadAccess(this.root, page, false);
+ this.checkReadAccess(this.root, page, true);
this.checkReadAccess(this.administrator, page, false);
this.checkReadAccess(this.manager, page, false);
this.checkReadAccess(this.user, page, true);
14 years, 4 months
gatein SVN: r3874 - portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2010-08-19 10:57:41 -0400 (Thu, 19 Aug 2010)
New Revision: 3874
Modified:
portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestPortalConfiguration.java
Log:
update portal configuration test to test rendering
Modified: 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 2010-08-19 14:43:33 UTC (rev 3873)
+++ portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestPortalConfiguration.java 2010-08-19 14:57:41 UTC (rev 3874)
@@ -44,8 +44,12 @@
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"));
+ ControllerRefMetaData groupControllerRef = new ControllerRefMetaData("site");
+ groupControllerRef.setParameter(new QualifiedName("gtn", "sitetype"), "group");
+ routerMD.addRoute("/groups/{{gtn}sitename}/{{gtn}path:.*}", groupControllerRef);
+ ControllerRefMetaData userControllerRef = new ControllerRefMetaData("site");
+ userControllerRef.setParameter(new QualifiedName("gtn", "sitetype"), "user");
+ routerMD.addRoute("/users/{{gtn}sitename}/{{gtn}path:.*}", userControllerRef);
//
this.router = new Router(routerMD);
@@ -57,7 +61,10 @@
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")));
+ assertEquals("private/classic", router.render("site", expectedParameters));
}
public void testPrivateClassicSlash() throws Exception
@@ -67,7 +74,10 @@
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/")));
+ assertEquals("private/classic", router.render("site", expectedParameters));
}
public void testPrivateClassicHome() throws Exception
@@ -76,6 +86,9 @@
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")));
+ assertEquals("private/classic/home", router.render("site", expectedParameters));
}
}
14 years, 4 months
gatein SVN: r3873 - portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2010-08-19 10:43:33 -0400 (Thu, 19 Aug 2010)
New Revision: 3873
Modified:
portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestBuildRoute.java
Log:
minor
Modified: 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 2010-08-19 14:42:30 UTC (rev 3872)
+++ portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestBuildRoute.java 2010-08-19 14:43:33 UTC (rev 3873)
@@ -24,10 +24,8 @@
import org.exoplatform.web.controller.metadata.ControllerRefMetaData;
import org.exoplatform.web.controller.metadata.RouterMetaData;
-import java.util.Arrays;
import java.util.Collections;
import java.util.Map;
-import java.util.regex.Pattern;
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
14 years, 4 months
gatein SVN: r3872 - in portal/branches/navcontroller/component/web/controller/src: test/java/org/exoplatform/web/controller/router and 1 other directory.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2010-08-19 10:42:30 -0400 (Thu, 19 Aug 2010)
New Revision: 3872
Modified:
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/router/Route.java
portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestBuildRoute.java
Log:
re enable commented unit tests
Modified: 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 2010-08-19 13:56:24 UTC (rev 3871)
+++ portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/router/Route.java 2010-08-19 14:42:30 UTC (rev 3872)
@@ -307,12 +307,12 @@
String parameterName;
if (colon == -1)
{
- regex = "([^/]+)";
+ regex = "[^/]+";
parameterName = parameterDef;
}
else
{
- regex = "(" + parameterDef.substring(colon + 1) + ")";
+ regex = parameterDef.substring(colon + 1);
parameterName = parameterDef.substring(0, colon);
}
@@ -332,7 +332,9 @@
//
+ builder.appendExpression("(");
builder.appendExpression(regex);
+ builder.appendExpression(")");
parameterNames.add(parameterQName);
parameterPatterns.add(Pattern.compile("^" + regex + "$"));
previous = end.get(i) + 1;
Modified: 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 2010-08-19 13:56:24 UTC (rev 3871)
+++ portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestBuildRoute.java 2010-08-19 14:42:30 UTC (rev 3872)
@@ -25,6 +25,7 @@
import org.exoplatform.web.controller.metadata.RouterMetaData;
import java.util.Arrays;
+import java.util.Collections;
import java.util.Map;
import java.util.regex.Pattern;
@@ -67,7 +68,6 @@
}
}
-/*
public void testParameterSegment()
{
String[] paths = {"/{a}","{a}"};
@@ -76,11 +76,18 @@
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);
+
+ //
+ assertEquals(0, router.root.simpleRoutes.size());
+ assertEquals(1, router.root.patternRoutes.size());
+ PatternRoute patternRoute = router.root.patternRoutes.get(0);
+ assertEquals("^([^/]+)", patternRoute.pattern.toString());
+ assertEquals(Collections.singletonList(new QualifiedName("a")), patternRoute.parameterNames);
+ assertEquals(1, patternRoute.parameterPatterns.size());
+ assertEquals("^[^/]+$", patternRoute.parameterPatterns.get(0).toString());
+ assertEquals(2, patternRoute.chunks.size());
+ assertEquals("", patternRoute.chunks.get(0));
+ assertEquals("", patternRoute.chunks.get(1));
}
}
@@ -92,11 +99,18 @@
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);
+
+ //
+ assertEquals(0, router.root.simpleRoutes.size());
+ assertEquals(1, router.root.patternRoutes.size());
+ PatternRoute patternRoute = router.root.patternRoutes.get(0);
+ assertEquals("^([^/]+)", patternRoute.pattern.toString());
+ assertEquals(Collections.singletonList(new QualifiedName("q", "a")), patternRoute.parameterNames);
+ assertEquals(1, patternRoute.parameterPatterns.size());
+ assertEquals("^[^/]+$", patternRoute.parameterPatterns.get(0).toString());
+ assertEquals(2, patternRoute.chunks.size());
+ assertEquals("", patternRoute.chunks.get(0));
+ assertEquals("", patternRoute.chunks.get(1));
}
}
@@ -108,14 +122,20 @@
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);
+
+ //
+ assertEquals(0, router.root.simpleRoutes.size());
+ assertEquals(1, router.root.patternRoutes.size());
+ PatternRoute patternRoute = router.root.patternRoutes.get(0);
+ assertEquals("^(.*)", patternRoute.pattern.toString());
+ assertEquals(Collections.singletonList(new QualifiedName("a")), patternRoute.parameterNames);
+ assertEquals(1, patternRoute.parameterPatterns.size());
+ assertEquals("^.*$", patternRoute.parameterPatterns.get(0).toString());
+ assertEquals(2, patternRoute.chunks.size());
+ assertEquals("", patternRoute.chunks.get(0));
+ assertEquals("", patternRoute.chunks.get(1));
}
}
-*/
private void assertEquals(Route expectedRoute, Route route)
{
14 years, 4 months
gatein SVN: r3871 - 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-19 09:56:24 -0400 (Thu, 19 Aug 2010)
New Revision: 3871
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:
- Fixed incorrect version number.
Modified: components/wsrp/trunk/admin-gui/pom.xml
===================================================================
--- components/wsrp/trunk/admin-gui/pom.xml 2010-08-19 12:59:11 UTC (rev 3870)
+++ components/wsrp/trunk/admin-gui/pom.xml 2010-08-19 13:56:24 UTC (rev 3871)
@@ -21,11 +21,12 @@
~ 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>\</version>
+ <version>2.0.0-Alpha02-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-19 12:59:11 UTC (rev 3870)
+++ components/wsrp/trunk/api/pom.xml 2010-08-19 13:56:24 UTC (rev 3871)
@@ -21,11 +21,12 @@
~ 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>\</version>
+ <version>2.0.0-Alpha02-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-19 12:59:11 UTC (rev 3870)
+++ components/wsrp/trunk/common/pom.xml 2010-08-19 13:56:24 UTC (rev 3871)
@@ -20,11 +20,12 @@
~ 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>\</version>
+ <version>2.0.0-Alpha02-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-19 12:59:11 UTC (rev 3870)
+++ components/wsrp/trunk/consumer/pom.xml 2010-08-19 13:56:24 UTC (rev 3871)
@@ -21,11 +21,12 @@
~ 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>\</version>
+ <version>2.0.0-Alpha02-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-19 12:59:11 UTC (rev 3870)
+++ components/wsrp/trunk/hibernate-impl/pom.xml 2010-08-19 13:56:24 UTC (rev 3871)
@@ -22,13 +22,14 @@
~ 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>\</version>
+ <version>2.0.0-Alpha02-SNAPSHOT</version>
</parent>
<groupId>org.gatein.wsrp</groupId>
Modified: components/wsrp/trunk/pom.xml
===================================================================
--- components/wsrp/trunk/pom.xml 2010-08-19 12:59:11 UTC (rev 3870)
+++ components/wsrp/trunk/pom.xml 2010-08-19 13:56:24 UTC (rev 3871)
@@ -21,7 +21,8 @@
~ 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>
@@ -29,7 +30,7 @@
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
- <version>\</version>
+ <version>2.0.0-Alpha02-SNAPSHOT</version>
<packaging>pom</packaging>
Modified: components/wsrp/trunk/producer/pom.xml
===================================================================
--- components/wsrp/trunk/producer/pom.xml 2010-08-19 12:59:11 UTC (rev 3870)
+++ components/wsrp/trunk/producer/pom.xml 2010-08-19 13:56:24 UTC (rev 3871)
@@ -21,11 +21,12 @@
~ 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>\</version>
+ <version>2.0.0-Alpha02-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-19 12:59:11 UTC (rev 3870)
+++ components/wsrp/trunk/test/pom.xml 2010-08-19 13:56:24 UTC (rev 3871)
@@ -22,11 +22,12 @@
~ 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>\</version>
+ <version>2.0.0-Alpha02-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-19 12:59:11 UTC (rev 3870)
+++ components/wsrp/trunk/wsrp-producer-war/pom.xml 2010-08-19 13:56:24 UTC (rev 3871)
@@ -22,11 +22,12 @@
~ 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>\</version>
+ <version>2.0.0-Alpha02-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -122,108 +123,108 @@
</build>
</profile>
<profile>
- <id>integration-tests-enabled</id>
- <activation>
- <property>
- <name>!maven.test.skip</name>
- </property>
- </activation>
- <build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.cargo</groupId>
- <artifactId>cargo-maven2-plugin</artifactId>
- <version>1.0.1</version>
- <executions>
- <execution>
- <id>pre-integration-start-server</id>
- <phase>pre-integration-test</phase>
- <goals>
- <goal>start</goal>
- </goals>
- </execution>
- <execution>
- <id>post-integration-stop-server</id>
- <phase>post-integration-test</phase>
- <goals>
- <goal>stop</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <configuration>
- <finalName>test</finalName>
- <appendAssemblyId>true</appendAssemblyId>
- <!-- we don't want to add these archives into the repo -->
- <attach>false</attach>
- <outputDirectory>${project.build.directory}/test-archives</outputDirectory>
- <descriptors>
- <descriptor>src/test/assembly/test-producer.xml</descriptor>
- <descriptor>src/test/assembly/test-markup-portlet.xml</descriptor>
- <descriptor>src/test/assembly/test-renderparam-portlet.xml</descriptor>
- <descriptor>src/test/assembly/test-session-portlet.xml</descriptor>
- <descriptor>src/test/assembly/test-basic-portlet.xml</descriptor>
- <descriptor>src/test/assembly/test-dispatcher-portlet.xml</descriptor>
- <descriptor>src/test/assembly/test-getlocales-portlet.xml</descriptor>
- <descriptor>src/test/assembly/test-encodeurl-portlet.xml</descriptor>
- <descriptor>src/test/assembly/test-usercontext-portlet.xml</descriptor>
- <descriptor>src/test/assembly/test-multivalued-portlet.xml</descriptor>
- <descriptor>src/test/assembly/test-implicitcloning-portlet.xml</descriptor>
- <descriptor>src/test/assembly/test-resource-portlet.xml</descriptor>
- <descriptor>src/test/assembly/test-resourcenoencodeurl-portlet.xml</descriptor>
- <descriptor>src/test/assembly/test-applicationscope-portlet.xml</descriptor>
- <descriptor>src/test/assembly/test-portletstate-portlet.xml</descriptor>
- </descriptors>
- </configuration>
- <executions>
- <execution>
- <id>assemble</id>
- <!-- note that package phase happens after the test phase and before the integration test phase -->
- <phase>package</phase>
- <goals>
- <goal>single</goal>
- </goals>
- </execution>
- </executions>
- <dependencies>
- <dependency>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>jboss-packaging-maven-plugin</artifactId>
- <version>2.1.1</version>
- </dependency>
- </dependencies>
- </plugin>
- <plugin>
- <!-- Copy Google Portlet samples from PC module to test-archives so that they can be used in tests -->
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <version>2.1</version>
- <executions>
- <execution>
- <id>copy</id>
- <goals>
- <goal>copy</goal>
- </goals>
+ <id>integration-tests-enabled</id>
+ <activation>
+ <property>
+ <name>!maven.test.skip</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.cargo</groupId>
+ <artifactId>cargo-maven2-plugin</artifactId>
+ <version>1.0.1</version>
+ <executions>
+ <execution>
+ <id>pre-integration-start-server</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>start</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>post-integration-stop-server</id>
+ <phase>post-integration-test</phase>
+ <goals>
+ <goal>stop</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
<configuration>
- <artifactItems>
- <artifactItem>
- <groupId>org.gatein.pc</groupId>
- <artifactId>pc-samples</artifactId>
- <version>2.1.1-GA</version>
- <classifier>google-portlet</classifier>
- <type>war</type>
- <destFileName>google-portlet.war</destFileName>
- <outputDirectory>${project.build.directory}/test-archives</outputDirectory>
- </artifactItem>
- </artifactItems>
+ <finalName>test</finalName>
+ <appendAssemblyId>true</appendAssemblyId>
+ <!-- we don't want to add these archives into the repo -->
+ <attach>false</attach>
+ <outputDirectory>${project.build.directory}/test-archives</outputDirectory>
+ <descriptors>
+ <descriptor>src/test/assembly/test-producer.xml</descriptor>
+ <descriptor>src/test/assembly/test-markup-portlet.xml</descriptor>
+ <descriptor>src/test/assembly/test-renderparam-portlet.xml</descriptor>
+ <descriptor>src/test/assembly/test-session-portlet.xml</descriptor>
+ <descriptor>src/test/assembly/test-basic-portlet.xml</descriptor>
+ <descriptor>src/test/assembly/test-dispatcher-portlet.xml</descriptor>
+ <descriptor>src/test/assembly/test-getlocales-portlet.xml</descriptor>
+ <descriptor>src/test/assembly/test-encodeurl-portlet.xml</descriptor>
+ <descriptor>src/test/assembly/test-usercontext-portlet.xml</descriptor>
+ <descriptor>src/test/assembly/test-multivalued-portlet.xml</descriptor>
+ <descriptor>src/test/assembly/test-implicitcloning-portlet.xml</descriptor>
+ <descriptor>src/test/assembly/test-resource-portlet.xml</descriptor>
+ <descriptor>src/test/assembly/test-resourcenoencodeurl-portlet.xml</descriptor>
+ <descriptor>src/test/assembly/test-applicationscope-portlet.xml</descriptor>
+ <descriptor>src/test/assembly/test-portletstate-portlet.xml</descriptor>
+ </descriptors>
</configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
+ <executions>
+ <execution>
+ <id>assemble</id>
+ <!-- note that package phase happens after the test phase and before the integration test phase -->
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>jboss-packaging-maven-plugin</artifactId>
+ <version>2.1.1</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ <plugin>
+ <!-- Copy Google Portlet samples from PC module to test-archives so that they can be used in tests -->
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <version>2.1</version>
+ <executions>
+ <execution>
+ <id>copy</id>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.gatein.pc</groupId>
+ <artifactId>pc-samples</artifactId>
+ <version>2.1.1-GA</version>
+ <classifier>google-portlet</classifier>
+ <type>war</type>
+ <destFileName>google-portlet.war</destFileName>
+ <outputDirectory>${project.build.directory}/test-archives</outputDirectory>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
</profile>
</profiles>
@@ -423,7 +424,7 @@
<include>org/gatein/wsrp/protocol/v1/ServiceDescriptionTestCase.class</include>
<include>org/gatein/wsrp/protocol/v1/RegistrationTestCase.class</include>
<include>org/gatein/wsrp/protocol/v2/MarkupTestCase.class</include>
- <!-- <include>org/gatein/wsrp/protocol/v2/ResourceTestCase.class</include> -->
+ <!-- <include>org/gatein/wsrp/protocol/v2/ResourceTestCase.class</include> -->
<include>org/gatein/wsrp/protocol/v2/ServiceDescriptionTestCase.class</include>
<include>org/gatein/wsrp/protocol/v2/PortletManagementTestCase.class</include>
</includes>
Modified: components/wsrp/trunk/wsrp1-ws/pom.xml
===================================================================
--- components/wsrp/trunk/wsrp1-ws/pom.xml 2010-08-19 12:59:11 UTC (rev 3870)
+++ components/wsrp/trunk/wsrp1-ws/pom.xml 2010-08-19 13:56:24 UTC (rev 3871)
@@ -21,11 +21,12 @@
~ 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>\</version>
+ <version>2.0.0-Alpha02-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-19 12:59:11 UTC (rev 3870)
+++ components/wsrp/trunk/wsrp2-ws/pom.xml 2010-08-19 13:56:24 UTC (rev 3871)
@@ -22,11 +22,12 @@
~ 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>\</version>
+ <version>2.0.0-Alpha02-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wsrp-wsrp2-ws</artifactId>
14 years, 4 months
gatein SVN: r3870 - portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/router.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2010-08-19 08:59:11 -0400 (Thu, 19 Aug 2010)
New Revision: 3870
Modified:
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
Log:
minor : changed visibility of two classes to package protected
Modified: 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 2010-08-19 12:53:40 UTC (rev 3869)
+++ portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/router/PatternBuilder.java 2010-08-19 12:59:11 UTC (rev 3870)
@@ -25,7 +25,7 @@
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
* @version $Revision$
*/
-public class PatternBuilder
+class PatternBuilder
{
/** . */
Modified: 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 2010-08-19 12:53:40 UTC (rev 3869)
+++ portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/router/PatternRoute.java 2010-08-19 12:59:11 UTC (rev 3870)
@@ -28,7 +28,7 @@
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
* @version $Revision$
*/
-public class PatternRoute extends Route
+class PatternRoute extends Route
{
/** . */
14 years, 4 months