Return-Path: Delivered-To: apmail-portals-jetspeed-dev-archive@www.apache.org Received: (qmail 87260 invoked from network); 22 Mar 2008 21:57:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Mar 2008 21:57:15 -0000 Received: (qmail 30722 invoked by uid 500); 22 Mar 2008 21:57:13 -0000 Delivered-To: apmail-portals-jetspeed-dev-archive@portals.apache.org Received: (qmail 30694 invoked by uid 500); 22 Mar 2008 21:57:13 -0000 Mailing-List: contact jetspeed-dev-help@portals.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Jetspeed Developers List" Delivered-To: mailing list jetspeed-dev@portals.apache.org Received: (qmail 30683 invoked by uid 99); 22 Mar 2008 21:57:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 22 Mar 2008 14:57:12 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 22 Mar 2008 21:56:34 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 732B01A9832; Sat, 22 Mar 2008 14:56:45 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r640090 - in /portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src: main/java/org/apache/jetspeed/components/portletentity/ test/java/org/apache/jetspeed/ test/java/org/apache/jetspeed/request/ test/resources/ Date: Sat, 22 Mar 2008 21:56:44 -0000 To: jetspeed-dev@portals.apache.org From: ate@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080322215645.732B01A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: ate Date: Sat Mar 22 14:56:44 2008 New Revision: 640090 URL: http://svn.apache.org/viewvc?rev=640090&view=rev Log: Fix for TestPortletEntityDAO: PortletEntityImpl requires RequestContextComponent to be set Added: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/request/ portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/request/MockRequestContextComponent.java (with props) Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletentity/PortletEntityImpl.java portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/ (props changed) portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/resources/registry-test.xml Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletentity/PortletEntityImpl.java URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletentity/PortletEntityImpl.java?rev=640090&r1=640089&r2=640090&view=diff ============================================================================== --- portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletentity/PortletEntityImpl.java (original) +++ portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletentity/PortletEntityImpl.java Sat Mar 22 14:56:44 2008 @@ -533,6 +533,10 @@ return new PortletEntityUserPrincipal(NO_PRINCIPAL); } RequestContext rc = rcc.getRequestContext(); + if (rc == null) + { + return new PortletEntityUserPrincipal(NO_PRINCIPAL); + } Principal principal = rc.getUserPrincipal(); if (principal == null) { Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Sat Mar 22 14:56:44 2008 @@ -1,2 +1,2 @@ -target +target surefire*.properties Added: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/request/MockRequestContextComponent.java URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/request/MockRequestContextComponent.java?rev=640090&view=auto ============================================================================== --- portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/request/MockRequestContextComponent.java (added) +++ portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/request/MockRequestContextComponent.java Sat Mar 22 14:56:44 2008 @@ -0,0 +1,48 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.jetspeed.request; + +import javax.servlet.ServletConfig; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +/** + * @version $Id$ + * + */ +public class MockRequestContextComponent implements RequestContextComponent +{ + + public RequestContext create(HttpServletRequest req, HttpServletResponse resp, ServletConfig config) + { + return null; + } + + public RequestContext getRequestContext(HttpServletRequest request) + { + return null; + } + + public RequestContext getRequestContext() + { + return null; + } + + public void release(RequestContext context) + { + } +} Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/request/MockRequestContextComponent.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/request/MockRequestContextComponent.java ------------------------------------------------------------------------------ svn:keywords = Id Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/request/MockRequestContextComponent.java ------------------------------------------------------------------------------ svn:mime-type = text/plain Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/resources/registry-test.xml URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/resources/registry-test.xml?rev=640090&r1=640089&r2=640090&view=diff ============================================================================== --- portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/resources/registry-test.xml (original) +++ portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/resources/registry-test.xml Sat Mar 22 14:56:44 2008 @@ -1,34 +1,34 @@ - - - - - - - - - - - - - JETSPEED-INF/ojb/registry_repository.xml - - - + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + + + + + + + + + + JETSPEED-INF/ojb/registry_repository.xml + + + @@ -42,72 +42,77 @@ - - - - - org.apache.jetspeed.components.portletregistry.PortletRegistry - - - - - - - - PROPAGATION_REQUIRED,-org.apache.jetspeed.components.portletregistry.RegistryException - PROPAGATION_REQUIRED,-org.apache.jetspeed.components.portletregistry.RegistryException - PROPAGATION_REQUIRED,-org.apache.jetspeed.components.portletregistry.RegistryException - PROPAGATION_REQUIRED,-org.apache.jetspeed.components.portletregistry.RegistryException - PROPAGATION_SUPPORTS - - - - - - - - - - - - - - - org.apache.jetspeed.components.portletentity.PortletEntityAccessComponent - - - - - - - - PROPAGATION_REQUIRED - PROPAGATION_REQUIRED,-org.apache.jetspeed.components.portletentity.PortletEntityNotStoredException - PROPAGATION_SUPPORTS - - - - - - - - setEntityAccessProxy - - - - - - - - + + + + + + + org.apache.jetspeed.components.portletregistry.PortletRegistry + + + + + + + + PROPAGATION_REQUIRED,-org.apache.jetspeed.components.portletregistry.RegistryException + PROPAGATION_REQUIRED,-org.apache.jetspeed.components.portletregistry.RegistryException + PROPAGATION_REQUIRED,-org.apache.jetspeed.components.portletregistry.RegistryException + PROPAGATION_REQUIRED,-org.apache.jetspeed.components.portletregistry.RegistryException + PROPAGATION_SUPPORTS + + + + + + + + + + + + + + + + + + org.apache.jetspeed.components.portletentity.PortletEntityAccessComponent + + + + + + + + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED,-org.apache.jetspeed.components.portletentity.PortletEntityNotStoredException + PROPAGATION_SUPPORTS + + + + + + + + setEntityAccessProxy + + + + + + + + --------------------------------------------------------------------- To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org For additional commands, e-mail: jetspeed-dev-help@portals.apache.org