You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by hl...@apache.org on 2005/03/10 14:24:39 UTC
cvs commit: jakarta-tapestry/portlet/target/module-lib/compile/hivemind hivemind-1.1-alpha-3-snapshot.jar
hlship 2005/03/10 05:24:38
Modified: framework/src/java/org/apache/tapestry/engine
HomeService.java
. status.xml build.xml .classpath
contrib build.xml
framework/src/java/org/apache/tapestry/web WebRequest.java
ServletWebRequest.java
framework/src/descriptor/META-INF tapestry.request.xml
tapestry.services.xml
framework build.xml
src/documentation/content/xdocs/UsersGuide configuration.xml
examples/Workbench build.xml
Added: portlet/target/module-lib/compile/commons-lang
commons-lang-2.0.jar
portlet/src/java/org/apache/tapestry/portlet
PortletMessages.java PortletStrings.properties
PortletWebRequest.java PortletWebSession.java
portlet/target/module-lib/test/easymock easymock-1.1.jar
portlet/target/test-classes/org/apache/tapestry/portlet
TestPortletWebRequest.class
BasePortletWebTestCase.class
TestPortletWebSession.class
portlet/src/test/org/apache/tapestry/portlet
TestPortletWebRequest.java
TestPortletWebSession.java
BasePortletWebTestCase.java
portlet/target/classes/org/apache/tapestry/portlet
PortletMessages.class PortletStrings.properties
PortletWebRequest.class PortletWebSession.class
portlet/target/module-lib/test/easymockclassextension
easymockclassextension-1.1.jar
portlet/target/module-lib/test/junit junit-3.8.1.jar
portlet/src/descriptor/META-INF hivemodule.xml
portlet/target/module-lib/test/cglib-full
cglib-full-2.0.2.jar
portlet/target/module-lib/compile/portlet-api
portlet-api-1.0.jar
portlet/target/module-lib/compile/hivemind-lib
hivemind-lib-1.1-alpha-3-snapshot.jar
portlet/target/module-lib/compile/tapestry
tapestry-3.1-alpha-2-snapshot.jar
portlet build.xml
portlet/target/module-lib/compile/commons-codec
commons-codec-1.3.jar
portlet/target/module-lib/compile/ognl ognl-2.6.7.jar
portlet/target/module-lib/compile/commons-logging
commons-logging-1.0.4.jar
portlet/target/module-lib/compile/hivemind
hivemind-1.1-alpha-3-snapshot.jar
Log:
Begin adding JSR-168 Portlet support.
Revision Changes Path
1.1 jakarta-tapestry/portlet/target/module-lib/compile/commons-lang/commons-lang-2.0.jar
<<Binary file>>
1.9 +11 -1 jakarta-tapestry/framework/src/java/org/apache/tapestry/engine/HomeService.java
Index: HomeService.java
===================================================================
RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/engine/HomeService.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- HomeService.java 28 Jan 2005 21:07:15 -0000 1.8
+++ HomeService.java 10 Mar 2005 13:23:27 -0000 1.9
@@ -47,6 +47,10 @@
private LinkFactory _linkFactory;
+ /** @since 3.1 */
+
+ private String _pageName;
+
public ILink getLink(IRequestCycle cycle, Object parameter)
{
if (parameter != null)
@@ -62,7 +66,7 @@
public void service(IRequestCycle cycle, ResponseOutputStream output) throws ServletException,
IOException
{
- cycle.activate(TapestryConstants.HOME_PAGE);
+ cycle.activate(_pageName);
_responseRenderer.renderResponse(cycle, output);
}
@@ -83,4 +87,10 @@
{
_linkFactory = linkFactory;
}
+
+ /** @since 3.1 */
+ public void setPageName(String pageName)
+ {
+ _pageName = pageName;
+ }
}
\ No newline at end of file
1.78 +1 -0 jakarta-tapestry/status.xml
Index: status.xml
===================================================================
RCS file: /home/cvs/jakarta-tapestry/status.xml,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -r1.77 -r1.78
--- status.xml 28 Feb 2005 18:44:51 -0000 1.77
+++ status.xml 10 Mar 2005 13:23:27 -0000 1.78
@@ -57,6 +57,7 @@
<action type="update" dev="HLS"> Upgrade to HiveMind 1.1-alpha-2. </action>
<action type="update" dev="HLS"> Coordinate Locale changes with the hivemind.ThreadLocale service. </action>
<action type="add" dev="HLS"> Add lookup mechanism for determine page class from page name. </action>
+ <action type="add" dev="HLS"> Allow the name of the initial page to be overriden using the org.apache.tapestry.home-page application property. </action>
</release>
<release version="3.1-alpha-1" date="Feb 21 2005">
<action type="update" dev="HLS"> Remove dependencies on Jakarta digester, collections and beanutils. Add dependency on Jakarta HiveMind. </action>
1.105 +1 -1 jakarta-tapestry/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-tapestry/build.xml,v
retrieving revision 1.104
retrieving revision 1.105
diff -u -r1.104 -r1.105
--- build.xml 5 Jan 2005 23:17:27 -0000 1.104
+++ build.xml 10 Mar 2005 13:23:27 -0000 1.105
@@ -22,7 +22,7 @@
<filelist id="project.modules"
dir="."
- files="framework/build.xml contrib/build.xml examples/Workbench/build.xml"/>
+ files="framework/build.xml portlet/build.xml contrib/build.xml examples/Workbench/build.xml"/>
<import file="${hivebuild.dir}/project.xml"/>
<import file="${hivebuild.dir}/license-report.xml"/>
1.73 +4 -0 jakarta-tapestry/.classpath
Index: .classpath
===================================================================
RCS file: /home/cvs/jakarta-tapestry/.classpath,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -r1.72 -r1.73
--- .classpath 8 Mar 2005 22:36:40 -0000 1.72
+++ .classpath 10 Mar 2005 13:23:27 -0000 1.73
@@ -2,6 +2,8 @@
<classpath>
<classpathentry kind="src" path="framework/src/java"/>
<classpathentry kind="src" path="framework/src/test"/>
+ <classpathentry kind="src" path="portlet/src/java"/>
+ <classpathentry kind="src" path="portlet/src/test"/>
<classpathentry kind="src" path="contrib/src/java"/>
<classpathentry kind="src" path="contrib/src/test"/>
<classpathentry kind="src" path="examples/Workbench/src/java"/>
@@ -29,5 +31,7 @@
<classpathentry kind="lib" path="ext-package/lib/jboss-j2ee-3.2.1.jar"/>
<classpathentry kind="lib" path="ext-package/lib/hivemind-1.1-alpha-3-snapshot.jar"/>
<classpathentry kind="lib" path="ext-package/lib/hivemind-lib-1.1-alpha-3-snapshot.jar"/>
+ <classpathentry kind="lib" path="portlet/src/descriptor"/>
+ <classpathentry kind="lib" path="ext-package/lib/portlet-api-1.0.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
1.1 jakarta-tapestry/portlet/src/java/org/apache/tapestry/portlet/PortletMessages.java
Index: PortletMessages.java
===================================================================
// Copyright 2005 The Apache Software Foundation
//
// Licensed 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.tapestry.portlet;
import org.apache.hivemind.impl.MessageFormatter;
/**
* @author Howard M. Lewis Ship
* @since 3.1
*/
class PortletMessages
{
private static final MessageFormatter _formatter = new MessageFormatter(PortletMessages.class,
"PortletStrings");
public static String unsupportedMethod(String methodName)
{
return _formatter.format("unsupported-method", methodName);
}
}
1.1 jakarta-tapestry/portlet/src/java/org/apache/tapestry/portlet/PortletStrings.properties
Index: PortletStrings.properties
===================================================================
# Copyright 2005 The Apache Software Foundation
#
# Licensed 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.
unsupported-method=Method {0}() is not supported for portlet requests.
1.1 jakarta-tapestry/portlet/src/java/org/apache/tapestry/portlet/PortletWebRequest.java
Index: PortletWebRequest.java
===================================================================
// Copyright 2005 The Apache Software Foundation
//
// Licensed 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.tapestry.portlet;
import java.util.List;
import javax.portlet.PortletRequest;
import javax.portlet.PortletSession;
import org.apache.hivemind.util.Defense;
import org.apache.tapestry.web.WebRequest;
import org.apache.tapestry.web.WebSession;
import org.apache.tapestry.web.WebUtils;
/**
* Implementation of {@link org.apache.tapestry.web.WebRequest}that adapts a
* {@link PortletRequest).
*
* @author Howard M. Lewis Ship
* @since 3.1
*/
public class PortletWebRequest implements WebRequest
{
private final PortletRequest _portletRequest;
private WebSession _webSession;
public PortletWebRequest(PortletRequest portletRequest)
{
Defense.notNull(portletRequest, "portletRequest");
_portletRequest = portletRequest;
}
public List getParameterNames()
{
return WebUtils.toSortedList(_portletRequest.getParameterNames());
}
public String getParameterValue(String parameterName)
{
return _portletRequest.getParameter(parameterName);
}
public String[] getParameterValues(String parameterName)
{
return _portletRequest.getParameterValues(parameterName);
}
public String getContextPath()
{
return _portletRequest.getContextPath();
}
public WebSession getSession(boolean create)
{
if (_webSession != null)
return _webSession;
PortletSession session = _portletRequest.getPortletSession(create);
if (session != null)
_webSession = new PortletWebSession(session);
return _webSession;
}
public String getScheme()
{
return _portletRequest.getScheme();
}
public String getServerName()
{
return _portletRequest.getServerName();
}
public int getServerPort()
{
return _portletRequest.getServerPort();
}
/**
* Returns "<PortletRequest>", because portlets don't have a notion of request URI.
*/
public String getRequestURI()
{
return "<PortletRequest>";
}
public void forward(String URL)
{
unsupported("forward");
}
public String getActivationPath()
{
return "";
}
public List getAttributeNames()
{
return WebUtils.toSortedList(_portletRequest.getAttributeNames());
}
public Object getAttribute(String name)
{
return _portletRequest.getAttribute(name);
}
public void setAttribute(String name, Object attribute)
{
if (attribute == null)
_portletRequest.removeAttribute(name);
else
_portletRequest.setAttribute(name, attribute);
}
protected final void unsupported(String methodName)
{
throw new UnsupportedOperationException(PortletMessages.unsupportedMethod(methodName));
}
}
1.1 jakarta-tapestry/portlet/src/java/org/apache/tapestry/portlet/PortletWebSession.java
Index: PortletWebSession.java
===================================================================
// Copyright 2005 The Apache Software Foundation
//
// Licensed 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.tapestry.portlet;
import java.util.List;
import javax.portlet.PortletSession;
import org.apache.hivemind.util.Defense;
import org.apache.tapestry.web.WebSession;
import org.apache.tapestry.web.WebUtils;
/**
* Adapts a {@link javax.portlet.PortletSession}as a {@link org.apache.tapestry.web.WebSession}.
*
* @author Howard M. Lewis Ship
* @since 3.1
*/
public class PortletWebSession implements WebSession
{
private final PortletSession _portletSession;
public PortletWebSession(final PortletSession portletSession)
{
Defense.notNull(portletSession, "portletSession");
_portletSession = portletSession;
}
public String getId()
{
return _portletSession.getId();
}
public boolean isNew()
{
return _portletSession.isNew();
}
public List getAttributeNames()
{
return WebUtils.toSortedList(_portletSession.getAttributeNames());
}
public Object getAttribute(String name)
{
return _portletSession.getAttribute(name);
}
public void setAttribute(String name, Object attribute)
{
if (attribute == null)
_portletSession.removeAttribute(name);
else
_portletSession.setAttribute(name, attribute);
}
}
1.1 jakarta-tapestry/portlet/target/module-lib/test/easymock/easymock-1.1.jar
<<Binary file>>
1.1 jakarta-tapestry/portlet/target/test-classes/org/apache/tapestry/portlet/TestPortletWebRequest.class
<<Binary file>>
1.1 jakarta-tapestry/portlet/target/test-classes/org/apache/tapestry/portlet/BasePortletWebTestCase.class
<<Binary file>>
1.1 jakarta-tapestry/portlet/target/test-classes/org/apache/tapestry/portlet/TestPortletWebSession.class
<<Binary file>>
1.1 jakarta-tapestry/portlet/src/test/org/apache/tapestry/portlet/TestPortletWebRequest.java
Index: TestPortletWebRequest.java
===================================================================
// Copyright 2005 The Apache Software Foundation
//
// Licensed 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.tapestry.portlet;
import java.util.List;
import javax.portlet.PortletRequest;
import javax.portlet.PortletResponse;
import javax.portlet.PortletSession;
import org.apache.tapestry.web.WebRequest;
import org.apache.tapestry.web.WebSession;
import org.easymock.MockControl;
/**
* Tests for {@link org.apache.tapestry.web.PortletWebRequest}.
*
* @author Howard M. Lewis Ship
* @since 3.1
*/
public class TestPortletWebRequest extends BasePortletWebTestCase
{
private PortletRequest newRequest()
{
return (PortletRequest) newMock(PortletRequest.class);
}
private PortletResponse newResponse()
{
return (PortletResponse) newMock(PortletResponse.class);
}
public void testGetParameterNames()
{
MockControl control = newControl(PortletRequest.class);
PortletRequest request = (PortletRequest) control.getMock();
request.getParameterNames();
control.setReturnValue(newEnumeration());
replayControls();
WebRequest wr = new PortletWebRequest(request);
List l = wr.getParameterNames();
checkList(l);
verifyControls();
}
public void testGetParameterValue()
{
String value = "William Orbit";
MockControl control = newControl(PortletRequest.class);
PortletRequest request = (PortletRequest) control.getMock();
request.getParameter("artist");
control.setReturnValue(value);
replayControls();
WebRequest wr = new PortletWebRequest(request);
assertSame(value, wr.getParameterValue("artist"));
verifyControls();
}
public void testGetParameterValues()
{
String[] values =
{ "William Orbit", "Steely Dan" };
MockControl control = newControl(PortletRequest.class);
PortletRequest request = (PortletRequest) control.getMock();
request.getParameterValues("artist");
control.setReturnValue(values);
replayControls();
WebRequest wr = new PortletWebRequest(request);
assertSame(values, wr.getParameterValues("artist"));
verifyControls();
}
public void testGetContextPath()
{
MockControl control = newControl(PortletRequest.class);
PortletRequest request = (PortletRequest) control.getMock();
request.getContextPath();
control.setReturnValue("/foo");
replayControls();
WebRequest wr = new PortletWebRequest(request);
assertEquals("/foo", wr.getContextPath());
verifyControls();
}
public void testGetAttributeNames()
{
MockControl control = newControl(PortletRequest.class);
PortletRequest request = (PortletRequest) control.getMock();
request.getAttributeNames();
control.setReturnValue(newEnumeration());
replayControls();
WebRequest wr = new PortletWebRequest(request);
List l = wr.getAttributeNames();
checkList(l);
verifyControls();
}
public void testGetAttribute()
{
Object attribute = new Object();
MockControl control = newControl(PortletRequest.class);
PortletRequest request = (PortletRequest) control.getMock();
request.getAttribute("attr");
control.setReturnValue(attribute);
replayControls();
WebRequest wr = new PortletWebRequest(request);
assertSame(attribute, wr.getAttribute("attr"));
verifyControls();
}
public void testSetAttribute()
{
Object attribute = new Object();
MockControl control = newControl(PortletRequest.class);
PortletRequest request = (PortletRequest) control.getMock();
request.setAttribute("name", attribute);
replayControls();
WebRequest wr = new PortletWebRequest(request);
wr.setAttribute("name", attribute);
verifyControls();
}
public void testSetAttributeToNull()
{
MockControl control = newControl(PortletRequest.class);
PortletRequest request = (PortletRequest) control.getMock();
request.removeAttribute("tonull");
replayControls();
WebRequest wr = new PortletWebRequest(request);
wr.setAttribute("tonull", null);
verifyControls();
}
public void testGetSession()
{
MockControl control = newControl(PortletRequest.class);
PortletRequest request = (PortletRequest) control.getMock();
PortletSession session = (PortletSession) newMock(PortletSession.class);
request.getPortletSession(false);
control.setReturnValue(null);
// Get it, doesn't exist, wreate false
replayControls();
WebRequest wr = new PortletWebRequest(request);
assertNull(wr.getSession(false));
verifyControls();
request.getPortletSession(true);
control.setReturnValue(session);
// #2: Get it, wreate is true, it is wreated.
replayControls();
WebSession cs = wr.getSession(true);
verifyControls();
// #3: Cached in local variable, make sure same
// think returned.
replayControls();
assertSame(cs, wr.getSession(false));
verifyControls();
}
public void testGetScheme()
{
MockControl control = newControl(PortletRequest.class);
PortletRequest request = (PortletRequest) control.getMock();
request.getScheme();
control.setReturnValue("http");
replayControls();
WebRequest wr = new PortletWebRequest(request);
assertEquals("http", wr.getScheme());
verifyControls();
}
public void testGetServerName()
{
MockControl control = newControl(PortletRequest.class);
PortletRequest request = (PortletRequest) control.getMock();
request.getServerName();
control.setReturnValue("www.myhost.com");
replayControls();
WebRequest wr = new PortletWebRequest(request);
assertEquals("www.myhost.com", wr.getServerName());
verifyControls();
}
public void testGetServerPort()
{
MockControl control = newControl(PortletRequest.class);
PortletRequest request = (PortletRequest) control.getMock();
request.getServerPort();
control.setReturnValue(80);
replayControls();
WebRequest wr = new PortletWebRequest(request);
assertEquals(80, wr.getServerPort());
verifyControls();
}
public void testGetRequestURIUnsupported()
{
PortletRequest request = newRequest();
replayControls();
WebRequest wr = new PortletWebRequest(request);
assertEquals("<PortletRequest>", wr.getRequestURI());
verifyControls();
}
public void testForwardUnsupported()
{
PortletRequest request = newRequest();
replayControls();
WebRequest wr = new PortletWebRequest(request);
try
{
wr.forward(null);
unreachable();
}
catch (UnsupportedOperationException ex)
{
// Expected.
}
verifyControls();
}
}
1.1 jakarta-tapestry/portlet/src/test/org/apache/tapestry/portlet/TestPortletWebSession.java
Index: TestPortletWebSession.java
===================================================================
// Copyright 2005 The Apache Software Foundation
//
// Licensed 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.tapestry.portlet;
import java.util.List;
import javax.portlet.PortletSession;
import org.apache.tapestry.portlet.PortletWebSession;
import org.apache.tapestry.web.WebSession;
import org.easymock.MockControl;
/**
* Tests for {@link org.apache.tapestry.portlet.PortletWebSession}.
*
* @author Howard M. Lewis Ship
* @since 3.1
*/
public class TestPortletWebSession extends BasePortletWebTestCase
{
public void testGetAttributeNames()
{
MockControl control = newControl(PortletSession.class);
PortletSession session = (PortletSession) control.getMock();
session.getAttributeNames();
control.setReturnValue(newEnumeration());
replayControls();
WebSession ws = new PortletWebSession(session);
List l = ws.getAttributeNames();
checkList(l);
verifyControls();
}
public void testGetAttribute()
{
Object attribute = new Object();
MockControl control = newControl(PortletSession.class);
PortletSession session = (PortletSession) control.getMock();
session.getAttribute("attr");
control.setReturnValue(attribute);
replayControls();
WebSession ws = new PortletWebSession(session);
assertSame(attribute, ws.getAttribute("attr"));
verifyControls();
}
public void testSetAttribute()
{
Object attribute = new Object();
MockControl control = newControl(PortletSession.class);
PortletSession session = (PortletSession) control.getMock();
session.setAttribute("name", attribute);
replayControls();
WebSession ws = new PortletWebSession(session);
ws.setAttribute("name", attribute);
verifyControls();
}
public void testSetAttributeToNull()
{
MockControl control = newControl(PortletSession.class);
PortletSession session = (PortletSession) control.getMock();
session.removeAttribute("tonull");
replayControls();
WebSession ws = new PortletWebSession(session);
ws.setAttribute("tonull", null);
verifyControls();
}
public void testGetId()
{
MockControl control = newControl(PortletSession.class);
PortletSession session = (PortletSession) control.getMock();
session.getId();
control.setReturnValue("abc");
replayControls();
WebSession ws = new PortletWebSession(session);
assertEquals("abc", ws.getId());
verifyControls();
}
}
1.1 jakarta-tapestry/portlet/src/test/org/apache/tapestry/portlet/BasePortletWebTestCase.java
Index: BasePortletWebTestCase.java
===================================================================
// Copyright 2005 The Apache Software Foundation
//
// Licensed 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.tapestry.portlet;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Enumeration;
import java.util.List;
import org.apache.hivemind.test.HiveMindTestCase;
/**
* @author Howard M. Lewis Ship
* @since 3.1
*/
public class BasePortletWebTestCase extends HiveMindTestCase
{
protected Enumeration newEnumeration()
{
List l = new ArrayList();
l.add("fred");
l.add("barney");
return Collections.enumeration(l);
}
protected void checkList(List l)
{
assertEquals("barney", l.get(0));
assertEquals("fred", l.get(1));
}
}
1.1 jakarta-tapestry/portlet/target/classes/org/apache/tapestry/portlet/PortletMessages.class
<<Binary file>>
1.1 jakarta-tapestry/portlet/target/classes/org/apache/tapestry/portlet/PortletStrings.properties
Index: PortletStrings.properties
===================================================================
unsupported-method=Method {0}() is not supported for portlet requests.
1.1 jakarta-tapestry/portlet/target/classes/org/apache/tapestry/portlet/PortletWebRequest.class
<<Binary file>>
1.1 jakarta-tapestry/portlet/target/classes/org/apache/tapestry/portlet/PortletWebSession.class
<<Binary file>>
1.1 jakarta-tapestry/portlet/target/module-lib/test/easymockclassextension/easymockclassextension-1.1.jar
<<Binary file>>
1.28 +2 -1 jakarta-tapestry/contrib/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-tapestry/contrib/build.xml,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- build.xml 1 Mar 2005 21:38:05 -0000 1.27
+++ build.xml 10 Mar 2005 13:23:44 -0000 1.28
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<!--
- Copyright 2004 The Apache Software Foundation
+ Copyright 2004, 2005 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -14,6 +14,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
+
<project name="Tapestry Contrib Library" default="jar">
<property name="module.name" value="tapestry-contrib"/>
1.1 jakarta-tapestry/portlet/target/module-lib/test/junit/junit-3.8.1.jar
<<Binary file>>
1.1 jakarta-tapestry/portlet/src/descriptor/META-INF/hivemodule.xml
Index: hivemodule.xml
===================================================================
<?xml version="1.0"?>
<!--
Copyright 2005 The Apache Software Foundation
Licensed 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.
-->
<module id="tapestry.portlet" version="3.1.0" package="org.apache.tapestry.portlet">
Add on for Tapestry that adds native Portlet support.
</module>
1.1 jakarta-tapestry/portlet/target/module-lib/test/cglib-full/cglib-full-2.0.2.jar
<<Binary file>>
1.1 jakarta-tapestry/portlet/target/module-lib/compile/portlet-api/portlet-api-1.0.jar
<<Binary file>>
1.1 jakarta-tapestry/portlet/target/module-lib/compile/hivemind-lib/hivemind-lib-1.1-alpha-3-snapshot.jar
<<Binary file>>
1.1 jakarta-tapestry/portlet/target/module-lib/compile/tapestry/tapestry-3.1-alpha-2-snapshot.jar
<<Binary file>>
1.5 +4 -0 jakarta-tapestry/framework/src/java/org/apache/tapestry/web/WebRequest.java
Index: WebRequest.java
===================================================================
RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/web/WebRequest.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- WebRequest.java 8 Mar 2005 15:36:36 -0000 1.4
+++ WebRequest.java 10 Mar 2005 13:24:11 -0000 1.5
@@ -109,6 +109,8 @@
/**
* Returns the path portion of the request which triggered this request. Query parameters,
* scheme, server and port are omitted.
+ * <p>
+ * Note: portlets do not know their request URI.
*/
public String getRequestURI();
@@ -123,6 +125,8 @@
/**
* Returns the path of the resource which activated this request (this is the servlet path for a
* servlet request).
+ *
+ * @returns the servlet path (for servlet requests), or a blank string (for portlet requests).
*/
public String getActivationPath();
}
\ No newline at end of file
1.5 +5 -5 jakarta-tapestry/framework/src/java/org/apache/tapestry/web/ServletWebRequest.java
Index: ServletWebRequest.java
===================================================================
RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/web/ServletWebRequest.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ServletWebRequest.java 8 Mar 2005 15:36:36 -0000 1.4
+++ ServletWebRequest.java 10 Mar 2005 13:24:11 -0000 1.5
@@ -41,7 +41,7 @@
private final HttpServletResponse _servletResponse;
- private WebSession _containerSession;
+ private WebSession _webSession;
public ServletWebRequest(HttpServletRequest request, HttpServletResponse response)
{
@@ -74,15 +74,15 @@
public WebSession getSession(boolean create)
{
- if (_containerSession != null)
- return _containerSession;
+ if (_webSession != null)
+ return _webSession;
HttpSession session = _servletRequest.getSession(create);
if (session != null)
- _containerSession = new ServletWebSession(session);
+ _webSession = new ServletWebSession(session);
- return _containerSession;
+ return _webSession;
}
public List getAttributeNames()
1.21 +19 -20 jakarta-tapestry/framework/src/descriptor/META-INF/tapestry.request.xml
Index: tapestry.request.xml
===================================================================
RCS file: /home/cvs/jakarta-tapestry/framework/src/descriptor/META-INF/tapestry.request.xml,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- tapestry.request.xml 8 Mar 2005 22:36:40 -0000 1.20
+++ tapestry.request.xml 10 Mar 2005 13:24:37 -0000 1.21
@@ -93,7 +93,7 @@
A pipeline for handling each request.
- <invoke-factory service-id="hivemind.lib.PipelineFactory">
+ <invoke-factory service-id="hivemind.lib.PipelineFactory" model="primitive">
<create-pipeline filter-interface="ServletRequestServicerFilter"
configuration-id="ServletRequestServicerPipeline"/>
</invoke-factory>
@@ -101,17 +101,17 @@
<contribution configuration-id="ServletRequestServicerPipeline">
<filter name="DecodedRequestInjector" object="service:DecodedRequestInjector"/>
- <filter name="SetupRequestEncoding" object="service:SetupRequestEncoding"/>
+ <filter name="SetupRequestEncoding" object="service:SetupRequestEncoding"/>
<terminator object="service:WebRequestServicerPipelineBridge"/>
</contribution>
<service-point id="WebRequestServicerPipelineBridge" interface="ServletRequestServicer">
- <invoke-factory>
- <construct class="impl.WebRequestServicerPipelineBridge">
- <set-service property="webRequestServicer" service-id="WebRequestServicerPipeline"/>
- <set-service property="requestGlobals" service-id="tapestry.globals.RequestGlobals"/>
- </construct>
- </invoke-factory>
+ <invoke-factory model="primitive">
+ <construct class="impl.WebRequestServicerPipelineBridge">
+ <set-service property="webRequestServicer" service-id="WebRequestServicerPipeline"/>
+ <set-service property="requestGlobals" service-id="tapestry.globals.RequestGlobals"/>
+ </construct>
+ </invoke-factory>
</service-point>
<configuration-point id="WebRequestServicerPipeline" schema-id="hivemind.lib.Pipeline">
@@ -126,7 +126,7 @@
A secondary pipeline for handling each requests wrapped in the WebRequest abstraction
layer.
- <invoke-factory service-id="hivemind.lib.PipelineFactory">
+ <invoke-factory service-id="hivemind.lib.PipelineFactory" model="primitive">
<create-pipeline filter-interface="WebRequestServicerFilter"
configuration-id="WebRequestServicerPipeline"/>
</invoke-factory>
@@ -141,7 +141,7 @@
Terminator service for the WebRequestServicerPipeline. This locates an IEngine instance that
can take control of the remainder of the request.
- <invoke-factory>
+ <invoke-factory model="primitive">
<construct class="impl.InvokeEngineTerminator">
<set-service property="engineManager" service-id="EngineManager"/>
<set-service property="infrastructure" service-id="tapestry.Infrastructure"/>
@@ -158,7 +158,7 @@
application extension). If the extension exists, then a different HttpServletRequest
is substituted.
- <invoke-factory>
+ <invoke-factory model="primitive">
<construct class="org.apache.tapestry.request.DecodedRequestInjector">
<set-object property="applicationSpecification" value="infrastructure:applicationSpecification"/>
</construct>
@@ -200,7 +200,7 @@
<set-service property="monitorFactory" service-id="tapestry.monitor.MonitorFactory"/>
<set-service property="strategySource" service-id="tapestry.persist.PropertyPersistenceStrategySource"/>
<set-service property="infrastructure" service-id="tapestry.Infrastructure"/>
- <set-service property="absoluteURLBuilder" service-id="AbsoluteURLBuilder"/>
+ <set-service property="absoluteURLBuilder" service-id="AbsoluteURLBuilder"/>
</construct>
</invoke-factory>
@@ -210,10 +210,9 @@
Sets the output encoding for the request.
- <invoke-factory>
+ <invoke-factory model="primitive">
<construct class="impl.SetupRequestEncoding">
- <set-object property="outputEncoding"
- value="app-property:org.apache.tapestry.output-encoding"/>
+ <set-object property="outputEncoding" value="app-property:org.apache.tapestry.output-encoding"/>
</construct>
</invoke-factory>
</service-point>
@@ -223,11 +222,11 @@
Uses the ResetEventCoordinator to reset any cached data at the end of the request.
Only used during development, not in production.
- <invoke-factory>
- <construct class="impl.DisableCachingFilter">
- <set-object property="resetEventCoordinator" value="infrastructure:resetEventCoordinator"/>
- </construct>
- </invoke-factory>
+ <invoke-factory model="primitive">
+ <construct class="impl.DisableCachingFilter">
+ <set-object property="resetEventCoordinator" value="infrastructure:resetEventCoordinator"/>
+ </construct>
+ </invoke-factory>
</service-point>
<contribution configuration-id="WebRequestServicerPipeline" if="property org.apache.tapestry.disable-caching">
1.15 +2 -0 jakarta-tapestry/framework/src/descriptor/META-INF/tapestry.services.xml
Index: tapestry.services.xml
===================================================================
RCS file: /home/cvs/jakarta-tapestry/framework/src/descriptor/META-INF/tapestry.services.xml,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- tapestry.services.xml 8 Mar 2005 15:36:36 -0000 1.14
+++ tapestry.services.xml 10 Mar 2005 13:24:37 -0000 1.15
@@ -96,6 +96,7 @@
<construct class="HomeService">
<set-object property="responseRenderer" value="infrastructure:responseRenderer"/>
<set-object property="linkFactory" value="infrastructure:linkFactory"/>
+ <set-object property="pageName" value="app-property:org.apache.tapestry.home-page"/>
</construct>
</invoke-factory>
</service-point>
@@ -141,6 +142,7 @@
<contribution configuration-id="hivemind.FactoryDefaults">
<default symbol="org.apache.tapestry.enable-reset-service" value="false"/>
+ <default symbol="org.apache.tapestry.home-page" value="Home"/>
</contribution>
<configuration-point id="ApplicationServices" schema-id="EngineServices">
1.48 +2 -1 jakarta-tapestry/framework/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-tapestry/framework/build.xml,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -r1.47 -r1.48
--- build.xml 1 Mar 2005 21:38:06 -0000 1.47
+++ build.xml 10 Mar 2005 13:24:37 -0000 1.48
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<!--
- Copyright 2004 The Apache Software Foundation
+ Copyright 2004, 2005 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -14,6 +14,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
+
<project name="Tapestry Framework" default="jar">
<property name="module.name" value="tapestry"/>
1.12 +8 -0 jakarta-tapestry/src/documentation/content/xdocs/UsersGuide/configuration.xml
Index: configuration.xml
===================================================================
RCS file: /home/cvs/jakarta-tapestry/src/documentation/content/xdocs/UsersGuide/configuration.xml,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- configuration.xml 28 Feb 2005 18:44:52 -0000 1.11
+++ configuration.xml 10 Mar 2005 13:24:37 -0000 1.12
@@ -450,6 +450,14 @@
</td>
</tr>
+<tr>
+ <td>org.apache.tapestry.home-page</td>
+ <td>
+ The name of the page to be displayed by the home engine service (that is, the page initially
+ displayed when there's no other information in the request URL). The default is "Home".
+ </td>
+</tr>
+
<tr>
<td>org.apache.tapestry.jwcid-attribute-name</td>
<td>
1.1 jakarta-tapestry/portlet/build.xml
Index: build.xml
===================================================================
<?xml version="1.0"?>
<!--
Copyright 2005 The Apache Software Foundation
Licensed 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.
-->
<project name="Tapestry Portlet Support" default="jar">
<property name="module.name" value="tapestry-portlet"/>
<property name="javadoc.package" value="org.apache.tapestry.portlet.*"/>
<property name="root.dir" value=".."/>
<property file="${root.dir}/config/build.properties"/>
<property file="${root.dir}/config/common.properties"/>
<import file="${hivebuild.dir}/jar-module.xml"/>
<import file="${hivebuild.dir}/javadoc-report.xml"/>
<import file="${hivebuild.dir}/clover-report.xml"/>
<target name="compile-dependencies">
<project-dependency artifact="tapestry"/>
<ibiblio-dependency artifact="commons-logging" version="${logging.version}" group="commons-logging"/>
<ibiblio-dependency artifact="hivemind" version="${hivemind.version}" group="hivemind"/>
<ibiblio-dependency artifact="hivemind-lib" version="${hivemind.version}" group="hivemind"/>
<ibiblio-dependency artifact="commons-codec" version="${codec.version}" group="commons-codec"/>
<ibiblio-dependency artifact="ognl" version="${ognl.version}" group="ognl"/>
<ibiblio-dependency artifact="commons-lang" version="${lang.version}" group="commons-lang"/>
<ibiblio-dependency artifact="portlet-api" version="1.0" group="portlet-api"/>
<ibiblio-dependency artifact="easymock" version="1.1" group="easymock" use="test"/>
<ibiblio-dependency artifact="easymockclassextension" version="1.1" group="easymock" use="test"/>
<ibiblio-dependency artifact="cglib-full" version="2.0.2" group="cglib" use="test"/>
<!--
<ibiblio-dependency artifact="bsf" version="2.3.0" group="bsf"/>
<ibiblio-dependency artifact="commons-fileupload" version="1.0" group="commons-fileupload"/>
<ibiblio-dependency artifact="hivemind-lib" version="1.0-rc-1" group="hivemind"/>
<ibiblio-dependency artifact="oro" version="2.0.6" group="oro"/>
<ibiblio-dependency artifact="javassist" version="2.6" group="jboss"/>
<ibiblio-dependency artifact="servletapi" version="2.3" group="servletapi"/>
-->
</target>
</project>
1.1 jakarta-tapestry/portlet/target/module-lib/compile/commons-codec/commons-codec-1.3.jar
<<Binary file>>
1.1 jakarta-tapestry/portlet/target/module-lib/compile/ognl/ognl-2.6.7.jar
<<Binary file>>
1.15 +2 -1 jakarta-tapestry/examples/Workbench/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-tapestry/examples/Workbench/build.xml,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- build.xml 1 Mar 2005 21:38:07 -0000 1.14
+++ build.xml 10 Mar 2005 13:24:37 -0000 1.15
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<!--
- Copyright 2004 The Apache Software Foundation
+ Copyright 2004, 2005 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -14,6 +14,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
+
<project name="Tapestry Workbench" default="war">
<property name="module.name" value="workbench"/>
1.1 jakarta-tapestry/portlet/target/module-lib/compile/commons-logging/commons-logging-1.0.4.jar
<<Binary file>>
1.1 jakarta-tapestry/portlet/target/module-lib/compile/hivemind/hivemind-1.1-alpha-3-snapshot.jar
<<Binary file>>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org