weaver 2005/04/29 07:02:35
Modified: portal/src/test/org/apache/jetspeed/window TestWindows.java
portal/src/java/org/apache/jetspeed/velocity
JetspeedPowerTool.java
Log:
See JS2-252: http://issues.apache.org/jira/browse/JS2-252
Revision Changes Path
1.6 +4 -1
jakarta-jetspeed-2/portal/src/test/org/apache/jetspeed/window/TestWindows.java
Index: TestWindows.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed-2/portal/src/test/org/apache/jetspeed/window/TestWindows.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- TestWindows.java 24 Jan 2005 21:03:55 -0000 1.5
+++ TestWindows.java 29 Apr 2005 14:02:35 -0000 1.6
@@ -16,6 +16,7 @@
package org.apache.jetspeed.window;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
import junit.framework.Test;
@@ -26,7 +27,9 @@
import org.apache.jetspeed.container.window.PortletWindowAccessor;
import org.apache.jetspeed.container.window.impl.PortletWindowAccessorImpl;
import org.apache.jetspeed.om.common.portlet.MutablePortletEntity;
+import org.apache.jetspeed.om.page.ContentFragment;
import org.apache.jetspeed.om.page.Fragment;
+import org.apache.jetspeed.om.page.psml.ContentFragmentImpl;
import org.apache.pluto.om.window.PortletWindow;
import org.apache.pluto.om.window.PortletWindowList;
import org.apache.pluto.om.window.PortletWindowListCtrl;
@@ -77,7 +80,7 @@
public void testWindowAccess() throws Exception
{
List windows = new ArrayList();
- Fragment f1 = (Fragment) fragMock.proxy();
+ ContentFragment f1 = new ContentFragmentImpl((Fragment)
fragMock.proxy(), new HashMap());
MutablePortletEntity entity = (MutablePortletEntity)
entityMock.proxy();
CompositeWindowList windowList = (CompositeWindowList)
windowListMock.proxy();
entityAccessMock.expects(new
InvokeAtLeastOnceMatcher()).method("getPortletEntityForFragment")
1.44 +15 -15
jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/velocity/JetspeedPowerTool.java
Index: JetspeedPowerTool.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/velocity/JetspeedPowerTool.java,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- JetspeedPowerTool.java 21 Apr 2005 08:50:37 -0000 1.43
+++ JetspeedPowerTool.java 29 Apr 2005 14:02:35 -0000 1.44
@@ -56,7 +56,7 @@
import org.apache.jetspeed.locator.TemplateLocator;
import org.apache.jetspeed.locator.TemplateLocatorException;
import org.apache.jetspeed.om.common.portlet.PortletDefinitionComposite;
-import org.apache.jetspeed.om.page.Fragment;
+import org.apache.jetspeed.om.page.ContentFragment;
import org.apache.jetspeed.om.page.Page;
import org.apache.jetspeed.request.RequestContext;
import org.apache.jetspeed.util.ArgUtil;
@@ -210,17 +210,17 @@
*
* @return
*/
- public Fragment getCurrentFragment()
+ public ContentFragment getCurrentFragment()
{
checkState();
- return (Fragment)
renderRequest.getAttribute(PortalReservedParameters.FRAGMENT_ATTRIBUTE);
+ return (ContentFragment)
renderRequest.getAttribute(PortalReservedParameters.FRAGMENT_ATTRIBUTE);
}
/**
*
* @param f
*/
- public void setCurrentFragment( Fragment f )
+ public void setCurrentFragment( ContentFragment f )
{
checkState();
renderRequest.setAttribute(PortalReservedParameters.FRAGMENT_ATTRIBUTE, f);
@@ -231,7 +231,7 @@
{
checkState();
- Fragment f = (Fragment)
getRequestContext().getRequest().getAttribute(LAYOUT_ATTR);
+ ContentFragment f = (ContentFragment)
getRequestContext().getRequest().getAttribute(LAYOUT_ATTR);
renderRequest.setAttribute(LAYOUT_ATTR, f);
}
@@ -239,10 +239,10 @@
*
* @return
*/
- public Fragment getCurrentLayout()
+ public ContentFragment getCurrentLayout()
{
checkState();
- return (Fragment) renderRequest.getAttribute(LAYOUT_ATTR);
+ return (ContentFragment) renderRequest.getAttribute(LAYOUT_ATTR);
}
/**
@@ -302,7 +302,7 @@
* @return The PortletEntity represented by the current fragment.
* @throws Exception
*/
- public PortletEntity getPortletEntity( Fragment f ) throws Exception
+ public PortletEntity getPortletEntity( ContentFragment f ) throws
Exception
{
PortletEntity portletEntity =
entityAccess.getPortletEntityForFragment(f);
if (portletEntity == null)
@@ -337,7 +337,7 @@
* @return whether or not the Fragment in question should be considered
* visible during rendering.
*/
- public boolean isHidden( Fragment f )
+ public boolean isHidden( ContentFragment f )
{
checkState();
if (f == null)
@@ -452,7 +452,7 @@
* @throws Exception
* @return String path to the decorator.
*/
- public String decorateAndInclude( Fragment f ) throws Exception
+ public String decorateAndInclude( ContentFragment f ) throws Exception
{
// makes sure that any previous content has been written to
// preserve natural HTML rendering order
@@ -504,7 +504,7 @@
* Portlet fragment to "decorate"
* @throws Exception
*/
- protected String decorateAndIncludePortlet( Fragment f ) throws Exception
+ protected String decorateAndIncludePortlet( ContentFragment f ) throws
Exception
{
// make sure that any previous content has been written to
// preserve natural HTML rendering order
@@ -602,7 +602,7 @@
* @param e
* @param msg
*/
- protected void handleError( Exception e, String msg, Fragment fragment )
+ protected void handleError( Exception e, String msg, ContentFragment
fragment )
{
log.error(msg, e);
@@ -686,7 +686,7 @@
WindowState state = getWindowState();
ContentTypeSet content = portlet.getContentTypeSet();
- Fragment fragment = getCurrentFragment();
+ ContentFragment fragment = getCurrentFragment();
String fragmentId = fragment.getId();
String portletName = portlet.getUniqueName();
PortletWindow window = windowAccess.getPortletWindow(fragment);
@@ -822,7 +822,7 @@
* @param entity
* @return
*/
- public String getTitle( PortletEntity entity, Fragment f )
+ public String getTitle( PortletEntity entity, ContentFragment f )
{
String title = null;
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]