gatein SVN: r5370 - in exo/portal/branches/3.1.x: gadgets/eXoGadgets/src/main/webapp/META-INF and 7 other directories.
by do-not-reply@jboss.org
Author: kien_nguyen
Date: 2010-11-29 23:24:48 -0500 (Mon, 29 Nov 2010)
New Revision: 5370
Added:
exo/portal/branches/3.1.x/gadgets/eXoGadgets/src/main/webapp/META-INF/
exo/portal/branches/3.1.x/gadgets/eXoGadgets/src/main/webapp/META-INF/context.xml
exo/portal/branches/3.1.x/web/eXoResources/src/main/webapp/META-INF/
exo/portal/branches/3.1.x/web/eXoResources/src/main/webapp/META-INF/context.xml
exo/portal/branches/3.1.x/web/portal/src/main/webapp/META-INF/
exo/portal/branches/3.1.x/web/portal/src/main/webapp/META-INF/context.xml
exo/portal/branches/3.1.x/web/rest/src/main/webapp/META-INF/
exo/portal/branches/3.1.x/web/rest/src/main/webapp/META-INF/context.xml
Removed:
exo/portal/branches/3.1.x/web/portal/src/main/resources/
Log:
EXOGTN-184 Tomcat configuration sanitization
Added: exo/portal/branches/3.1.x/gadgets/eXoGadgets/src/main/webapp/META-INF/context.xml
===================================================================
--- exo/portal/branches/3.1.x/gadgets/eXoGadgets/src/main/webapp/META-INF/context.xml (rev 0)
+++ exo/portal/branches/3.1.x/gadgets/eXoGadgets/src/main/webapp/META-INF/context.xml 2010-11-30 04:24:48 UTC (rev 5370)
@@ -0,0 +1,22 @@
+<!--
+
+ 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.
+
+-->
+
+<Context path="/eXoGadgetServer" docBase="eXoGadgetServer" debug="0" reloadable="true" crossContext="true"/>
Added: exo/portal/branches/3.1.x/web/eXoResources/src/main/webapp/META-INF/context.xml
===================================================================
--- exo/portal/branches/3.1.x/web/eXoResources/src/main/webapp/META-INF/context.xml (rev 0)
+++ exo/portal/branches/3.1.x/web/eXoResources/src/main/webapp/META-INF/context.xml 2010-11-30 04:24:48 UTC (rev 5370)
@@ -0,0 +1,22 @@
+<!--
+
+ 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.
+
+-->
+
+<Context path="/eXoResources" docBase="eXoResources" debug="0" reloadable="true" crossContext="true"/>
Added: exo/portal/branches/3.1.x/web/portal/src/main/webapp/META-INF/context.xml
===================================================================
--- exo/portal/branches/3.1.x/web/portal/src/main/webapp/META-INF/context.xml (rev 0)
+++ exo/portal/branches/3.1.x/web/portal/src/main/webapp/META-INF/context.xml 2010-11-30 04:24:48 UTC (rev 5370)
@@ -0,0 +1,31 @@
+<!--
+
+ 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.
+
+-->
+
+<Context path='/portal' docBase='portal' debug='0' reloadable='true' crossContext='true' privileged='true'>
+ <Realm className='org.apache.catalina.realm.JAASRealm'
+ appName='gatein-domain'
+ userClassNames='org.exoplatform.services.security.jaas.UserPrincipal'
+ roleClassNames='org.exoplatform.services.security.jaas.RolePrincipal'
+ debug='0' cache='false'/>
+ <Valve
+ className='org.apache.catalina.authenticator.FormAuthenticator'
+ characterEncoding='UTF-8'/>
+</Context>
Added: exo/portal/branches/3.1.x/web/rest/src/main/webapp/META-INF/context.xml
===================================================================
--- exo/portal/branches/3.1.x/web/rest/src/main/webapp/META-INF/context.xml (rev 0)
+++ exo/portal/branches/3.1.x/web/rest/src/main/webapp/META-INF/context.xml 2010-11-30 04:24:48 UTC (rev 5370)
@@ -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.
+
+-->
+
+<Context path="/rest" docBase="rest" reloadable="true" crossContext="false">
+
+ <Realm className='org.apache.catalina.realm.JAASRealm'
+ appName='gatein-domain'
+ userClassNames="org.exoplatform.services.security.jaas.UserPrincipal"
+ roleClassNames="org.exoplatform.services.security.jaas.RolePrincipal"
+ debug='0' cache='false'/>
+</Context>
14 years
gatein SVN: r5369 - portal/branches/branch-GTNPORTAL-1700/web/portal/src/main/webapp/WEB-INF/conf/jcr.
by do-not-reply@jboss.org
Author: tuyen.nguyenthe
Date: 2010-11-29 23:12:19 -0500 (Mon, 29 Nov 2010)
New Revision: 5369
Modified:
portal/branches/branch-GTNPORTAL-1700/web/portal/src/main/webapp/WEB-INF/conf/jcr/repository-configuration.xml
Log:
GTNPORTAL-1699 JCR workspaces wsrp-system and pc-system use same Value Storage with Id gadgets
Modified: portal/branches/branch-GTNPORTAL-1700/web/portal/src/main/webapp/WEB-INF/conf/jcr/repository-configuration.xml
===================================================================
--- portal/branches/branch-GTNPORTAL-1700/web/portal/src/main/webapp/WEB-INF/conf/jcr/repository-configuration.xml 2010-11-30 03:58:48 UTC (rev 5368)
+++ portal/branches/branch-GTNPORTAL-1700/web/portal/src/main/webapp/WEB-INF/conf/jcr/repository-configuration.xml 2010-11-30 04:12:19 UTC (rev 5369)
@@ -237,7 +237,7 @@
<property name="swap-directory" value="${gatein.jcr.data.dir}/swap/wsrp${container.name.suffix}"/>
</properties>
<value-storages>
- <value-storage id="gadgets"
+ <value-storage id="wsrp-system"
class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
<properties>
<property name="path" value="${gatein.jcr.storage.data.dir}/wsrp${container.name.suffix}"/>
@@ -304,7 +304,7 @@
<property name="swap-directory" value="${gatein.jcr.data.dir}/swap/pc${container.name.suffix}"/>
</properties>
<value-storages>
- <value-storage id="gadgets" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
+ <value-storage id="pc-system" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
<properties>
<property name="path" value="${gatein.jcr.storage.data.dir}/pc${container.name.suffix}"/>
</properties>
14 years
gatein SVN: r5368 - exo/portal/branches/3.1.x/web/portal/src/main/webapp/WEB-INF/conf/jcr.
by do-not-reply@jboss.org
Author: tuyen.nguyenthe
Date: 2010-11-29 22:58:48 -0500 (Mon, 29 Nov 2010)
New Revision: 5368
Modified:
exo/portal/branches/3.1.x/web/portal/src/main/webapp/WEB-INF/conf/jcr/repository-configuration.xml
Log:
EXOGTN-192 JCR workspaces wsrp-system and pc-system use same Value Storage with Id gadgets
Modified: exo/portal/branches/3.1.x/web/portal/src/main/webapp/WEB-INF/conf/jcr/repository-configuration.xml
===================================================================
--- exo/portal/branches/3.1.x/web/portal/src/main/webapp/WEB-INF/conf/jcr/repository-configuration.xml 2010-11-30 03:27:34 UTC (rev 5367)
+++ exo/portal/branches/3.1.x/web/portal/src/main/webapp/WEB-INF/conf/jcr/repository-configuration.xml 2010-11-30 03:58:48 UTC (rev 5368)
@@ -103,7 +103,7 @@
<property name="update-storage" value="true"/>
<property name="max-buffer-size" value="204800"/>
<property name="swap-directory" value="${gatein.jcr.data.dir}/swap/portal-system${container.name.suffix}"/>
- </properties> ∂
+ </properties>
<value-storages>
<value-storage id="portal-system" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
<properties>
@@ -237,7 +237,7 @@
<property name="swap-directory" value="${gatein.jcr.data.dir}/swap/wsrp${container.name.suffix}"/>
</properties>
<value-storages>
- <value-storage id="gadgets"
+ <value-storage id="wsrp-system"
class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
<properties>
<property name="path" value="${gatein.jcr.storage.data.dir}/wsrp${container.name.suffix}"/>
@@ -304,7 +304,7 @@
<property name="swap-directory" value="${gatein.jcr.data.dir}/swap/pc${container.name.suffix}"/>
</properties>
<value-storages>
- <value-storage id="gadgets" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
+ <value-storage id="pc-system" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
<properties>
<property name="path" value="${gatein.jcr.storage.data.dir}/pc${container.name.suffix}"/>
</properties>
14 years
gatein SVN: r5367 - in portal/branches/branch-GTNPORTAL-1700: examples/portal/war/src/main/resources/tomcat and 8 other directories.
by do-not-reply@jboss.org
Author: tuyen.nguyenthe
Date: 2010-11-29 22:27:34 -0500 (Mon, 29 Nov 2010)
New Revision: 5367
Modified:
portal/branches/branch-GTNPORTAL-1700/examples/extension/war/src/main/resources/tomcat/sample-ext.xml
portal/branches/branch-GTNPORTAL-1700/examples/portal/war/src/main/resources/tomcat/sample-portal.xml
portal/branches/branch-GTNPORTAL-1700/examples/skins/simpleskin/src/main/resources/tomcat/simpleDeployableSkin.xml
portal/branches/branch-GTNPORTAL-1700/gadgets/eXoGadgets/src/main/resources/tomcat/eXoGadgets.xml
portal/branches/branch-GTNPORTAL-1700/portlet/dashboard/src/main/resources/tomcat/dashboard.xml
portal/branches/branch-GTNPORTAL-1700/portlet/exoadmin/src/main/resources/tomcat/exoadmin.xml
portal/branches/branch-GTNPORTAL-1700/portlet/web/src/main/resources/tomcat/web.xml
portal/branches/branch-GTNPORTAL-1700/testsuite/webuibasedsamples/src/main/resources/tomcat/portlets.xml
portal/branches/branch-GTNPORTAL-1700/web/eXoResources/src/main/resources/tomcat/eXoResources.xml
portal/branches/branch-GTNPORTAL-1700/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIUserProfileInputSet.java
Log:
GTNPORTAL-1644 Edit docbase in some tomcat resources after tomcat packaging has been changed
Modified: portal/branches/branch-GTNPORTAL-1700/examples/extension/war/src/main/resources/tomcat/sample-ext.xml
===================================================================
--- portal/branches/branch-GTNPORTAL-1700/examples/extension/war/src/main/resources/tomcat/sample-ext.xml 2010-11-30 03:21:29 UTC (rev 5366)
+++ portal/branches/branch-GTNPORTAL-1700/examples/extension/war/src/main/resources/tomcat/sample-ext.xml 2010-11-30 03:27:34 UTC (rev 5367)
@@ -1 +1 @@
-<Context path="/sample-ext" docBase="../../../../../examples/extension/war/src/main/webapp/" debug="0" reloadable="true" crossContext="true"/>
+<Context path="/sample-ext" docBase="../../../../../../examples/extension/war/src/main/webapp/" debug="0" reloadable="true" crossContext="true"/>
Modified: portal/branches/branch-GTNPORTAL-1700/examples/portal/war/src/main/resources/tomcat/sample-portal.xml
===================================================================
--- portal/branches/branch-GTNPORTAL-1700/examples/portal/war/src/main/resources/tomcat/sample-portal.xml 2010-11-30 03:21:29 UTC (rev 5366)
+++ portal/branches/branch-GTNPORTAL-1700/examples/portal/war/src/main/resources/tomcat/sample-portal.xml 2010-11-30 03:27:34 UTC (rev 5367)
@@ -1 +1 @@
-<Context path="/sample-portal" docBase="../../../../../examples/portal/war/src/main/webapp/" debug="0" reloadable="true" crossContext="true"/>
+<Context path="/sample-portal" docBase="../../../../../../examples/portal/war/src/main/webapp/" debug="0" reloadable="true" crossContext="true"/>
Modified: portal/branches/branch-GTNPORTAL-1700/examples/skins/simpleskin/src/main/resources/tomcat/simpleDeployableSkin.xml
===================================================================
--- portal/branches/branch-GTNPORTAL-1700/examples/skins/simpleskin/src/main/resources/tomcat/simpleDeployableSkin.xml 2010-11-30 03:21:29 UTC (rev 5366)
+++ portal/branches/branch-GTNPORTAL-1700/examples/skins/simpleskin/src/main/resources/tomcat/simpleDeployableSkin.xml 2010-11-30 03:27:34 UTC (rev 5367)
@@ -1 +1 @@
-<Context path="/simpleDeployableSkin" docBase="../../../../../examples/skins/simpleskin/src/main/webapp/" debug="0" reloadable="true" crossContext="true"/>
+<Context path="/simpleDeployableSkin" docBase="../../../../../../examples/skins/simpleskin/src/main/webapp/" debug="0" reloadable="true" crossContext="true"/>
Modified: portal/branches/branch-GTNPORTAL-1700/gadgets/eXoGadgets/src/main/resources/tomcat/eXoGadgets.xml
===================================================================
--- portal/branches/branch-GTNPORTAL-1700/gadgets/eXoGadgets/src/main/resources/tomcat/eXoGadgets.xml 2010-11-30 03:21:29 UTC (rev 5366)
+++ portal/branches/branch-GTNPORTAL-1700/gadgets/eXoGadgets/src/main/resources/tomcat/eXoGadgets.xml 2010-11-30 03:27:34 UTC (rev 5367)
@@ -19,5 +19,5 @@
-->
-<Context path="/eXoGadgetWeb" docBase="../../../eXoProjects/portal/trunk/gadgets/eXoGadgets/src/main/webapp"
+<Context path="/eXoGadgetWeb" docBase="../../../../../../gadgets/eXoGadgets/src/main/webapp"
debug="0" reloadable="true" />
Modified: portal/branches/branch-GTNPORTAL-1700/portlet/dashboard/src/main/resources/tomcat/dashboard.xml
===================================================================
--- portal/branches/branch-GTNPORTAL-1700/portlet/dashboard/src/main/resources/tomcat/dashboard.xml 2010-11-30 03:21:29 UTC (rev 5366)
+++ portal/branches/branch-GTNPORTAL-1700/portlet/dashboard/src/main/resources/tomcat/dashboard.xml 2010-11-30 03:27:34 UTC (rev 5367)
@@ -19,5 +19,5 @@
-->
-<Context path="/dashboard" docBase="../../../eXoProjects/portal/trunk/portlet/dashboard/src/main/webapp"
+<Context path="/dashboard" docBase="../../../../../../portlet/dashboard/src/main/webapp"
debug="0" reloadable="true" />
\ No newline at end of file
Modified: portal/branches/branch-GTNPORTAL-1700/portlet/exoadmin/src/main/resources/tomcat/exoadmin.xml
===================================================================
--- portal/branches/branch-GTNPORTAL-1700/portlet/exoadmin/src/main/resources/tomcat/exoadmin.xml 2010-11-30 03:21:29 UTC (rev 5366)
+++ portal/branches/branch-GTNPORTAL-1700/portlet/exoadmin/src/main/resources/tomcat/exoadmin.xml 2010-11-30 03:27:34 UTC (rev 5367)
@@ -19,5 +19,5 @@
-->
-<Context path="/exoadmin" docBase="../../../eXoProjects/portal/trunk/portlet/exoadmin/src/main/webapp"
+<Context path="/exoadmin" docBase="../../../../../../portlet/exoadmin/src/main/webapp"
debug="0" reloadable="true" />
Modified: portal/branches/branch-GTNPORTAL-1700/portlet/web/src/main/resources/tomcat/web.xml
===================================================================
--- portal/branches/branch-GTNPORTAL-1700/portlet/web/src/main/resources/tomcat/web.xml 2010-11-30 03:21:29 UTC (rev 5366)
+++ portal/branches/branch-GTNPORTAL-1700/portlet/web/src/main/resources/tomcat/web.xml 2010-11-30 03:27:34 UTC (rev 5367)
@@ -19,5 +19,5 @@
-->
-<Context path="/web" docBase="../../../eXoProjects/portal/trunk/portlet/web/src/main/webapp"
+<Context path="/web" docBase="../../../../../../portlet/web/src/main/webapp"
debug="0" reloadable="true" />
Modified: portal/branches/branch-GTNPORTAL-1700/testsuite/webuibasedsamples/src/main/resources/tomcat/portlets.xml
===================================================================
--- portal/branches/branch-GTNPORTAL-1700/testsuite/webuibasedsamples/src/main/resources/tomcat/portlets.xml 2010-11-30 03:21:29 UTC (rev 5366)
+++ portal/branches/branch-GTNPORTAL-1700/testsuite/webuibasedsamples/src/main/resources/tomcat/portlets.xml 2010-11-30 03:27:34 UTC (rev 5367)
@@ -1,2 +1,2 @@
-<Context path="/portlets" docBase="../../../eXoProjects/portal/trunk/sample/portlets/src/main/webapp"
+<Context path="/portlets" docBase="../../../../../../sample/portlets/src/main/webapp"
debug="0" reloadable="true" />
Modified: portal/branches/branch-GTNPORTAL-1700/web/eXoResources/src/main/resources/tomcat/eXoResources.xml
===================================================================
--- portal/branches/branch-GTNPORTAL-1700/web/eXoResources/src/main/resources/tomcat/eXoResources.xml 2010-11-30 03:21:29 UTC (rev 5366)
+++ portal/branches/branch-GTNPORTAL-1700/web/eXoResources/src/main/resources/tomcat/eXoResources.xml 2010-11-30 03:27:34 UTC (rev 5367)
@@ -19,5 +19,5 @@
-->
-<Context path="/eXoResources" docBase="../../../../../web/eXoResources/src/main/webapp"
+<Context path="/eXoResources" docBase="../../../../../../web/eXoResources/src/main/webapp"
debug="0" reloadable="true" />
Modified: portal/branches/branch-GTNPORTAL-1700/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIUserProfileInputSet.java
===================================================================
--- portal/branches/branch-GTNPORTAL-1700/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIUserProfileInputSet.java 2010-11-30 03:21:29 UTC (rev 5366)
+++ portal/branches/branch-GTNPORTAL-1700/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIUserProfileInputSet.java 2010-11-30 03:27:34 UTC (rev 5367)
@@ -121,6 +121,7 @@
initLanguageCombo(langSelectBox);
continue;
}
+
set.addUIFormInput(new UIFormStringInput(key, null, null));
}
}
14 years
gatein SVN: r5366 - in portal/branches/branch-GTNPORTAL-1700/component: application-registry/src/test/java/org/exoplatform/application/gadget and 3 other directories.
by do-not-reply@jboss.org
Author: tuyen.nguyenthe
Date: 2010-11-29 22:21:29 -0500 (Mon, 29 Nov 2010)
New Revision: 5366
Modified:
portal/branches/branch-GTNPORTAL-1700/component/application-registry/src/test/java/org/exoplatform/application/AbstractApplicationRegistryTest.java
portal/branches/branch-GTNPORTAL-1700/component/application-registry/src/test/java/org/exoplatform/application/gadget/TestSourceStorageService.java
portal/branches/branch-GTNPORTAL-1700/component/application-registry/src/test/java/org/exoplatform/application/registry/TestApplicationRegistryService.java
portal/branches/branch-GTNPORTAL-1700/component/identity/src/test/java/org/exoplatform/services/organization/TestOrganizationService.java
portal/branches/branch-GTNPORTAL-1700/component/portal/src/test/java/org/exoplatform/portal/config/TestOrganization.java
Log:
GTNPORTAL-1704 Improve some testcase
Modified: portal/branches/branch-GTNPORTAL-1700/component/application-registry/src/test/java/org/exoplatform/application/AbstractApplicationRegistryTest.java
===================================================================
--- portal/branches/branch-GTNPORTAL-1700/component/application-registry/src/test/java/org/exoplatform/application/AbstractApplicationRegistryTest.java 2010-11-30 03:15:59 UTC (rev 5365)
+++ portal/branches/branch-GTNPORTAL-1700/component/application-registry/src/test/java/org/exoplatform/application/AbstractApplicationRegistryTest.java 2010-11-30 03:21:29 UTC (rev 5366)
@@ -32,14 +32,4 @@
})
public abstract class AbstractApplicationRegistryTest extends AbstractKernelTest
{
-
-/*
- public void testFoo() throws Exception
- {
- PortalContainer container = PortalContainer.getInstance();
- ApplicationRegistryService registry = (ApplicationRegistryService)container.getComponentInstanceOfType(ApplicationRegistryService.class);
- registry.getAllApplications();
- }
-*/
-
}
Modified: portal/branches/branch-GTNPORTAL-1700/component/application-registry/src/test/java/org/exoplatform/application/gadget/TestSourceStorageService.java
===================================================================
--- portal/branches/branch-GTNPORTAL-1700/component/application-registry/src/test/java/org/exoplatform/application/gadget/TestSourceStorageService.java 2010-11-30 03:15:59 UTC (rev 5365)
+++ portal/branches/branch-GTNPORTAL-1700/component/application-registry/src/test/java/org/exoplatform/application/gadget/TestSourceStorageService.java 2010-11-30 03:21:29 UTC (rev 5366)
@@ -1,155 +0,0 @@
-/**
- * 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.application.gadget;
-
-import org.exoplatform.component.test.AbstractGateInTest;
-
-/**
- * todo julien : fix or remove
- *
- * Thu, May 15, 2004 @
- * @author: Tuan Nguyen
- * @version: $Id: TestResourceBundleService.java 5799 2006-05-28 17:55:42Z geaz $
- * @since: 0.0
- * @email: tuan08(a)yahoo.com
- */
-public class TestSourceStorageService extends AbstractGateInTest
-{
-
- private SourceStorage service_;
-
- public void setUp() throws Exception
- {
- // PortalContainer manager = PortalContainer.getInstance();
- // service_ = (SourceStorage) manager.getComponentInstanceOfType(SourceStorage.class) ;
- }
-
- public void testSourceStorageAdd() throws Exception
- {
- // //-------Insert Source Storeage 1--------
- // Source source1 = new Source("Calculator.xml", "application/xml", "UTF-8");
- // source1.setTextContent("Gadget's content");
- // source1.setLastModified(Calendar.getInstance());
- // service_.saveSource("source", source1) ;
- //
- // //-------Check Source Storeage's content added--------
- // Source sourceGet = service_.getSource("source/Calculator.xml");
- // assertEquals("Gadget's content", sourceGet.getTextContent());
- //
- // //-------Insert Source Storeage 2 with path is null--------
- // Source source2 = new Source("Todo.xml", "application/xml", "UTF-8");
- // source2.setTextContent("Gadget's content");
- // source2.setLastModified(Calendar.getInstance());
- // service_.saveSource(null, source2) ;
- //
- // //-------Check Source Storeage's content added--------
- // Source sourceGet2 = service_.getSource("Todo.xml");
- // assertEquals("Gadget's content", sourceGet2.getTextContent());
- //
- // //-------Insert Source Storeage 2 with text content is null--------
- // Source source3 = new Source("Todo.xml", "application/xml", "UTF-8");
- // source3.setTextContent(null);
- // source3.setLastModified(Calendar.getInstance());
- // service_.saveSource("source", source3) ;
- //
- // Source sourceGet3 = service_.getSource("source/Todo.xml");
- // System.out.println("\n\n\n\n\n\n\n\n\naaa" + service_.getSourceURI("source/Todo.xml"));
- // assertTrue("Expect text content is empty", sourceGet3.getTextContent().equals(""));
- //
- }
- //
- // public void testSourceStorageUpdate() throws Exception {
- // //-------Insert Source Storeage 1--------
- // Source source = new Source("Calculator.xml", "application/xml", "UTF-8");
- // source.setTextContent("Gadget's content");
- // source.setLastModified(Calendar.getInstance());
- // service_.saveSource("source", source) ;
- //
- // //-------Check Source Storeage's content added--------
- // Source sourceGet = service_.getSource("source/Calculator.xml");
- // assertEquals("Gadget's content", sourceGet.getTextContent());
- //
- // //-------Update Source Storeage's just added to database--------
- // source.setTextContent("Gadget's content update");
- // service_.saveSource("source", source);
- //
- // //-------Check Source Storeage's content just updated--------
- // sourceGet = service_.getSource("source/Calculator.xml");
- // assertEquals("Gadget's content update", sourceGet.getTextContent());
- //
- // }
- //
- // public void testSourceStorageRemove() throws Exception {
- // //-------Insert Source Storeage 1--------
- // Source source = new Source("Calculator.xml", "application/xml", "UTF-8");
- // source.setTextContent("Gadget's content");
- // source.setLastModified(Calendar.getInstance());
- // service_.saveSource("source", source) ;
- //
- // //-------Check Source Storeage's content added--------
- // Source sourceGet = service_.getSource("source/Calculator.xml");
- // assertEquals("Gadget's content", sourceGet.getTextContent());
- //
- // //System.out.println("\n\n\n\n\n\naaaa" + sourceGet.getName());
- // //-------Remove Source Storeage's content added--------
- // service_.removeSource("source/Calculator.xml");
- // sourceGet = service_.getSource("source/Calculator.xml");
- // //-------Check Source Storeage is really removed--------
- // assertTrue("Expect source is null", sourceGet==null);
- //
- // }
- //
- // public void testSourceStorageList() throws Exception {
- // //-------Check list of Source Storeage is empty--------
- // Source sourceGet = service_.getSource("source");
- //
- // assertTrue("First, none of source exist", sourceGet == null);
- //
- // //-------Insert Source Storeage1--------
- // Source source1 = new Source("Calculator.xml", "application/xml", "UTF-8");
- // source1.setTextContent("Gadget's content");
- // source1.setLastModified(Calendar.getInstance());
- // service_.saveSource("source", source1) ;
- //
- // //-------Check Source Storeage1's content added--------
- // sourceGet = service_.getSource("source/Calculator.xml");
- // assertEquals("Gadget's content", sourceGet.getTextContent());
- //
- // //-------Insert Source Storeage2--------
- // Source source2 = new Source("Todo.xml", "application/xml", "UTF-8");
- // source2.setTextContent("Gadget's content");
- // source2.setLastModified(Calendar.getInstance());
- // service_.saveSource("source", source2) ;
- //
- // //-------Check Source Storeage2's content added--------
- // Source sourceGet2 = service_.getSource("source/Todo.xml");
- // assertEquals("Gadget's content", sourceGet2.getTextContent());
- //
- // }
- //
- // protected String getDescription() {
- // return "Test Source Storage Service" ;
- // }
- //
- // public void tearDown() throws Exception {
- // // remove all data test
- // service_.removeSource("source");
- // }
-}
Modified: portal/branches/branch-GTNPORTAL-1700/component/application-registry/src/test/java/org/exoplatform/application/registry/TestApplicationRegistryService.java
===================================================================
--- portal/branches/branch-GTNPORTAL-1700/component/application-registry/src/test/java/org/exoplatform/application/registry/TestApplicationRegistryService.java 2010-11-30 03:15:59 UTC (rev 5365)
+++ portal/branches/branch-GTNPORTAL-1700/component/application-registry/src/test/java/org/exoplatform/application/registry/TestApplicationRegistryService.java 2010-11-30 03:21:29 UTC (rev 5366)
@@ -64,12 +64,6 @@
protected OrganizationService orgService;
-/*
- protected int initialCats;
-
- protected int initialApps;
-*/
-
protected ChromatticManager chromatticManager;
@Override
@@ -151,160 +145,12 @@
chessApp.setAccessPermissions(pers);
service_.save(gameCategory, chessApp);
- List<ApplicationCategory> returnCategorys = service_.getApplicationCategories(username1);
- for (ApplicationCategory cate : returnCategorys)
- {
- System.out.println("\n\n\ncateName: " + cate.getName());
- List<Application> apps = service_.getApplications(cate);
- for (Application app : apps)
- {
- System.out.println("\nappName: " + app.getApplicationName() + "---" + app.getAccessPermissions());
- }
- }
- assertEquals(2, returnCategorys.size());
+ List<ApplicationCategory> returnCategories = service_.getApplicationCategories(username1);
+ assertEquals(2, returnCategories.size());
+ assertEquals(2, returnCategories.get(0).getApplications().size());
+ assertEquals(2, returnCategories.get(1).getApplications().size());
}
-/*
-
- void assertApplicationOperation(ApplicationRegistryService service) throws Exception
- {
- assertApplicationSave(service);
- assertApplicationUpdate(service);
- assertApplicationRemove(service);
- }
-
- void assertApplicationSave(ApplicationRegistryService service) throws Exception
- {
- String categoryName = "Office";
- String appType = "TypeOne";
- String appGroup = "GroupOne";
- String[] appNames = {"OpenOffice_org", "MS_Office"};
-
- ApplicationCategory appCategory = createAppCategory(categoryName, "None");
- service.save(appCategory);
-
- for (String appName : appNames)
- {
- Application app = createApplication(appName, appType, appGroup);
- app.setCategoryName(categoryName);
- service.save(appCategory, app);
- }
-
- List<Application> apps = service.getApplications(appCategory);
- assertEquals(2, apps.size());
-
- for (String appName : appNames)
- {
- String appId = categoryName + "/" + appName;
-
- Application app = service.getApplication(appId);
- assertEquals(appName, app.getApplicationName());
- }
- // service.clearAllRegistries() ;
- }
-
- void assertApplicationUpdate(ApplicationRegistryService service) throws Exception
- {
- String categoryName = "Office";
- String appType = "TypeOne";
- String appGroup = "GroupOne";
- String[] appNames = {"OpenOffice_org", "MS_Office"};
-
- ApplicationCategory appCategory = createAppCategory(categoryName, "None");
- service.save(appCategory);
-
- // Save apps with description
- for (String appName : appNames)
- {
- String oldDesciption = "This is: " + appName;
- Application app = createApplication(appName, appType, appGroup);
- app.setCategoryName(categoryName);
- app.setDescription(oldDesciption);
- service.save(appCategory, app);
- }
-
- for (String appName : appNames)
- {
- String appId = categoryName + "/" + appName;
- String oldDesciption = "This is: " + appName;
-
- Application app = service.getApplication(appId);
- assertEquals(oldDesciption, app.getDescription());
- }
-
- // Update apps with new description: use save() method
- List<Application> apps = service.getApplications(appCategory);
- for (Application app : apps)
- {
- String newDesciption = "This is: " + app.getApplicationName() + " suite.";
- app.setDescription(newDesciption);
- service.save(appCategory, app);
-
- }
-
- for (String appName : appNames)
- {
- String appId = categoryName + "/" + appName;
-
- Application app = service.getApplication(appId);
- String newDesciption = "This is: " + app.getApplicationName() + " suite.";
- assertEquals(newDesciption, app.getDescription());
- }
-
- // Update apps with new description: use update() method
- for (String appName : appNames)
- {
- String appId = categoryName + "/" + appName;
- String newDesciption = "This is new : " + appName + " suite.";
-
- Application app = service.getApplication(appId);
- app.setDescription(newDesciption);
- service.update(app);
- }
-
- for (String appName : appNames)
- {
- String appId = categoryName + "/" + appName;
- String newDesciption = "This is new : " + appName + " suite.";
- Application app = service.getApplication(appId);
- assertEquals(newDesciption, app.getDescription());
- }
-
- List<Application> apps2 = service.getApplications(appCategory);
- assertEquals(2, apps2.size());
-
- // service.clearAllRegistries() ;
- }
-
- void assertApplicationRemove(ApplicationRegistryService service) throws Exception
- {
- String categoryName = "Office";
- String appType = "TestType";
- String appGroup = "TestGroup";
- String[] appNames = {"OpenOffice_org", "MS_Office"};
-
- ApplicationCategory appCategory = createAppCategory(categoryName, "None");
- service.save(appCategory);
-
- for (String appName : appNames)
- {
- Application app = createApplication(appName, appType, appGroup);
- app.setCategoryName(categoryName);
- service.save(appCategory, app);
- }
-
- List<Application> apps = service.getApplications(appCategory);
- assertEquals(2, apps.size());
-
- for (Application app : apps)
- {
- service.remove(app);
- }
-
- List<Application> apps2 = service.getApplications(appCategory);
- assertEquals(0, apps2.size());
- // service.clearAllRegistries() ;
- }
-*/
+
private ApplicationCategory createAppCategory(String categoryName, String categoryDes)
{
ApplicationCategory category = new ApplicationCategory();
@@ -313,6 +159,7 @@
category.setDescription(categoryDes);
return category;
}
+
private Application createApplication(String appName, String appGroup)
{
Application app = new Application();
@@ -322,90 +169,4 @@
app.setType(ApplicationType.PORTLET);
return app;
}
-
-/*
- private void prepareOrganizationData() throws Exception
- {
- groupDefault = orgService.getGroupHandler().findGroupById("/platform/users");
- if (group1 == null)
- {
- group1 = createGroup(orgService, Group1);
- }
- if (group2 == null)
- {
- group2 = createGroup(orgService, Group2);
- }
-
- mTypeDefault = orgService.getMembershipTypeHandler().findMembershipType("member");
- if (mType1 == null)
- {
- mType1 = createMembershipType(orgService, memtype1);
- }
- if (mType2 == null)
- {
- mType2 = createMembershipType(orgService, memtype2);
- }
-
- if (user1 == null)
- {
- user1 = createUser(orgService, username1);
- createDataUser(orgService, user1);
- }
- if (user2 == null)
- {
- user2 = createUser(orgService, username2);
- createDataUser(orgService, user2);
- }
-
- userDefault = orgService.getUserHandler().findUserByName(demo);
- }
-
- private Group createGroup(OrganizationService orgService, String groupName) throws Exception
- {
- Group savedGroup = orgService.getGroupHandler().findGroupById("/" + groupName);
- if (savedGroup != null)
- return savedGroup;
- Group groupParent = orgService.getGroupHandler().createGroupInstance();
- groupParent.setGroupName(groupName);
- groupParent.setDescription("This is description");
- orgService.getGroupHandler().addChild(null, groupParent, true);
- return groupParent;
- }
-
- private MembershipType createMembershipType(OrganizationService orgService, String name) throws Exception
- {
- MembershipType savedMt = orgService.getMembershipTypeHandler().findMembershipType(name);
- if (savedMt != null)
- return savedMt;
- MembershipType mt = orgService.getMembershipTypeHandler().createMembershipTypeInstance();
- mt.setName(name);
- mt.setDescription("This is a test");
- mt.setOwner("exo");
- orgService.getMembershipTypeHandler().createMembershipType(mt, true);
- return mt;
- }
-
- @SuppressWarnings("deprecation")
- private User createUser(OrganizationService orgService, String userName) throws Exception
- {
- User savedUser = orgService.getUserHandler().findUserByName(userName);
- if (savedUser != null)
- return savedUser;
- User user = orgService.getUserHandler().createUserInstance(userName);
- user.setPassword("default");
- user.setFirstName("default");
- user.setLastName("default");
- user.setEmail("exo(a)exoportal.org");
- orgService.getUserHandler().createUser(user, true);
- return user;
- }
-
- private User createDataUser(OrganizationService orgService, User u) throws Exception
- {
- UserProfile up = orgService.getUserProfileHandler().findUserProfileByName(u.getUserName());
- up.getUserInfoMap().put("user.gender", "male");
- orgService.getUserProfileHandler().saveUserProfile(up, true);
- return u;
- }
-*/
}
Modified: portal/branches/branch-GTNPORTAL-1700/component/identity/src/test/java/org/exoplatform/services/organization/TestOrganizationService.java
===================================================================
--- portal/branches/branch-GTNPORTAL-1700/component/identity/src/test/java/org/exoplatform/services/organization/TestOrganizationService.java 2010-11-30 03:15:59 UTC (rev 5365)
+++ portal/branches/branch-GTNPORTAL-1700/component/identity/src/test/java/org/exoplatform/services/organization/TestOrganizationService.java 2010-11-30 03:21:29 UTC (rev 5366)
@@ -117,12 +117,6 @@
RequestLifeCycle.end();
}
- public void testSimle() throws Exception
- {
- assertTrue(true);
-
- }
-
public void testUserPageSize() throws Exception
{
for (String name : USERS)
Modified: portal/branches/branch-GTNPORTAL-1700/component/portal/src/test/java/org/exoplatform/portal/config/TestOrganization.java
===================================================================
--- portal/branches/branch-GTNPORTAL-1700/component/portal/src/test/java/org/exoplatform/portal/config/TestOrganization.java 2010-11-30 03:15:59 UTC (rev 5365)
+++ portal/branches/branch-GTNPORTAL-1700/component/portal/src/test/java/org/exoplatform/portal/config/TestOrganization.java 2010-11-30 03:21:29 UTC (rev 5366)
@@ -19,16 +19,15 @@
package org.exoplatform.portal.config;
+import java.util.Collection;
import org.exoplatform.commons.utils.PageList;
import org.exoplatform.container.PortalContainer;
+import org.exoplatform.services.organization.Group;
import org.exoplatform.services.organization.GroupHandler;
import org.exoplatform.services.organization.OrganizationService;
import org.exoplatform.services.organization.User;
import org.exoplatform.services.organization.UserHandler;
-import java.util.Collection;
-import java.util.List;
-
/**
* Created by The eXo Platform SARL Author : Tung Pham thanhtungty(a)gmail.com Nov
* 13, 2007
@@ -36,6 +35,16 @@
public class TestOrganization extends AbstractPortalTest
{
+ private static final String GROUP_1 = "testOrganization_group1";
+ private static final String GROUP_2 = "testOrganization_group2";
+ private static final String GROUP_3 = "testOrganization_group3";
+
+ private static final String USER_1 = "testOrganization_user1";
+ private static final String USER_2 = "testOrganization_user2";
+ private static final String USER_3 = "testOrganization_user3";
+ private static final String DEFAULT_PASSWORD = "defaultpassword";
+ private static final String DESCRIPTION = " Description";
+
private OrganizationService organizationService;
@Override
@@ -45,59 +54,148 @@
begin();
PortalContainer container = getContainer();
organizationService = (OrganizationService)container.getComponentInstance(OrganizationService.class);
+
+ createGroup(null, GROUP_1);
+ createGroup(GROUP_1, GROUP_2);
+ createGroup(GROUP_1, GROUP_3);
+
+ createUser(USER_1, GROUP_1);
+ createUser(USER_2, GROUP_2);
+ createUser(USER_3, GROUP_1);
}
@Override
protected void tearDown() throws Exception
{
- end();
+ deleteGroup(GROUP_1);
+ deleteGroup(GROUP_2);
+ deleteGroup(GROUP_3);
+
+ deleteUser(USER_1);
+ deleteUser(USER_2);
+ deleteUser(USER_3);
+
+ end(false);
super.tearDown();
}
- public void testFindGroups() throws Exception
+ public void testFindGroupNotFound() throws Exception {
+ GroupHandler groupHander = organizationService.getGroupHandler();
+ Group group = groupHander.findGroupById(GROUP_1 + "NOTFOUND");
+ assertNull(group);
+ }
+
+ public void testFindGroupFromRoot() throws Exception
{
GroupHandler handler = organizationService.getGroupHandler();
- Collection allGroups = handler.findGroups(null);
+ Collection<Group> allGroups = handler.findGroups(null);
+ assertNotNull(allGroups);
assertTrue(allGroups.size() > 0);
}
public void testFindGroupById() throws Exception
{
- GroupHandler uHandler = organizationService.getGroupHandler();
- Collection group = uHandler.findGroupsOfUser("root");
+ GroupHandler groupHandler = organizationService.getGroupHandler();
+ Group group = groupHandler.findGroupById(GROUP_1);
+ assertNotNull(group);
+ assertEquals(GROUP_1, group.getGroupName());
+ assertEquals(GROUP_1 + DESCRIPTION, group.getDescription());
+
+ group = groupHandler.findGroupById(GROUP_3);
+ assertNotNull(group);
+ assertEquals(GROUP_3, group.getGroupName());
}
+
+ public void testFindGroupOfUser() {
+ GroupHandler groupHandler = organizationService.getGroupHandler();
+ try {
+ Collection<Group> groups = groupHandler.findGroupsOfUser(USER_1);
+ assertNotNull(groups);
+ assertTrue(groups.size() >= 1);
+ } catch (Exception e) {
+ fail();
+ }
+ }
public void testFindUserByGroup() throws Exception
{
+ GroupHandler groupHandler = organizationService.getGroupHandler();
+ Group group = groupHandler.findGroupById(GROUP_1);
UserHandler uHandler = organizationService.getUserHandler();
- PageList users = uHandler.findUsersByGroup("/platform/administrators");
- assertTrue(users.getAvailable() > 0);
-
- List iterator = users.getAll();
- for (Object test : iterator)
- {
- User a = (User)test;
- System.out.println(a.getUserName());
- }
+ PageList<User> users = uHandler.findUsersByGroup(group.getId());
+ assertNotNull(users);
+ assertTrue(users.getPageSize() > 0);
}
public void testChangePassword() throws Exception
{
UserHandler uHandler = organizationService.getUserHandler();
- User user = uHandler.findUserByName("root");
+ User user = uHandler.findUserByName(USER_1);
assertNotNull(user);
- assertTrue(uHandler.authenticate("root", "gtn"));
+ assertTrue(uHandler.authenticate(USER_1, DEFAULT_PASSWORD));
// Test changing password
user.setPassword("newPassword");
uHandler.saveUser(user, false);
- user = uHandler.findUserByName("root");
+ user = uHandler.findUserByName(USER_1);
assertNotNull(user);
- assertTrue(uHandler.authenticate("root", "newPassword"));
-
- // Reset to default password
- user.setPassword("gtn");
- uHandler.saveUser(user, false);
-
+ assertTrue(uHandler.authenticate(USER_1, "newPassword"));
}
+
+
+ private void createGroup(String parent, String name) {
+ GroupHandler groupHandler = organizationService.getGroupHandler();
+ try {
+ Group parentGroup = null;
+ if(parent != null) {
+ parentGroup = groupHandler.findGroupById(parent);
+ }
+ Group newGroup = groupHandler.createGroupInstance();
+ newGroup.setGroupName(name);
+ newGroup.setDescription(name + DESCRIPTION);
+ newGroup.setLabel(name);
+ if(parentGroup != null) {
+ groupHandler.addChild(parentGroup, newGroup, true);
+ }
+ groupHandler.saveGroup(newGroup, true);
+
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail("Error on create group [" + name + "] " + e.getMessage());
+ }
+
+ }
+
+ private void deleteGroup(String name) {
+ GroupHandler groupHandler = organizationService.getGroupHandler();
+ try {
+ Group group = groupHandler.findGroupById(name);
+ groupHandler.removeGroup(group, true);
+ } catch (Exception e) {
+
+ }
+ }
+
+ private void createUser(String username, String... groups) {
+ UserHandler userHandler = organizationService.getUserHandler();
+ User user = userHandler.createUserInstance(username);
+ user.setPassword(DEFAULT_PASSWORD);
+ user.setFirstName("default");
+ user.setLastName("default");
+ user.setEmail("exo(a)exoportal.org");
+ user.setOrganizationId(groups[0]);
+ try {
+ userHandler.createUser(user, true);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail("Error on create user: " + e.getMessage());
+ }
+ }
+ private void deleteUser(String username) {
+ UserHandler userHandler = organizationService.getUserHandler();
+ try {
+ userHandler.removeUser(username, true);
+ } catch (Exception e) {
+ }
+ }
}
14 years
gatein SVN: r5365 - exo/portal/branches/3.1.x/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm.
by do-not-reply@jboss.org
Author: kien_nguyen
Date: 2010-11-29 22:15:59 -0500 (Mon, 29 Nov 2010)
New Revision: 5365
Modified:
exo/portal/branches/3.1.x/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/jboss-cache.xml
Log:
EXOGTN-181 Use expiration eviction policy for picket link
Modified: exo/portal/branches/3.1.x/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/jboss-cache.xml
===================================================================
--- exo/portal/branches/3.1.x/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/jboss-cache.xml 2010-11-30 03:11:48 UTC (rev 5364)
+++ exo/portal/branches/3.1.x/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/jboss-cache.xml 2010-11-30 03:15:59 UTC (rev 5365)
@@ -2,10 +2,11 @@
<!-- Eviction configuration -->
<eviction wakeUpInterval="5000">
- <default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm"
+ <default algorithmClass="org.jboss.cache.eviction.ExpirationAlgorithm"
eventQueueSize="1000000">
- <property name="maxNodes" value="1000000" />
+ <property name="maxNodes" value="100000" />
<property name="timeToLive" value="120000" />
+ <property name="warnNoExpirationKey" value="false" />
</default>
</eviction>
14 years
gatein SVN: r5364 - in epp/docs/branches/EPP_5_1_Branch/Reference_Guide/en-US: images/WSRP and 1 other directories.
by do-not-reply@jboss.org
Author: smumford
Date: 2010-11-29 22:11:48 -0500 (Mon, 29 Nov 2010)
New Revision: 5364
Modified:
epp/docs/branches/EPP_5_1_Branch/Reference_Guide/en-US/extras/WSRP/default255.xml
epp/docs/branches/EPP_5_1_Branch/Reference_Guide/en-US/extras/WSRP/default257.xml
epp/docs/branches/EPP_5_1_Branch/Reference_Guide/en-US/extras/WSRP/default258.xml
epp/docs/branches/EPP_5_1_Branch/Reference_Guide/en-US/extras/WSRP/default259.xml
epp/docs/branches/EPP_5_1_Branch/Reference_Guide/en-US/images/WSRP/config_end.png
epp/docs/branches/EPP_5_1_Branch/Reference_Guide/en-US/images/WSRP/config_init.png
epp/docs/branches/EPP_5_1_Branch/Reference_Guide/en-US/images/WSRP/config_missing.png
epp/docs/branches/EPP_5_1_Branch/Reference_Guide/en-US/images/WSRP/config_refresh.png
epp/docs/branches/EPP_5_1_Branch/Reference_Guide/en-US/images/WSRP/config_self.png
epp/docs/branches/EPP_5_1_Branch/Reference_Guide/en-US/images/WSRP/config_wsdl.png
epp/docs/branches/EPP_5_1_Branch/Reference_Guide/en-US/images/WSRP/consumer_operations.png
epp/docs/branches/EPP_5_1_Branch/Reference_Guide/en-US/images/WSRP/modify_reg_end.png
epp/docs/branches/EPP_5_1_Branch/Reference_Guide/en-US/images/WSRP/modify_reg_self.png
epp/docs/branches/EPP_5_1_Branch/Reference_Guide/en-US/images/WSRP/modify_reg_self_end.png
epp/docs/branches/EPP_5_1_Branch/Reference_Guide/en-US/images/WSRP/producer_blank.png
epp/docs/branches/EPP_5_1_Branch/Reference_Guide/en-US/images/WSRP/producer_default.png
epp/docs/branches/EPP_5_1_Branch/Reference_Guide/en-US/images/WSRP/producer_email.png
epp/docs/branches/EPP_5_1_Branch/Reference_Guide/en-US/images/WSRP/producer_registration.png
epp/docs/branches/EPP_5_1_Branch/Reference_Guide/en-US/images/WSRP/remote_portlets.png
epp/docs/branches/EPP_5_1_Branch/Reference_Guide/en-US/modules/WSRP.xml
Log:
JBEPP-517: Updated WSRP section to align more with community doc
Modified: epp/docs/branches/EPP_5_1_Branch/Reference_Guide/en-US/extras/WSRP/default255.xml
===================================================================
--- epp/docs/branches/EPP_5_1_Branch/Reference_Guide/en-US/extras/WSRP/default255.xml 2010-11-30 01:51:11 UTC (rev 5363)
+++ epp/docs/branches/EPP_5_1_Branch/Reference_Guide/en-US/extras/WSRP/default255.xml 2010-11-30 03:11:48 UTC (rev 5364)
@@ -14,4 +14,4 @@
<value>true</value>
</container-runtime-option>
</portlet>
-</portlet-app>
+</portlet-app>
\ No newline at end of file
Modified: epp/docs/branches/EPP_5_1_Branch/Reference_Guide/en-US/extras/WSRP/default257.xml
===================================================================
--- epp/docs/branches/EPP_5_1_Branch/Reference_Guide/en-US/extras/WSRP/default257.xml 2010-11-30 01:51:11 UTC (rev 5363)
+++ epp/docs/branches/EPP_5_1_Branch/Reference_Guide/en-US/extras/WSRP/default257.xml 2010-11-30 03:11:48 UTC (rev 5364)
@@ -4,7 +4,7 @@
xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_wsrp_consumer_1_0 http://www.jboss.org/portal/xsd/gatein_wsrp_consumer_1_0.xsd">
<deployment>
<wsrp-producer id="self" expiration-cache="300" ws-timeout="30000">
- <endpoint-wsdl-url>http://localhost:8080/wsrp-producer/MarkupService?wsdl</endpoint-wsdl-url>
+ <endpoint-wsdl-url>http://localhost:8080/wsrp-producer/v2/MarkupService?wsdl</endpoint-wsdl-url>
<registration-data>
<property>
<name>email</name>
@@ -20,4 +20,4 @@
<registration-data/>
</wsrp-producer>
</deployment>
-</deployments>
+</deployments>
\ No newline at end of file
Modified: epp/docs/branches/EPP_5_1_Branch/Reference_Guide/en-US/extras/WSRP/default258.xml
===================================================================
--- epp/docs/branches/EPP_5_1_Branch/Reference_Guide/en-US/extras/WSRP/default258.xml 2010-11-30 01:51:11 UTC (rev 5363)
+++ epp/docs/branches/EPP_5_1_Branch/Reference_Guide/en-US/extras/WSRP/default258.xml 2010-11-30 03:11:48 UTC (rev 5364)
@@ -3,9 +3,15 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_wsrp_consumer_1_0 http://www.jboss.org/portal/xsd/gatein_wsrp_consumer_1_0.xsd">
<deployment>
- <wsrp-producer id="self" expiration-cache="300" ws-timeout="30000">
- <endpoint-wsdl-url>http://localhost:8080/wsrp-producer/MarkupService?wsdl</endpoint-wsdl-url>
+ <wsrp-producer id="selfv1" expiration-cache="500" ws-timeout="50000">
+ <endpoint-wsdl-url>http://localhost:8080/wsrp-producer/v1/MarkupService?wsdl</endpoint-wsdl-url>
<registration-data/>
</wsrp-producer>
</deployment>
-</deployments>
+ <deployment>
+ <wsrp-producer id="selfv2" expiration-cache="500" ws-timeout="50000">
+ <endpoint-wsdl-url>http://localhost:8080/wsrp-producer/v2/MarkupService?wsdl</endpoint-wsdl-url>
+ <registration-data/>
+ </wsrp-producer>
+ </deployment>
+</deployments>
\ No newline at end of file
Modified: epp/docs/branches/EPP_5_1_Branch/Reference_Guide/en-US/extras/WSRP/default259.xml
===================================================================
--- epp/docs/branches/EPP_5_1_Branch/Reference_Guide/en-US/extras/WSRP/default259.xml 2010-11-30 01:51:11 UTC (rev 5363)
+++ epp/docs/branches/EPP_5_1_Branch/Reference_Guide/en-US/extras/WSRP/default259.xml 2010-11-30 03:11:48 UTC (rev 5364)
@@ -15,4 +15,4 @@
</registration-data>
</wsrp-producer>
</deployment>
-</deployments>
+</deployments>
\ No newline at end of file
Modified: epp/docs/branches/EPP_5_1_Branch/Reference_Guide/en-US/images/WSRP/config_end.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/Reference_Guide/en-US/images/WSRP/config_init.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/Reference_Guide/en-US/images/WSRP/config_missing.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/Reference_Guide/en-US/images/WSRP/config_refresh.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/Reference_Guide/en-US/images/WSRP/config_self.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/Reference_Guide/en-US/images/WSRP/config_wsdl.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/Reference_Guide/en-US/images/WSRP/consumer_operations.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/Reference_Guide/en-US/images/WSRP/modify_reg_end.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/Reference_Guide/en-US/images/WSRP/modify_reg_self.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/Reference_Guide/en-US/images/WSRP/modify_reg_self_end.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/Reference_Guide/en-US/images/WSRP/producer_blank.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/Reference_Guide/en-US/images/WSRP/producer_default.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/Reference_Guide/en-US/images/WSRP/producer_email.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/Reference_Guide/en-US/images/WSRP/producer_registration.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/Reference_Guide/en-US/images/WSRP/remote_portlets.png
===================================================================
(Binary files differ)
Modified: epp/docs/branches/EPP_5_1_Branch/Reference_Guide/en-US/modules/WSRP.xml
===================================================================
--- epp/docs/branches/EPP_5_1_Branch/Reference_Guide/en-US/modules/WSRP.xml 2010-11-30 01:51:11 UTC (rev 5363)
+++ epp/docs/branches/EPP_5_1_Branch/Reference_Guide/en-US/modules/WSRP.xml 2010-11-30 03:11:48 UTC (rev 5364)
@@ -331,8 +331,13 @@
<important>
<title>Chunked Encoding</title>
<para>
- Some WSRP producers, such as Oracle, do not support chunked encoding. Using an Oracle WSRP producer will therefore produce an error.
+ Some WSRP producers, such as Oracle, do not support chunked encoding. If your producer does not support chunked encoding, it will not be able to properly connect to the producer.
</para>
+ <para>
+ This will manifest itself with the following error:
+ </para>
+<screen>Caused by: org.jboss.ws.WSException: Invalid HTTP server response [503] - Service Unavailable.
+</screen>
<para>
A workaround for this issue involves editing the <parameter>chunksize</parameter> setting in the <filename>standard-jaxws-client-config.xml</filename> file.
</para>
@@ -464,7 +469,7 @@
This will retrieve the service description associated with the Producer which WSRP interface is described by the WSDL file found at the URL entered.
</para>
<para>
- In this case, querying the service description will suggest that the Producer requires registration but did not request any registration property:
+ In this case, querying the service description will show that the Producer requires registration but did not request any registration property:
</para>
<mediaobject>
<imageobject role="html">
@@ -528,9 +533,9 @@
</para>
</note>
</section>
-
- <section id="sect-Reference_Guide-Configuring_a_Remote_Producer-Configuring_Access_to_a_Remote_Portlet">
- <title>Configuring Access to a Remote Portlet</title>
+<!--MARK-->
+ <section id="sect-Reference_Guide-Configuring_a_Remote_Producer-Adding_remote_portlets_to_categories">
+ <title>Adding remote portlets to categories</title>
<para>
Clicking on the Portlet link in the Application Registry will now show the remote potlets in the <emphasis role="bold">REMOTE</emphasis> tab in the left column:
</para>
@@ -631,14 +636,19 @@
<para>
Since, in most instances, the information provided by the producer does not change often, use of this caching facility to minimize bandwidth usage is recommended.
</para>
- <para>
- It is also possible to define a timeout after which WS operations are considered as failed. This is helpful to avoid blocking the WSRP service, as it waits on a service that does not answer.
- </para>
- <para>
- Use the <literal>ws-timeout</literal> attribute of the <literal><wsrp-producer></literal> element to specify how many milliseconds the WSRP service will wait for a response from the remote producer before timing out.
- </para>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term>WS Timeout</term>
+ <listitem>
+ <para>
+ It is also possible to define a timeout after which WS operations are considered as failed. This is helpful to avoid blocking the WSRP service, as it waits on a service that does not answer.
+ </para>
+ <para>
+ Use the <literal>ws-timeout</literal> attribute of the <literal><wsrp-producer></literal> element to specify how many milliseconds the WSRP service will wait for a response from the remote producer before timing out.
+ </para>
+ </listitem>
+ </varlistentry>
<varlistentry>
<term>Pre-registration information</term>
<listitem>
@@ -647,7 +657,7 @@
</para>
<note>
<para>
- As at this release only simple String properties are supported and it is not possible to configure complex registration data. However, this should be sufficient for most cases.
+ Only simple String properties are supported. It is not possible to configure complex registration data. However, this should be sufficient for most cases.
</para>
</note>
<para>
@@ -740,7 +750,7 @@
</step>
<step>
<para>
- Click on this new button and, if the updated registration details have been been accepted by the remote producer the following should appear:
+ Click on <emphasis role="bold">Modify registration</emphasis> and, if the updated registration details have been been accepted by the remote producer the following should appear:
</para>
<mediaobject>
<imageobject role="html">
@@ -758,7 +768,7 @@
<section id="sect-Reference_Guide-Modifying_a_Currently_Held_Registration-Registration_Modification_on_Producer_Error">
<title>Registration Modification on Producer Error</title>
<para>
- Invoking operations on the producer may fail with an <exceptionname>OperationFailedFault</exceptionname> if the producer administrator has changed its requirement for registered consumers. &PRODUCT; will attempt to assist in these cases.
+ If a Producer administrator changes the requirements for registered consumers, invoking operations on the producer may fail with an <exceptionname>OperationFailedFault</exceptionname>. &PRODUCT; will attempt to assist in these cases.
</para>
<para>
This section will discuss an example using the <literal>self</literal> producer.
@@ -952,7 +962,7 @@
The portlets can be re-imported directly by pressing the "<guilabel>Use for import</guilabel>" button or, on the Consumers list page, using the "<guilabel>Import</guilabel>" action for a given consumer.
</para>
<para>
- The example below assumes that the second option has been used and that several sets of previously exported portlets are available to import from. After clicking the action link, a screen similar to the one below shoould appear:
+ The example below assumes that the second option has been used and that several sets of previously exported portlets are available to import from. After clicking the action link, a screen similar to the one below should appear:
</para>
<mediaobject>
<imageobject role="html">
@@ -1025,7 +1035,7 @@
</imageobject>
</mediaobject>
<para>
- In this example, we want to replace the content of the <literal>/samples-remotecontroller-portlet.RemoteControl (remote)</literal> with the content of the <literal>/ajaxPortlet.JSFAJAXPortlet</literal> portlet that we previously exported.
+ In this example, we want to replace the content of the <literal>/samples-remotecontroller-portlet.RemoteControl (remote)</literal> with the content of the <literal>/ajaxPortlet.JSFAJAXPortlet</literal> portlet that was previously exported.
</para>
<procedure>
<title></title>
@@ -1036,7 +1046,7 @@
</step>
<step>
<para>
- Select <literal>page1</literal> in the list of available pages. The screen will then refresh to display the list of available windows on that page, similar to the one seen below:
+ Select <literal>page1</literal> in the list of available pages. The screen will then refresh to display the list of available windows on that page, similar to the image below:
</para>
<mediaobject>
<imageobject role="html">
@@ -1049,7 +1059,7 @@
<note>
<title></title>
<para>
- At this point, you still need to select the window which content we want to replace before being able to complete the import operation
+ At this point, you still need to select which window content we want to replace before being able to complete the import operation
</para>
</note>
</step>
@@ -1075,20 +1085,8 @@
</step>
<step>
<para>
- The <literal>page1</literal> page should now show:
+ The <literal>page1</literal> page should now show that the content of <literal>/samples-remotecontroller-portlet.RemoteControl (remote)</literal> window has been replaced by the content of the <literal>/ajaxPortlet.JSFAJAXPortlet</literal> imported portlet and that the window has been renamed appropriately.
</para>
- <itemizedlist>
- <listitem>
- <para>
- That the content of <literal>/samples-remotecontroller-portlet.RemoteControl (remote)</literal> window has been replaced by the content of the <literal>/ajaxPortlet.JSFAJAXPortlet</literal> imported portlet.
- </para>
- </listitem>
- <listitem>
- <para>
- The window has been renamed appropriately:
- </para>
- </listitem>
- </itemizedlist>
<mediaobject>
<imageobject role="html">
<imagedata fileref="images/WSRP/import_modified_page.png" format="PNG" align="center" scale="95" />
@@ -1111,7 +1109,7 @@
This can occur when a consumer is registered with a producer that has been modified by its administrator to not require registration any longer.
</para>
<para>
- In this unlikely scenario, local registration information can be erased from the consumer to allow it to resume interacting with the remote producer.
+ In this scenario, local registration information can be erased from the consumer to allow it to resume interacting with the remote producer.
</para>
<para>
To do this click on the "<emphasis role="bold">Erase local registration</emphasis>" button next to the registration context information on the consumer configuration screen:
@@ -1153,7 +1151,6 @@
Several aspects can be modified with respect to whether registration is required for consumers to access the Producer's services. An XML Schema for the configuration format is available at <filename> <replaceable>PORTAL_HOME</replaceable>/lib/wsrp-integration-api-<replaceable>WSRP_VERSION</replaceable>.jar/xsd/gatein_wsrp_producer_1_0.xsd </filename>.
</para>
</section>
-
<section id="sect-Reference_Guide-Configuring_the_WSRP_Producer-Default_Configuration">
<title>Default Configuration</title>
@@ -1184,11 +1181,8 @@
</imageobject>
</mediaobject>
<para>
- Administrators can specify whether or not a producer which requires registration will send the full service description to unregistered consumers.
+ You can specify whether or not the producer will send the full service description to unregistered consumers, and, if it requires registration, which <literal>RegistrationPolicy</literal> to use (and, if needed, which <literal>RegistrationPropertyValidator</literal>), along with required registration property description for which consumers must provide acceptable values to successfully register.
</para>
- <para>
- The full service description includes which <classname>RegistrationPolicy</classname> (and <classname>RegistrationPropertyValidator</classname> if needed) to use, as well as required registration property descriptions for which consumers must provide acceptable values to successfully register.
- </para>
<para>
WSDL URLs to access &PRODUCT;'s WSRP producer are now displayed in either in WSRP 1 or WSRP 2 mode.</para>
</section>
@@ -1262,7 +1256,7 @@
<note>
<para>
- At this time, only String (xsd:string) properties are supported.
+ At this time, only String (<literal>xsd:string</literal>) properties are supported.
</para>
</note>
<note>
@@ -1285,14 +1279,23 @@
This is done by plugging a <classname>RegistrationPropertyValidator</classname> into the default registration policy. This allows users to define their own validation mechanism.
</para>
<para>
- Refer to the <trademark class="trade">Javadoc</trademark> for <classname>org.jboss.portal.registration.RegistrationPolicy</classname> and <classname>org.jboss.portal.Registration.policies.RegistrationPropertyValidator</classname> for more details on what is expected of each method.
+ Refer to the <trademark class="trade">Javadoc</trademark> for <classname>org.gatein.registration.RegistrationPolicy</classname> and <classname>org.gatein.registration.policies.RegistrationPropertyValidator</classname> for more details on what is expected of each method.
</para>
<para>
- A defined registration policy is required for the producer to be correctly configured. Do this by specifying the qualified class name of the registration policy. As it is anticipated that most users will use the default registration policy, it is possible to provide the class name of a custom property validator instead to customize the default registration policy behavior. Note that property validators are only used by the default policy.
+ A defined registration policy is required for the producer to be correctly configured. Do this by specifying the qualified class name of the registration policy.
+ </para>
+ <para>
+ As it is anticipated that most users will use the default registration policy, it is possible to provide the class name of a custom property validator instead to customize the default registration policy behavior. Note that property validators are only used by the default policy.
</para>
<note>
<para>
- Since the policy or the validator are defined via their class name and dynamically loaded, it is important to ensure that the identified class is available to the application server. One way to accomplish that is to deploy the policy implementation as a JAR file in the AS instance deploy directory. Note also that, since both policies and validators are dynamically instantiated, they must provide a default, no-argument constructor.
+ Since the policy or the validator are defined via their class name and dynamically loaded, it is important to ensure that the identified class is available to the application server.
+ </para>
+ <para>
+ One way to accomplish that is to deploy the policy implementation as a JAR file in the AS instance deploy directory.
+ </para>
+ <para>
+ Note also that, since both policies and validators are dynamically instantiated, they must provide a default, no-argument constructor.
</para>
</note>
</section>
@@ -1303,10 +1306,16 @@
<section id="sect-Reference_Guide-Configuring_the_WSRP_Producer-WSRP_Validation_Mode">
<title>WSRP Validation Mode</title>
<para>
- The lack of conformance kit and the wording of the WSRP specification leaves room for differing interpretations, resulting in interoperability issues. It is therefore possible to encounter issues when using consumers from different vendors. Experience from these issues has produced a way to relax the validation that the WSRP producer performs on the data provided by consumers to help with interoperability by accepting data that would normally be invalid. Note that the our validation algorithm is only relaxed on aspects of the specification that are deemed harmless such as invalid language codes.
+ The lack of conformance kit and the wording of the WSRP specification leaves room for differing interpretations, resulting in interoperability issues. It is therefore possible to encounter issues when using consumers from different vendors.
+ </para>
+ <para>
+ Experience of these issues has produced a way to relax the validation that the WSRP producer performs on the data provided by consumers to help with interoperability by accepting data that would normally be invalid.
+ </para>
+ <para>
+ Note that the our validation algorithm is only relaxed on aspects of the specification that are deemed harmless such as invalid language codes.
</para>
<para>
- By default, the WSRP producer is configured in strict mode. If you experience issues with a given consumer, you might want to try to relax the validation mode. This is accomplished by unchecking the "Use strict WSRP compliance" checkbox on the Producer configuration screen.
+ By default, the WSRP producer is configured in strict mode. If you experience issues with a given consumer, you may attempt to relax the validation mode. Unchecking the "Use strict WSRP compliance" checkbox on the Producer configuration screen to do this.
</para>
</section>
14 years
gatein SVN: r5363 - in portal/branches/branch-GTNPORTAL-1700: webui/core/src/main/java/org/exoplatform/webui/form and 1 other directory.
by do-not-reply@jboss.org
Author: kien_nguyen
Date: 2010-11-29 20:51:11 -0500 (Mon, 29 Nov 2010)
New Revision: 5363
Modified:
portal/branches/branch-GTNPORTAL-1700/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIForm.js
portal/branches/branch-GTNPORTAL-1700/webui/core/src/main/java/org/exoplatform/webui/form/UIFormCheckBoxInput.java
Log:
GTNPORTAL-1654 Checkbox selection is lost with paginator when add gadget or portlet in categories
Modified: portal/branches/branch-GTNPORTAL-1700/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIForm.js
===================================================================
--- portal/branches/branch-GTNPORTAL-1700/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIForm.js 2010-11-29 22:51:54 UTC (rev 5362)
+++ portal/branches/branch-GTNPORTAL-1700/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIForm.js 2010-11-30 01:51:11 UTC (rev 5363)
@@ -144,6 +144,11 @@
break;
case "checkbox":
+ if(element.checked)
+ this.addField(element.name, "true");
+ else
+ this.addField(element.name, "false");
+ break;
case "radio":
if(element.checked) this.addField(element.name, element.value);
break;
Modified: portal/branches/branch-GTNPORTAL-1700/webui/core/src/main/java/org/exoplatform/webui/form/UIFormCheckBoxInput.java
===================================================================
--- portal/branches/branch-GTNPORTAL-1700/webui/core/src/main/java/org/exoplatform/webui/form/UIFormCheckBoxInput.java 2010-11-29 22:51:54 UTC (rev 5362)
+++ portal/branches/branch-GTNPORTAL-1700/webui/core/src/main/java/org/exoplatform/webui/form/UIFormCheckBoxInput.java 2010-11-30 01:51:11 UTC (rev 5363)
@@ -114,13 +114,16 @@
{
if (!isEnable())
return;
- if (input == null)
- checked = false;
- else
- checked = true;
- if (typeValue_ == Boolean.class || typeValue_ == boolean.class)
- {
- value_ = typeValue_.cast(checked);
+
+ if (input != null) {
+ if(input.equals("true"))
+ checked = true;
+ else
+ checked = false;
+ if (typeValue_ == Boolean.class || typeValue_ == boolean.class)
+ {
+ value_ = typeValue_.cast(checked);
+ }
}
}
14 years
gatein SVN: r5362 - in portal/branches/navcontroller/component/web/controller/src: main/java/org/exoplatform/web/controller/router and 1 other directories.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2010-11-29 17:51:54 -0500 (Mon, 29 Nov 2010)
New Revision: 5362
Modified:
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/regexp/RegExpParser.java
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
portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestRouteEscaper.java
Log:
use correct regex for route rendering
Modified: portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/regexp/RegExpParser.java
===================================================================
--- portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/regexp/RegExpParser.java 2010-11-29 22:43:42 UTC (rev 5361)
+++ portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/regexp/RegExpParser.java 2010-11-29 22:51:54 UTC (rev 5362)
@@ -51,6 +51,11 @@
this.index = from;
}
+ public void reset()
+ {
+ this.index = 0;
+ }
+
public int getIndex()
{
return index;
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-11-29 22:43:42 UTC (rev 5361)
+++ portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/router/Route.java 2010-11-29 22:51:54 UTC (rev 5362)
@@ -224,7 +224,6 @@
switch (param.encodingMode)
{
case FORM:
- s = s.replace('/', slashEscape);
matched = param.pattern.matcher(s).matches();
break;
case PRESERVE_PATH:
@@ -653,25 +652,30 @@
}
}
- // Now analyse the regexp
+ // Now work on the regex
+ String renderingRegex;
+ String routingRegex;
try
{
RegExpParser parser = new RegExpParser(regex);
- RENode.Disjunction disjunction = parser.parseDisjunction();
- // Process for form
+ //
+ RENode.Disjunction routingDisjunction = parser.parseDisjunction();
if (encodingMode == EncodingMode.FORM)
{
RouteEscaper escaper = new RouteEscaper('/', '_');
- escaper.visit(disjunction);
+ escaper.visit(routingDisjunction);
}
+ RegExpAnalyser routingAnalyser = new RegExpAnalyser();
+ routingAnalyser.process(routingDisjunction);
+ routingRegex = routingAnalyser.getPattern();
//
- RegExpAnalyser analyser = new RegExpAnalyser();
- analyser.process(disjunction);
-
- //
- regex = analyser.getPattern();
+ parser.reset();
+ RENode.Disjunction renderingDisjunction = parser.parseDisjunction();
+ RegExpAnalyser renderingAnalyser = new RegExpAnalyser();
+ renderingAnalyser.process(renderingDisjunction);
+ renderingRegex = renderingAnalyser.getPattern();
}
catch (SyntaxException e)
{
@@ -683,13 +687,13 @@
}
//
- builder.expr("(").expr(regex).expr(")");
+ builder.expr("(").expr(routingRegex).expr(")");
//
parameterPatterns.add(new PathParam(
parameterQName,
encodingMode,
- Pattern.compile("^" + regex + "$")));
+ Pattern.compile("^" + renderingRegex + "$")));
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-11-29 22:43:42 UTC (rev 5361)
+++ portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestBuildRoute.java 2010-11-29 22:51:54 UTC (rev 5362)
@@ -67,7 +67,7 @@
assertEquals("^/([^/]+)", patternRoute.pattern.toString());
assertEquals(1, patternRoute.params.size());
assertEquals(QualifiedName.create("a"), patternRoute.params.get(0).name);
- assertEquals("^[^/]+$", patternRoute.params.get(0).pattern.toString());
+ assertEquals("^.+$", patternRoute.params.get(0).pattern.toString());
assertEquals(EncodingMode.FORM, patternRoute.params.get(0).encodingMode);
assertEquals(2, patternRoute.chunks.size());
assertEquals("", patternRoute.chunks.get(0));
@@ -89,7 +89,7 @@
assertEquals("^/([^/]+)", patternRoute.pattern.toString());
assertEquals(1, patternRoute.params.size());
assertEquals(QualifiedName.create("q", "a"), patternRoute.params.get(0).name);
- assertEquals("^[^/]+$", patternRoute.params.get(0).pattern.toString());
+ assertEquals("^.+$", patternRoute.params.get(0).pattern.toString());
assertEquals(EncodingMode.FORM, patternRoute.params.get(0).encodingMode);
assertEquals(2, patternRoute.chunks.size());
assertEquals("", patternRoute.chunks.get(0));
@@ -111,7 +111,7 @@
assertEquals("^/([^/]*)", patternRoute.pattern.toString());
assertEquals(1, patternRoute.params.size());
assertEquals(QualifiedName.create("a"), patternRoute.params.get(0).name);
- assertEquals("^[^/]*$", patternRoute.params.get(0).pattern.toString());
+ assertEquals("^.*$", patternRoute.params.get(0).pattern.toString());
assertEquals(EncodingMode.FORM, patternRoute.params.get(0).encodingMode);
assertEquals(2, patternRoute.chunks.size());
assertEquals("", patternRoute.chunks.get(0));
Modified: portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestRouteEscaper.java
===================================================================
--- portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestRouteEscaper.java 2010-11-29 22:43:42 UTC (rev 5361)
+++ portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestRouteEscaper.java 2010-11-29 22:51:54 UTC (rev 5362)
@@ -41,7 +41,6 @@
escaper.visit(re);
RegExpAnalyser analyser = new RegExpAnalyser();
analyser.process(re);
- System.out.println(pattern + " --> " + analyser.getPattern());
Pattern p = Pattern.compile(analyser.getPattern());
Matcher matcher = p.matcher(test);
assertTrue(matcher.find());
14 years
gatein SVN: r5361 - in portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller: router and 1 other directory.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2010-11-29 17:43:42 -0500 (Mon, 29 Nov 2010)
New Revision: 5361
Modified:
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/metadata/DescriptorBuilder.java
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/metadata/RouterDescriptor.java
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/router/Route.java
Log:
minor
Modified: portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/metadata/DescriptorBuilder.java
===================================================================
--- portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/metadata/DescriptorBuilder.java 2010-11-29 22:39:20 UTC (rev 5360)
+++ portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/metadata/DescriptorBuilder.java 2010-11-29 22:43:42 UTC (rev 5361)
@@ -34,6 +34,18 @@
public class DescriptorBuilder
{
+ /** . */
+ private static final QName routeQN = new QName("http://www.gatein.org/xml/ns/gatein_router_1_0", "route");
+
+ /** . */
+ private static final QName paramQN = new QName("http://www.gatein.org/xml/ns/gatein_router_1_0", "route-param");
+
+ /** . */
+ private static final QName requestParamQN = new QName("http://www.gatein.org/xml/ns/gatein_router_1_0", "request-param");
+
+ /** . */
+ private static final QName pathParamQN = new QName("http://www.gatein.org/xml/ns/gatein_router_1_0", "path-param");
+
public static PathParamDescriptor pathParam(String qualifiedName)
{
return new PathParamDescriptor(qualifiedName);
@@ -49,18 +61,6 @@
return new RouteParamDescriptor(qualifiedName);
}
- /** . */
- private static final QName routeQN = new QName("http://www.gatein.org/xml/ns/gatein_router_1_0", "route");
-
- /** . */
- private static final QName paramQN = new QName("http://www.gatein.org/xml/ns/gatein_router_1_0", "route-param");
-
- /** . */
- private static final QName requestParamQN = new QName("http://www.gatein.org/xml/ns/gatein_router_1_0", "request-param");
-
- /** . */
- private static final QName pathParamQN = new QName("http://www.gatein.org/xml/ns/gatein_router_1_0", "path-param");
-
public static RouteDescriptor route(String path)
{
return new RouteDescriptor(path);
Modified: portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/metadata/RouterDescriptor.java
===================================================================
--- portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/metadata/RouterDescriptor.java 2010-11-29 22:39:20 UTC (rev 5360)
+++ portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/metadata/RouterDescriptor.java 2010-11-29 22:43:42 UTC (rev 5361)
@@ -41,15 +41,15 @@
this.routes = new ArrayList<RouteDescriptor>();
}
- public RouterDescriptor add(RouteDescriptor controller)
+ public RouterDescriptor add(RouteDescriptor route)
{
- if (controller == null)
+ if (route == null)
{
throw new NullPointerException();
}
//
- routes.add(controller);
+ routes.add(route);
//
return this;
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-11-29 22:39:20 UTC (rev 5360)
+++ portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/router/Route.java 2010-11-29 22:43:42 UTC (rev 5361)
@@ -671,9 +671,7 @@
analyser.process(disjunction);
//
- String tmp = analyser.getPattern();
- System.out.println("" + regex + " -> " + tmp);
- regex = tmp;
+ regex = analyser.getPattern();
}
catch (SyntaxException e)
{
@@ -701,7 +699,6 @@
// Julien : should the pattern end with a $ ?????? I don't see that for now
// we need to figure out clearly
Pattern pattern = builder.build();
- System.out.println("pattern = " + pattern);
PatternRoute route = new PatternRoute(pattern, parameterPatterns, chunks);
// Wire
14 years