[MMBASE SCM] r40416 - CMSContainer/trunk/CMSContainer_Modules/community/src/java/com/finalist/cmsc/community/taglib
Author: billyxie Date: 2010-01-08 08:44:40 +0100 (Fri, 08 Jan 2010) New Revision: 40416 Modified: CMSContainer/trunk/CMSContainer_Modules/community/src/java/com/finalist/cmsc/community/taglib/PageReadableTag.java Log: CMSC-1603 - add the PageReadable Tag Modified: CMSContainer/trunk/CMSContainer_Modules/community/src/java/com/finalist/cmsc/community/taglib/PageReadableTag.java === --- CMSContainer/trunk/CMSContainer_Modules/community/src/java/com/finalist/cmsc/community/taglib/PageReadableTag.java 2010-01-08 07:15:25 UTC (rev 40415) +++ CMSContainer/trunk/CMSContainer_Modules/community/src/java/com/finalist/cmsc/community/taglib/PageReadableTag.java 2010-01-08 07:44:40 UTC (rev 40416) @@ -32,17 +32,17 @@ @Override public int doStartTag() throws JspException { super.doStartTag(); - AuthorityService authorityService = (AuthorityService) ApplicationContextFactory.getBean("authorityService"); - org.acegisecurity.Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); - if(authentication == null) return SKIP_BODY; - Set authorityNames = authorityService.getAuthorityNamesForUser(authentication.getName()); - Cloud cloud = CloudProviderFactory.getCloudProvider().getCloud(); Node pageNode = cloud.getNode(getPageId()); NodeList pagegroups = pageNode.getRelatedNodes("pagegroup"); if(pagegroups.size() == 0) return EVAL_BODY_INCLUDE;; + AuthorityService authorityService = (AuthorityService) ApplicationContextFactory.getBean("authorityService"); + org.acegisecurity.Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); + if(authentication == null) return SKIP_BODY; + Set authorityNames = authorityService.getAuthorityNamesForUser(authentication.getName()); + for(int i = 0; i < pagegroups.size(); i++){ Node group = pagegroups.get(i); if(authorityNames.contains(group.getValue("name"))) ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE SCM] r40415 - CMSContainer/trunk/CMSContainer_Modules/community/src/java/com/finalist/cmsc/community/taglib
Author: billyxie Date: 2010-01-08 08:15:25 +0100 (Fri, 08 Jan 2010) New Revision: 40415 Modified: CMSContainer/trunk/CMSContainer_Modules/community/src/java/com/finalist/cmsc/community/taglib/PageReadableTag.java Log: CMSC-1603 - add the PageReadable Tag Modified: CMSContainer/trunk/CMSContainer_Modules/community/src/java/com/finalist/cmsc/community/taglib/PageReadableTag.java === --- CMSContainer/trunk/CMSContainer_Modules/community/src/java/com/finalist/cmsc/community/taglib/PageReadableTag.java 2010-01-08 07:14:43 UTC (rev 40414) +++ CMSContainer/trunk/CMSContainer_Modules/community/src/java/com/finalist/cmsc/community/taglib/PageReadableTag.java 2010-01-08 07:15:25 UTC (rev 40415) @@ -41,6 +41,8 @@ Node pageNode = cloud.getNode(getPageId()); NodeList pagegroups = pageNode.getRelatedNodes("pagegroup"); + if(pagegroups.size() == 0) return EVAL_BODY_INCLUDE;; + for(int i = 0; i < pagegroups.size(); i++){ Node group = pagegroups.get(i); if(authorityNames.contains(group.getValue("name"))) ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE SCM] r40414 - CMSContainer/trunk/CMSContainer_Demo/demo.cmscontainer.org/war/src/webapp/WEB-INF/templates/view/demo/navigation
Author: billyxie Date: 2010-01-08 08:14:43 +0100 (Fri, 08 Jan 2010) New Revision: 40414 Modified: CMSContainer/trunk/CMSContainer_Demo/demo.cmscontainer.org/war/src/webapp/WEB-INF/templates/view/demo/navigation/submenu.jsp Log: CMSC-1603 - add the PageReadable Tag Modified: CMSContainer/trunk/CMSContainer_Demo/demo.cmscontainer.org/war/src/webapp/WEB-INF/templates/view/demo/navigation/submenu.jsp === --- CMSContainer/trunk/CMSContainer_Demo/demo.cmscontainer.org/war/src/webapp/WEB-INF/templates/view/demo/navigation/submenu.jsp 2010-01-08 07:13:38 UTC (rev 40413) +++ CMSContainer/trunk/CMSContainer_Demo/demo.cmscontainer.org/war/src/webapp/WEB-INF/templates/view/demo/navigation/submenu.jsp 2010-01-08 07:14:43 UTC (rev 40414) @@ -14,13 +14,23 @@ - - class="selected"> -" title=""> - - - - + + + +class="selected"> + " title=""> + + + + + + +class="selected"> + " title=""> + + + + ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE SCM] r40413 - CMSContainer/trunk/CMSContainer_Demo/demo.cmscontainer.org/war-community/src/webapp/WEB-INF
Author: kevinshen Date: 2010-01-08 08:13:38 +0100 (Fri, 08 Jan 2010) New Revision: 40413 Modified: CMSContainer/trunk/CMSContainer_Demo/demo.cmscontainer.org/war-community/src/webapp/WEB-INF/web.xml Log: CMSC-1539 CAS single sign-on implementation Modified: CMSContainer/trunk/CMSContainer_Demo/demo.cmscontainer.org/war-community/src/webapp/WEB-INF/web.xml === --- CMSContainer/trunk/CMSContainer_Demo/demo.cmscontainer.org/war-community/src/webapp/WEB-INF/web.xml 2010-01-08 06:28:23 UTC (rev 40412) +++ CMSContainer/trunk/CMSContainer_Demo/demo.cmscontainer.org/war-community/src/webapp/WEB-INF/web.xml 2010-01-08 07:13:38 UTC (rev 40413) @@ -91,10 +91,6 @@ org.springframework.web.context.ContextLoaderListener - - - org.jasig.cas.client.session.SingleSignOutHttpSessionListener - SecurityFilterChainProxy @@ -109,21 +105,14 @@ /*
[MMBASE SCM] r40412 - CMSContainer/trunk/CMSContainer_Demo/demo.cmscontainer.org/war/src/webapp/WEB-INF/templates/view/demo/navigation
Author: billyxie Date: 2010-01-08 07:28:23 +0100 (Fri, 08 Jan 2010) New Revision: 40412 Modified: CMSContainer/trunk/CMSContainer_Demo/demo.cmscontainer.org/war/src/webapp/WEB-INF/templates/view/demo/navigation/submenu.jsp Log: CMSC-1603 - add the PageReadable Tag Modified: CMSContainer/trunk/CMSContainer_Demo/demo.cmscontainer.org/war/src/webapp/WEB-INF/templates/view/demo/navigation/submenu.jsp === --- CMSContainer/trunk/CMSContainer_Demo/demo.cmscontainer.org/war/src/webapp/WEB-INF/templates/view/demo/navigation/submenu.jsp 2010-01-08 06:11:45 UTC (rev 40411) +++ CMSContainer/trunk/CMSContainer_Demo/demo.cmscontainer.org/war/src/webapp/WEB-INF/templates/view/demo/navigation/submenu.jsp 2010-01-08 06:28:23 UTC (rev 40412) @@ -14,11 +14,13 @@ -class="selected"> - " title=""> - - - + + class="selected"> +" title=""> + + + + ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE SCM] r40411 - CMSContainer/trunk/CMSContainer/cmsc/portal/src/java/com/finalist/cmsc/portalImpl
Author: kevinshen Date: 2010-01-08 07:11:45 +0100 (Fri, 08 Jan 2010) New Revision: 40411 Modified: CMSContainer/trunk/CMSContainer/cmsc/portal/src/java/com/finalist/cmsc/portalImpl/SecurePortalServlet.java Log: CMSC-1539 CAS single sign-on implementation Modified: CMSContainer/trunk/CMSContainer/cmsc/portal/src/java/com/finalist/cmsc/portalImpl/SecurePortalServlet.java === --- CMSContainer/trunk/CMSContainer/cmsc/portal/src/java/com/finalist/cmsc/portalImpl/SecurePortalServlet.java 2010-01-07 18:52:39 UTC (rev 40410) +++ CMSContainer/trunk/CMSContainer/cmsc/portal/src/java/com/finalist/cmsc/portalImpl/SecurePortalServlet.java 2010-01-08 06:11:45 UTC (rev 40411) @@ -30,16 +30,17 @@ log.debug("Page: allowed to see"); return super.doRender(request, response, path); } - Cloud cloud = CloudUtil.getCloudFromThread(); - Node node = cloud.getNode(item.getId()); - UserRole role = NavigationUtil.getRole(cloud, node, false); - if (SecurityUtil.isWriter(role)) { -return super.doRender(request, response, path); + Cloud cloud = CloudUtil.getCloudFromThread(); + if (cloud != null) { + Node node = cloud.getNode(item.getId()); + UserRole role = NavigationUtil.getRole(cloud, node, false); + if (SecurityUtil.isWriter(role)) { +return super.doRender(request, response, path); + } } response.sendRedirect(getServletContext().getInitParameter("casServerLoginUrl")+"?service="+HttpUtil.getWebappUri(request)+path); - - log.warn("Page: not allowed to see, no login page found!"); - return false; + log.warn("Page: not allowed to see, no login page found!"); + return false; } } ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE SCM] r40410 - mmbase/trunk/example-webapp
Author: michiel Date: 2010-01-07 19:52:39 +0100 (Thu, 07 Jan 2010) New Revision: 40410 Modified: mmbase/trunk/example-webapp/jetty-env.xml Log: should use 2.9 too Modified: mmbase/trunk/example-webapp/jetty-env.xml === --- mmbase/trunk/example-webapp/jetty-env.xml 2010-01-07 18:48:33 UTC (rev 40409) +++ mmbase/trunk/example-webapp/jetty-env.xml 2010-01-07 18:52:39 UTC (rev 40410) @@ -7,6 +7,8 @@ + +
[MMBASE SCM] r40409 - mmbase/trunk/example-webapp
Author: michiel Date: 2010-01-07 19:48:33 +0100 (Thu, 07 Jan 2010) New Revision: 40409 Modified: mmbase/trunk/example-webapp/pom.xml Log: Modified: mmbase/trunk/example-webapp/pom.xml === --- mmbase/trunk/example-webapp/pom.xml 2010-01-07 18:27:52 UTC (rev 40408) +++ mmbase/trunk/example-webapp/pom.xml 2010-01-07 18:48:33 UTC (rev 40409) @@ -38,7 +38,6 @@ org.mortbay.jetty jetty-maven-plugin -7.0.0.pre5 ${basedir}/jetty-env.xml @@ -46,26 +45,8 @@ jdbcUrl ${jdbcUrl} - - com.sun.management.jmxremote - - - - -c3p0 -c3p0 -0.9.1.2 -runtime - - - -hsqldb -hsqldb -1.8.0.7 - -
[MMBASE SCM] r40408 - mmbase/branches/MMBase-1_9/base-webapp/src/main/webapp/mmbase/admin/css
Author: andre Date: 2010-01-07 19:27:52 +0100 (Thu, 07 Jan 2010) New Revision: 40408 Modified: mmbase/branches/MMBase-1_9/base-webapp/src/main/webapp/mmbase/admin/css/admin.css Log: no width then.. Modified: mmbase/branches/MMBase-1_9/base-webapp/src/main/webapp/mmbase/admin/css/admin.css === --- mmbase/branches/MMBase-1_9/base-webapp/src/main/webapp/mmbase/admin/css/admin.css 2010-01-07 18:27:45 UTC (rev 40407) +++ mmbase/branches/MMBase-1_9/base-webapp/src/main/webapp/mmbase/admin/css/admin.css 2010-01-07 18:27:52 UTC (rev 40408) @@ -273,7 +273,6 @@ { border: 1px solid #002828; background-color: #e0f0e0; - width: 75%; text-align: center; } @@ -289,7 +288,6 @@ { border: 1px #900 solid; background-color: #fff9f9; - width: 75%; text-align: center; } ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE SCM] r40407 - mmbase/trunk/base-webapp/src/main/webapp/mmbase/admin/css
Author: andre Date: 2010-01-07 19:27:45 +0100 (Thu, 07 Jan 2010) New Revision: 40407 Modified: mmbase/trunk/base-webapp/src/main/webapp/mmbase/admin/css/admin.css Log: no width then.. Modified: mmbase/trunk/base-webapp/src/main/webapp/mmbase/admin/css/admin.css === --- mmbase/trunk/base-webapp/src/main/webapp/mmbase/admin/css/admin.css 2010-01-07 17:19:10 UTC (rev 40406) +++ mmbase/trunk/base-webapp/src/main/webapp/mmbase/admin/css/admin.css 2010-01-07 18:27:45 UTC (rev 40407) @@ -273,7 +273,6 @@ { border: 1px solid #002828; background-color: #e0f0e0; - width: 75%; text-align: center; } @@ -289,7 +288,6 @@ { border: 1px #900 solid; background-color: #fff9f9; - width: 75%; text-align: center; } ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE SCM] r40406 - mmbase/trunk/base-webapp
Author: michiel Date: 2010-01-07 18:19:10 +0100 (Thu, 07 Jan 2010) New Revision: 40406 Modified: mmbase/trunk/base-webapp/pom.xml Log: added a remark about running base-webapp itself Modified: mmbase/trunk/base-webapp/pom.xml === --- mmbase/trunk/base-webapp/pom.xml2010-01-07 17:13:45 UTC (rev 40405) +++ mmbase/trunk/base-webapp/pom.xml2010-01-07 17:19:10 UTC (rev 40406) @@ -1,4 +1,4 @@ - + http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";> 4.0.0 @@ -22,8 +22,11 @@ -This is a minimalistic war containing the essentials for an MMBase web applications. -This can be used as initial war overlay for your own project. +This is a minimalistic war containing the essentials for an MMBase web applications. This can be used as initial +war overlay for your own project. + +It will run on its own, but only if a jdbc/MMBase datasource is provided (for hsql, +otherwise also override the mmbaseroot/database property). ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE SCM] r40405 - mmbase/branches/MMBase-1_9/example-webapp
Author: michiel Date: 2010-01-07 18:13:45 +0100 (Thu, 07 Jan 2010) New Revision: 40405 Modified: mmbase/branches/MMBase-1_9/example-webapp/pom.xml Log: added hsql jar in case app is deployed without configurign a db Modified: mmbase/branches/MMBase-1_9/example-webapp/pom.xml === --- mmbase/branches/MMBase-1_9/example-webapp/pom.xml 2010-01-07 17:10:13 UTC (rev 40404) +++ mmbase/branches/MMBase-1_9/example-webapp/pom.xml 2010-01-07 17:13:45 UTC (rev 40405) @@ -75,7 +75,13 @@ 4.0.0 --> + +hsqldb +hsqldb +1.8.0.7 + + @@ -95,7 +101,7 @@ ${base.version} war -
[MMBASE SCM] r40404 - mmbase/branches/MMBase-1_9/base-webapp
Author: michiel Date: 2010-01-07 18:10:13 +0100 (Thu, 07 Jan 2010) New Revision: 40404 Modified: mmbase/branches/MMBase-1_9/base-webapp/pom.xml Log: the base-webapp is meant to base your own applications on. It is not meant as an example. It should not contain a database. Modified: mmbase/branches/MMBase-1_9/base-webapp/pom.xml === --- mmbase/branches/MMBase-1_9/base-webapp/pom.xml 2010-01-07 17:07:47 UTC (rev 40403) +++ mmbase/branches/MMBase-1_9/base-webapp/pom.xml 2010-01-07 17:10:13 UTC (rev 40404) @@ -22,7 +22,7 @@ -This is a minimalistic war containing the essentials for an MMBase web applications. +This is a minimalistic war containing the essentials for an MMBase web applications. This can be used as initial war overlay for your own project. @@ -79,12 +79,6 @@ log4j - - hsqldb - hsqldb - 1.8.0.7 - - ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE SCM] r40403 - mmbase/trunk/base-webapp
Author: michiel Date: 2010-01-07 18:07:47 +0100 (Thu, 07 Jan 2010) New Revision: 40403 Modified: mmbase/trunk/base-webapp/pom.xml Log: we may need hsqldb, but not in the base-webapp Modified: mmbase/trunk/base-webapp/pom.xml === --- mmbase/trunk/base-webapp/pom.xml2010-01-07 16:54:54 UTC (rev 40402) +++ mmbase/trunk/base-webapp/pom.xml2010-01-07 17:07:47 UTC (rev 40403) @@ -22,7 +22,7 @@ -This is a minimalistic war containing the essentials for an MMBase web applications. +This is a minimalistic war containing the essentials for an MMBase web applications. This can be used as initial war overlay for your own project. @@ -79,15 +79,9 @@ log4j - - hsqldb - hsqldb - 1.8.0.7 - + - - deploy ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE SCM] r40402 - mmbase/trunk/tests/clustering/org/mmbase/tests
Author: michiel Date: 2010-01-07 17:54:54 +0100 (Thu, 07 Jan 2010) New Revision: 40402 Modified: mmbase/trunk/tests/clustering/org/mmbase/tests/Clustering.java Log: more ways to test this Modified: mmbase/trunk/tests/clustering/org/mmbase/tests/Clustering.java === --- mmbase/trunk/tests/clustering/org/mmbase/tests/Clustering.java 2010-01-07 15:56:19 UTC (rev 40401) +++ mmbase/trunk/tests/clustering/org/mmbase/tests/Clustering.java 2010-01-07 16:54:54 UTC (rev 40402) @@ -267,7 +267,9 @@ List related2 = nodea2.getRelatedNodes(); assertTrue("relatednodes " + related1 + " != " + related2, related1.size() == related2.size()); +assertEquals(1, cloud1.getNode(zNode1.getNumber()).countRelatedNodes("object")); assertEquals(1, cloud1.getNode(zNode1.getNumber()).getRelatedNodes().size()); +assertEquals(1, cloud2.getNode(zNode1.getNumber()).countRelatedNodes("object")); assertEquals(1, cloud2.getNode(zNode1.getNumber()).getRelatedNodes().size()); // FAILS } ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE SCM] r40401 - mmbase/trunk/core/src/test/java/org/mmbase/util/functions
Author: michiel Date: 2010-01-07 16:56:19 +0100 (Thu, 07 Jan 2010) New Revision: 40401 Modified: mmbase/trunk/core/src/test/java/org/mmbase/util/functions/SetFunctionTest.java Log: Modified: mmbase/trunk/core/src/test/java/org/mmbase/util/functions/SetFunctionTest.java === --- mmbase/trunk/core/src/test/java/org/mmbase/util/functions/SetFunctionTest.java 2010-01-07 15:55:35 UTC (rev 40400) +++ mmbase/trunk/core/src/test/java/org/mmbase/util/functions/SetFunctionTest.java 2010-01-07 15:56:19 UTC (rev 40401) @@ -95,9 +95,8 @@ { Node typedef = cloud.getNodeManager("typedef").getList(null).getNode(0); params.set("A", "" + typedef.getNumber()); - Collection errors = params.validate(); -assertEquals(0, params.validate().size()); +assertEquals("" + errors, 0, errors.size()); assertEquals("aa" + typedef.getNumber(), function.getFunctionValue(params)); } { @@ -107,6 +106,7 @@ try { params.set("A", "" + news.getNumber()); +params.check(); fail("Node " + news + " should not have been valid for " + DataTypes.getDataType("typedef")); } catch (IllegalArgumentException iae) { //ok ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE SCM] r40400 - mmbase/trunk/core/src/test/java/org/mmbase/datatypes
Author: michiel Date: 2010-01-07 16:55:35 +0100 (Thu, 07 Jan 2010) New Revision: 40400 Modified: mmbase/trunk/core/src/test/java/org/mmbase/datatypes/DataTypesTest.java Log: use a bit of threadlocal Modified: mmbase/trunk/core/src/test/java/org/mmbase/datatypes/DataTypesTest.java === --- mmbase/trunk/core/src/test/java/org/mmbase/datatypes/DataTypesTest.java 2010-01-07 15:54:43 UTC (rev 40399) +++ mmbase/trunk/core/src/test/java/org/mmbase/datatypes/DataTypesTest.java 2010-01-07 15:55:35 UTC (rev 40400) @@ -14,6 +14,8 @@ import java.util.*; import org.mmbase.bridge.NodeManager; import org.mmbase.bridge.Field; +import org.mmbase.bridge.Cloud; +import org.mmbase.bridge.util.*; import org.mmbase.bridge.mock.*; import org.mmbase.util.*; import org.mmbase.util.xml.DocumentReader; @@ -396,7 +398,9 @@ @Test public void typedef() throws Exception { NodeDataType typedefDataType = (NodeDataType) DataTypes.getDataType("typedef"); -org.mmbase.bridge.Node typedef = MockCloudContext.getInstance().getCloud("mmbase").getNodeManager("typedef").getList(null).getNode(0); // a valid node +Cloud cloud = MockCloudContext.getInstance().getCloud("mmbase"); +CloudThreadLocal.bind(cloud); +org.mmbase.bridge.Node typedef = cloud.getNodeManager("typedef").getList(null).getNode(0); // a valid node assertEquals(typedef, typedefDataType.castToValidate(typedef, null, null)); assertEquals(typedef.getNumber(), ((org.mmbase.bridge.Node) typedefDataType.castToValidate(typedef.getNumber(), null, null)).getNumber()); @@ -424,6 +428,7 @@ assertEquals(typedef.getNumber(), typedefDataType.cast(typedef, null, null).getNumber()); assertEquals(aa.getNumber(), typedefDataType.cast(aa, null, null).getNumber()); +CloudThreadLocal.unbind(); } @Test ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE SCM] r40399 - mmbase/trunk/core/src/test/java/org/mmbase/util/functions
Author: michiel Date: 2010-01-07 16:54:43 +0100 (Thu, 07 Jan 2010) New Revision: 40399 Modified: mmbase/trunk/core/src/test/java/org/mmbase/util/functions/ParameterTest.java Log: Modified: mmbase/trunk/core/src/test/java/org/mmbase/util/functions/ParameterTest.java === --- mmbase/trunk/core/src/test/java/org/mmbase/util/functions/ParameterTest.java 2010-01-07 14:35:00 UTC (rev 40398) +++ mmbase/trunk/core/src/test/java/org/mmbase/util/functions/ParameterTest.java 2010-01-07 15:54:43 UTC (rev 40399) @@ -53,12 +53,8 @@ Parameter param = new Parameter("a", DataTypes.getDataType("colors")); param.checkType("just a string"); // it _is_ of the correct type - -try { -param.autoCast("a2"); // it cannot be casted though -fail(); -} catch (CastException ie) { -} +param.autoCast("a2"); // and can also be casted. + assertEquals("red", param.autoCast("red")); } @@ -74,12 +70,7 @@ param.checkType(news); // it _is_ of the correct type (namely a node) param.autoCast(typedef); -try { -param.autoCast(news); -fail("Node " + news + " should not have been valid for " + DataTypes.getDataType("typedef")); -} catch(CastException ce) { -// but it cannot be casted. -} +assertTrue(param.getDataType().validate(news, null, null).size() > 0); } } ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE SCM] r40398 - CMSContainer/branches/b1_7
Author: kbettinger Date: 2010-01-07 15:35:00 +0100 (Thu, 07 Jan 2010) New Revision: 40398 Modified: CMSContainer/branches/b1_7/pom.xml Log: version 1.7.2-SNAPSHOT starting Modified: CMSContainer/branches/b1_7/pom.xml === --- CMSContainer/branches/b1_7/pom.xml 2010-01-07 14:34:03 UTC (rev 40397) +++ CMSContainer/branches/b1_7/pom.xml 2010-01-07 14:35:00 UTC (rev 40398) @@ -14,7 +14,7 @@ org.cmscontainer cmsc-project - 1.7.1-SNAPSHOT + 1.7.2-SNAPSHOT CMSContainer/pom.xml ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE SCM] r40397 - CMSContainer/branches/b1_7
Author: kbettinger Date: 2010-01-07 15:34:03 +0100 (Thu, 07 Jan 2010) New Revision: 40397 Modified: CMSContainer/branches/b1_7/pom.xml Log: CMSC-1585 Modified: CMSContainer/branches/b1_7/pom.xml === --- CMSContainer/branches/b1_7/pom.xml 2010-01-07 14:26:46 UTC (rev 40396) +++ CMSContainer/branches/b1_7/pom.xml 2010-01-07 14:34:03 UTC (rev 40397) @@ -27,7 +27,7 @@ CMSContainer_Modules CMSContainer_Portlets CMSContainer_Templates - + CMSContainer_Demo/demo.cmscontainer.org ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE SCM] r40396 - in CMSContainer/branches/b1_7: CMSContainer_Modules CMSContainer_Modules/alias CMSContainer_Modules/community CMSContainer_Modules/dataconversion CMSContainer_Modules/directreact
Author: fpunt Date: 2010-01-07 15:26:46 +0100 (Thu, 07 Jan 2010) New Revision: 40396 Modified: CMSContainer/branches/b1_7/CMSContainer_Modules/alias/pom.xml CMSContainer/branches/b1_7/CMSContainer_Modules/community/pom.xml CMSContainer/branches/b1_7/CMSContainer_Modules/dataconversion/pom.xml CMSContainer/branches/b1_7/CMSContainer_Modules/directreaction/pom.xml CMSContainer/branches/b1_7/CMSContainer_Modules/egemmail/pom.xml CMSContainer/branches/b1_7/CMSContainer_Modules/favorites/pom.xml CMSContainer/branches/b1_7/CMSContainer_Modules/fileupload/pom.xml CMSContainer/branches/b1_7/CMSContainer_Modules/glossary/pom.xml CMSContainer/branches/b1_7/CMSContainer_Modules/import-excelmenu/pom.xml CMSContainer/branches/b1_7/CMSContainer_Modules/knownvisitor-ntlm/pom.xml CMSContainer/branches/b1_7/CMSContainer_Modules/knownvisitor/pom.xml CMSContainer/branches/b1_7/CMSContainer_Modules/language-redirect/pom.xml CMSContainer/branches/b1_7/CMSContainer_Modules/linkvalidator/pom.xml CMSContainer/branches/b1_7/CMSContainer_Modules/luceus/pom.xml CMSContainer/branches/b1_7/CMSContainer_Modules/messageoftheday/pom.xml CMSContainer/branches/b1_7/CMSContainer_Modules/openofficeintegration/pom.xml CMSContainer/branches/b1_7/CMSContainer_Modules/pagewizard/pom.xml CMSContainer/branches/b1_7/CMSContainer_Modules/pom.xml CMSContainer/branches/b1_7/CMSContainer_Modules/publish-cleaner/pom.xml CMSContainer/branches/b1_7/CMSContainer_Modules/publish-remote/pom.xml CMSContainer/branches/b1_7/CMSContainer_Modules/rating/pom.xml CMSContainer/branches/b1_7/CMSContainer_Modules/rss/pom.xml CMSContainer/branches/b1_7/CMSContainer_Modules/rssfeed/pom.xml CMSContainer/branches/b1_7/CMSContainer_Modules/sitecopy/pom.xml CMSContainer/branches/b1_7/CMSContainer_Modules/staticdownload/pom.xml CMSContainer/branches/b1_7/CMSContainer_Modules/subsite/pom.xml CMSContainer/branches/b1_7/CMSContainer_Modules/tasks/pom.xml CMSContainer/branches/b1_7/CMSContainer_Modules/tiles/pom.xml CMSContainer/branches/b1_7/CMSContainer_Modules/versioning/pom.xml CMSContainer/branches/b1_7/CMSContainer_Modules/workflow/pom.xml CMSContainer/branches/b1_7/CMSContainer_Portlets/pom.xml CMSContainer/branches/b1_7/CMSContainer_Portlets/portlets-banner/pom.xml CMSContainer/branches/b1_7/CMSContainer_Portlets/portlets-calendar/pom.xml CMSContainer/branches/b1_7/CMSContainer_Portlets/portlets-dynamicforms/pom.xml CMSContainer/branches/b1_7/CMSContainer_Portlets/portlets-dynamicforms2/pom.xml CMSContainer/branches/b1_7/CMSContainer_Portlets/portlets-ecard/pom.xml CMSContainer/branches/b1_7/CMSContainer_Portlets/portlets-emailalert/pom.xml CMSContainer/branches/b1_7/CMSContainer_Portlets/portlets-flash/pom.xml CMSContainer/branches/b1_7/CMSContainer_Portlets/portlets-gallery/pom.xml CMSContainer/branches/b1_7/CMSContainer_Portlets/portlets-gallery2/pom.xml CMSContainer/branches/b1_7/CMSContainer_Portlets/portlets-googlemap/pom.xml CMSContainer/branches/b1_7/CMSContainer_Portlets/portlets-guestbook/pom.xml CMSContainer/branches/b1_7/CMSContainer_Portlets/portlets-jforum/pom.xml CMSContainer/branches/b1_7/CMSContainer_Portlets/portlets-login/pom.xml CMSContainer/branches/b1_7/CMSContainer_Portlets/portlets-maileditors/pom.xml CMSContainer/branches/b1_7/CMSContainer_Portlets/portlets-mailfriend/pom.xml CMSContainer/branches/b1_7/CMSContainer_Portlets/portlets-newsletter/pom.xml CMSContainer/branches/b1_7/CMSContainer_Portlets/portlets-playlist/pom.xml CMSContainer/branches/b1_7/CMSContainer_Portlets/portlets-poll/pom.xml CMSContainer/branches/b1_7/CMSContainer_Portlets/portlets-preferences/pom.xml CMSContainer/branches/b1_7/CMSContainer_Portlets/portlets-print/pom.xml CMSContainer/branches/b1_7/CMSContainer_Portlets/portlets-randomcontent/pom.xml CMSContainer/branches/b1_7/CMSContainer_Portlets/portlets-search/pom.xml CMSContainer/branches/b1_7/CMSContainer_Portlets/portlets-secure/pom.xml CMSContainer/branches/b1_7/CMSContainer_Portlets/portlets-tagcloud/pom.xml CMSContainer/branches/b1_7/CMSContainer_Portlets/portlets-teaser/pom.xml CMSContainer/branches/b1_7/CMSContainer_Templates/community/pom.xml CMSContainer/branches/b1_7/CMSContainer_Templates/double/pom.xml CMSContainer/branches/b1_7/CMSContainer_Templates/double/war-live/pom.xml CMSContainer/branches/b1_7/CMSContainer_Templates/double/war-staging/pom.xml CMSContainer/branches/b1_7/CMSContainer_Templates/luceus/pom.xml CMSContainer/branches/b1_7/CMSContainer_Templates/pom.xml CMSContainer/branches/b1_7/CMSContainer_Templates/single/pom.xml CMSContainer/branches/b1_7/CMSContainer_Templates/single/war/pom.xml Log: releasing 1.7.1 Modified: CMSContainer/branches/b1_7/CMSContainer_Modules/alias/pom.xml === --- CMSContainer/branches/b1_7/CMSContainer_Modules/alias
[MMBASE SCM] r40395 - in CMSContainer/branches/b1_7/CMSContainer_Demo: demo.cmscontainer.org demo.cmscontainer.org/war demo.cmscontainer.org/war-community demo.cmscontainer.org/war-live demo.cmscontai
Author: fpunt Date: 2010-01-07 15:25:22 +0100 (Thu, 07 Jan 2010) New Revision: 40395 Modified: CMSContainer/branches/b1_7/CMSContainer_Demo/demo.cmscontainer.org/pom.xml CMSContainer/branches/b1_7/CMSContainer_Demo/demo.cmscontainer.org/war-community/pom.xml CMSContainer/branches/b1_7/CMSContainer_Demo/demo.cmscontainer.org/war-live/pom.xml CMSContainer/branches/b1_7/CMSContainer_Demo/demo.cmscontainer.org/war-single/pom.xml CMSContainer/branches/b1_7/CMSContainer_Demo/demo.cmscontainer.org/war-staging/pom.xml CMSContainer/branches/b1_7/CMSContainer_Demo/demo.cmscontainer.org/war/pom.xml CMSContainer/branches/b1_7/CMSContainer_Demo/m2archetype/war-community-archetype/src/main/resources/archetype-resources/pom.xml CMSContainer/branches/b1_7/CMSContainer_Demo/m2archetype/war-livestaging-archetype/src/main/resources/archetype-resources/pom.xml CMSContainer/branches/b1_7/CMSContainer_Demo/m2archetype/war-livestaging-archetype/src/main/resources/archetype-resources/war-live/pom.xml CMSContainer/branches/b1_7/CMSContainer_Demo/m2archetype/war-livestaging-archetype/src/main/resources/archetype-resources/war-staging/pom.xml CMSContainer/branches/b1_7/CMSContainer_Demo/m2archetype/war-livestaging-archetype/src/main/resources/archetype-resources/war/pom.xml CMSContainer/branches/b1_7/CMSContainer_Demo/m2archetype/war-single-archetype/src/main/resources/archetype-resources/pom.xml CMSContainer/branches/b1_7/CMSContainer_Demo/www.cmscontainer.org/pom.xml CMSContainer/branches/b1_7/CMSContainer_Demo/www.cmscontainer.org/war-live/pom.xml CMSContainer/branches/b1_7/CMSContainer_Demo/www.cmscontainer.org/war-staging/pom.xml CMSContainer/branches/b1_7/CMSContainer_Demo/www.cmscontainer.org/war/pom.xml Log: releasing 1.7.1 Modified: CMSContainer/branches/b1_7/CMSContainer_Demo/demo.cmscontainer.org/pom.xml === --- CMSContainer/branches/b1_7/CMSContainer_Demo/demo.cmscontainer.org/pom.xml 2010-01-07 14:24:09 UTC (rev 40394) +++ CMSContainer/branches/b1_7/CMSContainer_Demo/demo.cmscontainer.org/pom.xml 2010-01-07 14:25:22 UTC (rev 40395) @@ -6,7 +6,7 @@ org.cmscontainer cmsc-project-parent - 1.7.1 + 1.7.2-SNAPSHOT org.cmscontainer.demos Modified: CMSContainer/branches/b1_7/CMSContainer_Demo/demo.cmscontainer.org/war/pom.xml === --- CMSContainer/branches/b1_7/CMSContainer_Demo/demo.cmscontainer.org/war/pom.xml 2010-01-07 14:24:09 UTC (rev 40394) +++ CMSContainer/branches/b1_7/CMSContainer_Demo/demo.cmscontainer.org/war/pom.xml 2010-01-07 14:25:22 UTC (rev 40395) @@ -6,7 +6,7 @@ org.cmscontainer.demos cmsc-demo-base -1.7.1 +1.7.2-SNAPSHOT cmsc-demo-webapp Modified: CMSContainer/branches/b1_7/CMSContainer_Demo/demo.cmscontainer.org/war-community/pom.xml === --- CMSContainer/branches/b1_7/CMSContainer_Demo/demo.cmscontainer.org/war-community/pom.xml 2010-01-07 14:24:09 UTC (rev 40394) +++ CMSContainer/branches/b1_7/CMSContainer_Demo/demo.cmscontainer.org/war-community/pom.xml 2010-01-07 14:25:22 UTC (rev 40395) @@ -6,7 +6,7 @@ org.cmscontainer.demos cmsc-demo-base -1.7.1 +1.7.2-SNAPSHOT cmsc-community Modified: CMSContainer/branches/b1_7/CMSContainer_Demo/demo.cmscontainer.org/war-live/pom.xml === --- CMSContainer/branches/b1_7/CMSContainer_Demo/demo.cmscontainer.org/war-live/pom.xml 2010-01-07 14:24:09 UTC (rev 40394) +++ CMSContainer/branches/b1_7/CMSContainer_Demo/demo.cmscontainer.org/war-live/pom.xml 2010-01-07 14:25:22 UTC (rev 40395) @@ -6,7 +6,7 @@ org.cmscontainer.demos cmsc-demo-base -1.7.1 +1.7.2-SNAPSHOT cmsc-demo-live Modified: CMSContainer/branches/b1_7/CMSContainer_Demo/demo.cmscontainer.org/war-single/pom.xml === --- CMSContainer/branches/b1_7/CMSContainer_Demo/demo.cmscontainer.org/war-single/pom.xml 2010-01-07 14:24:09 UTC (rev 40394) +++ CMSContainer/branches/b1_7/CMSContainer_Demo/demo.cmscontainer.org/war-single/pom.xml 2010-01-07 14:25:22 UTC (rev 40395) @@ -6,7 +6,7 @@ org.cmscontainer.demos cmsc-demo-base -1.7.1 +1.7.2-SNAPSHOT cmsc-demo-single Modified: CMSContainer/branches/b1_7/CMSContainer_Demo/demo.cmscontainer.org/war-staging/pom.xml === --- CMSContainer/branches/b1_7/CMSContainer_Demo/demo.cmscontainer.org/war-staging/pom.xml 2010-01-07 14:24:09 UTC (rev 40394) +++ CMSContainer/branches/b1_7/CMSContainer_Demo/demo.cmscontainer.org/w
[MMBASE SCM] r40394 - in CMSContainer/branches/b1_7/CMSContainer: . cmsc cmsc/basicmodel cmsc/contentrepository cmsc/edit-webapp cmsc/maintenance cmsc/portal cmsc/portlets cmsc/richtext cmsc/search cm
Author: fpunt Date: 2010-01-07 15:24:09 +0100 (Thu, 07 Jan 2010) New Revision: 40394 Modified: CMSContainer/branches/b1_7/CMSContainer/cmsc/basicmodel/pom.xml CMSContainer/branches/b1_7/CMSContainer/cmsc/contentrepository/pom.xml CMSContainer/branches/b1_7/CMSContainer/cmsc/edit-webapp/pom.xml CMSContainer/branches/b1_7/CMSContainer/cmsc/maintenance/pom.xml CMSContainer/branches/b1_7/CMSContainer/cmsc/pom.xml CMSContainer/branches/b1_7/CMSContainer/cmsc/portal/pom.xml CMSContainer/branches/b1_7/CMSContainer/cmsc/portlets/pom.xml CMSContainer/branches/b1_7/CMSContainer/cmsc/richtext/pom.xml CMSContainer/branches/b1_7/CMSContainer/cmsc/search/pom.xml CMSContainer/branches/b1_7/CMSContainer/cmsc/security/pom.xml CMSContainer/branches/b1_7/CMSContainer/cmsc/servicemanagement/pom.xml CMSContainer/branches/b1_7/CMSContainer/cmsc/sitemanagement/pom.xml CMSContainer/branches/b1_7/CMSContainer/cmsc/taglib/pom.xml CMSContainer/branches/b1_7/CMSContainer/cmsc/utilities/pom.xml CMSContainer/branches/b1_7/CMSContainer/maven-base/pom.xml CMSContainer/branches/b1_7/CMSContainer/pom.xml CMSContainer/branches/b1_7/CMSContainer/project-parent/pom.xml Log: releasing 1.7.1 Modified: CMSContainer/branches/b1_7/CMSContainer/cmsc/basicmodel/pom.xml === --- CMSContainer/branches/b1_7/CMSContainer/cmsc/basicmodel/pom.xml 2010-01-07 14:20:07 UTC (rev 40393) +++ CMSContainer/branches/b1_7/CMSContainer/cmsc/basicmodel/pom.xml 2010-01-07 14:24:09 UTC (rev 40394) @@ -6,7 +6,7 @@ org.cmscontainer.core cmsc-core -1.7.1 +1.7.2-SNAPSHOT cmsc-basicmodel Modified: CMSContainer/branches/b1_7/CMSContainer/cmsc/contentrepository/pom.xml === --- CMSContainer/branches/b1_7/CMSContainer/cmsc/contentrepository/pom.xml 2010-01-07 14:20:07 UTC (rev 40393) +++ CMSContainer/branches/b1_7/CMSContainer/cmsc/contentrepository/pom.xml 2010-01-07 14:24:09 UTC (rev 40394) @@ -6,7 +6,7 @@ org.cmscontainer.core cmsc-core -1.7.1 +1.7.2-SNAPSHOT cmsc-contentrepository Modified: CMSContainer/branches/b1_7/CMSContainer/cmsc/edit-webapp/pom.xml === --- CMSContainer/branches/b1_7/CMSContainer/cmsc/edit-webapp/pom.xml 2010-01-07 14:20:07 UTC (rev 40393) +++ CMSContainer/branches/b1_7/CMSContainer/cmsc/edit-webapp/pom.xml 2010-01-07 14:24:09 UTC (rev 40394) @@ -6,7 +6,7 @@ org.cmscontainer.core cmsc-core -1.7.1 +1.7.2-SNAPSHOT cmsc-edit-webapp Modified: CMSContainer/branches/b1_7/CMSContainer/cmsc/maintenance/pom.xml === --- CMSContainer/branches/b1_7/CMSContainer/cmsc/maintenance/pom.xml 2010-01-07 14:20:07 UTC (rev 40393) +++ CMSContainer/branches/b1_7/CMSContainer/cmsc/maintenance/pom.xml 2010-01-07 14:24:09 UTC (rev 40394) @@ -6,7 +6,7 @@ org.cmscontainer.core cmsc-core -1.7.1 +1.7.2-SNAPSHOT cmsc-maintenance Modified: CMSContainer/branches/b1_7/CMSContainer/cmsc/pom.xml === --- CMSContainer/branches/b1_7/CMSContainer/cmsc/pom.xml2010-01-07 14:20:07 UTC (rev 40393) +++ CMSContainer/branches/b1_7/CMSContainer/cmsc/pom.xml2010-01-07 14:24:09 UTC (rev 40394) @@ -6,7 +6,7 @@ org.cmscontainer cmsc-project -1.7.1 +1.7.2-SNAPSHOT org.cmscontainer.core Modified: CMSContainer/branches/b1_7/CMSContainer/cmsc/portal/pom.xml === --- CMSContainer/branches/b1_7/CMSContainer/cmsc/portal/pom.xml 2010-01-07 14:20:07 UTC (rev 40393) +++ CMSContainer/branches/b1_7/CMSContainer/cmsc/portal/pom.xml 2010-01-07 14:24:09 UTC (rev 40394) @@ -6,7 +6,7 @@ org.cmscontainer.core cmsc-core -1.7.1 +1.7.2-SNAPSHOT cmsc-portal Modified: CMSContainer/branches/b1_7/CMSContainer/cmsc/portlets/pom.xml === --- CMSContainer/branches/b1_7/CMSContainer/cmsc/portlets/pom.xml 2010-01-07 14:20:07 UTC (rev 40393) +++ CMSContainer/branches/b1_7/CMSContainer/cmsc/portlets/pom.xml 2010-01-07 14:24:09 UTC (rev 40394) @@ -6,7 +6,7 @@ org.cmscontainer.core cmsc-core -1.7.1 +1.7.2-SNAPSHOT cmsc-portlets Modified: CMSContainer/branches/b1_7/CMSContainer/cmsc/richtext/pom.xml === --- CMSContainer/branches/b1_7/CMSContainer/cmsc/richtext/pom.xml 2010-01-07 14:20:07 UTC (rev 40393) +++ CMSContainer/branches/b
[MMBASE SCM] r40393 - mmbase/trunk/tests/clustering/org/mmbase/tests
Author: michiel Date: 2010-01-07 15:20:07 +0100 (Thu, 07 Jan 2010) New Revision: 40393 Modified: mmbase/trunk/tests/clustering/org/mmbase/tests/Clustering.java Log: found something that fails. (MMB-1128?) Modified: mmbase/trunk/tests/clustering/org/mmbase/tests/Clustering.java === --- mmbase/trunk/tests/clustering/org/mmbase/tests/Clustering.java 2010-01-07 14:15:55 UTC (rev 40392) +++ mmbase/trunk/tests/clustering/org/mmbase/tests/Clustering.java 2010-01-07 14:20:07 UTC (rev 40393) @@ -61,7 +61,7 @@ } } -public void fieldEquals(Node n1, Node n2) { +protected void fieldEquals(Node n1, Node n2) { for (Field f : n1.getNodeManager().getFields(NodeManager.ORDER_CREATE)) { if (f.getName().equals("number")) { // sigh, 'number' is a NODE field... @@ -82,8 +82,10 @@ } public void testCreateNode() { +// a node was created in cloud1. It must be available in cloud2. assertTrue(cloud2.hasNode(nodea1.getNumber())); Node nodea2 = cloud2.getNode(nodea1.getNumber()); +// and also be the same fieldEquals(nodea1, nodea2); } @@ -93,8 +95,12 @@ NodeManager aa2 = cloud2.getNodeManager("aa"); NodeList aa2list2 = aa2.getList(null, null, null); // should not give error, but may be size 0, because still in cache + +assertTrue(aa2list2.size() == 0 || aa2list2.size() == 1); + allowLatency(); -aa2list2 = aa2.getList(null, null, null); // should also be size 1! + +aa2list2 = aa2.getList(null, null, null); // should also be size 1 now! assertTrue("List before create was not size 0", aa2list.size() == 0); // was determined before the createNode, should still be 0. assertTrue("Check wether node-list got invalidated failed " + aa2list2.size() + " != " + aa2list.size() + " + 1", aa2list2.size() == aa2list.size() + 1); @@ -128,57 +134,79 @@ return (RelationManager) newTypeRel; } + +// MMB-1128 public void testCreateTypeRel() { // create new typerel, and see if that has influence on cloud 2. RelationManager rm = createTypeRel(cloud1, "posrel", "bb", "aa"); - -// query for local cloud NodeManager bb1 = cloud1.getNodeManager("bb"); -NodeQuery nq1 = Queries.createRelatedNodesQuery(cloud1.getNode(nodea1.getNumber()), bb1, null, "both"); -NodeList related1 = bb1.getList(nq1); -assertTrue("Locale list is null!", related1 != null); -assertTrue("Locale list is not empty.",related1.size() == 0); - -// query for remote cloud NodeManager bb2 = cloud2.getNodeManager("bb"); -NodeQuery nq2 = Queries.createRelatedNodesQuery(cloud2.getNode(nodea1.getNumber()), bb2, null, "both"); -NodeList related2 = bb2.getList(nq2); -assertTrue("Remote list is null!", related2 != null); -assertTrue("Locale list is not empty.", related2.size() == 0); -// create node and relation -Node bbnode1 = bb1.createNode(); -bbnode1.commit(); -Relation r1 = bbnode1.createRelation(nodea1, rm); -r1.commit(); +{ +// query for local cloud +NodeQuery nq1 = Queries.createRelatedNodesQuery(cloud1.getNode(nodea1.getNumber()), bb1, null, "both"); +NodeList related1 = bb1.getList(nq1); +assertTrue("Locale list is null!", related1 != null); +assertTrue("Locale list is not empty.",related1.size() == 0); +} -// re-query local cloud -related1 = bb1.getList(nq1); -assertTrue("Created a relation, but local related list size is not 1, but " + related1.size() + - ".\nUsed query: " + nq1, related1.size() == 1); // local -// re-query remote cloud -allowLatency(); -related2 = bb2.getList(nq2); -assertTrue("Created a relation, but remote related list size is not 1, but " + related2.size() + - ".\nUsed query: " + nq2, related2.size() == 1); // remote +{ +// query for remote cloud +NodeQuery nq2 = Queries.createRelatedNodesQuery(cloud2.getNode(nodea1.getNumber()), bb2, null, "both"); +NodeList related2 = bb2.getList(nq2); +assertTrue("Remote list is null!", related2 != null); +assertTrue("Locale list is not empty.", related2.size() == 0); +} +Relation r1; +{ +// create node and relation +Node bbnode1 = bb1.createNode(); +bbnode1.commit(); +r1 = bbnode1.createRelation(nodea1, rm); +r1.commit(); +} +{ +// re-query local cloud +NodeQuery nq1 = Queries.createRelatedNodesQuery(cloud1.getNode(nodea1.getNumber()), bb1, null, "both"); +NodeList related1 = bb1.getList
[MMBASE SCM] r40392 - CMSContainer/tags
Author: fpunt Date: 2010-01-07 15:15:55 +0100 (Thu, 07 Jan 2010) New Revision: 40392 Added: CMSContainer/tags/v1_7_1/ Log: releasing 1.7.1 Copied: CMSContainer/tags/v1_7_1 (from rev 40391, CMSContainer/branches/b1_7) ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE SCM] r40391 - in mmbase/trunk/tests: . clustering/org/mmbase/tests config/log
Author: michiel Date: 2010-01-07 14:51:56 +0100 (Thu, 07 Jan 2010) New Revision: 40391 Modified: mmbase/trunk/tests/build.xml mmbase/trunk/tests/clustering/org/mmbase/tests/Clustering.java mmbase/trunk/tests/config/log/log4j.xml Log: simplified clustering set up a bit Modified: mmbase/trunk/tests/build.xml === --- mmbase/trunk/tests/build.xml2010-01-07 13:46:21 UTC (rev 40390) +++ mmbase/trunk/tests/build.xml2010-01-07 13:51:56 UTC (rev 40391) @@ -16,7 +16,7 @@ - + @@ -200,8 +200,7 @@ classpathref="run.classpath.rmmci" > - - + @@ -215,7 +214,7 @@ > - + @@ -286,8 +285,7 @@ - - + @@ -304,8 +302,7 @@ - - + @@ -441,8 +438,7 @@ classpathref="run.classpath.rmmci" > - - + Modified: mmbase/trunk/tests/clustering/org/mmbase/tests/Clustering.java === --- mmbase/trunk/tests/clustering/org/mmbase/tests/Clustering.java 2010-01-07 13:46:21 UTC (rev 40390) +++ mmbase/trunk/tests/clustering/org/mmbase/tests/Clustering.java 2010-01-07 13:51:56 UTC (rev 40391) @@ -30,8 +30,8 @@ protected static Node nodea1; public void setUp() { if (cloud1 == null) { -cloud1 = getRemoteCloud("rmi://127.0.0.1:1221/remotecontext"); -cloud2 = getRemoteCloud("rmi://127.0.0.1:1222/remotecontext"); +cloud1 = getRemoteCloud("rmi://127.0.0.1:/remotecontext_test1"); +cloud2 = getRemoteCloud("rmi://127.0.0.1:/remotecontext_test2"); NodeManager aa2 = cloud2.getNodeManager("aa"); NodeManager aa1 = cloud1.getNodeManager("aa"); @@ -51,7 +51,7 @@ /** - * It's no hard requirement that changes are visibility immediately on the other side. So, sometimes wait a bit, to be + * It's no hard requirement that changes are visible immediately on the other side. So, sometimes wait a bit, to be * on the safe side. */ protected void allowLatency() { Modified: mmbase/trunk/tests/config/log/log4j.xml === --- mmbase/trunk/tests/config/log/log4j.xml 2010-01-07 13:46:21 UTC (rev 40390) +++ mmbase/trunk/tests/config/log/log4j.xml 2010-01-07 13:51:56 UTC (rev 40391) @@ -18,6 +18,11 @@ + + + + + ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE SCM] r40390 - mmbase/branches/MMBase-1_9/tests/clustering/org/mmbase/tests
Author: michiel Date: 2010-01-07 14:46:21 +0100 (Thu, 07 Jan 2010) New Revision: 40390 Modified: mmbase/branches/MMBase-1_9/tests/clustering/org/mmbase/tests/Clustering.java Log: ported a detail from trunk Modified: mmbase/branches/MMBase-1_9/tests/clustering/org/mmbase/tests/Clustering.java === --- mmbase/branches/MMBase-1_9/tests/clustering/org/mmbase/tests/Clustering.java 2010-01-07 12:55:20 UTC (rev 40389) +++ mmbase/branches/MMBase-1_9/tests/clustering/org/mmbase/tests/Clustering.java 2010-01-07 13:46:21 UTC (rev 40390) @@ -60,18 +60,22 @@ } catch (InterruptedException ie) { } } - public void fieldEquals(Node n1, Node n2) { -FieldIterator fi = n1.getNodeManager().getFields(NodeManager.ORDER_CREATE).fieldIterator(); -while (fi.hasNext()) { -Field f = fi.nextField(); +for (Field f : n1.getNodeManager().getFields(NodeManager.ORDER_CREATE)) { if (f.getName().equals("number")) { // sigh, 'number' is a NODE field... assertEquals(n1.getNumber(), n2.getNumber()); +} else if (f.getName().equals("otype")) { +// 'otype' is a NODE field too +assertEquals(n1.getNumber(), n2.getNumber()); } else { Object value1 = n1.getValue(f.getName()); Object value2 = n2.getValue(f.getName()); -assertTrue("" + value1 + " != " + value2 + " (value of " + n1.getNumber() + "/" + f.getName() + ")", value1 == null ? value2 == null : value1.equals(value2)); +assertTrue("" + + (value1 == null ? "" : value1.getClass().getName()) + value1 + + " != " + + (value2 == null ? "" : value2.getClass().getName()) + value2 + + " (value of " + n1.getNumber() + "/" + f.getName() + ")", value1 == null ? value2 == null : value1.equals(value2)); } } } ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE SCM] r40309 - in CMSContainer/trunk/CMSContainer/cmsc/sitemanagement: config/builders/sitemanagement src/webapp/editors/config src/webapp/editors/config/pagegroup
Author: kevinshen Date: 2010-01-04 08:02:38 +0100 (Mon, 04 Jan 2010) New Revision: 40309 Added: CMSContainer/trunk/CMSContainer/cmsc/sitemanagement/config/builders/sitemanagement/pagegroup.xml CMSContainer/trunk/CMSContainer/cmsc/sitemanagement/src/webapp/editors/config/pagegroup/ CMSContainer/trunk/CMSContainer/cmsc/sitemanagement/src/webapp/editors/config/pagegroup/search_page_related_pagegroup.xml Log: CMSC-1539 CAS single sign-on implementation Added: CMSContainer/trunk/CMSContainer/cmsc/sitemanagement/config/builders/sitemanagement/pagegroup.xml === --- CMSContainer/trunk/CMSContainer/cmsc/sitemanagement/config/builders/sitemanagement/pagegroup.xml (rev 0) +++ CMSContainer/trunk/CMSContainer/cmsc/sitemanagement/config/builders/sitemanagement/pagegroup.xml 2010-01-04 07:02:38 UTC (rev 40309) @@ -0,0 +1,46 @@ + +http://www.mmbase.org/xmlns/builder"; + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; + xsi:schemaLocation="http://www.mmbase.org/xmlns/builder +http://www.mmbase.org/xmlns/builder.xsd"; + extends="object" maintainer="finalist.com" name="pagegroup" version="1"> + + active + 70 + + Pagina groep + Page group + Pagina groep + Page groep + + + + + + + + + + + + + + + Groep naam + Group name + + + + 2 + 2 + 2 + + + http://www.mmbase.org/xmlns/datatypes"; /> + + name + STRING + + + + Added: CMSContainer/trunk/CMSContainer/cmsc/sitemanagement/src/webapp/editors/config/pagegroup/search_page_related_pagegroup.xml === --- CMSContainer/trunk/CMSContainer/cmsc/sitemanagement/src/webapp/editors/config/pagegroup/search_page_related_pagegroup.xml (rev 0) +++ CMSContainer/trunk/CMSContainer/cmsc/sitemanagement/src/webapp/editors/config/pagegroup/search_page_related_pagegroup.xml 2010-01-04 07:02:38 UTC (rev 40309) @@ -0,0 +1,18 @@ + +http://www.mmbase.org/dtd/wizard-schema_1_0.dtd";> + + Groepen met toegang + Groups with access + + + Name + Naam + + + + + + + + + \ No newline at end of file ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE SCM] r40386 - mmbase/trunk/tests/clustering/org/mmbase/tests
Author: michiel Date: 2010-01-07 13:20:53 +0100 (Thu, 07 Jan 2010) New Revision: 40386 Modified: mmbase/trunk/tests/clustering/org/mmbase/tests/Clustering.java Log: something went wrong with otype testing Modified: mmbase/trunk/tests/clustering/org/mmbase/tests/Clustering.java === --- mmbase/trunk/tests/clustering/org/mmbase/tests/Clustering.java 2010-01-07 12:10:39 UTC (rev 40385) +++ mmbase/trunk/tests/clustering/org/mmbase/tests/Clustering.java 2010-01-07 12:20:53 UTC (rev 40386) @@ -62,16 +62,21 @@ } public void fieldEquals(Node n1, Node n2) { -FieldIterator fi = n1.getNodeManager().getFields(NodeManager.ORDER_CREATE).fieldIterator(); -while (fi.hasNext()) { -Field f = fi.nextField(); +for (Field f : n1.getNodeManager().getFields(NodeManager.ORDER_CREATE)) { if (f.getName().equals("number")) { // sigh, 'number' is a NODE field... assertEquals(n1.getNumber(), n2.getNumber()); +} else if (f.getName().equals("otype")) { +// 'otype' is a NODE field too +assertEquals(n1.getNumber(), n2.getNumber()); } else { Object value1 = n1.getValue(f.getName()); Object value2 = n2.getValue(f.getName()); -assertTrue("" + value1 + " != " + value2 + " (value of " + n1.getNumber() + "/" + f.getName() + ")", value1 == null ? value2 == null : value1.equals(value2)); +assertTrue("" + + (value1 == null ? "" : value1.getClass().getName()) + value1 + + " != " + + (value2 == null ? "" : value2.getClass().getName()) + value2 + + " (value of " + n1.getNumber() + "/" + f.getName() + ")", value1 == null ? value2 == null : value1.equals(value2)); } } } ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE SCM] r40384 - speeltuin/mihxil/portal/src/main/webapp/mmbase/portal
Author: michiel Date: 2010-01-07 12:53:21 +0100 (Thu, 07 Jan 2010) New Revision: 40384 Modified: speeltuin/mihxil/portal/src/main/webapp/mmbase/portal/portal.css.jsp speeltuin/mihxil/portal/src/main/webapp/mmbase/portal/portal.js.jsp Log: Modified: speeltuin/mihxil/portal/src/main/webapp/mmbase/portal/portal.css.jsp === --- speeltuin/mihxil/portal/src/main/webapp/mmbase/portal/portal.css.jsp 2010-01-07 11:52:28 UTC (rev 40383) +++ speeltuin/mihxil/portal/src/main/webapp/mmbase/portal/portal.css.jsp 2010-01-07 11:53:21 UTC (rev 40384) @@ -63,7 +63,16 @@ z-index: 2000; } +a.mm_portal_edit { + position: absolute; + background: yellow; + right: 0px; + margin-right: 10px; + top: 0px; + z-index: 2000; +} + .ui-dialog { z-index: 2010 !important; } Modified: speeltuin/mihxil/portal/src/main/webapp/mmbase/portal/portal.js.jsp === --- speeltuin/mihxil/portal/src/main/webapp/mmbase/portal/portal.js.jsp 2010-01-07 11:52:28 UTC (rev 40383) +++ speeltuin/mihxil/portal/src/main/webapp/mmbase/portal/portal.js.jsp 2010-01-07 11:53:21 UTC (rev 40384) @@ -29,9 +29,9 @@ var self = this; if ($("#mm_portal_edit").length == 0) { $("body").append(""); -$("body").append(""); $("#mm_portal_edit").dialog(self.options); } + this.addLinksToEditables(); this.addLinkToBody(); } ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE SCM] r40383 - speeltuin/mihxil/portal/src/main/resources/META-INF/tags/mm/portal
Author: michiel Date: 2010-01-07 12:52:28 +0100 (Thu, 07 Jan 2010) New Revision: 40383 Modified: speeltuin/mihxil/portal/src/main/resources/META-INF/tags/mm/portal/page.tagx Log: added descriptions Modified: speeltuin/mihxil/portal/src/main/resources/META-INF/tags/mm/portal/page.tagx === --- speeltuin/mihxil/portal/src/main/resources/META-INF/tags/mm/portal/page.tagx 2010-01-07 11:48:10 UTC (rev 40382) +++ speeltuin/mihxil/portal/src/main/resources/META-INF/tags/mm/portal/page.tagx 2010-01-07 11:52:28 UTC (rev 40383) @@ -4,7 +4,14 @@ xmlns:c="http://java.sun.com/jsp/jstl/core"; version="2.0" > - + + + http://www.mmbase.org/api/org/mmbase/util/DynamicDate.html"; + /> ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE SCM] r40382 - speeltuin/mihxil/portal/src/main/resources/META-INF/tags/mm/portal
Author: michiel Date: 2010-01-07 12:48:10 +0100 (Thu, 07 Jan 2010) New Revision: 40382 Modified: speeltuin/mihxil/portal/src/main/resources/META-INF/tags/mm/portal/page.tagx Log: Modified: speeltuin/mihxil/portal/src/main/resources/META-INF/tags/mm/portal/page.tagx === --- speeltuin/mihxil/portal/src/main/resources/META-INF/tags/mm/portal/page.tagx 2010-01-07 10:51:52 UTC (rev 40381) +++ speeltuin/mihxil/portal/src/main/resources/META-INF/tags/mm/portal/page.tagx 2010-01-07 11:48:10 UTC (rev 40382) @@ -19,13 +19,11 @@ - - ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE SCM] r40381 - in speeltuin/mihxil/portal: src/main/resources/META-INF src/main/resources/META-INF/tags/mm/portal src/main/webapp/mmbase/portal test-webapp
Author: michiel Date: 2010-01-07 11:51:52 +0100 (Thu, 07 Jan 2010) New Revision: 40381 Added: speeltuin/mihxil/portal/src/main/resources/META-INF/tags/mm/portal/page.tagx Modified: speeltuin/mihxil/portal/src/main/resources/META-INF/mmbase-portal.tld speeltuin/mihxil/portal/src/main/webapp/mmbase/portal/portal.js.jsp speeltuin/mihxil/portal/test-webapp/jetty-env.xml Log: added a 'page' tag Modified: speeltuin/mihxil/portal/src/main/resources/META-INF/mmbase-portal.tld === --- speeltuin/mihxil/portal/src/main/resources/META-INF/mmbase-portal.tld 2010-01-07 10:46:10 UTC (rev 40380) +++ speeltuin/mihxil/portal/src/main/resources/META-INF/mmbase-portal.tld 2010-01-07 10:51:52 UTC (rev 40381) @@ -18,5 +18,10 @@ /META-INF/tags/mm/portal/block.tagx + +page +/META-INF/tags/mm/portal/page.tagx + + Added: speeltuin/mihxil/portal/src/main/resources/META-INF/tags/mm/portal/page.tagx === --- speeltuin/mihxil/portal/src/main/resources/META-INF/tags/mm/portal/page.tagx (rev 0) +++ speeltuin/mihxil/portal/src/main/resources/META-INF/tags/mm/portal/page.tagx 2010-01-07 10:51:52 UTC (rev 40381) @@ -0,0 +1,33 @@ +http://java.sun.com/JSP/Page"; +xmlns:mm="http://www.mmbase.org/mmbase-taglib-2.0"; +xmlns:c="http://java.sun.com/jsp/jstl/core"; +version="2.0" +> + + + + + + + + + + + + + + + + + + + + + + + + + + + Modified: speeltuin/mihxil/portal/src/main/webapp/mmbase/portal/portal.js.jsp === --- speeltuin/mihxil/portal/src/main/webapp/mmbase/portal/portal.js.jsp 2010-01-07 10:46:10 UTC (rev 40380) +++ speeltuin/mihxil/portal/src/main/webapp/mmbase/portal/portal.js.jsp 2010-01-07 10:51:52 UTC (rev 40381) @@ -16,7 +16,7 @@ height: 0.8 * $(window).height(), width: 0.8 * $(window).width(), close: function() { -$("#edit").empty(); +$("#mm_portal_edit").empty(); $("body").trigger("mmpClosed", [self]); } } @@ -27,9 +27,10 @@ MMBasePortal.prototype.init = function() { var self = this; -if ($("#edit").length == 0) { -$("body").append(""); -$("#edit").dialog(self.options); +if ($("#mm_portal_edit").length == 0) { +$("body").append(""); +$("body").append(""); +$("#mm_portal_edit").dialog(self.options); } this.addLinksToEditables(); this.addLinkToBody(); @@ -68,9 +69,11 @@ $(div).append(a); $(a).click(function() { try { -var iframe = $(" "); -$("#edit").append(iframe); -$("#edit").dialog("open"); + +var ift = " "; +var iframe = $(ift); +$("#mm_portal_edit").append(iframe); +$("#mm_portal_edit").dialog("open"); self.edits++; } catch (e) { console.log(e); Modified: speeltuin/mihxil/portal/test-webapp/jetty-env.xml === --- speeltuin/mihxil/portal/test-webapp/jetty-env.xml 2010-01-07 10:46:10 UTC (rev 40380) +++ speeltuin/mihxil/portal/test-webapp/jetty-env.xml 2010-01-07 10:51:52 UTC (rev 40381) @@ -14,15 +14,15 @@ src/main/webapp - ../applications/taglib/src/main/webapp - ../base-webapp/src/main/webapp - ../base-webapp/target/base-webapp-1.9-servlet25-SNAPSHOT + ../src/main/webapp + /home/michiel/mmbase/9/base-webapp/src/main/webapp + /home/michiel/mmbase/9/base-webapp/target/base-webapp-1.9-servlet25-SNAPSHOT + /home/michiel/mmbase/9/applications/searchrelate/target/mmbase-searchrelate-1.9-SNAPSHOT --> - ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE SCM] r40380 - CMSContainer/trunk/CMSContainer_Portlets/portlets-poll/config/builders/poll
Author: fpunt Date: 2010-01-07 11:46:10 +0100 (Thu, 07 Jan 2010) New Revision: 40380 Modified: CMSContainer/trunk/CMSContainer_Portlets/portlets-poll/config/builders/poll/pollchoice.xml Log: CMSC-1597 The counter field of the poll choice had as base type "created" which will put the current timestamp in it. When of course was not how it should work. It breaks on default value, since "created" fields are read only. The field now has base type integer, which it should be. Modified: CMSContainer/trunk/CMSContainer_Portlets/portlets-poll/config/builders/poll/pollchoice.xml === --- CMSContainer/trunk/CMSContainer_Portlets/portlets-poll/config/builders/poll/pollchoice.xml 2010-01-07 09:38:23 UTC (rev 40379) +++ CMSContainer/trunk/CMSContainer_Portlets/portlets-poll/config/builders/poll/pollchoice.xml 2010-01-07 10:46:10 UTC (rev 40380) @@ -55,7 +55,7 @@ 4 -http://www.mmbase.org/xmlns/datatypes";> +http://www.mmbase.org/xmlns/datatypes";> ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE SCM] r40379 - CMSContainer/trunk/CMSContainer_Demo/demo.cmscontainer.org/war-community/src/webapp/META-INF
Author: kevinshen Date: 2010-01-07 10:38:23 +0100 (Thu, 07 Jan 2010) New Revision: 40379 Modified: CMSContainer/trunk/CMSContainer_Demo/demo.cmscontainer.org/war-community/src/webapp/META-INF/context.xml Log: CMSC-1539 CAS single sign-on implementation Modified: CMSContainer/trunk/CMSContainer_Demo/demo.cmscontainer.org/war-community/src/webapp/META-INF/context.xml === --- CMSContainer/trunk/CMSContainer_Demo/demo.cmscontainer.org/war-community/src/webapp/META-INF/context.xml 2010-01-07 09:37:40 UTC (rev 40378) +++ CMSContainer/trunk/CMSContainer_Demo/demo.cmscontainer.org/war-community/src/webapp/META-INF/context.xml 2010-01-07 09:38:23 UTC (rev 40379) @@ -126,8 +126,7 @@ - ldap://192.168.4.67:389"; type="java.lang.String" /> - + ldap://192.168.4.67"; type="java.lang.String" /> ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE SCM] r40378 - CMSContainer/trunk/CMSContainer_Modules/community/src/webapp/WEB-INF
Author: kevinshen Date: 2010-01-07 10:37:40 +0100 (Thu, 07 Jan 2010) New Revision: 40378 Modified: CMSContainer/trunk/CMSContainer_Modules/community/src/webapp/WEB-INF/spring-community.xml CMSContainer/trunk/CMSContainer_Modules/community/src/webapp/WEB-INF/web.xml Log: CMSC-1539 CAS single sign-on implementation Modified: CMSContainer/trunk/CMSContainer_Modules/community/src/webapp/WEB-INF/spring-community.xml === --- CMSContainer/trunk/CMSContainer_Modules/community/src/webapp/WEB-INF/spring-community.xml 2010-01-07 09:07:53 UTC (rev 40377) +++ CMSContainer/trunk/CMSContainer_Modules/community/src/webapp/WEB-INF/spring-community.xml 2010-01-07 09:37:40 UTC (rev 40378) @@ -98,7 +98,6 @@ $env{ldap.url} - Modified: CMSContainer/trunk/CMSContainer_Modules/community/src/webapp/WEB-INF/web.xml === --- CMSContainer/trunk/CMSContainer_Modules/community/src/webapp/WEB-INF/web.xml 2010-01-07 09:07:53 UTC (rev 40377) +++ CMSContainer/trunk/CMSContainer_Modules/community/src/webapp/WEB-INF/web.xml 2010-01-07 09:37:40 UTC (rev 40378) @@ -361,9 +361,8 @@ true - + - Returns xml content CommunityLogoutServlet com.finalist.cmsc.community.servlet.CommunityLogoutServlet 5 ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE SCM] r40377 - CMSContainer/trunk/CMSContainer_Demo/demo.cmscontainer.org/war-community/src/webapp/WEB-INF
Author: kevinshen Date: 2010-01-07 10:07:53 +0100 (Thu, 07 Jan 2010) New Revision: 40377 Modified: CMSContainer/trunk/CMSContainer_Demo/demo.cmscontainer.org/war-community/src/webapp/WEB-INF/web.xml Log: CMSC-1539 CAS single sign-on implementation Modified: CMSContainer/trunk/CMSContainer_Demo/demo.cmscontainer.org/war-community/src/webapp/WEB-INF/web.xml === --- CMSContainer/trunk/CMSContainer_Demo/demo.cmscontainer.org/war-community/src/webapp/WEB-INF/web.xml 2010-01-07 08:23:14 UTC (rev 40376) +++ CMSContainer/trunk/CMSContainer_Demo/demo.cmscontainer.org/war-community/src/webapp/WEB-INF/web.xml 2010-01-07 09:07:53 UTC (rev 40377) @@ -374,6 +374,19 @@ true + + + +
[MMBASE SCM] r40376 - CMSContainer/trunk/CMSContainer/cmsc/portal/src/java/com/finalist/cmsc/portalImpl
Author: kevinshen Date: 2010-01-07 09:23:14 +0100 (Thu, 07 Jan 2010) New Revision: 40376 Modified: CMSContainer/trunk/CMSContainer/cmsc/portal/src/java/com/finalist/cmsc/portalImpl/SecurePortalServlet.java Log: CMSC-1539 CAS single sign-on implementation Modified: CMSContainer/trunk/CMSContainer/cmsc/portal/src/java/com/finalist/cmsc/portalImpl/SecurePortalServlet.java === --- CMSContainer/trunk/CMSContainer/cmsc/portal/src/java/com/finalist/cmsc/portalImpl/SecurePortalServlet.java 2010-01-07 08:17:19 UTC (rev 40375) +++ CMSContainer/trunk/CMSContainer/cmsc/portal/src/java/com/finalist/cmsc/portalImpl/SecurePortalServlet.java 2010-01-07 08:23:14 UTC (rev 40376) @@ -7,8 +7,14 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.mmbase.bridge.Cloud; +import org.mmbase.bridge.Node; +import org.mmbase.bridge.util.CloudUtil; import com.finalist.cmsc.beans.om.NavigationItem; +import com.finalist.cmsc.navigation.NavigationUtil; +import com.finalist.cmsc.security.SecurityUtil; +import com.finalist.cmsc.security.UserRole; import com.finalist.cmsc.services.sitemanagement.SiteManagement; import com.finalist.cmsc.util.HttpUtil; @@ -24,9 +30,14 @@ log.debug("Page: allowed to see"); return super.doRender(request, response, path); } - - response.sendRedirect(this.getServletContext().getInitParameter("casServerLoginUrl")+"?service="+HttpUtil.getWebappUri(request)+path); - + Cloud cloud = CloudUtil.getCloudFromThread(); + Node node = cloud.getNode(item.getId()); + UserRole role = NavigationUtil.getRole(cloud, node, false); + if (SecurityUtil.isWriter(role)) { +return super.doRender(request, response, path); + } + response.sendRedirect(getServletContext().getInitParameter("casServerLoginUrl")+"?service="+HttpUtil.getWebappUri(request)+path); + log.warn("Page: not allowed to see, no login page found!"); return false; } ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE SCM] r40375 - CMSContainer/trunk/CMSContainer/cmsc/sitemanagement/src/webapp/editors/secure
Author: billyxie Date: 2010-01-07 09:17:19 +0100 (Thu, 07 Jan 2010) New Revision: 40375 Modified: CMSContainer/trunk/CMSContainer/cmsc/sitemanagement/src/webapp/editors/secure/selectGroup.jsp Log: CMSC-1604 - add two tags and use them. Modified: CMSContainer/trunk/CMSContainer/cmsc/sitemanagement/src/webapp/editors/secure/selectGroup.jsp === --- CMSContainer/trunk/CMSContainer/cmsc/sitemanagement/src/webapp/editors/secure/selectGroup.jsp 2010-01-07 07:38:24 UTC (rev 40374) +++ CMSContainer/trunk/CMSContainer/cmsc/sitemanagement/src/webapp/editors/secure/selectGroup.jsp 2010-01-07 08:17:19 UTC (rev 40375) @@ -33,7 +33,10 @@ - + + + +
[MMBASE SCM] r40283 - in CMSContainer/branches/b1_5/CMSContainer_Templates: double/maven-base single/maven-base
Author: jkoster Date: 2009-12-21 10:47:13 +0100 (Mon, 21 Dec 2009) New Revision: 40283 Modified: CMSContainer/branches/b1_5/CMSContainer_Templates/double/maven-base/project.properties CMSContainer/branches/b1_5/CMSContainer_Templates/single/maven-base/project.properties Log: Templates should use a stable version. Modified: CMSContainer/branches/b1_5/CMSContainer_Templates/double/maven-base/project.properties === --- CMSContainer/branches/b1_5/CMSContainer_Templates/double/maven-base/project.properties 2009-12-21 09:05:05 UTC (rev 40282) +++ CMSContainer/branches/b1_5/CMSContainer_Templates/double/maven-base/project.properties 2009-12-21 09:47:13 UTC (rev 40283) @@ -7,10 +7,10 @@ application.version=1.0-SNAPSHOT -cmsc.version=1.5.12 +cmsc.version=1.5.13 -cmscportlets.version=1.5.12 -cmscmodules.version=1.5.12 +cmscportlets.version=1.5.13 +cmscmodules.version=1.5.13 mmbase.version=1.8.7-20090803 # maven build does not yet generate a rmmci. Did not create one by hand Modified: CMSContainer/branches/b1_5/CMSContainer_Templates/single/maven-base/project.properties === --- CMSContainer/branches/b1_5/CMSContainer_Templates/single/maven-base/project.properties 2009-12-21 09:05:05 UTC (rev 40282) +++ CMSContainer/branches/b1_5/CMSContainer_Templates/single/maven-base/project.properties 2009-12-21 09:47:13 UTC (rev 40283) @@ -7,9 +7,9 @@ application.version=1.0-SNAPSHOT -cmsc.version=1.5.14-SNAPSHOT -cmscportlets.version=1.5.14-SNAPSHOT -cmscmodules.version=1.5.14-SNAPSHOT +cmsc.version=1.5.13 +cmscportlets.version=1.5.13 +cmscmodules.version=1.5.13 mmbase.version=1.8.7-20090803 # maven build does not yet generate a rmmci. Did not create one by hand ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE SCM] r40374 - CMSContainer/trunk/CMSContainer_Modules/community/src/java/com/finalist/cmsc/community/taglib
Author: billyxie Date: 2010-01-07 08:38:24 +0100 (Thu, 07 Jan 2010) New Revision: 40374 Modified: CMSContainer/trunk/CMSContainer_Modules/community/src/java/com/finalist/cmsc/community/taglib/AddAuthorityTag.java Log: CMSC-1604 - add two tags and use them. Modified: CMSContainer/trunk/CMSContainer_Modules/community/src/java/com/finalist/cmsc/community/taglib/AddAuthorityTag.java === --- CMSContainer/trunk/CMSContainer_Modules/community/src/java/com/finalist/cmsc/community/taglib/AddAuthorityTag.java 2010-01-07 07:31:48 UTC (rev 40373) +++ CMSContainer/trunk/CMSContainer_Modules/community/src/java/com/finalist/cmsc/community/taglib/AddAuthorityTag.java 2010-01-07 07:38:24 UTC (rev 40374) @@ -41,7 +41,10 @@ ctx.getAutowireCapableBeanFactory().autowireBeanProperties(this, Autowire.BY_NAME.value(), false); AuthorityService as = getAuthorityService(); - as.createAuthority("", getValue()); + boolean exist = as.authorityExists(getValue()); + if(!exist){ + as.createAuthority("", getValue()); + } } private AuthorityService authorityService; ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE SCM] r40323 - mmbase/branches/MMBase-1_9/core/src/test/java/org/mmbase/bridge/util
Author: michiel Date: 2010-01-04 14:43:05 +0100 (Mon, 04 Jan 2010) New Revision: 40323 Modified: mmbase/branches/MMBase-1_9/core/src/test/java/org/mmbase/bridge/util/QueriesTest.java Log: backported r40315:40319 Modified: mmbase/branches/MMBase-1_9/core/src/test/java/org/mmbase/bridge/util/QueriesTest.java === --- mmbase/branches/MMBase-1_9/core/src/test/java/org/mmbase/bridge/util/QueriesTest.java 2010-01-04 13:42:39 UTC (rev 40322) +++ mmbase/branches/MMBase-1_9/core/src/test/java/org/mmbase/bridge/util/QueriesTest.java 2010-01-04 13:43:05 UTC (rev 40323) @@ -21,7 +21,7 @@ /** - * + * * @author Michiel Meeuwissen * @version $Id$ */ @@ -175,11 +175,28 @@ } + // // Tests below this assume an RMMCI connection // +@Test +public void addToResult() { +//Cloud cloud = getCloudContext().getCloud("mmbase"); +assumeNotNull(remoteCloud); +Cloud cloud = remoteCloud; +Node node = cloud.getNodeManager("news").createNode(); +node.setStringValue("title", "foo"); +node.commit(); +//NodeQuery q = Queries.createRelatedNodesQuery(node, otherNodeManager, role, direction); +NodeQuery q = Queries.createRelatedNodesQuery(node, cloud.getNodeManager("news"), "posrel", "destination"); +StepField pos = q.createStepField(q.getSteps().get(1), "pos"); +Constraint c = q.createConstraint(pos, new Integer(1)); +System.out.println("Query " + q.toSql()); +} + + @Test public void nodeComparationsAndSorting() { assumeNotNull(remoteCloud); @@ -289,7 +306,7 @@ NodeList relatedNodes = Queries.getRelatedNodes(node, cloud.getNodeManager("news"), "posrel", "destination", "pos", "DOWN"); -// implemetnation based on NodeQuery +// implementation based on NodeQuery NodeQuery q = Queries.createRelatedNodesQuery(node, cloud.getNodeManager("news"), "posrel", "destination"); Queries.addSortOrders(q, "posrel.pos,number", "DOWN"); List relatedNodes2 = Queries.getRelatedNodesInTransaction(node, q); // outside a transaction it works too @@ -347,4 +364,53 @@ } + +@Test +public void getRelationNodes() { +assumeNotNull(remoteCloud); +Cloud cloud = remoteCloud; +Node node = cloud.getNode("default.mags"); +// implementation based on NodeQuery +NodeQuery q = Queries.createRelationNodesQuery(node, cloud.getNodeManager("news"), "posrel", "destination"); +Queries.addSortOrders(q, "pos,number", "DOWN"); + +// must basic implementation used by e.g. mm:relatednodes +NodeList relatedNodes = q.getNodeManager().getList(q); + + +List relatedNodes2 = Queries.getRelatedNodesInTransaction(node, q); // outside a transaction it works too + +System.out.println(toString(relatedNodes, null) + " =? " + toString(relatedNodes2, null)); +assertListEqual(relatedNodes, null, relatedNodes2, (String) null); + +int sizeBefore = relatedNodes2.size(); + +// Now for the really insteresting stuff. +{ +// Adding a node + +Transaction t = cloud.getTransaction("relationnodes1"); +Node magNode = t.getNode("default.mags"); +Node newNode = t.getNodeManager("news").createNode(); +newNode.setStringValue("title", "Test node of " + QueriesTest.class.getName()); + +Node newRelation = Queries.addToResult(q, newNode).get(0); + +// +List relatedNodesInTransaction = Queries.getRelatedNodesInTransaction(magNode, q); + +assertEquals(sizeBefore + 1, relatedNodesInTransaction.size()); + +assertTrue(relatedNodesInTransaction.contains(newRelation)); // It should be the relation +assertFalse(relatedNodesInTransaction.contains(newNode)); // Not the related node + + +// order of posrel was DOWN, so this newNode should even be the first one in this list: + +assertEquals(newRelation, relatedNodesInTransaction.get(0)); +t.cancel(); +} + + +} } ___ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs
[MMBASE SCM] r40373 - in CMSContainer/trunk/CMSContainer_Modules/community/src: java/com/finalist/cmsc/community java/com/finalist/cmsc/community/filter java/com/finalist/cmsc/community/servlet java/c
Author: kevinshen Date: 2010-01-07 08:31:48 +0100 (Thu, 07 Jan 2010) New Revision: 40373 Added: CMSContainer/trunk/CMSContainer_Modules/community/src/java/com/finalist/cmsc/community/servlet/ CMSContainer/trunk/CMSContainer_Modules/community/src/java/com/finalist/cmsc/community/servlet/CommunityLogoutServlet.java Modified: CMSContainer/trunk/CMSContainer_Modules/community/src/java/com/finalist/cmsc/community/filter/SingleSignOnFilter.java CMSContainer/trunk/CMSContainer_Modules/community/src/java/com/finalist/cmsc/community/taglib/AbstractSSOTag.java CMSContainer/trunk/CMSContainer_Modules/community/src/java/com/finalist/cmsc/community/taglib/LogLinkTag.java CMSContainer/trunk/CMSContainer_Modules/community/src/tld/community.tld CMSContainer/trunk/CMSContainer_Modules/community/src/webapp/WEB-INF/web.xml Log: CMSC-1539 CAS single sign-on implementation Modified: CMSContainer/trunk/CMSContainer_Modules/community/src/java/com/finalist/cmsc/community/filter/SingleSignOnFilter.java === --- CMSContainer/trunk/CMSContainer_Modules/community/src/java/com/finalist/cmsc/community/filter/SingleSignOnFilter.java 2010-01-07 07:08:56 UTC (rev 40372) +++ CMSContainer/trunk/CMSContainer_Modules/community/src/java/com/finalist/cmsc/community/filter/SingleSignOnFilter.java 2010-01-07 07:31:48 UTC (rev 40373) @@ -112,12 +112,12 @@ Set < String > authoritiesDB =authorityService.getAuthorityNamesForUser(ldapAuthentication.getUserId()); for (Authority authority : ldapAuthentication.getAuthorities()) { - if (!allDBAuthorities.contains(authority)) { + if (!allDBAuthorities.contains(authority.getName())) { authorityService.createAuthority(null, authority.getName()); authenticationService.addAuthorityToUser(ldapAuthentication.getUserId(), authority.getName()); } else { -if (!authoritiesDB.contains(authority)) { +if (!authoritiesDB.contains(authority.getName())) { authenticationService.addAuthorityToUser(ldapAuthentication.getUserId(), authority.getName()); } } Added: CMSContainer/trunk/CMSContainer_Modules/community/src/java/com/finalist/cmsc/community/servlet/CommunityLogoutServlet.java === --- CMSContainer/trunk/CMSContainer_Modules/community/src/java/com/finalist/cmsc/community/servlet/CommunityLogoutServlet.java (rev 0) +++ CMSContainer/trunk/CMSContainer_Modules/community/src/java/com/finalist/cmsc/community/servlet/CommunityLogoutServlet.java 2010-01-07 07:31:48 UTC (rev 40373) @@ -0,0 +1,24 @@ +package com.finalist.cmsc.community.servlet; + +import java.io.IOException; + +import javax.servlet.ServletConfig; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +...@suppresswarnings("serial") +public class CommunityLogoutServlet extends HttpServlet { + + @Override + public void init(ServletConfig config) throws ServletException { + super.init(config); + } + + @Override + public void service(HttpServletRequest request, HttpServletResponse response) throws IOException { + request.getSession().invalidate(); + response.sendRedirect(getServletContext().getInitParameter("casServerLogoutUrl")); + } +} Modified: CMSContainer/trunk/CMSContainer_Modules/community/src/java/com/finalist/cmsc/community/taglib/AbstractSSOTag.java === --- CMSContainer/trunk/CMSContainer_Modules/community/src/java/com/finalist/cmsc/community/taglib/AbstractSSOTag.java 2010-01-07 07:08:56 UTC (rev 40372) +++ CMSContainer/trunk/CMSContainer_Modules/community/src/java/com/finalist/cmsc/community/taglib/AbstractSSOTag.java 2010-01-07 07:31:48 UTC (rev 40373) @@ -13,6 +13,10 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import com.finalist.cmsc.util.ServerUtil; +import com.finalist.pluto.portalImpl.core.PortalEnvironment; +import com.finalist.pluto.portalImpl.core.PortalURL; + public abstract class AbstractSSOTag extends CommunityTagSupport{ private static final Log log = LogFactory.getLog(UseSSOTag.class); @@ -73,6 +77,18 @@ return value; } + protected String getPath() { + PageContext ctx = (PageContext) getJspContext(); + HttpServletRequest request = (HttpServletRequest) ctx.getRequest(); + PortalEnvironment env = PortalEnvironment.getPortalEnvironment(request); + PortalURL currentURL = env.getRequestedPortalURL(); + String path = currentURL.getGlobalNavigationAsString(); + if (ServerUtil.useServerName()) { + path = request.getServerName() + "/" + path
[MMBASE SCM] r40372 - in CMSContainer/trunk/CMSContainer_Modules/community/src: java/com/finalist/cmsc/community/taglib java/com/finalist/cmsc/services/community/security tld
Author: billyxie Date: 2010-01-07 08:08:56 +0100 (Thu, 07 Jan 2010) New Revision: 40372 Added: CMSContainer/trunk/CMSContainer_Modules/community/src/java/com/finalist/cmsc/community/taglib/AddAuthorityTag.java CMSContainer/trunk/CMSContainer_Modules/community/src/java/com/finalist/cmsc/community/taglib/ListLDAPGroupsTag.java Modified: CMSContainer/trunk/CMSContainer_Modules/community/src/java/com/finalist/cmsc/services/community/security/AuthorityLDAPService.java CMSContainer/trunk/CMSContainer_Modules/community/src/tld/community.tld Log: CMSC-1604 - add two tags and use them. Added: CMSContainer/trunk/CMSContainer_Modules/community/src/java/com/finalist/cmsc/community/taglib/AddAuthorityTag.java === --- CMSContainer/trunk/CMSContainer_Modules/community/src/java/com/finalist/cmsc/community/taglib/AddAuthorityTag.java (rev 0) +++ CMSContainer/trunk/CMSContainer_Modules/community/src/java/com/finalist/cmsc/community/taglib/AddAuthorityTag.java 2010-01-07 07:08:56 UTC (rev 40372) @@ -0,0 +1,57 @@ +/** + * + */ +package com.finalist.cmsc.community.taglib; + +import java.io.IOException; + +import javax.servlet.jsp.JspException; +import javax.servlet.jsp.PageContext; +import javax.servlet.jsp.tagext.SimpleTagSupport; + +import org.springframework.beans.factory.annotation.Autowire; +import org.springframework.web.context.WebApplicationContext; +import org.springframework.web.context.support.WebApplicationContextUtils; + +import com.finalist.cmsc.services.community.security.AuthorityService; + + +/** + * @author Billy + * + */ +public class AddAuthorityTag extends SimpleTagSupport { + + private String value; + + + public String getValue() { + return value; + } + + + public void setValue(String value) { + this.value = value; + } + + @Override + public void doTag() throws JspException, IOException { + PageContext pctx = (PageContext) getJspContext(); + WebApplicationContext ctx = WebApplicationContextUtils.getRequiredWebApplicationContext(pctx.getServletContext()); + ctx.getAutowireCapableBeanFactory().autowireBeanProperties(this, Autowire.BY_NAME.value(), false); + + AuthorityService as = getAuthorityService(); + as.createAuthority("", getValue()); + } + + private AuthorityService authorityService; + + public AuthorityService getAuthorityService() { + return authorityService; + } + + public void setAuthorityService(AuthorityService authorityService) { + this.authorityService = authorityService; + } + +} Added: CMSContainer/trunk/CMSContainer_Modules/community/src/java/com/finalist/cmsc/community/taglib/ListLDAPGroupsTag.java === --- CMSContainer/trunk/CMSContainer_Modules/community/src/java/com/finalist/cmsc/community/taglib/ListLDAPGroupsTag.java (rev 0) +++ CMSContainer/trunk/CMSContainer_Modules/community/src/java/com/finalist/cmsc/community/taglib/ListLDAPGroupsTag.java 2010-01-07 07:08:56 UTC (rev 40372) @@ -0,0 +1,60 @@ +package com.finalist.cmsc.community.taglib; + +import java.io.IOException; +import java.util.Set; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.jsp.JspException; +import javax.servlet.jsp.PageContext; +import javax.servlet.jsp.tagext.SimpleTagSupport; + +import org.springframework.beans.factory.annotation.Autowire; +import org.springframework.web.context.WebApplicationContext; +import org.springframework.web.context.support.WebApplicationContextUtils; + +import com.finalist.cmsc.services.community.security.AuthorityLDAPService; +import com.finalist.cmsc.services.community.security.AuthorityService; + +/** + * @author Wouter Heijke + */ +public class ListLDAPGroupsTag extends SimpleTagSupport { + + private String var; + + public void setVar(String var) { + this.var = var; + } + + @Override + public void doTag() throws JspException, IOException { + PageContext pctx = (PageContext) getJspContext(); + WebApplicationContext ctx = WebApplicationContextUtils.getRequiredWebApplicationContext(pctx.getServletContext()); + ctx.getAutowireCapableBeanFactory().autowireBeanProperties(this, Autowire.BY_NAME.value(), false); + HttpServletRequest req = (HttpServletRequest) pctx.getRequest(); + + AuthorityService as = getAuthorityLDAPService(); + Set < String > list = as.getAuthorityNames(); + + if (var != null) { + if (list != null) { +req.setAttribute(var, list); + } else { +req.removeAttribute(var); + } + } else { + pctx.getOut().print(list); + } + } + + private AuthorityLDAPService authorityLDAPService; + + public AuthorityLDAPService getAuthorityLDAPService() { + return authorityLDAPService; + } + + public void setAuthorityLDAPService(Author
[MMBASE SCM] r40371 - CMSContainer/trunk/CMSContainer/cmsc/sitemanagement/src/webapp/editors/secure
Author: billyxie Date: 2010-01-07 08:05:14 +0100 (Thu, 07 Jan 2010) New Revision: 40371 Modified: CMSContainer/trunk/CMSContainer/cmsc/sitemanagement/src/webapp/editors/secure/selectGroup.jsp Log: CMSC-1604 - add two tags and use them. Modified: CMSContainer/trunk/CMSContainer/cmsc/sitemanagement/src/webapp/editors/secure/selectGroup.jsp === --- CMSContainer/trunk/CMSContainer/cmsc/sitemanagement/src/webapp/editors/secure/selectGroup.jsp 2010-01-06 22:49:03 UTC (rev 40370) +++ CMSContainer/trunk/CMSContainer/cmsc/sitemanagement/src/webapp/editors/secure/selectGroup.jsp 2010-01-07 07:05:14 UTC (rev 40371) @@ -33,6 +33,7 @@ +
[MMBASE SCM] r40287 - in CMSContainer/branches/b1_5/CMSContainer/cmsc: sitemanagement/src/java/com/finalist/cmsc/services/sitemanagement utilities/src/java/com/finalist/cmsc/ehcache
Author: jkoster Date: 2009-12-21 11:38:45 +0100 (Mon, 21 Dec 2009) New Revision: 40287 Added: CMSContainer/branches/b1_5/CMSContainer/cmsc/utilities/src/java/com/finalist/cmsc/ehcache/BlockingCacheManager.java Removed: CMSContainer/branches/b1_5/CMSContainer/cmsc/sitemanagement/src/java/com/finalist/cmsc/services/sitemanagement/BlockingCacheManager.java Log: CMSC-1579 - Move file. Deleted: CMSContainer/branches/b1_5/CMSContainer/cmsc/sitemanagement/src/java/com/finalist/cmsc/services/sitemanagement/BlockingCacheManager.java === --- CMSContainer/branches/b1_5/CMSContainer/cmsc/sitemanagement/src/java/com/finalist/cmsc/services/sitemanagement/BlockingCacheManager.java 2009-12-21 10:36:19 UTC (rev 40286) +++ CMSContainer/branches/b1_5/CMSContainer/cmsc/sitemanagement/src/java/com/finalist/cmsc/services/sitemanagement/BlockingCacheManager.java 2009-12-21 10:38:45 UTC (rev 40287) @@ -1,124 +0,0 @@ -package com.finalist.cmsc.services.sitemanagement; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import net.sf.ehcache.CacheException; -import net.sf.ehcache.CacheManager; -import net.sf.ehcache.constructs.blocking.BlockingCache; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -public class BlockingCacheManager { - private static final Log LOG = LogFactory.getLog(BlockingCacheManager.class.getName()); - - /** -* A custom cache manager, in case the user does not -* want to use the default cache manager when -* creating custom caches. -*/ - private static CacheManager manager; - - /** -* A map of BlockingCaches, keyed by cache name -*/ - protected final Map caches; - - - /** -* Empty Constructor -*/ - public BlockingCacheManager() { - caches = new HashMap(); - } - - /** -* Constructor that assigns the cache manager to use when -* creating caches. -*/ - public BlockingCacheManager(CacheManager mgr) { - manager = mgr; - caches = new HashMap(); - } - - /** -* Creates a cache. -*/ - public BlockingCache getCache(final String name) throws CacheException { - // Lookup the cache - BlockingCache blockingCache = (BlockingCache) caches.get(name); - if (blockingCache != null) { - return blockingCache; - } - - // Create the cache - synchronized (this) { - if (manager == null) { - //blockingCache = new BlockingCache(new CacheManager().getCache(name)); - //Create single CacheManager instance - blockingCache = new BlockingCache(CacheManager.create().getCache(name)); - } else { - blockingCache = new BlockingCache(manager.getCache(name)); - } - - caches.put(name, blockingCache); - return blockingCache; - } - } - - /** -* Drops the contents of all caches. -*/ - public void clearAll() throws CacheException { - final List cacheList = getCaches(); - if (LOG.isDebugEnabled()) { - LOG.debug("Removing all blocking caches"); - } - for (int i = 0; i < cacheList.size(); i++) { - final BlockingCache cache = (BlockingCache) cacheList.get(i); - cache.removeAll(); - } - } - - /** -* Drops the contents of a named cache. -*/ - public void clear(final String name) throws CacheException { - final BlockingCache blockingCache = (BlockingCache) getCache(name); - if (LOG.isDebugEnabled()) { - LOG.debug("Clearing " + name); - } - blockingCache.removeAll(); - } - - /** -* Returns the EHCache Cache Manager used in creating Blocking Caches. -* -* @return The cache manager -*/ - protected CacheManager getCacheManager() { - return manager; - } - - /** -* Sets the EHCache Cache Manager used in creating blocking caches. -* -* @param mgr The new manager to use -*/ - protected void setCacheManager(CacheManager mgr) { - manager = mgr; - } - - /** -* Builds the set of caches. -* Returns a copy so that the monitor can be released. -*/ - private synchronized List getCaches() { - final ArrayList blockingCaches = new ArrayList(); - blockingCaches.addAll(this.caches.values()); - return blockingCaches; - } -} Copied: CMSContainer/branches/b1_5/CMSContainer/cmsc/utilities/src/java/com/finalist/cmsc/ehcache/BlockingCacheManager.java (from rev 40286, CMSContainer/branches/b1_5/CMSContainer/cmsc/sitemanagement/src/java/com/finalist/cmsc/services/sitemanagement/BlockingCacheManager.java) === --- CMSContainer/branches/b1_5/CMSContainer/cmsc/utilities/src/java/com/finalist/cmsc/ehcache/BlockingCacheManager.java (rev 0) +++ CMSContainer/bran