gatein SVN: r5503 - exo/portal/branches/webos-gatein-branch/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace.
by do-not-reply@jboss.org
Author: hoang_to
Date: 2010-12-08 04:42:38 -0500 (Wed, 08 Dec 2010)
New Revision: 5503
Modified:
exo/portal/branches/webos-gatein-branch/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIMainActionListener.java
Log:
Use Class.forName method to create editted UIPage in EditCurrentPageActionListener, that is needed to fix the EditPage features in WebOS
Modified: exo/portal/branches/webos-gatein-branch/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIMainActionListener.java
===================================================================
--- exo/portal/branches/webos-gatein-branch/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIMainActionListener.java 2010-12-08 03:37:31 UTC (rev 5502)
+++ exo/portal/branches/webos-gatein-branch/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIMainActionListener.java 2010-12-08 09:42:38 UTC (rev 5503)
@@ -91,8 +91,8 @@
uiApp.setModeState(UIPortalApplication.APP_BLOCK_EDIT_MODE);
// We clone the edited UIPage object, that is required for Abort action
- //UIPage newUIPage = new UIPage();
- UIPage newUIPage = uiWorkingWS.createUIComponent(UIPage.class, null, null);
+ Class<? extends UIPage> clazz = Class.forName(page.getFactoryId()).asSubclass(UIPage.class);
+ UIPage newUIPage = uiWorkingWS.createUIComponent(clazz, null, null);
PortalDataMapper.toUIPage(newUIPage, page);
uiToolPanel.setWorkingComponent(newUIPage);
14 years
gatein SVN: r5502 - in portal/trunk: component/application-registry/src/test/java/org/exoplatform/application/gadget and 40 other directories.
by do-not-reply@jboss.org
Author: hoang_to
Date: 2010-12-07 22:37:31 -0500 (Tue, 07 Dec 2010)
New Revision: 5502
Added:
portal/trunk/component/resources/src/test/resources/locale/portlet_en.properties
portal/trunk/component/web/api/src/main/java/org/exoplatform/web/filter/RedefinableResourceFilter.java
portal/trunk/webui/portal/src/test/
portal/trunk/webui/portal/src/test/java/
portal/trunk/webui/portal/src/test/java/org/
portal/trunk/webui/portal/src/test/java/org/exoplatform/
portal/trunk/webui/portal/src/test/java/org/exoplatform/portal/
portal/trunk/webui/portal/src/test/java/org/exoplatform/portal/webui/
portal/trunk/webui/portal/src/test/java/org/exoplatform/portal/webui/test/
portal/trunk/webui/portal/src/test/java/org/exoplatform/portal/webui/test/ComponentConfigConcurrentTest.java
portal/trunk/webui/portal/src/test/java/org/exoplatform/portal/webui/test/MockApplication.java
portal/trunk/webui/portal/src/test/java/org/exoplatform/portal/webui/test/MockStateManager.java
portal/trunk/webui/portal/src/test/resources/
portal/trunk/webui/portal/src/test/resources/conf/
portal/trunk/webui/portal/src/test/resources/conf/portal/
portal/trunk/webui/portal/src/test/resources/conf/portal/test-configuration.xml
portal/trunk/webui/portal/src/test/resources/webui-configuration.xml
Removed:
portal/trunk/component/web/api/src/main/java/org/exoplatform/web/filter/ResourceOverridingFilter.java
portal/trunk/webui/portal/src/test/java/
portal/trunk/webui/portal/src/test/java/org/
portal/trunk/webui/portal/src/test/java/org/exoplatform/
portal/trunk/webui/portal/src/test/java/org/exoplatform/portal/
portal/trunk/webui/portal/src/test/java/org/exoplatform/portal/webui/
portal/trunk/webui/portal/src/test/java/org/exoplatform/portal/webui/test/
portal/trunk/webui/portal/src/test/java/org/exoplatform/portal/webui/test/ComponentConfigConcurrentTest.java
portal/trunk/webui/portal/src/test/java/org/exoplatform/portal/webui/test/MockApplication.java
portal/trunk/webui/portal/src/test/java/org/exoplatform/portal/webui/test/MockStateManager.java
portal/trunk/webui/portal/src/test/resources/
portal/trunk/webui/portal/src/test/resources/conf/
portal/trunk/webui/portal/src/test/resources/conf/portal/
portal/trunk/webui/portal/src/test/resources/conf/portal/test-configuration.xml
portal/trunk/webui/portal/src/test/resources/webui-configuration.xml
Modified:
portal/trunk/component/application-registry/src/test/java/org/exoplatform/application/AbstractApplicationRegistryTest.java
portal/trunk/component/application-registry/src/test/java/org/exoplatform/application/gadget/TestSourceStorageService.java
portal/trunk/component/application-registry/src/test/java/org/exoplatform/application/registry/TestApplicationRegistryService.java
portal/trunk/component/identity/src/test/java/org/exoplatform/services/organization/TestOrganizationService.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestOrganization.java
portal/trunk/component/resources/src/main/java/org/exoplatform/services/resources/impl/BaseResourceBundleService.java
portal/trunk/component/resources/src/test/java/org/exoplatform/services/resources/test/TestResourceBundleService.java
portal/trunk/component/web/api/src/main/java/org/exoplatform/web/filter/ExtensibleFilter.java
portal/trunk/component/web/api/src/main/java/org/exoplatform/web/filter/GenericFilter.java
portal/trunk/component/web/api/src/test/java/org/exoplatform/web/filter/TestExtensibleFilter.java
portal/trunk/examples/extension/war/src/main/resources/tomcat/sample-ext.xml
portal/trunk/examples/portal/war/src/main/resources/tomcat/sample-portal.xml
portal/trunk/examples/portlets/jsfhellouser/pom.xml
portal/trunk/examples/skins/simpleskin/src/main/resources/tomcat/simpleDeployableSkin.xml
portal/trunk/gadgets/eXoGadgets/src/main/resources/tomcat/eXoGadgets.xml
portal/trunk/portlet/dashboard/src/main/resources/tomcat/dashboard.xml
portal/trunk/portlet/exoadmin/src/main/resources/tomcat/exoadmin.xml
portal/trunk/portlet/web/src/main/resources/tomcat/web.xml
portal/trunk/testsuite/webuibasedsamples/src/main/resources/tomcat/portlets.xml
portal/trunk/web/eXoResources/src/main/resources/tomcat/eXoResources.xml
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalDragDrop.js
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIForm.js
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/jcr/repository-configuration.xml
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/uiconf/portal/webui/container/ContainerConfigOption.groovy
portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UIColumnContainer.gtmpl
portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UITableAutofitColumnContainer.gtmpl
portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UITableColumnContainer.gtmpl
portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/portal/UIPortletForm.gtmpl
portal/trunk/web/portal/src/main/webapp/groovy/webui/organization/account/UIUserSelector.gtmpl
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormCheckBoxInput.java
portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIUserProfileInputSet.java
portal/trunk/webui/framework/src/main/java/org/exoplatform/webui/config/Component.java
portal/trunk/webui/portal/pom.xml
Log:
GTNPORTAL-1700: Merge the commit branch of sprint 43 back to trunk
Modified: portal/trunk/component/application-registry/src/test/java/org/exoplatform/application/AbstractApplicationRegistryTest.java
===================================================================
--- portal/trunk/component/application-registry/src/test/java/org/exoplatform/application/AbstractApplicationRegistryTest.java 2010-12-07 14:58:26 UTC (rev 5501)
+++ portal/trunk/component/application-registry/src/test/java/org/exoplatform/application/AbstractApplicationRegistryTest.java 2010-12-08 03:37:31 UTC (rev 5502)
@@ -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/trunk/component/application-registry/src/test/java/org/exoplatform/application/gadget/TestSourceStorageService.java
===================================================================
--- portal/trunk/component/application-registry/src/test/java/org/exoplatform/application/gadget/TestSourceStorageService.java 2010-12-07 14:58:26 UTC (rev 5501)
+++ portal/trunk/component/application-registry/src/test/java/org/exoplatform/application/gadget/TestSourceStorageService.java 2010-12-08 03:37:31 UTC (rev 5502)
@@ -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/trunk/component/application-registry/src/test/java/org/exoplatform/application/registry/TestApplicationRegistryService.java
===================================================================
--- portal/trunk/component/application-registry/src/test/java/org/exoplatform/application/registry/TestApplicationRegistryService.java 2010-12-07 14:58:26 UTC (rev 5501)
+++ portal/trunk/component/application-registry/src/test/java/org/exoplatform/application/registry/TestApplicationRegistryService.java 2010-12-08 03:37:31 UTC (rev 5502)
@@ -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/trunk/component/identity/src/test/java/org/exoplatform/services/organization/TestOrganizationService.java
===================================================================
--- portal/trunk/component/identity/src/test/java/org/exoplatform/services/organization/TestOrganizationService.java 2010-12-07 14:58:26 UTC (rev 5501)
+++ portal/trunk/component/identity/src/test/java/org/exoplatform/services/organization/TestOrganizationService.java 2010-12-08 03:37:31 UTC (rev 5502)
@@ -117,12 +117,6 @@
RequestLifeCycle.end();
}
- public void testSimle() throws Exception
- {
- assertTrue(true);
-
- }
-
public void testUserPageSize() throws Exception
{
for (String name : USERS)
Modified: portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestOrganization.java
===================================================================
--- portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestOrganization.java 2010-12-07 14:58:26 UTC (rev 5501)
+++ portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestOrganization.java 2010-12-08 03:37:31 UTC (rev 5502)
@@ -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) {
+ }
+ }
}
Modified: portal/trunk/component/resources/src/main/java/org/exoplatform/services/resources/impl/BaseResourceBundleService.java
===================================================================
--- portal/trunk/component/resources/src/main/java/org/exoplatform/services/resources/impl/BaseResourceBundleService.java 2010-12-07 14:58:26 UTC (rev 5501)
+++ portal/trunk/component/resources/src/main/java/org/exoplatform/services/resources/impl/BaseResourceBundleService.java 2010-12-08 03:37:31 UTC (rev 5502)
@@ -22,6 +22,7 @@
import org.exoplatform.commons.utils.IOUtil;
import org.exoplatform.commons.utils.MapResourceBundle;
import org.exoplatform.commons.utils.PageList;
+import org.exoplatform.commons.utils.PropertyManager;
import org.exoplatform.container.xml.InitParams;
import org.exoplatform.services.cache.ExoCache;
import org.exoplatform.services.log.Log;
@@ -42,12 +43,10 @@
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
-import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.ResourceBundle;
-import java.util.Set;
/**
* Created by The eXo Platform SAS Mar 9, 2007
@@ -383,11 +382,6 @@
return IdentityResourceBundle.getInstance();
}
- // Case 1: ResourceBundle of portlets, standard java API is used
- if (isClasspathResource(name))
- return ResourceBundleLoader.load(name, locale, cl);
-
- // Case 2: ResourceBundle of portal
String country = locale.getCountry();
String id;
if (country != null && country.length() > 0)
@@ -399,18 +393,39 @@
id = name + "_" + locale.getLanguage();
}
- try
+ boolean isClasspathResource = isClasspathResource(name);
+ boolean isCacheable = !isClasspathResource || !PropertyManager.isDevelopping();
+ if (isCacheable)
{
- ResourceBundle rb = cache_.get(id);
- if (rb != null)
+ if (isClasspathResource)
{
- return rb;
+ // Avoid naming collision
+ id += "_" + cl.getClass() + "_" + cl.hashCode();
}
+ try
+ {
+ ResourceBundle rb = cache_.get(id);
+ if (rb != null)
+ {
+ return rb;
+ }
+ }
+ catch (Exception ex)
+ {
+ }
}
- catch (Exception ex)
+
+ // Case 1: ResourceBundle of portlets, standard java API is used
+ if (isClasspathResource)
{
+ ResourceBundle res = ResourceBundleLoader.load(name, locale, cl);
+ //Cache classpath resource bundle while running portal in non-dev mode
+ if (isCacheable)
+ cache_.put(id, res);
+ return res;
}
+ // Case 2: ResourceBundle of portal
try
{
ResourceBundle res = null;
Modified: portal/trunk/component/resources/src/test/java/org/exoplatform/services/resources/test/TestResourceBundleService.java
===================================================================
--- portal/trunk/component/resources/src/test/java/org/exoplatform/services/resources/test/TestResourceBundleService.java 2010-12-07 14:58:26 UTC (rev 5501)
+++ portal/trunk/component/resources/src/test/java/org/exoplatform/services/resources/test/TestResourceBundleService.java 2010-12-08 03:37:31 UTC (rev 5502)
@@ -19,8 +19,13 @@
package org.exoplatform.services.resources.test;
+import org.exoplatform.commons.utils.PropertyManager;
import org.exoplatform.container.PortalContainer;
-import org.exoplatform.services.resources.*;
+import org.exoplatform.services.resources.AbstractResourceBundleTest;
+import org.exoplatform.services.resources.LocaleConfigService;
+import org.exoplatform.services.resources.Query;
+import org.exoplatform.services.resources.ResourceBundleData;
+import org.exoplatform.services.resources.ResourceBundleService;
import java.util.List;
import java.util.Locale;
@@ -178,4 +183,33 @@
{
return "Test Resource Bundle Service";
}
+
+ public void testClasspathResourceCache()
+ {
+ String oldValue = PropertyManager.getProperty(PropertyManager.DEVELOPING);
+ try
+ {
+ PropertyManager.setProperty(PropertyManager.DEVELOPING, "false");
+ assertFalse(PropertyManager.isDevelopping());
+ MyClassLoader cl1 = new MyClassLoader();
+ ResourceBundle res = service_.getResourceBundle("locale.portlet", Locale.ENGLISH, cl1);
+ assertNotNull(res);
+ assertTrue(res == service_.getResourceBundle("locale.portlet", Locale.ENGLISH, cl1));
+ assertFalse(res == service_.getResourceBundle("locale.portlet", Locale.ENGLISH, new MyClassLoader()));
+ }
+ finally
+ {
+ PropertyManager.setProperty(PropertyManager.DEVELOPING, oldValue);
+ }
+ }
+
+ private static class MyClassLoader extends ClassLoader
+ {
+
+ @Override
+ public String toString()
+ {
+ return "MyClassLoader";
+ }
+ }
}
Copied: portal/trunk/component/resources/src/test/resources/locale/portlet_en.properties (from rev 5501, portal/branches/branch-GTNPORTAL-1700/component/resources/src/test/resources/locale/portlet_en.properties)
===================================================================
--- portal/trunk/component/resources/src/test/resources/locale/portlet_en.properties (rev 0)
+++ portal/trunk/component/resources/src/test/resources/locale/portlet_en.properties 2010-12-08 03:37:31 UTC (rev 5502)
@@ -0,0 +1,20 @@
+#
+# 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.
+#
+
+language.language=English
Modified: portal/trunk/component/web/api/src/main/java/org/exoplatform/web/filter/ExtensibleFilter.java
===================================================================
--- portal/trunk/component/web/api/src/main/java/org/exoplatform/web/filter/ExtensibleFilter.java 2010-12-07 14:58:26 UTC (rev 5501)
+++ portal/trunk/component/web/api/src/main/java/org/exoplatform/web/filter/ExtensibleFilter.java 2010-12-08 03:37:31 UTC (rev 5502)
@@ -29,7 +29,6 @@
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServletRequest;
/**
* This class allows the rest of the platform to define new filters thanks to the external
@@ -40,7 +39,7 @@
* nicolas.filotto(a)exoplatform.com
* 25 sept. 2009
*/
-public class ExtensibleFilter implements Filter
+public class ExtensibleFilter
{
/**
@@ -74,32 +73,31 @@
}
}
- /**
- * @see Filter#doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)
- */
- public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException,
- ServletException
+ public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain, String path)
+ throws IOException, ServletException
{
- ExtensibleFilterChain efChain = new ExtensibleFilterChain(chain, filters);
+ ExtensibleFilterChain efChain = new ExtensibleFilterChain(chain, filters, path);
efChain.doFilter(request, response);
}
-
+
private static class ExtensibleFilterChain implements FilterChain
{
private final FilterChain parentChain;
private final Iterator<FilterDefinition> filters;
+
+ private final String path;
- private ExtensibleFilterChain(FilterChain parentChain, List<FilterDefinition> filters)
+ private ExtensibleFilterChain(FilterChain parentChain, List<FilterDefinition> filters, String path_)
{
this.parentChain = parentChain;
this.filters = filters.iterator();
+ this.path = path_;
}
public void doFilter(ServletRequest request, ServletResponse response) throws IOException, ServletException
{
- String path = ((HttpServletRequest)request).getRequestURI();
while (filters.hasNext())
{
FilterDefinition filterDef = filters.next();
Modified: portal/trunk/component/web/api/src/main/java/org/exoplatform/web/filter/GenericFilter.java
===================================================================
--- portal/trunk/component/web/api/src/main/java/org/exoplatform/web/filter/GenericFilter.java 2010-12-07 14:58:26 UTC (rev 5501)
+++ portal/trunk/component/web/api/src/main/java/org/exoplatform/web/filter/GenericFilter.java 2010-12-08 03:37:31 UTC (rev 5502)
@@ -23,11 +23,15 @@
import org.exoplatform.container.web.AbstractFilter;
import java.io.IOException;
+import java.util.regex.Pattern;
import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
/**
* This filter allows the rest of the platform to add their own filters without changing the web.xml
@@ -41,12 +45,20 @@
public class GenericFilter extends AbstractFilter
{
+ private Pattern contextPathPattern;
/**
* @see javax.servlet.Filter#destroy()
*/
public void destroy()
{
}
+
+ @Override
+ protected void afterInit(FilterConfig config) throws ServletException
+ {
+ ServletContext servletContext = this.getServletContext();
+ contextPathPattern = Pattern.compile("[/]*" + servletContext.getContextPath() + "[/]*");
+ }
/**
* This filter calls <code>doFilter</code> of the {@link ExtensibleFilter} of
@@ -63,7 +75,8 @@
}
else
{
- filter.doFilter(request, response, chain);
+ String path = contextPathPattern.matcher(((HttpServletRequest)request).getRequestURI()).replaceFirst("/");
+ filter.doFilter(request, response, chain, path);
}
}
}
Copied: portal/trunk/component/web/api/src/main/java/org/exoplatform/web/filter/RedefinableResourceFilter.java (from rev 5501, portal/branches/branch-GTNPORTAL-1700/component/web/api/src/main/java/org/exoplatform/web/filter/RedefinableResourceFilter.java)
===================================================================
--- portal/trunk/component/web/api/src/main/java/org/exoplatform/web/filter/RedefinableResourceFilter.java (rev 0)
+++ portal/trunk/component/web/api/src/main/java/org/exoplatform/web/filter/RedefinableResourceFilter.java 2010-12-08 03:37:31 UTC (rev 5502)
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2003-2010 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.web.filter;
+
+import java.io.IOException;
+
+import javax.servlet.FilterChain;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+
+import org.exoplatform.container.PortalContainer;
+
+/**
+ * A filter enables resource overriding via extension mechanism.
+ *
+ * @author <a href="mailto:hoang281283@gmail.com">Minh Hoang TO</a>
+ * Sep 8, 2010
+ */
+
+public class RedefinableResourceFilter implements Filter {
+
+ @Override
+ public void doFilter(ServletRequest request, ServletResponse response,
+ FilterChain chain) throws IOException, ServletException {
+
+ HttpServletRequest upcastedRequest = (HttpServletRequest)request;
+
+ PortalContainer portalContainer = PortalContainer.getInstance();
+ ServletContext mergedContext = portalContainer.getPortalContext();
+
+ String path = upcastedRequest.getRequestURI();
+ String ctx = upcastedRequest.getContextPath();
+
+ if(ctx != null && ctx.length() > 0 && path.startsWith(ctx))
+ {
+ path = path.substring(ctx.length());
+ }
+
+ mergedContext.getRequestDispatcher(path).include(request, response);
+ }
+
+}
Deleted: portal/trunk/component/web/api/src/main/java/org/exoplatform/web/filter/ResourceOverridingFilter.java
===================================================================
--- portal/trunk/component/web/api/src/main/java/org/exoplatform/web/filter/ResourceOverridingFilter.java 2010-12-07 14:58:26 UTC (rev 5501)
+++ portal/trunk/component/web/api/src/main/java/org/exoplatform/web/filter/ResourceOverridingFilter.java 2010-12-08 03:37:31 UTC (rev 5502)
@@ -1,59 +0,0 @@
-/*
- * Copyright (C) 2003-2010 eXo Platform SAS.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Affero General Public License
- * as published by the Free Software Foundation; either version 3
- * of the License, or (at your option) any later version.
- *
- * This program 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, see<http://www.gnu.org/licenses/>.
- */
-package org.exoplatform.web.filter;
-
-import java.io.IOException;
-
-import javax.servlet.FilterChain;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServletRequest;
-
-import org.exoplatform.container.PortalContainer;
-
-/**
- * A filter enables resource overriding via extension mechanism.
- *
- * @author <a href="mailto:hoang281283@gmail.com">Minh Hoang TO</a>
- * Sep 8, 2010
- */
-
-public class ResourceOverridingFilter implements Filter {
-
- @Override
- public void doFilter(ServletRequest request, ServletResponse response,
- FilterChain chain) throws IOException, ServletException {
-
- HttpServletRequest upcastedRequest = (HttpServletRequest)request;
-
- PortalContainer portalContainer = PortalContainer.getInstance();
- ServletContext mergedContext = portalContainer.getPortalContext();
-
- String path = upcastedRequest.getRequestURI();
- String ctx = upcastedRequest.getContextPath();
-
- if(ctx != null && ctx.length() > 0 && path.startsWith(ctx))
- {
- path = path.substring(ctx.length());
- }
-
- mergedContext.getRequestDispatcher(path).include(request, response);
- }
-
-}
Modified: portal/trunk/component/web/api/src/test/java/org/exoplatform/web/filter/TestExtensibleFilter.java
===================================================================
--- portal/trunk/component/web/api/src/test/java/org/exoplatform/web/filter/TestExtensibleFilter.java 2010-12-07 14:58:26 UTC (rev 5501)
+++ portal/trunk/component/web/api/src/test/java/org/exoplatform/web/filter/TestExtensibleFilter.java 2010-12-08 03:37:31 UTC (rev 5502)
@@ -52,13 +52,14 @@
public void testDoFilter() throws IOException, ServletException
{
+ String pathRequest = "/testPath";
ExtensibleFilter exFilter = new ExtensibleFilter();
MockFilterOKTF mockFilterOKTF = new MockFilterOKTF();
MockFilterOKWTF mockFilterOKWTF = new MockFilterOKWTF();
MockFilterChain chain = new MockFilterChain();
exFilter.addFilterDefinitions(Arrays.asList(getFilterDefinition(mockFilterOKTF),
getFilterDefinition(mockFilterOKWTF)));
- exFilter.doFilter(new MockServletRequest(), null, chain);
+ exFilter.doFilter(new MockServletRequest(), null, chain, pathRequest);
assertTrue(mockFilterOKTF.start);
assertTrue(mockFilterOKTF.end);
assertTrue(mockFilterOKWTF.start);
@@ -70,7 +71,7 @@
chain = new MockFilterChain();
exFilter.addFilterDefinitions(Arrays.asList(getFilterDefinition(mockFilterOKTF),
getFilterDefinition(mockFilterOKWTF), getFilterDefinition(new MockFilterKO())));
- exFilter.doFilter(new MockServletRequest(), null, chain);
+ exFilter.doFilter(new MockServletRequest(), null, chain, pathRequest);
assertTrue(mockFilterOKTF.start);
assertTrue(mockFilterOKTF.end);
assertTrue(mockFilterOKWTF.start);
@@ -84,7 +85,7 @@
getFilterDefinition(mockFilterOKWTF), getFilterDefinition(new MockFilterKOIO())));
try
{
- exFilter.doFilter(new MockServletRequest(), null, chain);
+ exFilter.doFilter(new MockServletRequest(), null, chain, pathRequest);
fail("IOException is expected");
}
catch (IOException e)
@@ -103,7 +104,7 @@
getFilterDefinition(mockFilterOKWTF), getFilterDefinition(new MockFilterKOSE())));
try
{
- exFilter.doFilter(new MockServletRequest(), null, chain);
+ exFilter.doFilter(new MockServletRequest(), null, chain, pathRequest);
fail("ServletException is expected");
}
catch (ServletException e)
@@ -122,7 +123,7 @@
getFilterDefinition(mockFilterOKWTF), getFilterDefinition(new MockFilterKORE())));
try
{
- exFilter.doFilter(new MockServletRequest(), null, chain);
+ exFilter.doFilter(new MockServletRequest(), null, chain, pathRequest);
fail("RuntimeException is expected");
}
catch (RuntimeException e)
@@ -141,7 +142,7 @@
getFilterDefinition(mockFilterOKWTF), getFilterDefinition(new MockFilterKOER())));
try
{
- exFilter.doFilter(new MockServletRequest(), null, chain);
+ exFilter.doFilter(new MockServletRequest(), null, chain, pathRequest);
fail("Error is expected");
}
catch (Error e)
@@ -162,7 +163,7 @@
getFilterDefinition(mockFilterOKTF2)));
try
{
- exFilter.doFilter(new MockServletRequest(), null, chain);
+ exFilter.doFilter(new MockServletRequest(), null, chain, pathRequest);
fail("IOException is expected");
}
catch (IOException e)
Modified: portal/trunk/examples/extension/war/src/main/resources/tomcat/sample-ext.xml
===================================================================
--- portal/trunk/examples/extension/war/src/main/resources/tomcat/sample-ext.xml 2010-12-07 14:58:26 UTC (rev 5501)
+++ portal/trunk/examples/extension/war/src/main/resources/tomcat/sample-ext.xml 2010-12-08 03:37:31 UTC (rev 5502)
@@ -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/trunk/examples/portal/war/src/main/resources/tomcat/sample-portal.xml
===================================================================
--- portal/trunk/examples/portal/war/src/main/resources/tomcat/sample-portal.xml 2010-12-07 14:58:26 UTC (rev 5501)
+++ portal/trunk/examples/portal/war/src/main/resources/tomcat/sample-portal.xml 2010-12-08 03:37:31 UTC (rev 5502)
@@ -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/trunk/examples/portlets/jsfhellouser/pom.xml
===================================================================
--- portal/trunk/examples/portlets/jsfhellouser/pom.xml 2010-12-07 14:58:26 UTC (rev 5501)
+++ portal/trunk/examples/portlets/jsfhellouser/pom.xml 2010-12-08 03:37:31 UTC (rev 5502)
@@ -49,6 +49,16 @@
<artifactId>portletbridge-impl</artifactId>
<version>2.0.0.FINAL</version>
</dependency>
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <version>1.2_13</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-impl</artifactId>
+ <version>1.2_13</version>
+ </dependency>
</dependencies>
Modified: portal/trunk/examples/skins/simpleskin/src/main/resources/tomcat/simpleDeployableSkin.xml
===================================================================
--- portal/trunk/examples/skins/simpleskin/src/main/resources/tomcat/simpleDeployableSkin.xml 2010-12-07 14:58:26 UTC (rev 5501)
+++ portal/trunk/examples/skins/simpleskin/src/main/resources/tomcat/simpleDeployableSkin.xml 2010-12-08 03:37:31 UTC (rev 5502)
@@ -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/trunk/gadgets/eXoGadgets/src/main/resources/tomcat/eXoGadgets.xml
===================================================================
--- portal/trunk/gadgets/eXoGadgets/src/main/resources/tomcat/eXoGadgets.xml 2010-12-07 14:58:26 UTC (rev 5501)
+++ portal/trunk/gadgets/eXoGadgets/src/main/resources/tomcat/eXoGadgets.xml 2010-12-08 03:37:31 UTC (rev 5502)
@@ -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/trunk/portlet/dashboard/src/main/resources/tomcat/dashboard.xml
===================================================================
--- portal/trunk/portlet/dashboard/src/main/resources/tomcat/dashboard.xml 2010-12-07 14:58:26 UTC (rev 5501)
+++ portal/trunk/portlet/dashboard/src/main/resources/tomcat/dashboard.xml 2010-12-08 03:37:31 UTC (rev 5502)
@@ -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/trunk/portlet/exoadmin/src/main/resources/tomcat/exoadmin.xml
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/resources/tomcat/exoadmin.xml 2010-12-07 14:58:26 UTC (rev 5501)
+++ portal/trunk/portlet/exoadmin/src/main/resources/tomcat/exoadmin.xml 2010-12-08 03:37:31 UTC (rev 5502)
@@ -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/trunk/portlet/web/src/main/resources/tomcat/web.xml
===================================================================
--- portal/trunk/portlet/web/src/main/resources/tomcat/web.xml 2010-12-07 14:58:26 UTC (rev 5501)
+++ portal/trunk/portlet/web/src/main/resources/tomcat/web.xml 2010-12-08 03:37:31 UTC (rev 5502)
@@ -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/trunk/testsuite/webuibasedsamples/src/main/resources/tomcat/portlets.xml
===================================================================
--- portal/trunk/testsuite/webuibasedsamples/src/main/resources/tomcat/portlets.xml 2010-12-07 14:58:26 UTC (rev 5501)
+++ portal/trunk/testsuite/webuibasedsamples/src/main/resources/tomcat/portlets.xml 2010-12-08 03:37:31 UTC (rev 5502)
@@ -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/trunk/web/eXoResources/src/main/resources/tomcat/eXoResources.xml
===================================================================
--- portal/trunk/web/eXoResources/src/main/resources/tomcat/eXoResources.xml 2010-12-07 14:58:26 UTC (rev 5501)
+++ portal/trunk/web/eXoResources/src/main/resources/tomcat/eXoResources.xml 2010-12-08 03:37:31 UTC (rev 5502)
@@ -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/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalDragDrop.js
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalDragDrop.js 2010-12-07 14:58:26 UTC (rev 5501)
+++ portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalDragDrop.js 2010-12-08 03:37:31 UTC (rev 5502)
@@ -53,7 +53,7 @@
var PortalDragDrop = eXo.portal.PortalDragDrop ;
this.origDragObjectStyle = new eXo.core.HashMap() ;
var dragObject = dndEvent.dragObject ;
- var properties = ["top", eXo.core.I18n.isLT() ? "left" : "right", "zIndex", "opacity", "filter", "position"] ;
+ var properties = ["top", eXo.core.I18n.isLT() ? "left" : "right", "zIndex", "opacity", "filter", "position", "width"] ;
this.origDragObjectStyle.copyProperties(properties, dragObject.style) ;
var isAddingNewly = !DOMUtil.findFirstDescendantByClass(dragObject, "div", "UIComponentBlock");
@@ -73,6 +73,8 @@
}
PortalDragDrop.parentDragObject = dragObject.parentNode ;
+ //use this when press ESC with firefox (cancel dragdrop in column container)
+ PortalDragDrop.backupParentSibling = DOMUtil.findNextElementByTagName(dragObject.parentNode, "td");
PortalDragDrop.backupDragObjectWidth = dragObject.offsetWidth ;
/*Case: dragObject out of UIPortal*/
@@ -150,11 +152,6 @@
eXo.portal.PortalDragDrop.layoutTypeElementNode = layoutTypeElement ;
if(previewBlock == null) previewBlock = eXo.portal.PortalDragDrop.createPreview();
- if(previewTD || document.getElementById("PreviewTDBlock")) {
- if(!previewTD) previewTD = document.getElementById("PreviewTDBlock");
- if(previewTD.parentNode) previewTD.parentNode.removeChild(previewTD);
- previewTD = null;
- }
if(layoutTypeElement != null && !DOMUtil.hasClass(layoutTypeElement, "UITableColumnContainer")) {
/* ===============================CASE ROW LAYOUT================================ */
@@ -190,8 +187,6 @@
var td = tdElementList[i];
if((td != previewBlock.parentNode) && (td != dragObject.parentNode)) {
listComponent.push(td) ;
- } else if(td == dragObject.parentNode) {
- td.style.width = "0px";
}
} else {
listComponent.push(tdElementList[i]) ;
@@ -203,13 +198,10 @@
dndEvent.foundTargetObject.foundIndex = insertPosition ;
/* Insert preview block */
- previewTD = document.createElement("td");
- previewTD.id = previewTD.className = "PreviewTDBlock";
- previewTD.appendChild(previewBlock);
if(insertPosition >= 0) {
- trContainer.insertBefore(previewTD, listComponent[insertPosition]) ;
+ trContainer.insertBefore(dragObject.parentNode, listComponent[insertPosition]) ;
} else {
- trContainer.appendChild(previewTD) ;
+ trContainer.appendChild(dragObject.parentNode) ;
}
}
var dragParent = dragObject.parentNode;
@@ -219,11 +211,9 @@
} ;
DragDrop.dropCallback = function(dndEvent) {
- this.origDragObjectStyle.setProperties(dndEvent.dragObject.style, false) ;
-
var hasChanged = true;
- //When press esc key, we want to cancel the dragdrop, but now it only works with FF
- if (dndEvent.backupMouseEvent && dndEvent.backupMouseEvent.keyCode == 27 && eXo.core.Browser.isFF()) {
+ //When press esc key, we want to cancel the dragdrop
+ if (dndEvent.backupMouseEvent && dndEvent.backupMouseEvent.keyCode == 27) {
hasChanged = false;
}
//When dragObject is outside
@@ -231,38 +221,48 @@
dndEvent.foundTargetObject = dndEvent.lastFoundTargetObject;
}
- var targetElement = dndEvent.foundTargetObject;
- if(!targetElement || targetElement.foundIndex == null) {
- hasChanged = false;
- }
- //When dragobject is next to preview object (position is not changed)
+ var targetElement = dndEvent.foundTargetObject;
+ if(!targetElement || targetElement.foundIndex == null) {
+ hasChanged = false;
+ }
+// Case RowContainer : When dragobject is next to preview object (position is not changed)
+// Case ColumnContainer : When dragObject.parent's lastSibling doesn't change
+ var DOMUtil = eXo.core.DOMUtil;
if(!dndEvent.dragObject.isAddingNewly) {
- var DOMUtil = eXo.core.DOMUtil;
- var previewClass = "DragAndDropPreview";
- var previewTagName = "div";
- var previewSibling = dndEvent.dragObject;
- if (dndEvent.dragObject.parentNode.tagName.toLowerCase() == "td") {
- previewSibling = dndEvent.dragObject.parentNode;
- previewClass = "PreviewTDBlock";
- previewTagName = "td";
- }
- var tempObj = DOMUtil.findNextElementByTagName(previewSibling, previewTagName);
- if (tempObj != null && tempObj.className == previewClass) {
- hasChanged = false;
- } else {
- tempObj = DOMUtil.findPreviousElementByTagName(previewSibling, previewTagName);
- if (tempObj != null && tempObj.className == previewClass) {
- hasChanged = false;
- }
- }
+ if (dndEvent.dragObject.parentNode.tagName.toLowerCase() == "td") {
+ //Column Container
+ var backupParentSibling = eXo.portal.PortalDragDrop.backupParentSibling;
+ if (DOMUtil.findNextElementByTagName(dndEvent.dragObject.parentNode, "td") == backupParentSibling) {
+ hasChanged = false;
+ }
+ } else {
+ //RowContainer
+ var tempObj = DOMUtil.findNextElementByTagName(dndEvent.dragObject, "div");
+ if (tempObj != null && tempObj.className == "DragAndDropPreview") {
+ hasChanged = false;
+ } else {
+ tempObj = DOMUtil.findPreviousElementByTagName(dndEvent.dragObject, "div");
+ if (tempObj != null && tempObj.className == "DragAndDropPreview") {
+ hasChanged = false;
+ }
+ }
+ }
}
if(dndEvent.backupMouseEvent && dndEvent.backupMouseEvent.keyCode != 27) {
eXo.portal.PortalDragDrop.doDropCallback(dndEvent) ;
} else {
- if(dndEvent.dragObject.parentNode.nodeName.toLowerCase() == "td") {
- dndEvent.dragObject.parentNode.style.width = "auto";
- }
+ //When click ESC, restore dragObject's last position
+ if (dndEvent.dragObject.parentNode && dndEvent.dragObject.parentNode.tagName.toLowerCase() == "td") {
+ var tdNode = dndEvent.dragObject.parentNode ;
+ var lastSibling = eXo.portal.PortalDragDrop.backupParentSibling;
+ if (lastSibling == null) {
+ tdNode.parentNode.appendChild(tdNode);
+ } else {
+ tdNode.parentNode.insertBefore(tdNode, lastSibling);
+ }
+ }
+
if(dndEvent.dragObject.isAddingNewly) {
dndEvent.dragObject.parentNode.removeChild(dndEvent.dragObject) ;
}
@@ -275,15 +275,16 @@
}
if(previewBlock) previewBlock.parentNode.removeChild(previewBlock);
- if(previewTD) previewTD.parentNode.removeChild(previewTD);
- previewBlock = previewTD = null;
+ previewBlock = null;
eXo.portal.isInDragging = false;
if (hasChanged) {
eXo.portal.UIPortal.changeComposerSaveButton();
}
- // fix bug WEBOS-196
- dndEvent.dragObject.style.width = "auto" ;
+
+ // fix bug WEBOS-196
+// dndEvent.dragObject.style.width = "auto" ;
+ this.origDragObjectStyle.setProperties(dndEvent.dragObject.style, false) ;
};
var clickObject = this;
@@ -326,9 +327,6 @@
if(!srcElement.isAddingNewly && (targetElement.foundIndex != null)) {
if(eXo.portal.PortalDragDrop.layoutTypeElementNode != null) {
eXo.portal.PortalDragDrop.divRowContainerAddChild(srcElement, targetElement, targetElement.foundIndex) ;
- } else {
- eXo.portal.PortalDragDrop.parentDragObject.style.width = "auto";
- eXo.portal.PortalDragDrop.tableColumnContainerAddChild(srcElement, targetElement, targetElement.foundIndex) ;
}
}
@@ -366,6 +364,7 @@
dropableTargets.push(uiTableContainer);
return dropableTargets;
}
+
var uiWorkingWorkspace = document.getElementById("UIWorkingWorkspace") ;
var pagebody = document.getElementById("UIPageBody");
if(eXo.portal.portalMode && pagebody) {
@@ -381,6 +380,7 @@
if(DOMUtil.hasAncestor(uiContainers[i], dragBlock)) continue;
if(DOMUtil.hasClass(uiContainers[i], "ProtectedContainer")) continue;
if (DOMUtil.hasClass(uiContainers[i], "UITableColumnContainer")) continue;
+
dropableTargets.push(uiContainers[i]) ;
}
return dropableTargets ;
@@ -471,29 +471,4 @@
}
};
-/**
- * Add the <code>srcElement</code> to be a column of the <code>targetElement</code> table column container
- * at the position <code>insertPosition</code>
- */
-PortalDragDrop.prototype.tableColumnContainerAddChild = function(srcElement, targetElement, insertPosition) {
- var listComponent = eXo.core.DragDrop.dndEvent.foundTargetObject.listComponentInTarget ;
- var DOMUtil = eXo.core.DOMUtil ;
- var trContainer = DOMUtil.findFirstDescendantByClass(targetElement, "tr", "TRContainer") ;
-
- var tdInserted = document.createElement('td') ;
- tdInserted.appendChild(srcElement) ;
-
- if(insertPosition >= 0) {
- trContainer.insertBefore(tdInserted, listComponent[insertPosition]) ;
- } else {
- trContainer.appendChild(tdInserted) ;
- }
-
- srcElement.style.width = "auto" ;
-
- if(eXo.portal.PortalDragDrop.parentDragObject.nodeName.toLowerCase() == "td") {
- DOMUtil.removeElement(eXo.portal.PortalDragDrop.parentDragObject) ;
- }
-};
-
eXo.portal.PortalDragDrop = new PortalDragDrop() ;
\ No newline at end of file
Modified: portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js 2010-12-07 14:58:26 UTC (rev 5501)
+++ portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/UIPortal.js 2010-12-08 03:37:31 UTC (rev 5502)
@@ -516,10 +516,10 @@
var parent;
if (parent = DOMUtil.findAncestorByClass(element, "UIPortlet")) {
return parent;
+ } else if (parent = DOMUtil.findAncestorByClass(element, "UIPageBody")) {
+ return parent;
} else if (parent = DOMUtil.findAncestorByClass(element, "UIContainer")) {
return parent;
- } else if (parent = DOMUtil.findAncestorByClass(element, "UIPageBody")) {
- return parent;
} else if (parent = DOMUtil.findAncestorByClass(element, "UIPortal")) {
return parent;
}
@@ -611,7 +611,12 @@
UIPortal.prototype.removeComponent = function(componentId) {
var comp = document.getElementById(componentId);
var viewPage = eXo.core.DOMUtil.findAncestorByClass(comp, "VIEW-PAGE");
-
+
+ var parent = comp.parentNode;
+ if (eXo.core.DOMUtil.getChildrenByTagName(parent, "div").length === 1 && !eXo.core.DOMUtil.hasClass(parent, "EmptyContainer")) {
+ eXo.core.DOMUtil.addClass(parent, "EmptyContainer");
+ }
+
//Check if the removing component is a column
if (comp.parentNode.nodeName.toUpperCase() == "TD") eXo.core.DOMUtil.removeElement(comp.parentNode);
else eXo.core.DOMUtil.removeElement(comp);
Modified: portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIForm.js
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIForm.js 2010-12-07 14:58:26 UTC (rev 5501)
+++ portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIForm.js 2010-12-08 03:37:31 UTC (rev 5502)
@@ -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/trunk/web/portal/src/main/webapp/WEB-INF/conf/jcr/repository-configuration.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/jcr/repository-configuration.xml 2010-12-07 14:58:26 UTC (rev 5501)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/jcr/repository-configuration.xml 2010-12-08 03:37:31 UTC (rev 5502)
@@ -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>
Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/uiconf/portal/webui/container/ContainerConfigOption.groovy
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/uiconf/portal/webui/container/ContainerConfigOption.groovy 2010-12-07 14:58:26 UTC (rev 5501)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/uiconf/portal/webui/container/ContainerConfigOption.groovy 2010-12-08 03:37:31 UTC (rev 5502)
@@ -70,22 +70,22 @@
autofitColumn.addSelectItemOption(new SelectItemOption("autofitOneColumns","" +
"<container template=\"system:/groovy/portal/webui/container/UITableAutofitColumnContainer.gtmpl\">" +
" <factory-id>TableColumnContainer</factory-id>" +
- " <container template=\"system:/groovy/portal/webui/container/UIContainer.gtmpl\"></container>" +
+ " <container template=\"system:/groovy/portal/webui/container/UIColumnContainer.gtmpl\"><factory-id>ColumnContainer</factory-id></container>" +
"</container>",
"OneRowContainerLayout")) ;
autofitColumn.addSelectItemOption(new SelectItemOption("autofitTwoColumns",
"<container template=\"system:/groovy/portal/webui/container/UITableAutofitColumnContainer.gtmpl\">" +
" <factory-id>TableColumnContainer</factory-id>" +
- " <container template=\"system:/groovy/portal/webui/container/UIContainer.gtmpl\"></container>" +
- " <container template=\"system:/groovy/portal/webui/container/UIContainer.gtmpl\"></container>" +
+ " <container template=\"system:/groovy/portal/webui/container/UIColumnContainer.gtmpl\"><factory-id>ColumnContainer</factory-id></container>" +
+ " <container template=\"system:/groovy/portal/webui/container/UIColumnContainer.gtmpl\"><factory-id>ColumnContainer</factory-id></container>" +
"</container>",
"TwoColumnContainerLayout")) ;
autofitColumn.addSelectItemOption(new SelectItemOption("autofitThreeColumns",
"<container template=\"system:/groovy/portal/webui/container/UITableAutofitColumnContainer.gtmpl\">" +
" <factory-id>TableColumnContainer</factory-id>" +
- " <container template=\"system:/groovy/portal/webui/container/UIContainer.gtmpl\"></container>" +
- " <container template=\"system:/groovy/portal/webui/container/UIContainer.gtmpl\"></container>" +
- " <container template=\"system:/groovy/portal/webui/container/UIContainer.gtmpl\"></container>" +
+ " <container template=\"system:/groovy/portal/webui/container/UIColumnContainer.gtmpl\"><factory-id>ColumnContainer</factory-id></container>" +
+ " <container template=\"system:/groovy/portal/webui/container/UIColumnContainer.gtmpl\"><factory-id>ColumnContainer</factory-id></container>" +
+ " <container template=\"system:/groovy/portal/webui/container/UIColumnContainer.gtmpl\"><factory-id>ColumnContainer</factory-id></container>" +
"</container>",
"ThreeColumnContainerLayout")) ;
templates.add(autofitColumn);
Modified: portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UIColumnContainer.gtmpl
===================================================================
--- portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UIColumnContainer.gtmpl 2010-12-07 14:58:26 UTC (rev 5501)
+++ portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UIColumnContainer.gtmpl 2010-12-08 03:37:31 UTC (rev 5502)
@@ -42,10 +42,10 @@
<div class="VIEW-CONTAINER VIEW-BLOCK">
<%} %>
<%if(hasPermission) {%>
- <div class="UIRowContainer <%=(portalMode != UIPortalApplication.NORMAL_MODE && uicomponent.getChildren().size() == 0) ? "EmptyContainer" : ""%>">
- <div>
+ <div>
+ <div class="UIRowContainer <%=(portalMode != UIPortalApplication.NORMAL_MODE && uicomponent.getChildren().size() == 0) ? "EmptyContainer" : ""%>">
<%uicomponent.renderChildren();%>
- </div>
+ </div>
</div>
<%} else out.print("<div class='ProtectedContent'>"+_ctx.appRes("UIPortlet.label.protectedContent")+"</div>");%>
</div>
Modified: portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UITableAutofitColumnContainer.gtmpl
===================================================================
--- portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UITableAutofitColumnContainer.gtmpl 2010-12-07 14:58:26 UTC (rev 5501)
+++ portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UITableAutofitColumnContainer.gtmpl 2010-12-08 03:37:31 UTC (rev 5502)
@@ -16,7 +16,7 @@
}
%>
-<div class="UIContainer <%=uiPortalApp.isEditing()?"EdittingContainer":""%> <%=hasPermission?"":"ProtectedContainer"%>"
+<div class="UIContainer UITableColumnContainer <%=uiPortalApp.isEditing()?"EdittingContainer":""%> <%=hasPermission?"":"ProtectedContainer"%>"
id="${uicomponent.id}"
onmouseover="eXo.portal.UIPortal.blockOnMouseOver(event, this, true);"
onmouseout="eXo.portal.UIPortal.blockOnMouseOver(event, this, false);">
@@ -39,10 +39,10 @@
<%} %>
<div>
<%if(hasPermission) {%>
- <table class="UITableColumnContainer" style="margin: 0px auto; $style">
+ <table class="UITableColumn" margin: 0px auto; $style">
<tr class="TRContainer">
<% for(uiChild in uicomponent.getChildren()) {%>
- <td class="${uiChild.id}TDContainer TDContainer"><% uicomponent.renderUIComponent(uiChild) %></td>
+ <td class="${uiChild.id}TDContainer" <% if(uiChild.getWidth()) { %> width="<%= uiChild.getWidth(); %>" <% } %>><% uicomponent.renderUIComponent(uiChild) %></td>
<% } %>
</tr>
</table>
@@ -65,16 +65,16 @@
<div class="RightBar">
<div class="MiddleBar">
<div class="FixHeight ClearFix">
- <div class="DragControlArea" title="<%=_ctx.appRes("UIContainer.tooltip.drag")%>" onmousedown="eXo.portal.PortalDragDrop.init.call(this,event);"><span></span></div>
+ <div class="DragControlArea" title="<%=_ctx.appRes("UITableColumnContainer.title.DragControlArea")%>" onmousedown="eXo.portal.PortalDragDrop.init.call(this,event);"><span></span></div>
<%
String strTitle = uicomponent.getTitle() != null ?
ExpressionUtil.getExpressionValue(res, uicomponent.getTitle()) :
- _ctx.appRes("UIContainer.title.Container");
+ _ctx.appRes("UITableColumnContainer.title.Container");
%>
<div class="ContainerIcon DefaultContainer16x16Icon"><%=hasPermission ? strTitle : _ctx.appRes("UIPortlet.label.protectedContent")%></div>
<%if(hasPermission) {%>
- <a href="<%=uicomponent.event("EditContainer","$uicomponent.id")%>" class="EditContainerIcon" title="<%=_ctx.appRes("UIContainer.tooltip.editContainer")%>"><span></span></a>
- <a href="<%=uicomponent.event("DeleteComponent","$uicomponent.id")%>" class="DeleteContainerIcon" title="<%=_ctx.appRes("UIContainer.tooltip.closeContainer")%>"><span></span></a>
+ <a href="<%=uicomponent.event("EditContainer","$uicomponent.id")%>" class="EditContainerIcon" title="<%=_ctx.appRes("UITableColumnContainer.tooltip.editContainer")%>"><span></span></a>
+ <a href="<%=uicomponent.event("DeleteComponent","$uicomponent.id")%>" class="DeleteContainerIcon" title="<%=_ctx.appRes("UITableColumnContainer.tooltip.closeContainer")%>"><span></span></a>
<%}%>
</div>
</div>
Modified: portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UITableColumnContainer.gtmpl
===================================================================
--- portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UITableColumnContainer.gtmpl 2010-12-07 14:58:26 UTC (rev 5501)
+++ portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/container/UITableColumnContainer.gtmpl 2010-12-08 03:37:31 UTC (rev 5502)
@@ -42,7 +42,7 @@
<table class="UITableColumn" style="table-layout: fixed; margin: 0px auto; $style">
<tr class="TRContainer">
<% for(uiChild in uicomponent.getChildren()) {%>
- <td class="${uiChild.id}TDContainer TDContainer" width="<%= uiChild.getWidth(); %>"><% uicomponent.renderUIComponent(uiChild) %></td>
+ <td class="${uiChild.id}TDContainer" <% if(uiChild.getWidth()) { %> width="<%= uiChild.getWidth(); %>" <% } %>><% uicomponent.renderUIComponent(uiChild) %></td>
<% } %>
</tr>
</table>
Modified: portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/portal/UIPortletForm.gtmpl
===================================================================
--- portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/portal/UIPortletForm.gtmpl 2010-12-07 14:58:26 UTC (rev 5501)
+++ portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/portal/UIPortletForm.gtmpl 2010-12-08 03:37:31 UTC (rev 5502)
@@ -25,7 +25,7 @@
<div class="$className">
<div class="LeftTab">
<div class="RightTab">
- <div class="MiddleTab" onmousedown="eXo.UIPortletForm.hideSaveButton(this)" onclick="eXo.webui.UIHorizontalTabs.changeTabForUIFormTabpane(this, '$uiform.id', 'EditMode');$actionLink"><%= _ctx.appRes("UIPortletForm.tab.label.EditMode") %></div>
+ <div class="MiddleTab" onclick="eXo.UIPortletForm.hideSaveButton(this); eXo.webui.UIHorizontalTabs.changeTabForUIFormTabpane(this, '$uiform.id', 'EditMode');$actionLink"><%= _ctx.appRes("UIPortletForm.tab.label.EditMode") %></div>
</div>
</div>
</div>
@@ -44,7 +44,7 @@
<div class="$className">
<div class="LeftTab">
<div class="RightTab">
- <div class="MiddleTab" onmousedown="eXo.UIPortletForm.showSaveButton(this)" onclick="eXo.webui.UIHorizontalTabs.changeTabForUIFormTabpane(this, '$uiform.id', '$inputSet.id');$actionLink">$tabName</div>
+ <div class="MiddleTab" onclick="eXo.UIPortletForm.showSaveButton(this); eXo.webui.UIHorizontalTabs.changeTabForUIFormTabpane(this, '$uiform.id', '$inputSet.id');$actionLink">$tabName</div>
</div>
</div>
</div>
Modified: portal/trunk/web/portal/src/main/webapp/groovy/webui/organization/account/UIUserSelector.gtmpl
===================================================================
--- portal/trunk/web/portal/src/main/webapp/groovy/webui/organization/account/UIUserSelector.gtmpl 2010-12-07 14:58:26 UTC (rev 5501)
+++ portal/trunk/web/portal/src/main/webapp/groovy/webui/organization/account/UIUserSelector.gtmpl 2010-12-08 03:37:31 UTC (rev 5502)
@@ -58,7 +58,7 @@
<thead>
<tr>
<% if(isMulti) {%>
- <th style="width: 30px;"><input type="checkbox" class="checkbox" value="4" /></th>
+ <th style="width: 30px;"><input type="checkbox" class="checkbox" name="selectall"/></th>
<% } %>
<th>
<%=uiform.getLabel('userName')%>
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormCheckBoxInput.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormCheckBoxInput.java 2010-12-07 14:58:26 UTC (rev 5501)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormCheckBoxInput.java 2010-12-08 03:37:31 UTC (rev 5502)
@@ -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);
+ }
}
}
Modified: portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIUserProfileInputSet.java
===================================================================
--- portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIUserProfileInputSet.java 2010-12-07 14:58:26 UTC (rev 5501)
+++ portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIUserProfileInputSet.java 2010-12-08 03:37:31 UTC (rev 5502)
@@ -121,6 +121,7 @@
initLanguageCombo(langSelectBox);
continue;
}
+
set.addUIFormInput(new UIFormStringInput(key, null, null));
}
}
Modified: portal/trunk/webui/framework/src/main/java/org/exoplatform/webui/config/Component.java
===================================================================
--- portal/trunk/webui/framework/src/main/java/org/exoplatform/webui/config/Component.java 2010-12-07 14:58:26 UTC (rev 5501)
+++ portal/trunk/webui/framework/src/main/java/org/exoplatform/webui/config/Component.java 2010-12-08 03:37:31 UTC (rev 5502)
@@ -56,7 +56,8 @@
private final List<EventInterceptor> eventInterceptors;
- private Map<String, Event> eventMap;
+ /** Declare this map as volatile to make double-check work properly **/
+ private volatile Map<String, Event> eventMap;
private Lifecycle<UIComponent> componentLifecycle;
@@ -182,18 +183,21 @@
{
if(eventMap == null)
{
- eventMap = new HashMap<String, Event>();
+ Map<String, Event> temporaryMap = new HashMap<String, Event>();
if (events == null)
{
+ eventMap = temporaryMap;
return null;
}
for (Event event : events)
{
createCachedEventListeners(event);
- eventMap.put(event.getName(), event);
+ temporaryMap.put(event.getName(), event);
}
+
+ eventMap = temporaryMap;
}
return eventMap.get(eventName);
Modified: portal/trunk/webui/portal/pom.xml
===================================================================
--- portal/trunk/webui/portal/pom.xml 2010-12-07 14:58:26 UTC (rev 5501)
+++ portal/trunk/webui/portal/pom.xml 2010-12-08 03:37:31 UTC (rev 5502)
@@ -92,5 +92,12 @@
<groupId>org.gatein.captcha</groupId>
<artifactId>simplecaptcha</artifactId>
</dependency>
+
+ <dependency>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.component.test.core</artifactId>
+ <scope>test</scope>
+ </dependency>
+
</dependencies>
</project>
Copied: portal/trunk/webui/portal/src/test (from rev 5501, portal/branches/branch-GTNPORTAL-1700/webui/portal/src/test)
Copied: portal/trunk/webui/portal/src/test/java (from rev 5501, portal/branches/branch-GTNPORTAL-1700/webui/portal/src/test/java)
Copied: portal/trunk/webui/portal/src/test/java/org (from rev 5501, portal/branches/branch-GTNPORTAL-1700/webui/portal/src/test/java/org)
Copied: portal/trunk/webui/portal/src/test/java/org/exoplatform (from rev 5501, portal/branches/branch-GTNPORTAL-1700/webui/portal/src/test/java/org/exoplatform)
Copied: portal/trunk/webui/portal/src/test/java/org/exoplatform/portal (from rev 5501, portal/branches/branch-GTNPORTAL-1700/webui/portal/src/test/java/org/exoplatform/portal)
Copied: portal/trunk/webui/portal/src/test/java/org/exoplatform/portal/webui (from rev 5501, portal/branches/branch-GTNPORTAL-1700/webui/portal/src/test/java/org/exoplatform/portal/webui)
Copied: portal/trunk/webui/portal/src/test/java/org/exoplatform/portal/webui/test (from rev 5501, portal/branches/branch-GTNPORTAL-1700/webui/portal/src/test/java/org/exoplatform/portal/webui/test)
Deleted: portal/trunk/webui/portal/src/test/java/org/exoplatform/portal/webui/test/ComponentConfigConcurrentTest.java
===================================================================
--- portal/branches/branch-GTNPORTAL-1700/webui/portal/src/test/java/org/exoplatform/portal/webui/test/ComponentConfigConcurrentTest.java 2010-12-07 14:58:26 UTC (rev 5501)
+++ portal/trunk/webui/portal/src/test/java/org/exoplatform/portal/webui/test/ComponentConfigConcurrentTest.java 2010-12-08 03:37:31 UTC (rev 5502)
@@ -1,122 +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.exoplatform.portal.webui.test;
-
-import java.io.File;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.exoplatform.portal.webui.portal.PageNodeEvent;
-import org.exoplatform.portal.webui.portal.UIPortal;
-import org.exoplatform.webui.config.Event;
-
-import org.exoplatform.component.test.AbstractGateInTest;
-
-/**
- * Unit test for concurrent read of event from UI component configuration.
- *
- * @author <a href="mailto:mposolda@redhat.com">Marek Posolda</a>
- * @version $Revision$
- */
-public class ComponentConfigConcurrentTest extends AbstractGateInTest
-{
- private static final int WORKERS_COUNT = 50;
-
- private MockApplication mockApplication;
-
- public void testConcurrentReadOfComponentEventConfig() throws Exception
- {
- // Init configuration and mock WebUI application
- Map<String, String> initParams = new HashMap<String, String>();
- initParams.put("webui.configuration", "webui.configuration");
-
- String basedir = System.getProperty("basedir");
- String webuiConfig = basedir + "/src/test/resources/webui-configuration.xml";
- Map<String, URL> resources = new HashMap<String, URL>();
- resources.put("webui.configuration", new File(webuiConfig).toURI().toURL());
- initParams.put("webui.configuration", new File(webuiConfig).toURI().toURL().toString());
-
- mockApplication = new MockApplication(initParams, resources, null);
- mockApplication.onInit();
-
- // init workers list
- List<Worker> workers = new ArrayList<Worker>(WORKERS_COUNT);
-
- // test obtain event configuration concurrently with more worker threads
- for (int i=0 ; i<WORKERS_COUNT ; i++)
- {
- Worker worker = new Worker("Worker-" + i);
- workers.add(worker);
- worker.start();
- }
-
- // Wait for all workers to finish
- for (Worker worker : workers)
- {
- worker.join();
- }
-
- // Go throguh all workers and throw error if some worker has null eventConfig
- for (Worker worker : workers)
- {
- assertNotNull("event configuration is null in worker " + worker.getName(), worker.eventConfig);
- }
-
- // destroy mock application
- mockApplication.onDestroy();
- }
-
- private class Worker extends Thread
- {
- private Event eventConfig = null;
-
- public Worker(String name)
- {
- super(name);
- }
-
- public void run()
- {
- try
- {
- UIPortal uiPortal = mockApplication.createUIComponent(UIPortal.class, null, null, null);
- eventConfig = uiPortal.getComponentConfig().getUIComponentEventConfig(PageNodeEvent.CHANGE_PAGE_NODE);
-
- // log message now if eventConfig is null, so that we know about all failed workers. Test will be failed later.
- if (eventConfig == null)
- {
- log.error("eventConfig is null for worker " + getName());
- }
- }
- catch (Exception e)
- {
- log.error("Exception occured during concurrent test in worker " + getName(), e);
- }
- }
-
- }
-
-}
Copied: portal/trunk/webui/portal/src/test/java/org/exoplatform/portal/webui/test/ComponentConfigConcurrentTest.java (from rev 5501, portal/branches/branch-GTNPORTAL-1700/webui/portal/src/test/java/org/exoplatform/portal/webui/test/ComponentConfigConcurrentTest.java)
===================================================================
--- portal/trunk/webui/portal/src/test/java/org/exoplatform/portal/webui/test/ComponentConfigConcurrentTest.java (rev 0)
+++ portal/trunk/webui/portal/src/test/java/org/exoplatform/portal/webui/test/ComponentConfigConcurrentTest.java 2010-12-08 03:37:31 UTC (rev 5502)
@@ -0,0 +1,122 @@
+/******************************************************************************
+ * 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.exoplatform.portal.webui.test;
+
+import java.io.File;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.exoplatform.portal.webui.portal.PageNodeEvent;
+import org.exoplatform.portal.webui.portal.UIPortal;
+import org.exoplatform.webui.config.Event;
+
+import org.exoplatform.component.test.AbstractGateInTest;
+
+/**
+ * Unit test for concurrent read of event from UI component configuration.
+ *
+ * @author <a href="mailto:mposolda@redhat.com">Marek Posolda</a>
+ * @version $Revision$
+ */
+public class ComponentConfigConcurrentTest extends AbstractGateInTest
+{
+ private static final int WORKERS_COUNT = 50;
+
+ private MockApplication mockApplication;
+
+ public void testConcurrentReadOfComponentEventConfig() throws Exception
+ {
+ // Init configuration and mock WebUI application
+ Map<String, String> initParams = new HashMap<String, String>();
+ initParams.put("webui.configuration", "webui.configuration");
+
+ String basedir = System.getProperty("basedir");
+ String webuiConfig = basedir + "/src/test/resources/webui-configuration.xml";
+ Map<String, URL> resources = new HashMap<String, URL>();
+ resources.put("webui.configuration", new File(webuiConfig).toURI().toURL());
+ initParams.put("webui.configuration", new File(webuiConfig).toURI().toURL().toString());
+
+ mockApplication = new MockApplication(initParams, resources, null);
+ mockApplication.onInit();
+
+ // init workers list
+ List<Worker> workers = new ArrayList<Worker>(WORKERS_COUNT);
+
+ // test obtain event configuration concurrently with more worker threads
+ for (int i=0 ; i<WORKERS_COUNT ; i++)
+ {
+ Worker worker = new Worker("Worker-" + i);
+ workers.add(worker);
+ worker.start();
+ }
+
+ // Wait for all workers to finish
+ for (Worker worker : workers)
+ {
+ worker.join();
+ }
+
+ // Go throguh all workers and throw error if some worker has null eventConfig
+ for (Worker worker : workers)
+ {
+ assertNotNull("event configuration is null in worker " + worker.getName(), worker.eventConfig);
+ }
+
+ // destroy mock application
+ mockApplication.onDestroy();
+ }
+
+ private class Worker extends Thread
+ {
+ private Event eventConfig = null;
+
+ public Worker(String name)
+ {
+ super(name);
+ }
+
+ public void run()
+ {
+ try
+ {
+ UIPortal uiPortal = mockApplication.createUIComponent(UIPortal.class, null, null, null);
+ eventConfig = uiPortal.getComponentConfig().getUIComponentEventConfig(PageNodeEvent.CHANGE_PAGE_NODE);
+
+ // log message now if eventConfig is null, so that we know about all failed workers. Test will be failed later.
+ if (eventConfig == null)
+ {
+ log.error("eventConfig is null for worker " + getName());
+ }
+ }
+ catch (Exception e)
+ {
+ log.error("Exception occured during concurrent test in worker " + getName(), e);
+ }
+ }
+
+ }
+
+}
Deleted: portal/trunk/webui/portal/src/test/java/org/exoplatform/portal/webui/test/MockApplication.java
===================================================================
--- portal/branches/branch-GTNPORTAL-1700/webui/portal/src/test/java/org/exoplatform/portal/webui/test/MockApplication.java 2010-12-07 14:58:26 UTC (rev 5501)
+++ portal/trunk/webui/portal/src/test/java/org/exoplatform/portal/webui/test/MockApplication.java 2010-12-08 03:37:31 UTC (rev 5502)
@@ -1,98 +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.portal.webui.test;
-
-import java.net.URL;
-import java.util.Locale;
-import java.util.Map;
-import java.util.ResourceBundle;
-
-import org.exoplatform.container.ExoContainer;
-import org.exoplatform.portal.application.PortalStateManager;
-import org.exoplatform.portal.webui.portal.UIPortal;
-import org.exoplatform.portal.webui.workspace.UIPortalApplication;
-import org.exoplatform.resolver.ApplicationResourceResolver;
-import org.exoplatform.resolver.MockResourceResolver;
-import org.exoplatform.webui.application.WebuiApplication;
-
-public class MockApplication extends WebuiApplication
-{
-
- private Map<String, String> initParams_;
-
- private ResourceBundle appRes_;
-
- public MockApplication(Map<String, String> initParams, Map<String, URL> resources, ResourceBundle appRes)
- {
- initParams_ = initParams;
- appRes_ = appRes;
- ApplicationResourceResolver resolver = new ApplicationResourceResolver();
- resolver.addResourceResolver(new MockResourceResolver(resources));
- setResourceResolver(resolver);
- }
-
- public String getApplicationId()
- {
- return "MockApplication";
- }
-
- public String getApplicationName()
- {
- return "MockApplication";
- }
-
- @SuppressWarnings("unused")
- public ResourceBundle getResourceBundle(Locale locale) throws Exception
- {
- return appRes_;
- }
-
- @SuppressWarnings("unused")
- public ResourceBundle getOwnerResourceBundle(String username, Locale locale) throws Exception
- {
- return null;
- }
-
- public String getApplicationInitParam(String name)
- {
- return initParams_.get(name);
- }
-
- @Override
- public ExoContainer getApplicationServiceContainer()
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public String getApplicationGroup()
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public String getApplicationType()
- {
- // TODO Auto-generated method stub
- return null;
- }
-}
Copied: portal/trunk/webui/portal/src/test/java/org/exoplatform/portal/webui/test/MockApplication.java (from rev 5501, portal/branches/branch-GTNPORTAL-1700/webui/portal/src/test/java/org/exoplatform/portal/webui/test/MockApplication.java)
===================================================================
--- portal/trunk/webui/portal/src/test/java/org/exoplatform/portal/webui/test/MockApplication.java (rev 0)
+++ portal/trunk/webui/portal/src/test/java/org/exoplatform/portal/webui/test/MockApplication.java 2010-12-08 03:37:31 UTC (rev 5502)
@@ -0,0 +1,98 @@
+/**
+ * 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.webui.test;
+
+import java.net.URL;
+import java.util.Locale;
+import java.util.Map;
+import java.util.ResourceBundle;
+
+import org.exoplatform.container.ExoContainer;
+import org.exoplatform.portal.application.PortalStateManager;
+import org.exoplatform.portal.webui.portal.UIPortal;
+import org.exoplatform.portal.webui.workspace.UIPortalApplication;
+import org.exoplatform.resolver.ApplicationResourceResolver;
+import org.exoplatform.resolver.MockResourceResolver;
+import org.exoplatform.webui.application.WebuiApplication;
+
+public class MockApplication extends WebuiApplication
+{
+
+ private Map<String, String> initParams_;
+
+ private ResourceBundle appRes_;
+
+ public MockApplication(Map<String, String> initParams, Map<String, URL> resources, ResourceBundle appRes)
+ {
+ initParams_ = initParams;
+ appRes_ = appRes;
+ ApplicationResourceResolver resolver = new ApplicationResourceResolver();
+ resolver.addResourceResolver(new MockResourceResolver(resources));
+ setResourceResolver(resolver);
+ }
+
+ public String getApplicationId()
+ {
+ return "MockApplication";
+ }
+
+ public String getApplicationName()
+ {
+ return "MockApplication";
+ }
+
+ @SuppressWarnings("unused")
+ public ResourceBundle getResourceBundle(Locale locale) throws Exception
+ {
+ return appRes_;
+ }
+
+ @SuppressWarnings("unused")
+ public ResourceBundle getOwnerResourceBundle(String username, Locale locale) throws Exception
+ {
+ return null;
+ }
+
+ public String getApplicationInitParam(String name)
+ {
+ return initParams_.get(name);
+ }
+
+ @Override
+ public ExoContainer getApplicationServiceContainer()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public String getApplicationGroup()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public String getApplicationType()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+}
Deleted: portal/trunk/webui/portal/src/test/java/org/exoplatform/portal/webui/test/MockStateManager.java
===================================================================
--- portal/branches/branch-GTNPORTAL-1700/webui/portal/src/test/java/org/exoplatform/portal/webui/test/MockStateManager.java 2010-12-07 14:58:26 UTC (rev 5501)
+++ portal/trunk/webui/portal/src/test/java/org/exoplatform/portal/webui/test/MockStateManager.java 2010-12-08 03:37:31 UTC (rev 5502)
@@ -1,46 +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.portal.webui.test;
-
-import org.exoplatform.webui.application.StateManager;
-import org.exoplatform.webui.application.WebuiApplication;
-import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.core.UIApplication;
-
-public class MockStateManager extends StateManager
-{
-
- @SuppressWarnings("unused")
- public UIApplication restoreUIRootComponent(WebuiRequestContext context)
- {
- return null;
- }
-
- @SuppressWarnings("unused")
- public void storeUIRootComponent(WebuiRequestContext context)
- {
- }
-
- @SuppressWarnings("unused")
- public void expire(String sessionId, WebuiApplication app)
- {
-
- }
-}
Copied: portal/trunk/webui/portal/src/test/java/org/exoplatform/portal/webui/test/MockStateManager.java (from rev 5501, portal/branches/branch-GTNPORTAL-1700/webui/portal/src/test/java/org/exoplatform/portal/webui/test/MockStateManager.java)
===================================================================
--- portal/trunk/webui/portal/src/test/java/org/exoplatform/portal/webui/test/MockStateManager.java (rev 0)
+++ portal/trunk/webui/portal/src/test/java/org/exoplatform/portal/webui/test/MockStateManager.java 2010-12-08 03:37:31 UTC (rev 5502)
@@ -0,0 +1,46 @@
+/**
+ * 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.webui.test;
+
+import org.exoplatform.webui.application.StateManager;
+import org.exoplatform.webui.application.WebuiApplication;
+import org.exoplatform.webui.application.WebuiRequestContext;
+import org.exoplatform.webui.core.UIApplication;
+
+public class MockStateManager extends StateManager
+{
+
+ @SuppressWarnings("unused")
+ public UIApplication restoreUIRootComponent(WebuiRequestContext context)
+ {
+ return null;
+ }
+
+ @SuppressWarnings("unused")
+ public void storeUIRootComponent(WebuiRequestContext context)
+ {
+ }
+
+ @SuppressWarnings("unused")
+ public void expire(String sessionId, WebuiApplication app)
+ {
+
+ }
+}
Copied: portal/trunk/webui/portal/src/test/resources (from rev 5501, portal/branches/branch-GTNPORTAL-1700/webui/portal/src/test/resources)
Copied: portal/trunk/webui/portal/src/test/resources/conf (from rev 5501, portal/branches/branch-GTNPORTAL-1700/webui/portal/src/test/resources/conf)
Copied: portal/trunk/webui/portal/src/test/resources/conf/portal (from rev 5501, portal/branches/branch-GTNPORTAL-1700/webui/portal/src/test/resources/conf/portal)
Deleted: portal/trunk/webui/portal/src/test/resources/conf/portal/test-configuration.xml
===================================================================
--- portal/branches/branch-GTNPORTAL-1700/webui/portal/src/test/resources/conf/portal/test-configuration.xml 2010-12-07 14:58:26 UTC (rev 5501)
+++ portal/trunk/webui/portal/src/test/resources/conf/portal/test-configuration.xml 2010-12-08 03:37:31 UTC (rev 5502)
@@ -1,27 +0,0 @@
-<?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_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
-</configuration>
Copied: portal/trunk/webui/portal/src/test/resources/conf/portal/test-configuration.xml (from rev 5501, portal/branches/branch-GTNPORTAL-1700/webui/portal/src/test/resources/conf/portal/test-configuration.xml)
===================================================================
--- portal/trunk/webui/portal/src/test/resources/conf/portal/test-configuration.xml (rev 0)
+++ portal/trunk/webui/portal/src/test/resources/conf/portal/test-configuration.xml 2010-12-08 03:37:31 UTC (rev 5502)
@@ -0,0 +1,27 @@
+<?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_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
+</configuration>
Deleted: portal/trunk/webui/portal/src/test/resources/webui-configuration.xml
===================================================================
--- portal/branches/branch-GTNPORTAL-1700/webui/portal/src/test/resources/webui-configuration.xml 2010-12-07 14:58:26 UTC (rev 5501)
+++ portal/trunk/webui/portal/src/test/resources/webui-configuration.xml 2010-12-08 03:37:31 UTC (rev 5502)
@@ -1,37 +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.
-
--->
-
-<webui-configuration>
- <application>
- <init-params>
- </init-params>
-
- <ui-component-root>org.exoplatform.portal.webui.workspace.UIPortalApplication</ui-component-root>
- <state-manager>org.exoplatform.portal.webui.test.MockStateManager</state-manager>
-
- <application-lifecycle-listeners>
- <listener>org.exoplatform.webui.application.MonitorApplicationLifecycle</listener>
- </application-lifecycle-listeners>
-
- <events>
- </events>
- </application>
-</webui-configuration>
Copied: portal/trunk/webui/portal/src/test/resources/webui-configuration.xml (from rev 5501, portal/branches/branch-GTNPORTAL-1700/webui/portal/src/test/resources/webui-configuration.xml)
===================================================================
--- portal/trunk/webui/portal/src/test/resources/webui-configuration.xml (rev 0)
+++ portal/trunk/webui/portal/src/test/resources/webui-configuration.xml 2010-12-08 03:37:31 UTC (rev 5502)
@@ -0,0 +1,37 @@
+<!--
+
+ 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.
+
+-->
+
+<webui-configuration>
+ <application>
+ <init-params>
+ </init-params>
+
+ <ui-component-root>org.exoplatform.portal.webui.workspace.UIPortalApplication</ui-component-root>
+ <state-manager>org.exoplatform.portal.webui.test.MockStateManager</state-manager>
+
+ <application-lifecycle-listeners>
+ <listener>org.exoplatform.webui.application.MonitorApplicationLifecycle</listener>
+ </application-lifecycle-listeners>
+
+ <events>
+ </events>
+ </application>
+</webui-configuration>
14 years
gatein SVN: r5501 - in components/wsrp/trunk/producer/src: test/java/org/gatein/wsrp/producer/config and 2 other directories.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-12-07 09:58:26 -0500 (Tue, 07 Dec 2010)
New Revision: 5501
Added:
components/wsrp/trunk/producer/src/test/resources/xsd/gatein_wsrp_producer_1_0.xsd
Removed:
components/wsrp/trunk/producer/src/test/resources/xsd/jboss-wsrp-producer_2_7.xsd
Modified:
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/config/impl/xml/FileSystemXMLProducerConfigurationService.java
components/wsrp/trunk/producer/src/test/java/org/gatein/wsrp/producer/config/ProducerConfigurationTestCase.java
components/wsrp/trunk/producer/src/test/resources/custom-policy.xml
components/wsrp/trunk/producer/src/test/resources/extended.xml
components/wsrp/trunk/producer/src/test/resources/invalid-type.xml
components/wsrp/trunk/producer/src/test/resources/invalid1.xml
components/wsrp/trunk/producer/src/test/resources/invalid2.xml
components/wsrp/trunk/producer/src/test/resources/invalid3.xml
components/wsrp/trunk/producer/src/test/resources/minimal-registration.xml
components/wsrp/trunk/producer/src/test/resources/minimal.xml
components/wsrp/trunk/producer/src/test/resources/strict-mode.xml
Log:
- GTNWSRP-172: Fixed producer tests.
Modified: components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/config/impl/xml/FileSystemXMLProducerConfigurationService.java
===================================================================
--- components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/config/impl/xml/FileSystemXMLProducerConfigurationService.java 2010-12-07 12:15:45 UTC (rev 5500)
+++ components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/config/impl/xml/FileSystemXMLProducerConfigurationService.java 2010-12-07 14:58:26 UTC (rev 5501)
@@ -60,15 +60,16 @@
private static DefaultSchemaResolver RESOLVER;
- private static final String PRODUCER_NAMESPACE = "urn:jboss:portal:wsrp:producer:v2_7";
- private static final String PRODUCER_XSD = "jboss-wsrp-producer_2_7.xsd";
+ private static final String PRODUCER_NAMESPACE = "http://www.gatein.org/xml/ns/gatein_wsrp_producer_1_0";
+ private static final String PRODUCER_XSD = "gatein_wsrp_producer_1_0.xsd";
static
{
RESOLVER = new DefaultSchemaResolver();
RESOLVER.setCacheResolvedSchemas(true);
RESOLVER.addSchemaLocation("http://www.w3.org/XML/1998/namespace", "xsd/xml.xsd");
- RESOLVER.addSchemaLocation("urn:jboss:portal:wsrp:producer:v2_6", "xsd/jboss-wsrp-producer_2_6.xsd");
+ /*RESOLVER.addSchemaLocation("urn:jboss:portal:wsrp:producer:v2_6", "xsd/jboss-wsrp-producer_2_6.xsd");
+ RESOLVER.addSchemaLocation("urn:jboss:portal:wsrp:producer:v2_7", "xsd/jboss-wsrp-producer_2_7.xsd");*/
RESOLVER.addSchemaLocation(PRODUCER_NAMESPACE, "xsd/" + PRODUCER_XSD);
}
Modified: components/wsrp/trunk/producer/src/test/java/org/gatein/wsrp/producer/config/ProducerConfigurationTestCase.java
===================================================================
--- components/wsrp/trunk/producer/src/test/java/org/gatein/wsrp/producer/config/ProducerConfigurationTestCase.java 2010-12-07 12:15:45 UTC (rev 5500)
+++ components/wsrp/trunk/producer/src/test/java/org/gatein/wsrp/producer/config/ProducerConfigurationTestCase.java 2010-12-07 14:58:26 UTC (rev 5501)
@@ -76,7 +76,7 @@
RESOLVER = new DefaultSchemaResolver();
RESOLVER.setCacheResolvedSchemas(true);
RESOLVER.addSchemaLocation("http://www.w3.org/XML/1998/namespace", "xsd/xml.xsd");
- RESOLVER.addSchemaLocation("urn:jboss:portal:wsrp:producer:v2_7", "xsd/jboss-wsrp-producer_2_7.xsd");
+ RESOLVER.addSchemaLocation("http://www.gatein.org/xml/ns/gatein_wsrp_producer_1_0", "xsd/gatein_wsrp_producer_1_0.xsd");
}
protected void setUp() throws Exception
@@ -277,7 +277,7 @@
StringWriter xmlOutput = new StringWriter();
// get the XML Schema source
- InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream("xsd/jboss-wsrp-producer_2_7.xsd");
+ InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream("xsd/gatein_wsrp_producer_1_0.xsd");
Reader xsReader = new InputStreamReader(is);
@@ -287,15 +287,15 @@
marshaller.setSchemaResolver(RESOLVER);
// we need to specify what elements are top most (roots) providing namespace URI, prefix and local name
- marshaller.addRootElement("urn:jboss:portal:wsrp:producer:v2_7", "", "producer-configuration");
+ marshaller.addRootElement("http://www.gatein.org/xml/ns/gatein_wsrp_producer_1_0", "", "producer-configuration");
// declare default namespace
- marshaller.declareNamespace("wpc", "urn:jboss:portal:wsrp:producer:v2_7");
+ marshaller.declareNamespace("wpc", "http://www.gatein.org/xml/ns/gatein_wsrp_producer_1_0");
// add schema location by declaring xsi namespace and adding xsi:schemaLocation attribute
marshaller.declareNamespace("xsi", "http://www.w3.org/2001/XMLSchema-instance");
marshaller.addAttribute("xsi", "schemaLocation", "string",
- "urn:jboss:portal:wsrp:producer:v2_7 http://www.jboss.org/portal/xsd/jboss-wsrp-producer_2_7.xsd");
+ "http://www.gatein.org/xml/ns/gatein_wsrp_producer_1_0 http://www.jboss.org/portal/xsd/gatein_wsrp_producer_1_0.xsd");
// create an instance of Object Model Provider
ObjectModelProvider provider = new ProducerConfigurationProvider();
Modified: components/wsrp/trunk/producer/src/test/resources/custom-policy.xml
===================================================================
--- components/wsrp/trunk/producer/src/test/resources/custom-policy.xml 2010-12-07 12:15:45 UTC (rev 5500)
+++ components/wsrp/trunk/producer/src/test/resources/custom-policy.xml 2010-12-07 14:58:26 UTC (rev 5501)
@@ -1,30 +1,30 @@
-<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- ~ JBoss, a division of Red Hat ~
- ~ Copyright 2007, 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. ~
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
-<wpc:producer-configuration xmlns:wpc="urn:jboss:portal:wsrp:producer:v2_7"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:jboss:portal:wsrp:producer:v2_7 "
- xmlns:xml="http://www.w3.org/XML/1998/namespace">
+<!--
+ ~ 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.
+ -->
+<producer-configuration xmlns="http://www.gatein.org/xml/ns/gatein_wsrp_producer_1_0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_wsrp_producer_1_0 http://www.jboss.org/portal/xsd/gatein_wsrp_producer_1_0.xsd"
+ xmlns:xml="http://www.w3.org/XML/1998/namespace">
<registration-configuration>
<registration-policy>org.gatein.wsrp.producer.config.TestRegistrationPolicy</registration-policy>
</registration-configuration>
-</wpc:producer-configuration>
\ No newline at end of file
+</producer-configuration>
\ No newline at end of file
Modified: components/wsrp/trunk/producer/src/test/resources/extended.xml
===================================================================
--- components/wsrp/trunk/producer/src/test/resources/extended.xml 2010-12-07 12:15:45 UTC (rev 5500)
+++ components/wsrp/trunk/producer/src/test/resources/extended.xml 2010-12-07 14:58:26 UTC (rev 5501)
@@ -1,30 +1,30 @@
<?xml version="1.0"?>
-<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- ~ 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. ~
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
-<wpc:producer-configuration xmlns:wpc="urn:jboss:portal:wsrp:producer:v2_7"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:jboss:portal:wsrp:producer:v2_7 "
- xmlns:xml="http://www.w3.org/XML/1998/namespace">
+<!--
+ ~ 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.
+ -->
+<producer-configuration xmlns="http://www.gatein.org/xml/ns/gatein_wsrp_producer_1_0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_wsrp_producer_1_0 http://www.jboss.org/portal/xsd/gatein_wsrp_producer_1_0.xsd"
+ xmlns:xml="http://www.w3.org/XML/1998/namespace">
<registration-configuration fullServiceDescriptionRequiresRegistration="true">
<registration-property-validator>org.gatein.registration.policies.DefaultRegistrationPropertyValidator
</registration-property-validator>
@@ -41,4 +41,4 @@
<hint xml:lang="en" resourceName="resource.hint2">hint2</hint>
</registration-property-description>
</registration-configuration>
-</wpc:producer-configuration>
+</producer-configuration>
Modified: components/wsrp/trunk/producer/src/test/resources/invalid-type.xml
===================================================================
--- components/wsrp/trunk/producer/src/test/resources/invalid-type.xml 2010-12-07 12:15:45 UTC (rev 5500)
+++ components/wsrp/trunk/producer/src/test/resources/invalid-type.xml 2010-12-07 14:58:26 UTC (rev 5501)
@@ -1,28 +1,28 @@
-<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- ~ JBoss, a division of Red Hat ~
- ~ Copyright 2007, 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. ~
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
-<wpc:producer-configuration xmlns:wpc="urn:jboss:portal:wsrp:producer:v2_7"
+<!--
+ ~ 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.
+ -->
+<wpc:producer-configuration xmlns:wpc="http://www.gatein.org/xml/ns/gatein_wsrp_producer_1_0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:jboss:portal:wsrp:producer:v2_7 "
+ xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_wsrp_producer_1_0 http://www.jboss.org/portal/xsd/gatein_wsrp_producer_1_0.xsd"
xmlns:xml="http://www.w3.org/XML/1998/namespace">
<registration-configuration>
<registration-property-description>
Modified: components/wsrp/trunk/producer/src/test/resources/invalid1.xml
===================================================================
--- components/wsrp/trunk/producer/src/test/resources/invalid1.xml 2010-12-07 12:15:45 UTC (rev 5500)
+++ components/wsrp/trunk/producer/src/test/resources/invalid1.xml 2010-12-07 14:58:26 UTC (rev 5501)
@@ -1,29 +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. ~
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
-<wpc:producer-configuration xmlns:wpc="urn:jboss:portal:wsrp:producer:v2_7"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:jboss:portal:wsrp:producer:v2_7 "
- xmlns:xml="http://www.w3.org/XML/1998/namespace">
+<!--
+ ~ 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.
+ -->
+<producer-configuration xmlns="http://www.gatein.org/xml/ns/gatein_wsrp_producer_1_0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_wsrp_producer_1_0 http://www.jboss.org/portal/xsd/gatein_wsrp_producer_1_0.xsd"
+ xmlns:xml="http://www.w3.org/XML/1998/namespace">
<registration-configuration fullServiceDescriptionRequiresRegistration="invalid"/>
-</wpc:producer-configuration>
+</producer-configuration>
Modified: components/wsrp/trunk/producer/src/test/resources/invalid2.xml
===================================================================
--- components/wsrp/trunk/producer/src/test/resources/invalid2.xml 2010-12-07 12:15:45 UTC (rev 5500)
+++ components/wsrp/trunk/producer/src/test/resources/invalid2.xml 2010-12-07 14:58:26 UTC (rev 5501)
@@ -1,30 +1,30 @@
-<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- ~ 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. ~
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
-<wpc:producer-configuration xmlns:wpc="urn:jboss:portal:wsrp:producer:v2_7"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:jboss:portal:wsrp:producer:v2_7 "
- xmlns:xml="http://www.w3.org/XML/1998/namespace">
+<!--
+ ~ 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.
+ -->
+<producer-configuration xmlns="http://www.gatein.org/xml/ns/gatein_wsrp_producer_1_0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_wsrp_producer_1_0 http://www.jboss.org/portal/xsd/gatein_wsrp_producer_1_0.xsd"
+ xmlns:xml="http://www.w3.org/XML/1998/namespace">
<registration-configuration/>
<registration-configuration/>
-</wpc:producer-configuration>
+</producer-configuration>
Modified: components/wsrp/trunk/producer/src/test/resources/invalid3.xml
===================================================================
--- components/wsrp/trunk/producer/src/test/resources/invalid3.xml 2010-12-07 12:15:45 UTC (rev 5500)
+++ components/wsrp/trunk/producer/src/test/resources/invalid3.xml 2010-12-07 14:58:26 UTC (rev 5501)
@@ -1,31 +1,31 @@
-<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- ~ JBoss, a division of Red Hat ~
- ~ Copyright 2007, 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. ~
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
-<wpc:producer-configuration xmlns:wpc="urn:jboss:portal:wsrp:producer:v2_7"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:jboss:portal:wsrp:producer:v2_7 "
- xmlns:xml="http://www.w3.org/XML/1998/namespace">
+<!--
+ ~ 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.
+ -->
+<producer-configuration xmlns="http://www.gatein.org/xml/ns/gatein_wsrp_producer_1_0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_wsrp_producer_1_0 http://www.jboss.org/portal/xsd/gatein_wsrp_producer_1_0.xsd"
+ xmlns:xml="http://www.w3.org/XML/1998/namespace">
<registration-configuration>
- <registration-policy>org.jboss.portal.test.wsrp.config.TestRegistrationPolicy</registration-policy>
+ <registration-policy>org.gatein.wsrp.producer.config.TestRegistrationPolicy</registration-policy>
<registration-property-validator>org.test.package.SomePropertyValidator</registration-property-validator>
</registration-configuration>
-</wpc:producer-configuration>
+</producer-configuration>
Modified: components/wsrp/trunk/producer/src/test/resources/minimal-registration.xml
===================================================================
--- components/wsrp/trunk/producer/src/test/resources/minimal-registration.xml 2010-12-07 12:15:45 UTC (rev 5500)
+++ components/wsrp/trunk/producer/src/test/resources/minimal-registration.xml 2010-12-07 14:58:26 UTC (rev 5501)
@@ -1,28 +1,28 @@
-<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- ~ JBoss, a division of Red Hat ~
- ~ Copyright 2007, 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. ~
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
-<wpc:producer-configuration xmlns:wpc="urn:jboss:portal:wsrp:producer:v2_7"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:jboss:portal:wsrp:producer:v2_7 "
- xmlns:xml="http://www.w3.org/XML/1998/namespace">
+<!--
+ ~ 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.
+ -->
+<producer-configuration xmlns="http://www.gatein.org/xml/ns/gatein_wsrp_producer_1_0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_wsrp_producer_1_0 http://www.jboss.org/portal/xsd/gatein_wsrp_producer_1_0.xsd"
+ xmlns:xml="http://www.w3.org/XML/1998/namespace">
<registration-configuration/>
-</wpc:producer-configuration>
+</producer-configuration>
Modified: components/wsrp/trunk/producer/src/test/resources/minimal.xml
===================================================================
--- components/wsrp/trunk/producer/src/test/resources/minimal.xml 2010-12-07 12:15:45 UTC (rev 5500)
+++ components/wsrp/trunk/producer/src/test/resources/minimal.xml 2010-12-07 14:58:26 UTC (rev 5501)
@@ -1,27 +1,27 @@
-<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- ~ 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. ~
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
-<wpc:producer-configuration xmlns:wpc="urn:jboss:portal:wsrp:producer:v2_7"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:jboss:portal:wsrp:producer:v2_7 "
- xmlns:xml="http://www.w3.org/XML/1998/namespace"/>
+<!--
+ ~ 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.
+ -->
+<producer-configuration xmlns="http://www.gatein.org/xml/ns/gatein_wsrp_producer_1_0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_wsrp_producer_1_0 http://www.jboss.org/portal/xsd/gatein_wsrp_producer_1_0.xsd"
+ xmlns:xml="http://www.w3.org/XML/1998/namespace"/>
Modified: components/wsrp/trunk/producer/src/test/resources/strict-mode.xml
===================================================================
--- components/wsrp/trunk/producer/src/test/resources/strict-mode.xml 2010-12-07 12:15:45 UTC (rev 5500)
+++ components/wsrp/trunk/producer/src/test/resources/strict-mode.xml 2010-12-07 14:58:26 UTC (rev 5501)
@@ -1,29 +1,29 @@
<?xml version="1.0"?>
-<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- ~ JBoss, a division of Red Hat ~
- ~ Copyright 2008, 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.
+ -->
-<wpc:producer-configuration xmlns:wpc="urn:jboss:portal:wsrp:producer:v2_7"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:jboss:portal:wsrp:producer:v2_7 "
- xmlns:xml="http://www.w3.org/XML/1998/namespace"
- useStrictMode="false"/>
\ No newline at end of file
+<producer-configuration xmlns="http://www.gatein.org/xml/ns/gatein_wsrp_producer_1_0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_wsrp_producer_1_0 http://www.jboss.org/portal/xsd/gatein_wsrp_producer_1_0.xsd"
+ xmlns:xml="http://www.w3.org/XML/1998/namespace"
+ useStrictMode="false"/>
\ No newline at end of file
Copied: components/wsrp/trunk/producer/src/test/resources/xsd/gatein_wsrp_producer_1_0.xsd (from rev 5495, components/wsrp/trunk/api/src/main/resources/xsd/gatein_wsrp_producer_1_0.xsd)
===================================================================
--- components/wsrp/trunk/producer/src/test/resources/xsd/gatein_wsrp_producer_1_0.xsd (rev 0)
+++ components/wsrp/trunk/producer/src/test/resources/xsd/gatein_wsrp_producer_1_0.xsd 2010-12-07 14:58:26 UTC (rev 5501)
@@ -0,0 +1,73 @@
+<?xml version="1.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.
+ -->
+
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.gatein.org/xml/ns/gatein_wsrp_producer_1_0"
+ xmlns="http://www.gatein.org/xml/ns/gatein_wsrp_producer_1_0"
+ xmlns:xml="http://www.w3.org/XML/1998/namespace"
+ xmlns:wpc="http://www.gatein.org/xml/ns/gatein_wsrp_producer_1_0"
+ elementFormDefault="qualified"
+ version="1.0">
+
+ <xs:import namespace="http://www.w3.org/XML/1998/namespace"/>
+
+ <xs:element name="producer-configuration">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="registration-configuration" type="wpc:RegistrationConfiguration"/>
+ </xs:sequence>
+ <xs:attribute name="useStrictMode" type="xs:boolean" use="optional"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:complexType name="RegistrationConfiguration">
+ <xs:sequence>
+ <xs:element name="registration-policy" type="xs:string" minOccurs="0"/>
+ <xs:element name="registration-property-validator" type="xs:string" minOccurs="0"/>
+ <xs:element name="registration-property-description" type="wpc:RegistrationPropertyDescription" minOccurs="0"
+ maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:attribute name="fullServiceDescriptionRequiresRegistration" type="xs:boolean" use="optional"/>
+ </xs:complexType>
+
+ <xs:complexType name="RegistrationPropertyDescription">
+ <xs:sequence>
+ <xs:element name="name" type="xs:QName"/>
+ <xs:element name="type" type="xs:QName"/>
+ <xs:element name="label" type="wpc:LocalizedString" minOccurs="0"/>
+ <xs:element name="hint" type="wpc:LocalizedString" minOccurs="0"/>
+ <xs:element name="description" type="wpc:LocalizedString" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="LocalizedString">
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attribute ref="xml:lang" use="required"/>
+ <xs:attribute name="resourceName" type="xs:string" use="optional"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+</xs:schema>
Deleted: components/wsrp/trunk/producer/src/test/resources/xsd/jboss-wsrp-producer_2_7.xsd
===================================================================
--- components/wsrp/trunk/producer/src/test/resources/xsd/jboss-wsrp-producer_2_7.xsd 2010-12-07 12:15:45 UTC (rev 5500)
+++ components/wsrp/trunk/producer/src/test/resources/xsd/jboss-wsrp-producer_2_7.xsd 2010-12-07 14:58:26 UTC (rev 5501)
@@ -1,70 +0,0 @@
-<?xml version="1.0"?>
-
-<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- ~ JBoss, a division of Red Hat ~
- ~ Copyright 2008, 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. ~
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
- targetNamespace="urn:jboss:portal:wsrp:producer:v2_7"
- xmlns="urn:jboss:portal:wsrp:producer:v2_7"
- xmlns:xml="http://www.w3.org/XML/1998/namespace"
- xmlns:wpc="urn:jboss:portal:wsrp:producer:v2_7" elementFormDefault="qualified">
-
- <xs:import namespace="http://www.w3.org/XML/1998/namespace"/>
-
- <xs:element name="producer-configuration">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="registration-configuration" type="wpc:RegistrationConfiguration"/>
- </xs:sequence>
- <xs:attribute name="useStrictMode" type="xs:boolean" use="optional"/>
- </xs:complexType>
- </xs:element>
-
- <xs:complexType name="RegistrationConfiguration">
- <xs:sequence>
- <xs:element name="registration-policy" type="xs:string" minOccurs="0"/>
- <xs:element name="registration-property-validator" type="xs:string" minOccurs="0"/>
- <xs:element name="registration-property-description" type="wpc:RegistrationPropertyDescription" minOccurs="0"
- maxOccurs="unbounded"/>
- </xs:sequence>
- <xs:attribute name="fullServiceDescriptionRequiresRegistration" type="xs:boolean" use="optional"/>
- </xs:complexType>
-
- <xs:complexType name="RegistrationPropertyDescription">
- <xs:sequence>
- <xs:element name="name" type="xs:QName"/>
- <xs:element name="type" type="xs:QName"/>
- <xs:element name="label" type="wpc:LocalizedString" minOccurs="0"/>
- <xs:element name="hint" type="wpc:LocalizedString" minOccurs="0"/>
- <xs:element name="description" type="wpc:LocalizedString" minOccurs="0"/>
- </xs:sequence>
- </xs:complexType>
-
- <xs:complexType name="LocalizedString">
- <xs:simpleContent>
- <xs:extension base="xs:string">
- <xs:attribute ref="xml:lang" use="required"/>
- <xs:attribute name="resourceName" type="xs:string" use="optional"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-</xs:schema>
14 years
gatein SVN: r5500 - 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-12-07 07:15:45 -0500 (Tue, 07 Dec 2010)
New Revision: 5500
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/ProducerInfo.java
Log:
- Minor: removed outdated comment.
Modified: components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/ProducerInfo.java
===================================================================
--- components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/ProducerInfo.java 2010-12-07 12:12:39 UTC (rev 5499)
+++ components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/ProducerInfo.java 2010-12-07 12:15:45 UTC (rev 5500)
@@ -663,7 +663,7 @@
{
if (info.isHasUserSpecificState())
{
- log.debug("Portlet '" + portletHandle + "' will store persistent state for each user. NOT WELL TESTED!");
+ log.debug("Portlet '" + portletHandle + "' will store persistent state for each user.");
}
wsrpPortlet = new WSRPPortlet(PortletContext.createPortletContext(portletHandle), info);
14 years
gatein SVN: r5499 - in components/wsrp/trunk/consumer/src: main/java/org/gatein/wsrp/consumer/handlers and 5 other directories.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-12-07 07:12:39 -0500 (Tue, 07 Dec 2010)
New Revision: 5499
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/WSRPConsumerImpl.java
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/SessionHandler.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/consumer/ProducerInfoTestCase.java
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
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v2/ServiceDescriptionTestCase.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/behaviors/InitCookieMarkupBehavior.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/behaviors/InitCookieMarkupBehavior.java
Log:
- GTNWSRP-182: Removed CookieProtocol field from SessionHandler and get the needed value from the consumer instead so that the value never gets out of synch. Added test cases and fixed existing test cases that didn't properly check that initCookie was called *before* other methods.
Modified: components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/WSRPConsumerImpl.java
===================================================================
--- components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/WSRPConsumerImpl.java 2010-12-07 12:04:01 UTC (rev 5498)
+++ components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/WSRPConsumerImpl.java 2010-12-07 12:12:39 UTC (rev 5499)
@@ -673,9 +673,7 @@
private RefreshResult refreshProducerInfo(boolean forceRefresh) throws PortletInvokerException
{
- RefreshResult refreshResult = producerInfo.detailedRefresh(forceRefresh);
- sessionHandler.setRequiresInitCookie(producerInfo.getRequiresInitCookie());
- return refreshResult;
+ return producerInfo.detailedRefresh(forceRefresh);
}
public void releaseSessions() throws PortletInvokerException
Modified: components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/SessionHandler.java
===================================================================
--- components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/SessionHandler.java 2010-12-07 12:04:01 UTC (rev 5498)
+++ components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/SessionHandler.java 2010-12-07 12:12:39 UTC (rev 5499)
@@ -63,9 +63,6 @@
protected WSRPConsumerImpl consumer;
private static Logger log = LoggerFactory.getLogger(SessionHandler.class);
- /** Cookie protocol required by the producer with the consumer */
- private CookieProtocol requiresInitCookie;
-
/** The prefix used to isolate WSRP-related session information in the actual session object. */
private static final String SESSION_ID_PREFIX = "org.gatein.wsrp.session.";
@@ -84,19 +81,14 @@
public boolean isPerUserCookieInit()
{
- return CookieProtocol.PER_USER.equals(requiresInitCookie);
+ return CookieProtocol.PER_USER.equals(getRequiresInitCookie());
}
public boolean requiresInitCookie()
{
- return requiresInitCookie != null && !CookieProtocol.NONE.equals(requiresInitCookie);
+ return getRequiresInitCookie() != null && !CookieProtocol.NONE.equals(getRequiresInitCookie());
}
- public void setRequiresInitCookie(CookieProtocol requiresInitCookie)
- {
- this.requiresInitCookie = requiresInitCookie;
- }
-
void initProducerSessionInformation(PortletInvocation invocation) throws PortletInvokerException
{
// if we need cookies, set the current group id
@@ -116,7 +108,7 @@
private boolean requiresGroupInitCookie()
{
- return requiresInitCookie() && CookieProtocol.PER_GROUP.equals(requiresInitCookie);
+ return requiresInitCookie() && CookieProtocol.PER_GROUP.equals(getRequiresInitCookie());
}
/** Resets the information held by RequestHeaderClientHandler for the current interaction. */
@@ -450,4 +442,10 @@
info.updateHandleAssociatedInfo(originalHandle, newHandle);
}
}
+
+ /** Cookie protocol required by the producer with the consumer */
+ private CookieProtocol getRequiresInitCookie()
+ {
+ return consumer.getProducerInfo().getRequiresInitCookie();
+ }
}
Modified: components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/consumer/ProducerInfoTestCase.java
===================================================================
--- components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/consumer/ProducerInfoTestCase.java 2010-12-07 12:04:01 UTC (rev 5498)
+++ components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/consumer/ProducerInfoTestCase.java 2010-12-07 12:12:39 UTC (rev 5499)
@@ -31,8 +31,10 @@
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.behaviors.GroupedPortletsServiceDescriptionBehavior;
import org.gatein.wsrp.test.support.MockConsumerRegistry;
import org.oasis.wsrp.v2.AccessDenied;
+import org.oasis.wsrp.v2.CookieProtocol;
import org.oasis.wsrp.v2.Extension;
import org.oasis.wsrp.v2.InconsistentParameters;
import org.oasis.wsrp.v2.InvalidHandle;
@@ -55,6 +57,7 @@
import javax.jws.WebParam;
import javax.xml.namespace.QName;
import javax.xml.ws.Holder;
+import java.util.ArrayList;
import java.util.List;
/**
@@ -445,6 +448,17 @@
assertNull(info.getInfoForEvent(null));
}
+ public void testRequiresInitCookieIsProperlySet() throws PortletInvokerException
+ {
+ ServiceDescriptionBehavior sdb = new GroupedPortletsServiceDescriptionBehavior(new ArrayList<PortletDescription>(3));
+ sdb.setRequiresInitCookie(CookieProtocol.PER_GROUP);
+ serviceFactory.getRegistry().setServiceDescriptionBehavior(sdb);
+
+ info.refresh(false);
+
+ assertEquals(CookieProtocol.PER_GROUP, info.getRequiresInitCookie());
+ }
+
private static class TestPortletManagementBehavior extends PortletManagementBehavior
{
Modified: 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/v1/MarkupTestCase.java 2010-12-07 12:04:01 UTC (rev 5498)
+++ components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v1/MarkupTestCase.java 2010-12-07 12:12:39 UTC (rev 5499)
@@ -238,6 +238,9 @@
// set init cookie requirement
producer.setRequiresInitCookie(cookieProtocol);
+ // Force ProducerInfo refresh so that we make sure that the consumer knows about the new CookieProtocol
+ consumer.refreshProducerInfo();
+
// tell the producer which markup behavior we want to use
producer.setCurrentMarkupBehaviorHandle(handle);
Modified: 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/MarkupTestCase.java 2010-12-07 12:04:01 UTC (rev 5498)
+++ components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v2/MarkupTestCase.java 2010-12-07 12:12:39 UTC (rev 5499)
@@ -186,7 +186,6 @@
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());
@@ -242,6 +241,9 @@
// set init cookie requirement
producer.setRequiresInitCookie(CookieProtocol.fromValue(cookieProtocol));
+ // Force ProducerInfo refresh so that we make sure that the consumer knows about the new CookieProtocol
+ consumer.refreshProducerInfo();
+
// tell the producer which markup behavior we want to use
producer.setCurrentMarkupBehaviorHandle(handle);
Modified: 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/ServiceDescriptionTestCase.java 2010-12-07 12:04:01 UTC (rev 5498)
+++ components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/protocol/v2/ServiceDescriptionTestCase.java 2010-12-07 12:12:39 UTC (rev 5499)
@@ -20,14 +20,36 @@
* 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.wsrp.consumer.ProducerInfo;
import org.gatein.wsrp.test.ExtendedAssert;
import org.gatein.wsrp.test.protocol.v1.behaviors.BasicMarkupBehavior;
import org.gatein.wsrp.test.protocol.v1.behaviors.SessionMarkupBehavior;
+import org.gatein.wsrp.test.protocol.v2.BehaviorRegistry;
+import org.gatein.wsrp.test.protocol.v2.ServiceDescriptionBehavior;
+import org.gatein.wsrp.test.protocol.v2.behaviors.GroupedPortletsServiceDescriptionBehavior;
+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.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.xml.ws.Holder;
+import java.util.List;
+
/**
* @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw Dawidowicz</a>
* @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
@@ -66,4 +88,48 @@
portlet = consumer.getPortlet(PortletContext.createPortletContext(SessionMarkupBehavior.PORTLET_HANDLE));
checkPortlet(portlet, "2", SessionMarkupBehavior.PORTLET_HANDLE);
}
+
+ public void testRequiresInitCookieIsProperlySetOnConsumerInitiatedRefresh() throws OperationFailed, ResourceSuspended, ModifyRegistrationRequired, InvalidRegistration, PortletInvokerException
+ {
+ BehaviorRegistry registry = producer.getBehaviorRegistry();
+
+ 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));
+ ServiceDescriptionBehavior sdb = new GroupedPortletsServiceDescriptionBehavior(offeredPortlets.value);
+ sdb.setRequiresInitCookie(CookieProtocol.PER_GROUP);
+ setServiceDescriptionBehavior(sdb);
+
+ consumer.refreshProducerInfo();
+
+ ProducerInfo producerInfo = consumer.getProducerInfo();
+ assertEquals(CookieProtocol.PER_GROUP, producerInfo.getRequiresInitCookie());
+ assertTrue(consumer.getSessionHandler().requiresInitCookie());
+ }
+
+ public void testRequiresInitCookieIsProperlySetOnProducerInfoInitiatedRefresh() throws OperationFailed, ResourceSuspended, ModifyRegistrationRequired, InvalidRegistration, PortletInvokerException
+ {
+ BehaviorRegistry registry = producer.getBehaviorRegistry();
+
+ 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));
+ ServiceDescriptionBehavior sdb = new GroupedPortletsServiceDescriptionBehavior(offeredPortlets.value);
+ sdb.setRequiresInitCookie(CookieProtocol.PER_GROUP);
+ setServiceDescriptionBehavior(sdb);
+
+ consumer.getProducerInfo().refresh(true);
+
+ ProducerInfo producerInfo = consumer.getProducerInfo();
+ assertEquals(CookieProtocol.PER_GROUP, producerInfo.getRequiresInitCookie());
+
+ // SessionHandler needs to be updated if ProducerInfo is refreshed
+ assertTrue(consumer.getSessionHandler().requiresInitCookie());
+ }
}
Modified: components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/behaviors/InitCookieMarkupBehavior.java
===================================================================
--- components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/behaviors/InitCookieMarkupBehavior.java 2010-12-07 12:04:01 UTC (rev 5498)
+++ components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/behaviors/InitCookieMarkupBehavior.java 2010-12-07 12:12:39 UTC (rev 5499)
@@ -48,6 +48,7 @@
{
protected String portletHandle;
protected int initCookieCallCount;
+ private boolean initCookieCalled;
public InitCookieMarkupBehavior(BehaviorRegistry registry)
{
@@ -61,6 +62,11 @@
protected String getMarkupString(Mode mode, WindowState windowState, String navigationalState, V1GetMarkup getMarkup) throws V1OperationFailed, V1InvalidCookie
{
+ if (!initCookieCalled)
+ {
+ throw new IllegalStateException("initCookie should have been called first!");
+ }
+
String handle = getMarkup.getPortletContext().getPortletHandle();
if (portletHandle.equals(handle))
@@ -92,6 +98,7 @@
@Override
public List<V1Extension> initCookie(@WebParam(name = "registrationContext", targetNamespace = "urn:oasis:names:tc:wsrp:v1:types") V1RegistrationContext registrationContext) throws V1InvalidRegistration, V1AccessDenied, V1OperationFailed
{
+ initCookieCalled = true;
initCookieCallCount++;
return null;
}
Modified: components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/behaviors/InitCookieMarkupBehavior.java
===================================================================
--- components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/behaviors/InitCookieMarkupBehavior.java 2010-12-07 12:04:01 UTC (rev 5498)
+++ components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v2/behaviors/InitCookieMarkupBehavior.java 2010-12-07 12:12:39 UTC (rev 5499)
@@ -52,6 +52,7 @@
{
protected String portletHandle;
protected int initCookieCallCount;
+ private boolean initCookieCalled = false;
public InitCookieMarkupBehavior(BehaviorRegistry registry)
{
@@ -65,6 +66,11 @@
protected String getMarkupString(Mode mode, WindowState windowState, String navigationalState, GetMarkup getMarkup) throws OperationFailed, InvalidCookie
{
+ if (!initCookieCalled)
+ {
+ throw new IllegalStateException("initCookie should have been called first!");
+ }
+
String handle = getMarkup.getPortletContext().getPortletHandle();
if (portletHandle.equals(handle))
@@ -96,6 +102,7 @@
@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
{
+ initCookieCalled = true;
initCookieCallCount++;
return null;
}
14 years
gatein SVN: r5498 - epp/portal/branches/EPP_5_1_Branch/web/portal/src/main/webapp/WEB-INF/conf/jcr.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2010-12-07 07:04:01 -0500 (Tue, 07 Dec 2010)
New Revision: 5498
Modified:
epp/portal/branches/EPP_5_1_Branch/web/portal/src/main/webapp/WEB-INF/conf/jcr/repository-configuration.xml
Log:
JBEPP-709: Fix JCR swap location in configuration
Modified: epp/portal/branches/EPP_5_1_Branch/web/portal/src/main/webapp/WEB-INF/conf/jcr/repository-configuration.xml
===================================================================
--- epp/portal/branches/EPP_5_1_Branch/web/portal/src/main/webapp/WEB-INF/conf/jcr/repository-configuration.xml 2010-12-07 10:54:26 UTC (rev 5497)
+++ epp/portal/branches/EPP_5_1_Branch/web/portal/src/main/webapp/WEB-INF/conf/jcr/repository-configuration.xml 2010-12-07 12:04:01 UTC (rev 5498)
@@ -36,7 +36,7 @@
<property name="multi-db" value="false"/>
<property name="update-storage" value="true"/>
<property name="max-buffer-size" value="204800"/>
- <property name="swap-directory" value="${gatein.jcr.data.dir}/system${container.name.suffix}"/>
+ <property name="swap-directory" value="${gatein.jcr.data.dir}/swap/system${container.name.suffix}"/>
</properties>
<value-storages>
<value-storage id="system" class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
14 years
gatein SVN: r5497 - epp/examples/branches/EPP_5_1_Branch/portlets/idmhelloworld.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2010-12-07 05:54:26 -0500 (Tue, 07 Dec 2010)
New Revision: 5497
Added:
epp/examples/branches/EPP_5_1_Branch/portlets/idmhelloworld/README.txt
Log:
Adding a ReadMe
Added: epp/examples/branches/EPP_5_1_Branch/portlets/idmhelloworld/README.txt
===================================================================
--- epp/examples/branches/EPP_5_1_Branch/portlets/idmhelloworld/README.txt (rev 0)
+++ epp/examples/branches/EPP_5_1_Branch/portlets/idmhelloworld/README.txt 2010-12-07 10:54:26 UTC (rev 5497)
@@ -0,0 +1,13 @@
+====================
+Identity API example
+===================
+
+To compile and package the example use:
+mvn -DEPP_HOME=/full/path/to/EPP/installation clean install
+
+If you forget to set EPP_HOME the following error message will be shown by Maven:
+ [0] For dependency Dependency {groupId=org.exoplatform.core, artifactId=exo.core.component.organization.api, version=2.3.6-CR02, type=jar}: system-scoped dependency must specify an absolute path systemPath.
+ [1] For dependency Dependency {groupId=org.exoplatform.kernel, artifactId=exo.kernel.container, version=2.2.6-CR02, type=jar}: system-scoped dependency must specify an absolute path systemPath.
+
+
+
14 years
gatein SVN: r5496 - epp/examples/branches/EPP_5_1_Branch/portlets/idmhelloworld.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2010-12-07 05:51:23 -0500 (Tue, 07 Dec 2010)
New Revision: 5496
Modified:
epp/examples/branches/EPP_5_1_Branch/portlets/idmhelloworld/pom.xml
Log:
Prepared for productization
Modified: epp/examples/branches/EPP_5_1_Branch/portlets/idmhelloworld/pom.xml
===================================================================
--- epp/examples/branches/EPP_5_1_Branch/portlets/idmhelloworld/pom.xml 2010-12-07 09:34:42 UTC (rev 5495)
+++ epp/examples/branches/EPP_5_1_Branch/portlets/idmhelloworld/pom.xml 2010-12-07 10:51:23 UTC (rev 5496)
@@ -10,6 +10,12 @@
<name>EPP Portlets Examples - Identity Hello World Portlet</name>
<description />
+ <properties>
+ <gatein.home>${EPP_HOME}/jboss-as/server/default/deploy/gatein.ear</gatein.home>
+ <gatein.core.version>2.3.6-CR02</gatein.core.version>
+ <gatein.kernel.version>2.2.6-CR02</gatein.kernel.version>
+ </properties>
+
<build>
<plugins>
<plugin>
@@ -33,9 +39,17 @@
<dependency>
<groupId>org.exoplatform.core</groupId>
<artifactId>exo.core.component.organization.api</artifactId>
- <version>2.3.1-GA</version>
- <scope>provided</scope>
+ <version>${gatein.core.version}</version>
+ <scope>system</scope>
+ <systemPath>${gatein.home}/lib/exo.core.component.organization.api-${gatein.core.version}.jar</systemPath>
</dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.container</artifactId>
+ <version>${gatein.kernel.version}</version>
+ <scope>system</scope>
+ <systemPath>${gatein.home}/lib/exo.kernel.container-${gatein.kernel.version}.jar</systemPath>
+ </dependency>
</dependencies>
<repositories>
14 years
gatein SVN: r5495 - components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-12-07 04:34:42 -0500 (Tue, 07 Dec 2010)
New Revision: 5495
Modified:
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/RequestProcessor.java
Log:
- Removed extensions logging.
Modified: components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/RequestProcessor.java
===================================================================
--- components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/RequestProcessor.java 2010-12-06 22:38:31 UTC (rev 5494)
+++ components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/RequestProcessor.java 2010-12-07 09:34:42 UTC (rev 5495)
@@ -45,7 +45,6 @@
import org.gatein.wsrp.WSRPUtils;
import org.gatein.wsrp.producer.Utils;
import org.gatein.wsrp.spec.v2.WSRP2ExceptionFactory;
-import org.oasis.wsrp.v2.Extension;
import org.oasis.wsrp.v2.InvalidHandle;
import org.oasis.wsrp.v2.InvalidRegistration;
import org.oasis.wsrp.v2.MarkupType;
@@ -162,15 +161,6 @@
invocation.setWindowState(WSRPUtils.getJSR168WindowStateFromWSRPName(markupRequest.getWindowState()));
invocation.setMode(WSRPUtils.getJSR168PortletModeFromWSRPName(markupRequest.getMode()));
- List<Extension> extensions = params.getExtensions();
- if (ParameterValidation.existsAndIsNotEmpty(extensions))
- {
- for (Extension extension : extensions)
- {
- log.debug("NavigationalContext extension: " + extension);
- }
- }
-
NavigationalContext navigationalContext = params.getNavigationalContext();
if (navigationalContext != null)
{
14 years
gatein SVN: r5494 - in components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer: handlers and 1 other directory.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-12-06 17:38:31 -0500 (Mon, 06 Dec 2010)
New Revision: 5494
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/ProducerInfo.java
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/SessionHandler.java
Log:
- Added more logging.
Modified: components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/ProducerInfo.java
===================================================================
--- components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/ProducerInfo.java 2010-12-06 16:32:38 UTC (rev 5493)
+++ components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/ProducerInfo.java 2010-12-06 22:38:31 UTC (rev 5494)
@@ -497,6 +497,7 @@
{
// do we need to call initCookie or not?
requiresInitCookie = serviceDescription.getRequiresInitCookie();
+ log.debug("Requires initCookie: " + requiresInitCookie);
// custom mode descriptions
customModes = toMap(serviceDescription.getCustomModeDescriptions());
Modified: components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/SessionHandler.java
===================================================================
--- components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/SessionHandler.java 2010-12-06 16:32:38 UTC (rev 5493)
+++ components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/handlers/SessionHandler.java 2010-12-06 22:38:31 UTC (rev 5494)
@@ -135,6 +135,7 @@
// check if the cookie protocol requires cookie initialization
if (!requiresInitCookie())
{
+ log.debug("Doesn't require initCookie");
return;
}
14 years