You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jspwiki.apache.org by ja...@apache.org on 2008/12/20 13:02:19 UTC
svn commit: r728275 [1/2] - in
/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH: ./ src/com/ecyrd/jspwiki/
src/com/ecyrd/jspwiki/action/ src/com/ecyrd/jspwiki/attachment/
src/com/ecyrd/jspwiki/auth/acl/ src/com/ecyrd/jspwiki/content/
src/com/ecyrd/jspwik...
Author: jalkanen
Date: Sat Dec 20 04:02:17 2008
New Revision: 728275
URL: http://svn.apache.org/viewvc?rev=728275&view=rev
Log:
Merged with trunk r728274
Modified:
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/ChangeLog
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/PageManager.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/Release.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/WikiEngine.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/WikiPage.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/ViewActionBean.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/WikiContextFactory.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/attachment/Attachment.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/attachment/AttachmentManager.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/auth/acl/DefaultAclManager.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/content/ContentManager.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/dav/items/HTMLPageDavItem.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/plugin/BugReportHandler.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/plugin/WeblogEntryPlugin.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/providers/AbstractFileProvider.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/providers/BasicAttachmentProvider.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/providers/CachingProvider.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/providers/RCSFileProvider.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/providers/VersioningFileProvider.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/rpc/atom/AtomAPIServlet.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/rss/RSSGenerator.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/search/LuceneSearchProvider.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/search/SearchMatcher.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/tags/SearchResultIteratorTag.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/xmlrpc/MetaWeblogHandler.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/xmlrpc/RPCHandler.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/xmlrpc/RPCHandlerUTF8.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/TestEngine.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/VariableManagerTest.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/WikiEngineTest.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/attachment/AttachmentManagerTest.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/content/PageRenamerTest.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/diff/ContextualDiffProviderTest.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/parser/JSPWikiMarkupParserTest.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/plugin/CounterPluginTest.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/plugin/PluginManagerTest.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/plugin/ReferringPagesPluginTest.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/plugin/UndefinedPagesPluginTest.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/providers/CounterProvider.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/providers/FileSystemProviderTest.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/providers/RCSFileProviderTest.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/providers/VersioningFileProviderTest.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/providers/VerySimpleProvider.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/render/CreoleRendererTest.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/render/RenderingManagerTest.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/render/WysiwygEditingRendererTest.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/rss/RSSGeneratorTest.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/ui/InputValidatorTest.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/util/MailUtilTest.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/xmlrpc/RPCHandlerTest.java
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/ChangeLog
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/ChangeLog?rev=728275&r1=728274&r2=728275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/ChangeLog (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/ChangeLog Sat Dec 20 04:02:17 2008
@@ -1,3 +1,14 @@
+2008-12-20 Janne Jalkanen <ja...@apache.org>
+
+ * 3.0.0-svn-35
+
+ * First step in refactoring WikiPage into an interface. The WikiPage
+ constructors are now deprecated, and most of the code now uses
+ WikiEngine.createPage().
+
+ * Also created a WikiContextFactory.newViewContext(WikiPage) to get rid
+ of all the null arguments.
+
2008-12-19 Andrew Jaquith <ajaquith AT apache DOT org>
* 3.0.0-svn-34
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/PageManager.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/PageManager.java?rev=728275&r1=728274&r2=728275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/PageManager.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/PageManager.java Sat Dec 20 04:02:17 2008
@@ -20,35 +20,17 @@
*/
package com.ecyrd.jspwiki;
-import java.io.IOException;
-import java.security.Permission;
-import java.security.Principal;
-import java.util.*;
+import java.util.Collection;
+import java.util.List;
+import java.util.Properties;
-import org.apache.commons.lang.ArrayUtils;
-import org.apache.jspwiki.api.FilterException;
import org.apache.jspwiki.api.WikiException;
-import com.ecyrd.jspwiki.auth.WikiPrincipal;
-import com.ecyrd.jspwiki.auth.WikiSecurityException;
-import com.ecyrd.jspwiki.auth.acl.Acl;
-import com.ecyrd.jspwiki.auth.acl.AclEntry;
-import com.ecyrd.jspwiki.auth.acl.AclEntryImpl;
-import com.ecyrd.jspwiki.auth.user.UserProfile;
-import com.ecyrd.jspwiki.event.*;
-import com.ecyrd.jspwiki.log.Logger;
-import com.ecyrd.jspwiki.log.LoggerFactory;
+import com.ecyrd.jspwiki.event.WikiEvent;
+import com.ecyrd.jspwiki.event.WikiEventListener;
import com.ecyrd.jspwiki.modules.ModuleManager;
-import com.ecyrd.jspwiki.providers.CachingProvider;
import com.ecyrd.jspwiki.providers.ProviderException;
-import com.ecyrd.jspwiki.providers.RepositoryModifiedException;
import com.ecyrd.jspwiki.providers.WikiPageProvider;
-import com.ecyrd.jspwiki.util.ClassUtil;
-import com.ecyrd.jspwiki.util.TextUtil;
-import com.ecyrd.jspwiki.util.WikiBackgroundThread;
-import com.ecyrd.jspwiki.workflow.Outcome;
-import com.ecyrd.jspwiki.workflow.Task;
-import com.ecyrd.jspwiki.workflow.Workflow;
/**
* Manages the WikiPages. This class functions as an unified interface towards
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/Release.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/Release.java?rev=728275&r1=728274&r2=728275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/Release.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/Release.java Sat Dec 20 04:02:17 2008
@@ -77,7 +77,7 @@
* <p>
* If the build identifier is empty, it is not added.
*/
- public static final String BUILD = "34";
+ public static final String BUILD = "35";
/**
* This is the generic version string you should use
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/WikiEngine.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/WikiEngine.java?rev=728275&r1=728274&r2=728275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/WikiEngine.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/WikiEngine.java Sat Dec 20 04:02:17 2008
@@ -52,6 +52,7 @@
import com.ecyrd.jspwiki.auth.authorize.GroupManager;
import com.ecyrd.jspwiki.content.ContentManager;
import com.ecyrd.jspwiki.content.PageRenamer;
+import com.ecyrd.jspwiki.content.WikiName;
import com.ecyrd.jspwiki.diff.DifferenceManager;
import com.ecyrd.jspwiki.event.WikiEngineEvent;
import com.ecyrd.jspwiki.event.WikiEventListener;
@@ -899,13 +900,35 @@
*
* @return The front page name.
*/
-
+ // FIXME: This method should return a WikiPage
+ // FIXME: This method should return the FQN of the defaultspace:frontpage page of the wiki.
public String getFrontPage()
{
return m_frontPage;
}
/**
+ * Returns the default front page for a particular space. Always returns
+ * a valid WikiPage, even if the front page does not exist.
+ *
+ * @param space The space to get the front page for.
+ * @return A FQN of the page.
+ * @since 3.0
+ */
+ // FIXME: Does not yet support spaces
+ public WikiPage getFrontPage( String space )
+ {
+ WikiPage p = getPage( m_frontPage );
+
+ if( p == null )
+ {
+ p = createPage( new WikiName(space,m_frontPage) );
+ }
+
+ return p;
+ }
+
+ /**
* Returns the ServletContext that this particular WikiEngine was
* initialized with. <B>It may return null</B>, if the WikiEngine is not
* running inside a servlet container!
@@ -1486,7 +1509,7 @@
{
WikiPage page = getPage( pagename, version );
- WikiContext context = m_contextFactory.newViewContext( null, null, page );
+ WikiContext context = m_contextFactory.newViewContext( page );
String res = getHTML( context, page );
@@ -1555,7 +1578,7 @@
{
LinkCollector localCollector = new LinkCollector();
- textToHTML( m_contextFactory.newViewContext( null, null, page ),
+ textToHTML( m_contextFactory.newViewContext( page ),
pagedata,
localCollector,
null,
@@ -1859,6 +1882,31 @@
}
/**
+ * Creates a new WikiPage object.
+ *
+ * @param name The WikiName of the object to create
+ * @return A new WikiPage object.
+ * @since 3.0
+ */
+ @SuppressWarnings("deprecation")
+ public WikiPage createPage( WikiName name )
+ {
+ return new WikiPage( this, name );
+ }
+
+ /**
+ * A shortcut for createPage( WikiName.valueOf(fqn) );
+ *
+ * @param fqn The fully qualified name of a wikipage.
+ * @return A new page.
+ * @since 3.0
+ */
+ public WikiPage createPage( String fqn )
+ {
+ return createPage( WikiName.valueOf( fqn ) );
+ }
+
+ /**
* Finds the corresponding WikiPage object based on the page name. It always finds
* the latest version of a page.
*
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/WikiPage.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/WikiPage.java?rev=728275&r1=728274&r2=728275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/WikiPage.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/WikiPage.java Sat Dec 20 04:02:17 2008
@@ -81,10 +81,8 @@
private Acl m_accessList = null;
/**
- * Create a new WikiPage using a given engine and name.
- *
- * @param engine the WikiEngine that owns this page
- * @param path the path of the page
+ * Use {@link WikiEngine#createPage(String)} instead.
+ * @deprecated
*/
public WikiPage( WikiEngine engine, String path )
{
@@ -92,6 +90,10 @@
m_name = WikiName.valueOf( path );
}
+ /**
+ * Use {@link WikiEngine#createPage(WikiName)} instead.
+ * @deprecated
+ */
public WikiPage( WikiEngine engine, WikiName name )
{
m_engine = engine;
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/ViewActionBean.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/ViewActionBean.java?rev=728275&r1=728274&r2=728275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/ViewActionBean.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/ViewActionBean.java Sat Dec 20 04:02:17 2008
@@ -10,6 +10,7 @@
import com.ecyrd.jspwiki.WikiEngine;
import com.ecyrd.jspwiki.WikiPage;
import com.ecyrd.jspwiki.auth.permissions.PagePermission;
+import com.ecyrd.jspwiki.content.ContentManager;
import com.ecyrd.jspwiki.log.Logger;
import com.ecyrd.jspwiki.log.LoggerFactory;
import com.ecyrd.jspwiki.ui.stripes.HandlerPermission;
@@ -91,7 +92,7 @@
page = engine.getPage( engine.getFrontPage() );
if ( page == null )
{
- page = new WikiPage( engine, engine.getFrontPage() );
+ page = engine.getFrontPage(ContentManager.DEFAULT_SPACE);
}
setPage(page);
return null;
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/WikiContextFactory.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/WikiContextFactory.java?rev=728275&r1=728274&r2=728275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/WikiContextFactory.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/WikiContextFactory.java Sat Dec 20 04:02:17 2008
@@ -22,6 +22,8 @@
import com.ecyrd.jspwiki.*;
import com.ecyrd.jspwiki.auth.SessionMonitor;
+import com.ecyrd.jspwiki.content.ContentManager;
+import com.ecyrd.jspwiki.content.WikiName;
import com.ecyrd.jspwiki.log.Logger;
import com.ecyrd.jspwiki.log.LoggerFactory;
import com.ecyrd.jspwiki.parser.MarkupParser;
@@ -128,12 +130,7 @@
{
// If the page supplied was blank, default to the front page to
// avoid NPEs
- page = engine.getPage( engine.getFrontPage() );
- // Front page does not exist?
- if( page == null )
- {
- page = new WikiPage( engine, engine.getFrontPage() );
- }
+ page = engine.getFrontPage( ContentManager.DEFAULT_SPACE );
context.setPage( page );
}
request.setAttribute( WikiTagBase.ATTR_CONTEXT, context );
@@ -363,6 +360,17 @@
}
/**
+ * Provides a clean shortcut to newViewContext(null,null,page).
+ *
+ * @param page The WikiPage object for this page.
+ * @return A new WikiPage.
+ */
+ public WikiActionBeanContext newViewContext( WikiPage page )
+ {
+ return newViewContext( null, null, page );
+ }
+
+ /**
* Searches a set of named packages for WikiActionBean implementations, and
* returns any it finds.
*
@@ -614,7 +622,7 @@
if( wikipage == null )
{
page = MarkupParser.cleanLink( page );
- wikipage = new WikiPage( m_engine, page );
+ wikipage = m_engine.createPage( WikiName.valueOf( page ) );
}
return wikipage;
}
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/attachment/Attachment.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/attachment/Attachment.java?rev=728275&r1=728274&r2=728275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/attachment/Attachment.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/attachment/Attachment.java Sat Dec 20 04:02:17 2008
@@ -44,6 +44,7 @@
* @param parentPage The page which will contain this attachment.
* @param fileName The file name for the attachment.
*/
+ @SuppressWarnings("deprecation")
public Attachment( WikiEngine engine, String parentPage, String fileName )
{
super( engine, parentPage+"/"+fileName );
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/attachment/AttachmentManager.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/attachment/AttachmentManager.java?rev=728275&r1=728274&r2=728275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/attachment/AttachmentManager.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/attachment/AttachmentManager.java Sat Dec 20 04:02:17 2008
@@ -29,6 +29,7 @@
import org.apache.commons.lang.StringUtils;
import org.apache.jspwiki.api.WikiException;
+import com.ecyrd.jspwiki.content.WikiName;
import com.ecyrd.jspwiki.log.Logger;
import com.ecyrd.jspwiki.log.LoggerFactory;
@@ -499,7 +500,7 @@
m_engine.getReferenceManager().updateReferences( att.getName(),
new java.util.Vector() );
- WikiPage parent = new WikiPage( m_engine, att.getParentName() );
+ WikiPage parent = m_engine.createPage( WikiName.valueOf( att.getParentName() ) );
m_engine.updateReferences( parent );
m_engine.getSearchManager().reindexPage( att );
@@ -622,7 +623,7 @@
if( filename.toLowerCase().endsWith( ".jsp" ) || filename.toLowerCase().endsWith(".jspf") )
{
log.info( "Attempt to upload a file with a .jsp/.jspf extension. In certain cases this" +
- " can trigger unwanted security side effects, so we're preventing it." );
+ " can trigger unwanted security side effects, so we're preventing it." );
//
// the caller should catch the exception and use the exception text as an i18n key
throw new WikiException( "attach.unwanted.file" );
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/auth/acl/DefaultAclManager.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/auth/acl/DefaultAclManager.java?rev=728275&r1=728274&r2=728275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/auth/acl/DefaultAclManager.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/auth/acl/DefaultAclManager.java Sat Dec 20 04:02:17 2008
@@ -181,7 +181,7 @@
//
// Or, try parsing the page
//
- WikiContext ctx = m_engine.getWikiContextFactory().newViewContext( null, null, page );
+ WikiContext ctx = m_engine.getWikiContextFactory().newViewContext( page );
ctx.setVariable( RenderingManager.VAR_EXECUTE_PLUGINS, Boolean.FALSE );
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/content/ContentManager.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/content/ContentManager.java?rev=728275&r1=728274&r2=728275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/content/ContentManager.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/content/ContentManager.java Sat Dec 20 04:02:17 2008
@@ -86,7 +86,7 @@
public class ContentManager
{
- protected static final String DEFAULT_SPACE = "Main";
+ public static final String DEFAULT_SPACE = "Main";
private static final String JCR_DEFAULT_SPACE = "pages/"+DEFAULT_SPACE;
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/dav/items/HTMLPageDavItem.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/dav/items/HTMLPageDavItem.java?rev=728275&r1=728274&r2=728275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/dav/items/HTMLPageDavItem.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/dav/items/HTMLPageDavItem.java Sat Dec 20 04:02:17 2008
@@ -76,7 +76,7 @@
{
WikiEngine engine = ((WikiDavProvider)m_provider).getEngine();
- WikiContext context = engine.getWikiContextFactory().newViewContext( null, null, m_page );
+ WikiContext context = engine.getWikiContextFactory().newViewContext( m_page );
context.setVariable( MarkupParser.PROP_RUNPLUGINS, "false" );
context.setVariable( WikiEngine.PROP_RUNFILTERS, "false" );
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/plugin/BugReportHandler.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/plugin/BugReportHandler.java?rev=728275&r1=728274&r2=728275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/plugin/BugReportHandler.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/plugin/BugReportHandler.java Sat Dec 20 04:02:17 2008
@@ -33,6 +33,7 @@
import com.ecyrd.jspwiki.WikiContext;
import com.ecyrd.jspwiki.WikiEngine;
import com.ecyrd.jspwiki.WikiPage;
+import com.ecyrd.jspwiki.content.WikiName;
import com.ecyrd.jspwiki.filters.RedirectException;
import com.ecyrd.jspwiki.log.Logger;
import com.ecyrd.jspwiki.log.LoggerFactory;
@@ -167,7 +168,7 @@
String pageName = findNextPage( context, title,
(String)params.get( PARAM_PAGE ) );
- WikiPage newPage = new WikiPage( context.getEngine(), pageName );
+ WikiPage newPage = context.getEngine().createPage( WikiName.valueOf(pageName) );
WikiContext newContext = (WikiContext)context.clone();
newContext.setPage( newPage );
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/plugin/WeblogEntryPlugin.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/plugin/WeblogEntryPlugin.java?rev=728275&r1=728274&r2=728275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/plugin/WeblogEntryPlugin.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/plugin/WeblogEntryPlugin.java Sat Dec 20 04:02:17 2008
@@ -26,6 +26,7 @@
import org.apache.jspwiki.api.PluginException;
import com.ecyrd.jspwiki.*;
+import com.ecyrd.jspwiki.content.WikiName;
import com.ecyrd.jspwiki.log.Logger;
import com.ecyrd.jspwiki.log.LoggerFactory;
import com.ecyrd.jspwiki.providers.ProviderException;
@@ -154,10 +155,11 @@
while( idx < MAX_BLOG_ENTRIES )
{
- WikiPage page = new WikiPage( mgr.getEngine(),
- WeblogPlugin.makeEntryPage( baseName,
- date,
- Integer.toString(idx) ) );
+ String name = WeblogPlugin.makeEntryPage( baseName,
+ date,
+ Integer.toString(idx) );
+ WikiPage page = mgr.getEngine().createPage( WikiName.valueOf(name) );
+
PageLock lock = mgr.getCurrentLock( page );
if( lock == null )
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/providers/AbstractFileProvider.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/providers/AbstractFileProvider.java?rev=728275&r1=728274&r2=728275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/providers/AbstractFileProvider.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/providers/AbstractFileProvider.java Sat Dec 20 04:02:17 2008
@@ -21,12 +21,10 @@
package com.ecyrd.jspwiki.providers;
import java.io.*;
-import java.util.Properties;
-import java.util.Collection;
-import java.util.Date;
-import java.util.TreeSet;
-import java.util.ArrayList;
-import java.util.List;
+import java.util.*;
+
+import com.ecyrd.jspwiki.*;
+import com.ecyrd.jspwiki.content.WikiName;
import com.ecyrd.jspwiki.log.Logger;
import com.ecyrd.jspwiki.log.LoggerFactory;
import com.ecyrd.jspwiki.search.QueryItem;
@@ -36,8 +34,6 @@
import com.ecyrd.jspwiki.util.FileUtil;
import com.ecyrd.jspwiki.util.TextUtil;
-import com.ecyrd.jspwiki.*;
-
/**
* Provides a simple directory based repository for Wiki pages.
* <P>
@@ -447,7 +443,7 @@
return null;
}
- WikiPage p = new WikiPage( m_engine, page );
+ WikiPage p = m_engine.createPage( WikiName.valueOf( page ) );
p.setLastModified( new Date(file.lastModified()) );
return p;
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/providers/BasicAttachmentProvider.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/providers/BasicAttachmentProvider.java?rev=728275&r1=728274&r2=728275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/providers/BasicAttachmentProvider.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/providers/BasicAttachmentProvider.java Sat Dec 20 04:02:17 2008
@@ -47,6 +47,7 @@
import com.ecyrd.jspwiki.*;
import com.ecyrd.jspwiki.attachment.Attachment;
+import com.ecyrd.jspwiki.content.WikiName;
/**
* Provides basic, versioning attachments.
@@ -557,7 +558,7 @@
String pageId = unmangleName( pagesWithAttachments[i] );
pageId = pageId.substring( 0, pageId.length()-DIR_EXTENSION.length() );
- Collection c = listAttachments( new WikiPage( m_engine, pageId ) );
+ Collection c = listAttachments( m_engine.createPage( WikiName.valueOf( pageId ) ) );
for( Iterator it = c.iterator(); it.hasNext(); )
{
@@ -653,7 +654,7 @@
for( int i = latest; i >= 1; i-- )
{
- Attachment a = getAttachmentInfo( new WikiPage( m_engine, att.getParentName() ),
+ Attachment a = getAttachmentInfo( m_engine.createPage( WikiName.valueOf( att.getParentName() ) ),
att.getFileName(), i );
if( a != null )
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/providers/CachingProvider.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/providers/CachingProvider.java?rev=728275&r1=728274&r2=728275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/providers/CachingProvider.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/providers/CachingProvider.java Sat Dec 20 04:02:17 2008
@@ -688,7 +688,7 @@
{
String data = m_provider.getPageText(page.getName(), page.getVersion());
- WikiContext ctx = m_engine.getWikiContextFactory().newViewContext( null, null, page );
+ WikiContext ctx = m_engine.getWikiContextFactory().newViewContext( page );
MarkupParser parser = mgr.getParser( ctx, data );
parser.parse();
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/providers/RCSFileProvider.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/providers/RCSFileProvider.java?rev=728275&r1=728274&r2=728275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/providers/RCSFileProvider.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/providers/RCSFileProvider.java Sat Dec 20 04:02:17 2008
@@ -32,6 +32,8 @@
import java.util.Iterator;
import java.text.SimpleDateFormat;
import java.text.ParseException;
+
+import com.ecyrd.jspwiki.content.WikiName;
import com.ecyrd.jspwiki.log.Logger;
import com.ecyrd.jspwiki.log.LoggerFactory;
import com.ecyrd.jspwiki.util.FileUtil;
@@ -500,7 +502,7 @@
{
if( matcher.contains( line, revpattern ) )
{
- info = new WikiPage( m_engine, page );
+ info = m_engine.createPage( WikiName.valueOf( page ) );
MatchResult result = matcher.getMatch();
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/providers/VersioningFileProvider.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/providers/VersioningFileProvider.java?rev=728275&r1=728274&r2=728275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/providers/VersioningFileProvider.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/providers/VersioningFileProvider.java Sat Dec 20 04:02:17 2008
@@ -27,6 +27,9 @@
import java.util.Date;
import java.util.ArrayList;
import java.util.List;
+
+import com.ecyrd.jspwiki.content.ContentManager;
+import com.ecyrd.jspwiki.content.WikiName;
import com.ecyrd.jspwiki.log.Logger;
import com.ecyrd.jspwiki.log.LoggerFactory;
import com.ecyrd.jspwiki.util.FileUtil;
@@ -551,7 +554,7 @@
if( file.exists() )
{
- p = new WikiPage( m_engine, page );
+ p = m_engine.createPage( new WikiName(ContentManager.DEFAULT_SPACE, page) );
p.setLastModified( new Date(file.lastModified()) );
p.setVersion( version );
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/rpc/atom/AtomAPIServlet.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/rpc/atom/AtomAPIServlet.java?rev=728275&r1=728274&r2=728275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/rpc/atom/AtomAPIServlet.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/rpc/atom/AtomAPIServlet.java Sat Dec 20 04:02:17 2008
@@ -30,6 +30,8 @@
import java.util.Date;
import java.util.Collection;
import java.util.Iterator;
+
+import com.ecyrd.jspwiki.content.WikiName;
import com.ecyrd.jspwiki.log.Logger;
import com.ecyrd.jspwiki.log.LoggerFactory;
@@ -142,7 +144,7 @@
String pageName = plugin.getNewEntryPage( m_engine, blogid );
String username = author.getName();
- WikiPage entryPage = new WikiPage( m_engine, pageName );
+ WikiPage entryPage = m_engine.createPage( WikiName.valueOf( pageName ) );
entryPage.setAuthor( username );
WikiContext context = m_engine.getWikiContextFactory().newViewContext( request, response, entryPage );
@@ -283,7 +285,7 @@
String encodedName = TextUtil.urlEncodeUTF8( p.getName() );
- WikiContext context = m_engine.getWikiContextFactory().newViewContext( null, null, p );
+ WikiContext context = m_engine.getWikiContextFactory().newViewContext( p );
String title = TextUtil.replaceEntities(BlogUtil.getSiteName(context));
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/rss/RSSGenerator.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/rss/RSSGenerator.java?rev=728275&r1=728274&r2=728275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/rss/RSSGenerator.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/rss/RSSGenerator.java Sat Dec 20 04:02:17 2008
@@ -30,6 +30,7 @@
import com.ecyrd.jspwiki.*;
import com.ecyrd.jspwiki.attachment.Attachment;
import com.ecyrd.jspwiki.auth.permissions.PagePermission;
+import com.ecyrd.jspwiki.content.WikiName;
import com.ecyrd.jspwiki.providers.ProviderException;
import com.ecyrd.jspwiki.util.TextUtil;
@@ -231,7 +232,7 @@
StringBuilder buf = new StringBuilder();
String author = getAuthor(page);
- WikiContext ctx = m_engine.getWikiContextFactory().newViewContext( null, null, page );
+ WikiContext ctx = m_engine.getWikiContextFactory().newViewContext( page );
if( page.getVersion() > 1 )
{
String diff = m_engine.getDiff( ctx,
@@ -281,7 +282,7 @@
public String generate() throws WikiException
{
WikiContext context = m_engine.getWikiContextFactory().newContext(null,null,WikiContext.RSS);
- context.setPage( new WikiPage( m_engine, "__DUMMY" ) );
+ context.setPage( m_engine.createPage( WikiName.valueOf( "__DUMMY" ) ) );
Feed feed = new RSS10Feed( context );
String result = generateFullWikiRSS( context, feed );
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/search/LuceneSearchProvider.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/search/LuceneSearchProvider.java?rev=728275&r1=728274&r2=728275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/search/LuceneSearchProvider.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/search/LuceneSearchProvider.java Sat Dec 20 04:02:17 2008
@@ -50,6 +50,7 @@
import com.ecyrd.jspwiki.*;
import com.ecyrd.jspwiki.attachment.Attachment;
import com.ecyrd.jspwiki.attachment.AttachmentManager;
+import com.ecyrd.jspwiki.content.WikiName;
import com.ecyrd.jspwiki.parser.MarkupParser;
import com.ecyrd.jspwiki.providers.ProviderException;
import com.ecyrd.jspwiki.providers.WikiPageProvider;
@@ -639,7 +640,7 @@
else
{
log.error("Lucene found a result page '" + pageName + "' that could not be loaded, removing from Lucene cache");
- pageRemoved(new WikiPage( m_engine, pageName ));
+ pageRemoved(m_engine.createPage( WikiName.valueOf( pageName ) ));
}
}
}
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/search/SearchMatcher.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/search/SearchMatcher.java?rev=728275&r1=728274&r2=728275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/search/SearchMatcher.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/search/SearchMatcher.java Sat Dec 20 04:02:17 2008
@@ -21,8 +21,8 @@
package com.ecyrd.jspwiki.search;
-import java.io.IOException;
import java.io.BufferedReader;
+import java.io.IOException;
import java.io.StringReader;
import com.ecyrd.jspwiki.WikiEngine;
@@ -157,7 +157,7 @@
*/
public SearchResultImpl( String name, int score )
{
- m_page = new WikiPage( m_engine, name );
+ m_page = m_engine.getPage( name );
m_score = score;
}
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/tags/SearchResultIteratorTag.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/tags/SearchResultIteratorTag.java?rev=728275&r1=728274&r2=728275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/tags/SearchResultIteratorTag.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/tags/SearchResultIteratorTag.java Sat Dec 20 04:02:17 2008
@@ -105,7 +105,7 @@
// Create a wiki context for the result
WikiEngine engine = m_wikiContext.getEngine();
- WikiContext context = engine.getWikiContextFactory().newViewContext( null, null, r.getPage() );
+ WikiContext context = engine.getWikiContextFactory().newViewContext( r.getPage() );
// Stash it in the page context
pageContext.setAttribute( WikiTagBase.ATTR_CONTEXT,
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/xmlrpc/MetaWeblogHandler.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/xmlrpc/MetaWeblogHandler.java?rev=728275&r1=728274&r2=728275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/xmlrpc/MetaWeblogHandler.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/xmlrpc/MetaWeblogHandler.java Sat Dec 20 04:02:17 2008
@@ -37,6 +37,7 @@
import com.ecyrd.jspwiki.auth.AuthorizationManager;
import com.ecyrd.jspwiki.auth.WikiSecurityException;
import com.ecyrd.jspwiki.auth.permissions.PermissionFactory;
+import com.ecyrd.jspwiki.content.WikiName;
import com.ecyrd.jspwiki.plugin.WeblogEntryPlugin;
import com.ecyrd.jspwiki.plugin.WeblogPlugin;
import com.ecyrd.jspwiki.providers.ProviderException;
@@ -266,10 +267,10 @@
String pageName = plugin.getNewEntryPage( engine, blogid );
- WikiPage entryPage = new WikiPage( engine, pageName );
+ WikiPage entryPage = engine.createPage( WikiName.valueOf( pageName ) );
entryPage.setAuthor( username );
- WikiContext context = engine.getWikiContextFactory().newViewContext( null, null, entryPage );
+ WikiContext context = engine.getWikiContextFactory().newViewContext( entryPage );
StringBuilder text = new StringBuilder();
text.append( "!"+content.get("title") );
@@ -366,7 +367,7 @@
WikiPage entryPage = (WikiPage)page.clone();
entryPage.setAuthor( username );
- WikiContext context = engine.getWikiContextFactory().newViewContext( null, null, entryPage );
+ WikiContext context = engine.getWikiContextFactory().newViewContext( entryPage );
StringBuilder text = new StringBuilder();
text.append( "!"+content.get("title") );
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/xmlrpc/RPCHandler.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/xmlrpc/RPCHandler.java?rev=728275&r1=728274&r2=728275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/xmlrpc/RPCHandler.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/xmlrpc/RPCHandler.java Sat Dec 20 04:02:17 2008
@@ -267,7 +267,7 @@
LinkCollector extCollector = new LinkCollector();
LinkCollector attCollector = new LinkCollector();
- WikiContext context = m_engine.getWikiContextFactory().newViewContext( null, null, page );
+ WikiContext context = m_engine.getWikiContextFactory().newViewContext( page );
context.setVariable( WikiEngine.PROP_REFSTYLE, "absolute" );
m_engine.textToHTML( context,
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/xmlrpc/RPCHandlerUTF8.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/xmlrpc/RPCHandlerUTF8.java?rev=728275&r1=728274&r2=728275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/xmlrpc/RPCHandlerUTF8.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/xmlrpc/RPCHandlerUTF8.java Sat Dec 20 04:02:17 2008
@@ -219,7 +219,7 @@
LinkCollector extCollector = new LinkCollector();
LinkCollector attCollector = new LinkCollector();
- WikiContext context = m_engine.getWikiContextFactory().newViewContext( null, null, page );
+ WikiContext context = m_engine.getWikiContextFactory().newViewContext( page );
context.setVariable( WikiEngine.PROP_REFSTYLE, "absolute" );
m_engine.textToHTML( context,
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/TestEngine.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/TestEngine.java?rev=728275&r1=728274&r2=728275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/TestEngine.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/TestEngine.java Sat Dec 20 04:02:17 2008
@@ -28,8 +28,6 @@
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
-import org.apache.jspwiki.api.WikiException;
-
import net.sourceforge.stripes.controller.DispatcherServlet;
import net.sourceforge.stripes.controller.StripesFilter;
import net.sourceforge.stripes.mock.MockHttpServletRequest;
@@ -37,8 +35,7 @@
import net.sourceforge.stripes.mock.MockRoundtrip;
import net.sourceforge.stripes.mock.MockServletContext;
-import com.ecyrd.jspwiki.log.Logger;
-import com.ecyrd.jspwiki.log.LoggerFactory;
+import org.apache.jspwiki.api.WikiException;
import com.ecyrd.jspwiki.action.WikiActionBean;
import com.ecyrd.jspwiki.attachment.Attachment;
@@ -46,6 +43,9 @@
import com.ecyrd.jspwiki.auth.SessionMonitor;
import com.ecyrd.jspwiki.auth.Users;
import com.ecyrd.jspwiki.auth.WikiSecurityException;
+import com.ecyrd.jspwiki.content.WikiName;
+import com.ecyrd.jspwiki.log.Logger;
+import com.ecyrd.jspwiki.log.LoggerFactory;
import com.ecyrd.jspwiki.providers.AbstractFileProvider;
import com.ecyrd.jspwiki.providers.BasicAttachmentProvider;
import com.ecyrd.jspwiki.providers.FileSystemProvider;
@@ -348,7 +348,7 @@
Users.ADMIN_PASS );
// Create page and wiki context
- WikiPage page = new WikiPage( this, pageName );
+ WikiPage page = createPage( WikiName.valueOf( pageName ) );
WikiContext context = this.getWikiContextFactory().newViewContext( request, null, page );
saveText( context, content );
}
@@ -364,7 +364,7 @@
Users.JANNE_PASS );
// Create page and wiki context
- WikiPage page = new WikiPage( this, pageName );
+ WikiPage page = createPage( WikiName.valueOf( pageName ) );
WikiContext context = this.getWikiContextFactory().newViewContext( request, null, page );
saveText( context, content );
}
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/VariableManagerTest.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/VariableManagerTest.java?rev=728275&r1=728274&r2=728275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/VariableManagerTest.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/VariableManagerTest.java Sat Dec 20 04:02:17 2008
@@ -21,9 +21,14 @@
package com.ecyrd.jspwiki;
-import junit.framework.*;
-import java.io.*;
-import java.util.*;
+import java.io.IOException;
+import java.util.Properties;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import com.ecyrd.jspwiki.content.WikiName;
public class VariableManagerTest extends TestCase
{
@@ -47,7 +52,7 @@
m_variableManager = new VariableManager( props );
TestEngine testEngine = new TestEngine( props );
- m_context = testEngine.getWikiContextFactory().newViewContext( null, null, new WikiPage( testEngine, PAGE_NAME ) );
+ m_context = testEngine.getWikiContextFactory().newViewContext( testEngine.createPage(WikiName.valueOf(PAGE_NAME)) );
}
catch( IOException e ) {}
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/WikiEngineTest.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/WikiEngineTest.java?rev=728275&r1=728274&r2=728275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/WikiEngineTest.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/WikiEngineTest.java Sat Dec 20 04:02:17 2008
@@ -31,6 +31,7 @@
import com.ecyrd.jspwiki.util.FileUtil;
import com.ecyrd.jspwiki.util.TextUtil;
import com.ecyrd.jspwiki.attachment.*;
+import com.ecyrd.jspwiki.content.WikiName;
public class WikiEngineTest extends TestCase
{
@@ -144,7 +145,7 @@
public void testNonExistantPage2()
throws Exception
{
- WikiPage page = new WikiPage(m_engine, "Test1");
+ WikiPage page = m_engine.createPage( WikiName.valueOf( "Test1" ) );
assertEquals( "Page already exists",
false,
@@ -280,7 +281,7 @@
{
String src="Foobar. [Foobar]. Frobozz. [This is a link].";
- Object[] result = m_engine.scanWikiLinks( new WikiPage(m_engine, "Test"), src ).toArray();
+ Object[] result = m_engine.scanWikiLinks( m_engine.createPage( WikiName.valueOf( "Test" ) ), src ).toArray();
assertEquals( "item 0", "Foobar", result[0] );
assertEquals( "item 1", "This is a link", result[1] );
@@ -913,7 +914,7 @@
Collection pages = m_engine.getReferenceManager().findReferrers( "RenameBugTestPage" );
assertEquals( "has one", "OldNameTestPage", pages.iterator().next() );
- WikiContext ctx = m_engine.getWikiContextFactory().newViewContext( null, null, m_engine.getPage("OldNameTestPage") );
+ WikiContext ctx = m_engine.getWikiContextFactory().newViewContext( m_engine.getPage("OldNameTestPage") );
m_engine.renamePage( ctx, "OldNameTestPage", "NewNameTestPage", true );
@@ -929,9 +930,9 @@
public void testChangeNoteOldVersion2() throws Exception
{
- WikiPage p = new WikiPage( m_engine, NAME1 );
+ WikiPage p = m_engine.createPage( WikiName.valueOf( NAME1 ) );
- WikiContext context = m_engine.getWikiContextFactory().newViewContext( null, null, p );
+ WikiContext context = m_engine.getWikiContextFactory().newViewContext( p );
context.getPage().setAttribute( WikiPage.CHANGENOTE, "Test change" );
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/attachment/AttachmentManagerTest.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/attachment/AttachmentManagerTest.java?rev=728275&r1=728274&r2=728275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/attachment/AttachmentManagerTest.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/attachment/AttachmentManagerTest.java Sat Dec 20 04:02:17 2008
@@ -30,7 +30,7 @@
import junit.framework.TestSuite;
import com.ecyrd.jspwiki.TestEngine;
-import com.ecyrd.jspwiki.WikiPage;
+import com.ecyrd.jspwiki.content.WikiName;
import com.ecyrd.jspwiki.providers.ProviderException;
import com.ecyrd.jspwiki.util.FileUtil;
@@ -104,7 +104,7 @@
m_manager.storeAttachment( att, makeAttachmentFile() );
Attachment att2 = m_manager.getAttachmentInfo( m_engine.getWikiContextFactory().newViewContext(
- null, null, new WikiPage(m_engine, NAME1)),
+ m_engine.createPage( NAME1 )),
"test1.txt" );
assertNotNull( "attachment disappeared", att2 );
@@ -134,8 +134,7 @@
m_manager.storeAttachment( att, makeAttachmentFile() );
- Attachment att2 = m_manager.getAttachmentInfo( m_engine.getWikiContextFactory().newViewContext(
- null, null, new WikiPage(m_engine, NAME1)),
+ Attachment att2 = m_manager.getAttachmentInfo( m_engine.getWikiContextFactory().newViewContext(m_engine.getPage( NAME1 )),
"test file.txt" );
assertNotNull( "attachment disappeared", att2 );
@@ -165,8 +164,7 @@
m_manager.storeAttachment( att, makeAttachmentFile() );
- Attachment att2 = m_manager.getAttachmentInfo( m_engine.getWikiContextFactory().newViewContext(
- null, null, new WikiPage(m_engine, NAME1)),
+ Attachment att2 = m_manager.getAttachmentInfo( m_engine.getWikiContextFactory().newViewContext(m_engine.getPage(NAME1)),
"test1.txt", 1 );
assertNotNull( "attachment disappeared", att2 );
@@ -200,8 +198,7 @@
att.setAuthor( "FooBar" );
m_manager.storeAttachment( att, makeAttachmentFile() );
- Attachment att2 = m_manager.getAttachmentInfo( m_engine.getWikiContextFactory().newViewContext(
- null, null, new WikiPage(m_engine, NAME1)),
+ Attachment att2 = m_manager.getAttachmentInfo( m_engine.getWikiContextFactory().newViewContext(m_engine.getPage(NAME1)),
"test1.txt" );
assertNotNull( "attachment disappeared", att2 );
@@ -226,8 +223,7 @@
// Check that first author did not disappear
//
- Attachment att3 = m_manager.getAttachmentInfo( m_engine.getWikiContextFactory().newViewContext(
- null, null, new WikiPage(m_engine, NAME1)),
+ Attachment att3 = m_manager.getAttachmentInfo( m_engine.getWikiContextFactory().newViewContext(m_engine.getPage(NAME1)),
"test1.txt",
1 );
assertEquals( "version of v1", 1, att3.getVersion() );
@@ -243,7 +239,7 @@
m_manager.storeAttachment( att, makeAttachmentFile() );
- Collection c = m_manager.listAttachments( new WikiPage(m_engine, NAME1) );
+ Collection c = m_manager.listAttachments( m_engine.getPage(NAME1) );
assertEquals( "Length", 1, c.size() );
@@ -261,8 +257,7 @@
m_manager.storeAttachment( att, makeAttachmentFile() );
- Attachment att2 = m_manager.getAttachmentInfo( m_engine.getWikiContextFactory().newViewContext(
- null, null, new WikiPage(m_engine, NAME1)),
+ Attachment att2 = m_manager.getAttachmentInfo( m_engine.getWikiContextFactory().newViewContext(m_engine.getPage( NAME1 )),
"test1" );
assertNotNull( "attachment disappeared", att2 );
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/content/PageRenamerTest.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/content/PageRenamerTest.java?rev=728275&r1=728274&r2=728275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/content/PageRenamerTest.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/content/PageRenamerTest.java Sat Dec 20 04:02:17 2008
@@ -84,7 +84,7 @@
WikiPage p = m_engine.getPage("TestPage");
- WikiContext context = m_engine.getWikiContextFactory().newViewContext( null, null, p );
+ WikiContext context = m_engine.getWikiContextFactory().newViewContext( p );
m_engine.renamePage(context, "TestPage", "FooTest", false);
@@ -110,7 +110,7 @@
WikiPage p = m_engine.getPage("TestPage");
- WikiContext context = m_engine.getWikiContextFactory().newViewContext( null, null, p );
+ WikiContext context = m_engine.getWikiContextFactory().newViewContext( p );
m_engine.renamePage(context, "TestPage", "FooTest", true);
@@ -135,7 +135,7 @@
WikiPage p = m_engine.getPage("TestPage");
- WikiContext context = m_engine.getWikiContextFactory().newViewContext( null, null, p );
+ WikiContext context = m_engine.getWikiContextFactory().newViewContext( p );
m_engine.renamePage(context, "TestPage", "FooTest", true);
@@ -159,7 +159,7 @@
WikiPage p = m_engine.getPage("TestPage");
- WikiContext context = m_engine.getWikiContextFactory().newViewContext( null, null, p );
+ WikiContext context = m_engine.getWikiContextFactory().newViewContext( p );
m_engine.renamePage(context, "TestPage", "FooTest", true);
@@ -183,7 +183,7 @@
WikiPage p = m_engine.getPage("TestPage");
- WikiContext context = m_engine.getWikiContextFactory().newViewContext( null, null, p );
+ WikiContext context = m_engine.getWikiContextFactory().newViewContext( p );
m_engine.renamePage(context, "TestPage", "FooTest", true);
@@ -210,7 +210,7 @@
WikiPage p = m_engine.getPage("TestPage");
- WikiContext context = m_engine.getWikiContextFactory().newViewContext( null, null, p );
+ WikiContext context = m_engine.getWikiContextFactory().newViewContext( p );
m_engine.renamePage(context, "Test", "TestPage", true);
@@ -229,7 +229,7 @@
m_engine.addAttachment("TestPage", "bar.jpg", "pr0n".getBytes() );
WikiPage p = m_engine.getPage("TestPage");
- WikiContext context = m_engine.getWikiContextFactory().newViewContext( null, null, p );
+ WikiContext context = m_engine.getWikiContextFactory().newViewContext( p );
m_engine.renamePage(context, "TestPage", "FooTest", true);
@@ -307,7 +307,7 @@
{
WikiPage p = m_engine.getPage(src);
- WikiContext context = m_engine.getWikiContextFactory().newViewContext( null, null, p );
+ WikiContext context = m_engine.getWikiContextFactory().newViewContext( p );
m_engine.renamePage(context, src, dst, true);
}
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/diff/ContextualDiffProviderTest.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/diff/ContextualDiffProviderTest.java?rev=728275&r1=728274&r2=728275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/diff/ContextualDiffProviderTest.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/diff/ContextualDiffProviderTest.java Sat Dec 20 04:02:17 2008
@@ -30,6 +30,7 @@
import junit.framework.TestSuite;
import com.ecyrd.jspwiki.*;
+import com.ecyrd.jspwiki.content.WikiName;
public class ContextualDiffProviderTest extends TestCase
{
@@ -201,7 +202,7 @@
props.load( TestEngine.findTestProperties() );
TestEngine engine = new TestEngine(props);
- WikiContext ctx = engine.getWikiContextFactory().newViewContext( null, null, new WikiPage(engine,"Dummy") );
+ WikiContext ctx = engine.getWikiContextFactory().newViewContext( engine.createPage( "Dummy" ) );
String actualDiff = diff.makeDiffHtml( ctx, oldText, newText);
assertEquals(expectedDiff, actualDiff);
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/parser/JSPWikiMarkupParserTest.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/parser/JSPWikiMarkupParserTest.java?rev=728275&r1=728274&r2=728275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/parser/JSPWikiMarkupParserTest.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/parser/JSPWikiMarkupParserTest.java Sat Dec 20 04:02:17 2008
@@ -40,6 +40,7 @@
import com.ecyrd.jspwiki.*;
import com.ecyrd.jspwiki.attachment.Attachment;
+import com.ecyrd.jspwiki.content.WikiName;
import com.ecyrd.jspwiki.providers.BasicAttachmentProvider;
import com.ecyrd.jspwiki.render.XHTMLRenderer;
import com.ecyrd.jspwiki.util.TextUtil;
@@ -99,7 +100,7 @@
NoRequiredPropertyException,
ServletException
{
- return translate( new WikiPage(testEngine, PAGE_NAME), src );
+ return translate( testEngine.createPage( WikiName.valueOf( PAGE_NAME ) ), src );
}
private String translate( WikiEngine e, String src )
@@ -107,7 +108,7 @@
NoRequiredPropertyException,
ServletException
{
- return translate( e, new WikiPage(testEngine, PAGE_NAME), src );
+ return translate( e, e.createPage( WikiName.valueOf( PAGE_NAME ) ), src );
}
@@ -124,7 +125,7 @@
NoRequiredPropertyException,
ServletException
{
- WikiContext context = e.getWikiContextFactory().newViewContext( null, null, p );
+ WikiContext context = e.getWikiContextFactory().newViewContext( p );
JSPWikiMarkupParser tr = new JSPWikiMarkupParser( context,
new BufferedReader( new StringReader(src)) );
@@ -144,8 +145,7 @@
props.setProperty( "jspwiki.translatorReader.useRelNofollow", "true" );
TestEngine testEngine2 = new TestEngine( props );
- WikiContext context = testEngine2.getWikiContextFactory().newViewContext( null, null,
- new WikiPage(testEngine2, PAGE_NAME) );
+ WikiContext context = testEngine2.getWikiContextFactory().newViewContext( testEngine2.createPage( PAGE_NAME ) );
JSPWikiMarkupParser r = new JSPWikiMarkupParser( context,
new BufferedReader( new StringReader(src)) );
@@ -1199,7 +1199,7 @@
props.setProperty( "jspwiki.translatorReader.allowHTML", "true" );
testEngine = new TestEngine( props );
- WikiPage page = new WikiPage(testEngine,PAGE_NAME);
+ WikiPage page = testEngine.createPage( WikiName.valueOf( PAGE_NAME ) );
String out = translate( testEngine, page, src );
@@ -1214,7 +1214,7 @@
props.setProperty( "jspwiki.translatorReader.allowHTML", "true" );
testEngine = new TestEngine( props );
- WikiPage page = new WikiPage(testEngine,PAGE_NAME);
+ WikiPage page = testEngine.createPage( WikiName.valueOf( PAGE_NAME ) );
String out = translate( testEngine, page, src );
@@ -2246,7 +2246,7 @@
{
String src = "Foobar.[{SET name=foo}]";
- WikiPage p = new WikiPage( testEngine, PAGE_NAME );
+ WikiPage p = testEngine.createPage( WikiName.valueOf( PAGE_NAME ) );
String res = translate( p, src );
@@ -2260,7 +2260,7 @@
{
String src = "Foobar.[{SET name = foo}]";
- WikiPage p = new WikiPage( testEngine, PAGE_NAME );
+ WikiPage p = testEngine.createPage( WikiName.valueOf( PAGE_NAME ) );
String res = translate( p, src );
@@ -2274,7 +2274,7 @@
{
String src = "Foobar.[{SET name= Janne Jalkanen}]";
- WikiPage p = new WikiPage( testEngine, PAGE_NAME );
+ WikiPage p = testEngine.createPage( WikiName.valueOf( PAGE_NAME ) );
String res = translate( p, src );
@@ -2288,7 +2288,7 @@
{
String src = "Foobar.[{SET name='Janne Jalkanen'}][{SET too='{$name}'}]";
- WikiPage p = new WikiPage( testEngine, PAGE_NAME );
+ WikiPage p = testEngine.createPage( WikiName.valueOf( PAGE_NAME ) );
String res = translate( p, src );
@@ -2303,7 +2303,7 @@
{
String src = "Foobar.[{SET name='<b>danger</b>'}] [{$name}]";
- WikiPage p = new WikiPage( testEngine, PAGE_NAME );
+ WikiPage p = testEngine.createPage( WikiName.valueOf( PAGE_NAME ) );
String res = translate( p, src );
@@ -2322,8 +2322,7 @@
{
LinkCollector coll = new LinkCollector();
String src = "[Test]";
- WikiContext context = testEngine.getWikiContextFactory().newViewContext( null, null,
- new WikiPage(testEngine,PAGE_NAME) );
+ WikiContext context = testEngine.getWikiContextFactory().newViewContext( testEngine.createPage( PAGE_NAME ) );
MarkupParser p = new JSPWikiMarkupParser( context,
new BufferedReader( new StringReader(src)) );
@@ -2345,8 +2344,7 @@
LinkCollector coll = new LinkCollector();
String src = "["+PAGE_NAME+"/Test.txt]";
- WikiContext context = testEngine.getWikiContextFactory().newViewContext( null, null,
- new WikiPage(testEngine,PAGE_NAME) );
+ WikiContext context = testEngine.getWikiContextFactory().newViewContext( testEngine.createPage( PAGE_NAME ) );
MarkupParser p = new JSPWikiMarkupParser( context,
new BufferedReader( new StringReader(src)) );
@@ -2379,8 +2377,7 @@
LinkCollector coll_others = new LinkCollector();
String src = "[TestAtt.txt]";
- WikiContext context = testEngine.getWikiContextFactory().newViewContext( null, null,
- new WikiPage(testEngine,PAGE_NAME) );
+ WikiContext context = testEngine.getWikiContextFactory().newViewContext( testEngine.createPage( PAGE_NAME ) );
MarkupParser p = new JSPWikiMarkupParser( context,
new BufferedReader( new StringReader(src)) );
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/plugin/CounterPluginTest.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/plugin/CounterPluginTest.java?rev=728275&r1=728274&r2=728275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/plugin/CounterPluginTest.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/plugin/CounterPluginTest.java Sat Dec 20 04:02:17 2008
@@ -34,7 +34,7 @@
import com.ecyrd.jspwiki.NoRequiredPropertyException;
import com.ecyrd.jspwiki.TestEngine;
import com.ecyrd.jspwiki.WikiContext;
-import com.ecyrd.jspwiki.WikiPage;
+import com.ecyrd.jspwiki.content.WikiName;
import com.ecyrd.jspwiki.parser.JSPWikiMarkupParser;
import com.ecyrd.jspwiki.parser.MarkupParser;
import com.ecyrd.jspwiki.parser.WikiDocument;
@@ -68,8 +68,7 @@
NoRequiredPropertyException,
ServletException
{
- WikiContext context = testEngine.getWikiContextFactory().newViewContext( null, null,
- new WikiPage(testEngine, "TestPage") );
+ WikiContext context = testEngine.getWikiContextFactory().newViewContext( testEngine.createPage( "TestPage" ) );
MarkupParser p = new JSPWikiMarkupParser( context, new StringReader(src) );
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/plugin/PluginManagerTest.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/plugin/PluginManagerTest.java?rev=728275&r1=728274&r2=728275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/plugin/PluginManagerTest.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/plugin/PluginManagerTest.java Sat Dec 20 04:02:17 2008
@@ -31,7 +31,7 @@
import com.ecyrd.jspwiki.TestEngine;
import com.ecyrd.jspwiki.WikiContext;
import com.ecyrd.jspwiki.WikiEngine;
-import com.ecyrd.jspwiki.WikiPage;
+import com.ecyrd.jspwiki.content.WikiName;
import com.ecyrd.jspwiki.plugin.PluginManager.WikiPluginInfo;
import com.ecyrd.jspwiki.providers.ProviderException;
@@ -58,7 +58,7 @@
props.load( TestEngine.findTestProperties() );
engine = new TestEngine(props);
- context = engine.getWikiContextFactory().newViewContext( null, null, new WikiPage(engine, "Testpage") );
+ context = engine.getWikiContextFactory().newViewContext( engine.createPage( "Testpage" ) );
manager = new PluginManager( engine, props );
}
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/plugin/ReferringPagesPluginTest.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/plugin/ReferringPagesPluginTest.java?rev=728275&r1=728274&r2=728275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/plugin/ReferringPagesPluginTest.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/plugin/ReferringPagesPluginTest.java Sat Dec 20 04:02:17 2008
@@ -32,7 +32,7 @@
import com.ecyrd.jspwiki.TestEngine;
import com.ecyrd.jspwiki.WikiContext;
-import com.ecyrd.jspwiki.WikiPage;
+import com.ecyrd.jspwiki.content.WikiName;
public class ReferringPagesPluginTest extends TestCase
{
@@ -63,7 +63,7 @@
engine.saveText( "Foobar6", "Reference to [TestPage]." );
engine.saveText( "Foobar7", "Reference to [TestPage]." );
- context = engine.getWikiContextFactory().newViewContext( null, null, new WikiPage(engine,"TestPage") );
+ context = engine.getWikiContextFactory().newViewContext( engine.createPage( "TestPage" ) );
manager = new PluginManager( engine, props );
}
@@ -92,7 +92,7 @@
public void testSingleReferral()
throws Exception
{
- WikiContext context2 = engine.getWikiContextFactory().newViewContext( null, null, new WikiPage(engine, "Foobar") );
+ WikiContext context2 = engine.getWikiContextFactory().newViewContext( engine.createPage( "Foobar" ) );
String res = manager.execute( context2,
"{INSERT com.ecyrd.jspwiki.plugin.ReferringPagesPlugin WHERE max=5}");
@@ -133,7 +133,7 @@
public void testReferenceWidth()
throws Exception
{
- WikiContext context2 = engine.getWikiContextFactory().newViewContext( null, null, new WikiPage(engine, "Foobar") );
+ WikiContext context2 = engine.getWikiContextFactory().newViewContext( engine.createPage( "Foobar" ) );
String res = manager.execute( context2,
"{INSERT com.ecyrd.jspwiki.plugin.ReferringPagesPlugin WHERE maxwidth=5}");
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/plugin/UndefinedPagesPluginTest.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/plugin/UndefinedPagesPluginTest.java?rev=728275&r1=728274&r2=728275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/plugin/UndefinedPagesPluginTest.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/plugin/UndefinedPagesPluginTest.java Sat Dec 20 04:02:17 2008
@@ -31,7 +31,6 @@
import com.ecyrd.jspwiki.TestEngine;
import com.ecyrd.jspwiki.WikiContext;
-import com.ecyrd.jspwiki.WikiPage;
public class UndefinedPagesPluginTest extends TestCase
{
@@ -55,7 +54,7 @@
engine.saveText( "TestPage", "Reference to [Foobar]." );
engine.saveText( "Foobar", "Reference to [Foobar 2], [Foobars]" );
- context = engine.getWikiContextFactory().newViewContext( null, null, new WikiPage(engine, "TestPage") );
+ context = engine.getWikiContextFactory().newViewContext( engine.createPage( "TestPage") );
manager = new PluginManager( engine, props );
}
@@ -79,7 +78,7 @@
public void testSimpleUndefined()
throws Exception
{
- WikiContext context2 = engine.getWikiContextFactory().newViewContext( null, null, new WikiPage(engine, "Foobar") );
+ WikiContext context2 = engine.getWikiContextFactory().newViewContext( engine.createPage( "Foobar") );
String res = manager.execute( context2,
"{INSERT com.ecyrd.jspwiki.plugin.UndefinedPagesPlugin");
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/providers/CounterProvider.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/providers/CounterProvider.java?rev=728275&r1=728274&r2=728275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/providers/CounterProvider.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/providers/CounterProvider.java Sat Dec 20 04:02:17 2008
@@ -50,10 +50,10 @@
public void initialize( WikiEngine engine, Properties props )
{
m_pages = new WikiPage[]
- { new WikiPage(engine, "Foo"),
- new WikiPage(engine, "Bar"),
- new WikiPage(engine, "Blat"),
- new WikiPage(engine, "Blaa") };
+ { engine.createPage("Foo"),
+ engine.createPage("Bar"),
+ engine.createPage("Blat"),
+ engine.createPage("Blaa") };
m_initCalls++;
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/providers/FileSystemProviderTest.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/providers/FileSystemProviderTest.java?rev=728275&r1=728274&r2=728275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/providers/FileSystemProviderTest.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/providers/FileSystemProviderTest.java Sat Dec 20 04:02:17 2008
@@ -70,7 +70,7 @@
public void testScandinavianLetters()
throws Exception
{
- WikiPage page = new WikiPage(m_engine, "\u00c5\u00e4Test");
+ WikiPage page = m_engine.createPage("\u00c5\u00e4Test");
m_provider.putPageText( page, "test" );
@@ -87,7 +87,7 @@
public void testScandinavianLettersUTF8()
throws Exception
{
- WikiPage page = new WikiPage(m_engine, "\u00c5\u00e4Test");
+ WikiPage page = m_engine.createPage("\u00c5\u00e4Test");
m_providerUTF8.putPageText( page, "test\u00d6" );
@@ -108,7 +108,7 @@
public void testSlashesInPageNamesUTF8()
throws Exception
{
- WikiPage page = new WikiPage(m_engine, "Test/Foobar");
+ WikiPage page = m_engine.createPage("Test/Foobar");
m_providerUTF8.putPageText( page, "test" );
@@ -125,7 +125,7 @@
public void testSlashesInPageNames()
throws Exception
{
- WikiPage page = new WikiPage(m_engine, "Test/Foobar");
+ WikiPage page = m_engine.createPage("Test/Foobar");
m_provider.putPageText( page, "test" );
@@ -142,7 +142,7 @@
public void testDotsInBeginning()
throws Exception
{
- WikiPage page = new WikiPage(m_engine, ".Test");
+ WikiPage page = m_engine.createPage(".Test");
m_provider.putPageText( page, "test" );
@@ -160,7 +160,7 @@
{
try
{
- WikiPage page = new WikiPage(m_engine, "\u00c5\u00e4Test");
+ WikiPage page = m_engine.createPage("\u00c5\u00e4Test");
page.setAuthor("Min\u00e4");
m_provider.putPageText( page, "test" );
@@ -255,7 +255,7 @@
{
String files = props.getProperty( FileSystemProvider.PROP_PAGEDIR );
- WikiPage p = new WikiPage(m_engine,"Test");
+ WikiPage p = m_engine.createPage("Test");
p.setAuthor("AnonymousCoward");
m_provider.putPageText( p, "v1" );
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/providers/RCSFileProviderTest.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/providers/RCSFileProviderTest.java?rev=728275&r1=728274&r2=728275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/providers/RCSFileProviderTest.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/providers/RCSFileProviderTest.java Sat Dec 20 04:02:17 2008
@@ -219,9 +219,9 @@
public void testChangeNote()
throws Exception
{
- WikiPage p = new WikiPage( engine, NAME1 );
+ WikiPage p = engine.createPage( NAME1 );
p.setAttribute(WikiPage.CHANGENOTE, "Test change" );
- WikiContext context = engine.getWikiContextFactory().newViewContext(null, null, p);
+ WikiContext context = engine.getWikiContextFactory().newViewContext(p);
engine.saveText( context, "test" );
@@ -233,8 +233,8 @@
public void testChangeNoteOldVersion()
throws Exception
{
- WikiPage p = new WikiPage( engine, NAME1 );
- WikiContext context = engine.getWikiContextFactory().newViewContext(null, null, p);
+ WikiPage p = engine.createPage( NAME1 );
+ WikiContext context = engine.getWikiContextFactory().newViewContext(p);
context.getPage().setAttribute(WikiPage.CHANGENOTE, "Test change" );
engine.saveText( context, "test" );
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/providers/VersioningFileProviderTest.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/providers/VersioningFileProviderTest.java?rev=728275&r1=728274&r2=728275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/providers/VersioningFileProviderTest.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/providers/VersioningFileProviderTest.java Sat Dec 20 04:02:17 2008
@@ -291,9 +291,9 @@
public void testChangeNote()
throws Exception
{
- WikiPage p = new WikiPage( engine, NAME1 );
+ WikiPage p = engine.createPage( NAME1 );
p.setAttribute(WikiPage.CHANGENOTE, "Test change" );
- WikiContext context = engine.getWikiContextFactory().newViewContext(null, null, p);
+ WikiContext context = engine.getWikiContextFactory().newViewContext(p);
engine.saveText( context, "test" );
@@ -305,10 +305,10 @@
public void testChangeNoteOldVersion()
throws Exception
{
- WikiPage p = new WikiPage( engine, NAME1 );
+ WikiPage p = engine.createPage( NAME1 );
- WikiContext context = engine.getWikiContextFactory().newViewContext(null, null, p);
+ WikiContext context = engine.getWikiContextFactory().newViewContext(p);
context.getPage().setAttribute(WikiPage.CHANGENOTE, "Test change" );
engine.saveText( context, "test" );
@@ -327,9 +327,9 @@
public void testChangeNoteOldVersion2() throws Exception
{
- WikiPage p = new WikiPage( engine, NAME1 );
+ WikiPage p = engine.createPage( NAME1 );
- WikiContext context = engine.getWikiContextFactory().newViewContext( null, null, p );
+ WikiContext context = engine.getWikiContextFactory().newViewContext( p );
context.getPage().setAttribute( WikiPage.CHANGENOTE, "Test change" );
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/providers/VerySimpleProvider.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/providers/VerySimpleProvider.java?rev=728275&r1=728274&r2=728275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/providers/VerySimpleProvider.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/providers/VerySimpleProvider.java Sat Dec 20 04:02:17 2008
@@ -87,7 +87,7 @@
m_latestReq = page;
m_latestVers = version;
- WikiPage p = new WikiPage( m_engine, page );
+ WikiPage p = m_engine.createPage( page );
p.setVersion( 5 );
p.setAuthor( AUTHOR );
p.setLastModified( new Date(0L) );
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/render/CreoleRendererTest.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/render/CreoleRendererTest.java?rev=728275&r1=728274&r2=728275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/render/CreoleRendererTest.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/render/CreoleRendererTest.java Sat Dec 20 04:02:17 2008
@@ -48,8 +48,8 @@
private String render(String s) throws IOException
{
- WikiPage dummyPage = new WikiPage(m_testEngine,"TestPage");
- WikiContext ctx = m_testEngine.getWikiContextFactory().newViewContext( null, null, dummyPage );
+ WikiPage dummyPage = m_testEngine.createPage("TestPage");
+ WikiContext ctx = m_testEngine.getWikiContextFactory().newViewContext( dummyPage );
StringReader in = new StringReader(s);
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/render/RenderingManagerTest.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/render/RenderingManagerTest.java?rev=728275&r1=728274&r2=728275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/render/RenderingManagerTest.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/render/RenderingManagerTest.java Sat Dec 20 04:02:17 2008
@@ -75,7 +75,7 @@
WikiPage page = m_engine.getPage( "TestPage" );
String pagedata = m_engine.getPureText( page );
- WikiContext context = m_engine.getWikiContextFactory().newViewContext( null, null, page );
+ WikiContext context = m_engine.getWikiContextFactory().newViewContext( page );
MarkupParser p = m_manager.getParser( context, pagedata );
@@ -98,7 +98,7 @@
WikiPage page = m_engine.getPage( "TestPage" );
String pagedata = m_engine.getPureText( page );
- WikiContext context = m_engine.getWikiContextFactory().newViewContext( null, null, page );
+ WikiContext context = m_engine.getWikiContextFactory().newViewContext( page );
String html = m_manager.getHTML( context, pagedata );
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/render/WysiwygEditingRendererTest.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/render/WysiwygEditingRendererTest.java?rev=728275&r1=728274&r2=728275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/render/WysiwygEditingRendererTest.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/render/WysiwygEditingRendererTest.java Sat Dec 20 04:02:17 2008
@@ -57,8 +57,8 @@
private String render(String s) throws IOException
{
- WikiPage dummyPage = new WikiPage(m_testEngine,"TestPage");
- WikiContext ctx = m_testEngine.getWikiContextFactory().newViewContext( null, null, dummyPage );
+ WikiPage dummyPage = m_testEngine.createPage("TestPage");
+ WikiContext ctx = m_testEngine.getWikiContextFactory().newViewContext( dummyPage );
StringReader in = new StringReader(s);
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/rss/RSSGeneratorTest.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/rss/RSSGeneratorTest.java?rev=728275&r1=728274&r2=728275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/rss/RSSGeneratorTest.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/rss/RSSGeneratorTest.java Sat Dec 20 04:02:17 2008
@@ -82,7 +82,7 @@
RSSGenerator gen = m_testEngine.getRSSGenerator();
- WikiContext context = m_testEngine.getWikiContextFactory().newViewContext( null, null, m_testEngine.getPage("TestBlog") );
+ WikiContext context = m_testEngine.getWikiContextFactory().newViewContext( m_testEngine.getPage("TestBlog") );
WeblogPlugin blogplugin = new WeblogPlugin();
@@ -112,7 +112,7 @@
RSSGenerator gen = m_testEngine.getRSSGenerator();
- WikiContext context = m_testEngine.getWikiContextFactory().newViewContext( null, null, m_testEngine.getPage("TestBlog") );
+ WikiContext context = m_testEngine.getWikiContextFactory().newViewContext( m_testEngine.getPage("TestBlog") );
WeblogPlugin blogplugin = new WeblogPlugin();
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/ui/InputValidatorTest.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/ui/InputValidatorTest.java?rev=728275&r1=728274&r2=728275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/ui/InputValidatorTest.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/ui/InputValidatorTest.java Sat Dec 20 04:02:17 2008
@@ -33,7 +33,6 @@
import com.ecyrd.jspwiki.TestEngine;
import com.ecyrd.jspwiki.WikiContext;
-import com.ecyrd.jspwiki.WikiPage;
public class InputValidatorTest extends TestCase
{
@@ -48,7 +47,7 @@
Properties props = new Properties();
props.load( TestEngine.findTestProperties() );
testEngine = new TestEngine( props );
- WikiContext context = testEngine.getWikiContextFactory().newViewContext( null, null, new WikiPage(testEngine,"dummyPage") );
+ WikiContext context = testEngine.getWikiContextFactory().newViewContext( testEngine.createPage("dummyPage") );
val = new InputValidator( TEST, context );
}
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/util/MailUtilTest.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/util/MailUtilTest.java?rev=728275&r1=728274&r2=728275&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/util/MailUtilTest.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/util/MailUtilTest.java Sat Dec 20 04:02:17 2008
@@ -32,8 +32,6 @@
import com.ecyrd.jspwiki.TestEngine;
import com.ecyrd.jspwiki.WikiContext;
-import com.ecyrd.jspwiki.WikiPage;
-import com.ecyrd.jspwiki.util.MailUtil;
/**
* This test is not integrated into any TestSuite yet, because I don't know how
@@ -72,7 +70,7 @@
TestEngine testEngine = new TestEngine( m_props );
- m_context = testEngine.getWikiContextFactory().newViewContext( null, null, new WikiPage( testEngine, PAGE_NAME ) );
+ m_context = testEngine.getWikiContextFactory().newViewContext( testEngine.createPage( PAGE_NAME ) );
}
public void tearDown()