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/21 13:14:03 UTC
svn commit: r728430 [1/3] - in
/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH: ./ lib/
src/com/ecyrd/jspwiki/ src/com/ecyrd/jspwiki/action/
src/com/ecyrd/jspwiki/attachment/ src/com/ecyrd/jspwiki/auth/
src/com/ecyrd/jspwiki/auth/acl/ src/com/ecyrd/jspw...
Author: jalkanen
Date: Sun Dec 21 04:13:58 2008
New Revision: 728430
URL: http://svn.apache.org/viewvc?rev=728430&view=rev
Log:
Merge with trunk r728420.
Added:
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/util/RegExpUtil.java
- copied unchanged from r728427, incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/util/RegExpUtil.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/org/apache/jspwiki/api/WikiPage.java
- copied, changed from r728427, incubator/jspwiki/trunk/src/org/apache/jspwiki/api/WikiPage.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/plugin/ReferredPagesPluginTest.java
- copied unchanged from r728427, incubator/jspwiki/trunk/tests/com/ecyrd/jspwiki/plugin/ReferredPagesPluginTest.java
Removed:
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/lib/oro.jar
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/WikiPage.java
Modified:
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/.classpath
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/ChangeLog
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/build.xml
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/JCRWikiPage.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/PageLock.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/PageManager.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/PageTimeComparator.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/ReferenceManager.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/Release.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/VariableManager.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/WikiContext.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/WikiEngine.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/WikiProvider.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/AbstractPageActionBean.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/RenameActionBean.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/attachment/AttachmentServlet.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/auth/AuthorizationManager.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/auth/acl/AclManager.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/auth/permissions/PagePermission.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/auth/permissions/PermissionFactory.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/content/ContentManager.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/content/PageRenamer.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/dav/AttachmentDavProvider.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/dav/DavUtil.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/dav/HTMLPagesDavProvider.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/dav/RawPagesDavProvider.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/dav/items/PageDavItem.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/diff/DifferenceManager.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/filters/SpamFilter.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/log/LoggerFactory.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/parser/JSPWikiMarkupParser.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/parser/WikiDocument.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/plugin/AbstractReferralPlugin.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/IfPlugin.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/plugin/InsertPage.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/plugin/PluginManager.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/plugin/RecentChangesPlugin.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/plugin/ReferredPagesPlugin.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/plugin/ReferringPagesPlugin.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/plugin/TableOfContents.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/plugin/WeblogArchivePlugin.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/plugin/WeblogEntryPlugin.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/plugin/WeblogPlugin.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/CachingAttachmentProvider.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/FileSystemProvider.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/providers/WikiAttachmentProvider.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/providers/WikiPageProvider.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/AtomFeed.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/rss/Entry.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/rss/RSS10Feed.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/rss/RSS20Feed.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/BasicSearchProvider.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/SearchManager.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/search/SearchMatcher.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/search/SearchProvider.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/search/SearchResult.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/tags/AttachmentsIteratorTag.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/tags/AuthorTag.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/tags/CalendarTag.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/tags/CheckLockTag.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/tags/CheckVersionTag.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/tags/CommentLinkTag.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/tags/DiffLinkTag.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/tags/EditLinkTag.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/tags/FeedDiscoveryTag.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/tags/HasAttachmentsTag.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/tags/HistoryIteratorTag.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/tags/InsertPageTag.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/tags/IteratorTag.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/tags/LinkTag.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/tags/LinkToParentTag.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/tags/LinkToTag.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/tags/NextVersionTag.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/tags/NoSuchPageTag.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/tags/PageDateTag.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/tags/PageInfoLinkTag.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/tags/PageNameTag.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/tags/PageSizeTag.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/tags/PageTypeTag.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/tags/PageVersionTag.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/tags/ParentPageNameTag.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/tags/PermissionTag.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/tags/PreviousVersionTag.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/ui/admin/beans/SearchManagerBean.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/ui/stripes/DefaultWikiContext.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/ui/stripes/HandlerPermission.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/ui/stripes/WikiActionBeanContext.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/ui/stripes/WikiInterceptor.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/ui/stripes/WikiPageTypeConverter.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/util/HttpUtil.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/util/ProviderConverter.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/xmlrpc/AbstractRPCHandler.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/src/webdocs/Comment.jsp
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/Delete.jsp
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/Diff.jsp
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/Edit.jsp
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/Search.jsp
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/rss.jsp
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/AJAXSearch.jsp
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/AttachmentTab.jsp
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/InfoContent.jsp
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/PageActionsBottom.jsp
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/PageTab.jsp
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/editors/FCK.jsp
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/webdocs/templates/default/editors/plain.jsp
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/TestEngine.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/WikiEngineTest.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/action/RenameActionBeanTest.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/action/ViewActionBeanTest.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/action/WikiContextFactoryTest.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/attachment/AttachmentManagerTest.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/auth/AuthorizationManagerTest.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/auth/UserManagerTest.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/auth/acl/DefaultAclManagerTest.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/com/ecyrd/jspwiki/content/ContentManagerTest.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/AllTests.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/providers/CachingProviderTest.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/xmlrpc/RPCHandlerTest.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/stress/StressTestRCSProvider.java
incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/tests/stress/StressTestVersioningProvider.java
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/.classpath
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/.classpath?rev=728430&r1=728429&r2=728430&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/.classpath (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/.classpath Sun Dec 21 04:13:58 2008
@@ -12,7 +12,6 @@
<classpathentry kind="lib" path="tests/lib/xercesImpl-2.6.2.jar"/>
<classpathentry kind="lib" path="lib/sandler.jar"/>
<classpathentry kind="lib" path="lib/oscache.jar"/>
- <classpathentry kind="lib" path="lib/oro.jar"/>
<classpathentry kind="lib" path="lib/nekohtml.jar"/>
<classpathentry kind="lib" path="lib/lucene.jar"/>
<classpathentry kind="lib" path="tests/lib/junit.jar"/>
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/ChangeLog
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/ChangeLog?rev=728430&r1=728429&r2=728430&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/ChangeLog (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/ChangeLog Sun Dec 21 04:13:58 2008
@@ -1,3 +1,19 @@
+2008-12-21 Janne Jalkanen <ja...@apache.org>
+
+ * 3.0.0-svn-38
+
+ * Second step in refactoring WikiPage: WikiPage is now a part
+ of the API package, and all internal methods are using that now.
+
+ * This is the Winter Solstice build (only two more hours to go and
+ then things start going for the better again).
+
+2008-12-20 Harry Metske <me...@apache.org>
+
+ * 3.0.0-svn-37
+
+ * JSPWIKI-291 Replace ORO regexp library with Java 5 regexps
+
2008-12-20 Andrew Jaquith <ajaquith AT apache DOT org>
* 3.0.0-svn-36
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/build.xml
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/build.xml?rev=728430&r1=728429&r2=728430&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/build.xml (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/build.xml Sun Dec 21 04:13:58 2008
@@ -672,7 +672,7 @@
<target name="tests" depends="jar,tests-init,jartests,tests-db-init"
description="Runs the JUnit tests.">
- <junit printsummary="yes" haltonfailure="no" fork="yes">
+ <junit printsummary="yes" haltonfailure="no" fork="yes" maxmemory="128m">
<classpath>
<path refid="path.tests" />
</classpath>
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/JCRWikiPage.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/JCRWikiPage.java?rev=728430&r1=728429&r2=728430&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/JCRWikiPage.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/JCRWikiPage.java Sun Dec 21 04:13:58 2008
@@ -20,10 +20,10 @@
*/
package com.ecyrd.jspwiki;
-import java.util.Date;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Map;
+import java.io.InputStream;
+import java.util.*;
+
+import org.apache.jspwiki.api.WikiPage;
import javax.jcr.Node;
import javax.jcr.PathNotFoundException;
@@ -365,7 +365,7 @@
{
return m_name.hashCode() * m_version;
}
-
+
public void save() throws WikiException
{
try
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/PageLock.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/PageLock.java?rev=728430&r1=728429&r2=728430&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/PageLock.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/PageLock.java Sun Dec 21 04:13:58 2008
@@ -23,6 +23,8 @@
import java.io.Serializable;
import java.util.Date;
+import org.apache.jspwiki.api.WikiPage;
+
/**
* Describes a lock acquired by an user on a page. For the most part,
* the regular developer does not have to instantiate this class.
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=728430&r1=728429&r2=728430&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 Sun Dec 21 04:13:58 2008
@@ -25,7 +25,9 @@
import java.util.Properties;
import org.apache.jspwiki.api.WikiException;
+import org.apache.jspwiki.api.WikiPage;
+import com.ecyrd.jspwiki.content.WikiName;
import com.ecyrd.jspwiki.event.WikiEvent;
import com.ecyrd.jspwiki.event.WikiEventListener;
import com.ecyrd.jspwiki.modules.ModuleManager;
@@ -125,13 +127,20 @@
* faster. This method may cause repository access.
*
* @return A Collection of WikiPage objects.
- * @throws ProviderException If the backend has problems.
+ * @throws WikiException
*/
public Collection getAllPages()
throws ProviderException
{
- return m_engine.getContentManager().getAllPages( m_engine.getWikiContextFactory().newEmptyContext(),
- null );
+ try
+ {
+ return m_engine.getContentManager().getAllPages( m_engine.getWikiContextFactory().newEmptyContext(),
+ null );
+ }
+ catch( WikiException e )
+ {
+ throw new ProviderException("",e);
+ }
}
/**
@@ -255,7 +264,9 @@
try
{
- return m_engine.getContentManager().getPage( context, pageName, version );
+ return m_engine.getContentManager().getPage( context,
+ WikiName.valueOf(pageName),
+ version );
}
catch( WikiException e )
{
@@ -277,7 +288,8 @@
{
WikiContext context = m_engine.getWikiContextFactory().newViewContext( new JCRWikiPage(m_engine,pageName) );
- return m_engine.getContentManager().getVersionHistory( context, pageName );
+ return m_engine.getContentManager().getVersionHistory( context,
+ WikiName.valueOf(pageName) );
}
/**
@@ -304,7 +316,7 @@
{
return getAllPages().size();
}
- catch( ProviderException e )
+ catch( WikiException e )
{
return -1;
}
@@ -322,7 +334,7 @@
{
WikiContext ctx = m_engine.getWikiContextFactory().newViewContext( new JCRWikiPage(m_engine,pageName) );
- return m_engine.getContentManager().pageExists( ctx, pageName );
+ return m_engine.getContentManager().pageExists( ctx, WikiName.valueOf(pageName) );
}
/**
@@ -341,7 +353,7 @@
try
{
- return m_engine.getContentManager().pageExists( ctx, pageName, version );
+ return m_engine.getContentManager().pageExists( ctx, WikiName.valueOf(pageName), version );
}
catch( WikiException e )
{
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/PageTimeComparator.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/PageTimeComparator.java?rev=728430&r1=728429&r2=728430&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/PageTimeComparator.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/PageTimeComparator.java Sun Dec 21 04:13:58 2008
@@ -22,6 +22,9 @@
import java.io.Serializable;
import java.util.*;
+
+import org.apache.jspwiki.api.WikiPage;
+
import com.ecyrd.jspwiki.log.Logger;
import com.ecyrd.jspwiki.log.LoggerFactory;
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/ReferenceManager.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/ReferenceManager.java?rev=728430&r1=728429&r2=728430&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/ReferenceManager.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/ReferenceManager.java Sun Dec 21 04:13:58 2008
@@ -26,6 +26,8 @@
import java.util.*;
import org.apache.commons.lang.time.StopWatch;
+import org.apache.jspwiki.api.WikiPage;
+
import com.ecyrd.jspwiki.log.Logger;
import com.ecyrd.jspwiki.log.LoggerFactory;
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=728430&r1=728429&r2=728430&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 Sun Dec 21 04:13:58 2008
@@ -77,7 +77,7 @@
* <p>
* If the build identifier is empty, it is not added.
*/
- public static final String BUILD = "36";
+ public static final String BUILD = "38";
/**
* This is the generic version string you should use
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/VariableManager.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/VariableManager.java?rev=728430&r1=728429&r2=728430&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/VariableManager.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/VariableManager.java Sun Dec 21 04:13:58 2008
@@ -27,6 +27,8 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
+import org.apache.jspwiki.api.WikiPage;
+
import com.ecyrd.jspwiki.log.Logger;
import com.ecyrd.jspwiki.log.LoggerFactory;
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/WikiContext.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/WikiContext.java?rev=728430&r1=728429&r2=728430&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/WikiContext.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/WikiContext.java Sun Dec 21 04:13:58 2008
@@ -26,6 +26,8 @@
import javax.servlet.http.HttpServletRequest;
+import org.apache.jspwiki.api.WikiPage;
+
import com.ecyrd.jspwiki.action.*;
import com.ecyrd.jspwiki.ui.stripes.HandlerInfo;
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=728430&r1=728429&r2=728430&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 Sun Dec 21 04:13:58 2008
@@ -39,6 +39,7 @@
import org.apache.commons.lang.time.StopWatch;
import org.apache.jspwiki.api.FilterException;
import org.apache.jspwiki.api.WikiException;
+import org.apache.jspwiki.api.WikiPage;
import com.ecyrd.jspwiki.action.WikiActionBean;
import com.ecyrd.jspwiki.action.WikiContextFactory;
@@ -913,10 +914,11 @@
*
* @param space The space to get the front page for.
* @return A FQN of the page.
+ * @throws WikiException
* @since 3.0
*/
// FIXME: Does not yet support spaces
- public WikiPage getFrontPage( String space )
+ public WikiPage getFrontPage( String space ) throws WikiException
{
WikiPage p = getPage( m_frontPage );
@@ -1850,7 +1852,7 @@
return sortedPages;
}
- catch( ProviderException e )
+ catch( WikiException e )
{
log.error( "Unable to fetch all pages: ",e);
return null;
@@ -1886,12 +1888,24 @@
*
* @param name The WikiName of the object to create
* @return A new WikiPage object.
+ * @throws WikiException
* @since 3.0
*/
@SuppressWarnings("deprecation")
- public WikiPage createPage( WikiName name )
+ public WikiPage createPage( WikiName name ) throws ProviderException
{
- return new JCRWikiPage( this, name );
+ WikiPage p;
+ try
+ {
+ p = m_contentManager.addPage( getWikiContextFactory().newEmptyContext(),
+ name,
+ ContentManager.JSPWIKI_CONTENT_TYPE );
+ }
+ catch( WikiException e )
+ {
+ throw new ProviderException("",e); // FIXME
+ }
+ return p;
}
/**
@@ -1899,9 +1913,10 @@
*
* @param fqn The fully qualified name of a wikipage.
* @return A new page.
+ * @throws WikiException
* @since 3.0
*/
- public WikiPage createPage( String fqn )
+ public WikiPage createPage( String fqn ) throws WikiException
{
return createPage( WikiName.valueOf( fqn ) );
}
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/WikiProvider.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/WikiProvider.java?rev=728430&r1=728429&r2=728430&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/WikiProvider.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/WikiProvider.java Sun Dec 21 04:13:58 2008
@@ -23,6 +23,8 @@
import java.util.Properties;
import java.io.IOException;
+import org.apache.jspwiki.api.WikiException;
+
/**
* A generic Wiki provider for all sorts of things that the Wiki can
* store.
@@ -43,10 +45,11 @@
* @param properties A set of properties used to initialize this provider
* @throws NoRequiredPropertyException If the provider needs a property which is not found in the property set
* @throws IOException If there is an IO problem
+ * @throws WikiException
*/
public void initialize( WikiEngine engine, Properties properties )
throws NoRequiredPropertyException,
- IOException;
+ IOException, WikiException;
/**
* Return a valid HTML string for information. May
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/AbstractPageActionBean.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/AbstractPageActionBean.java?rev=728430&r1=728429&r2=728430&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/AbstractPageActionBean.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/AbstractPageActionBean.java Sun Dec 21 04:13:58 2008
@@ -1,8 +1,9 @@
package com.ecyrd.jspwiki.action;
+import org.apache.jspwiki.api.WikiPage;
+
import net.sourceforge.stripes.validation.Validate;
-import com.ecyrd.jspwiki.WikiPage;
/**
* Abstract WikiActionBean subclass used by all ActionBeans that use and process
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/RenameActionBean.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/RenameActionBean.java?rev=728430&r1=728429&r2=728430&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/RenameActionBean.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/action/RenameActionBean.java Sun Dec 21 04:13:58 2008
@@ -3,6 +3,7 @@
import javax.servlet.http.HttpServletRequest;
import org.apache.jspwiki.api.WikiException;
+import org.apache.jspwiki.api.WikiPage;
import net.sourceforge.stripes.action.HandlesEvent;
import net.sourceforge.stripes.action.RedirectResolution;
@@ -14,7 +15,6 @@
import net.sourceforge.stripes.validation.ValidationMethod;
import com.ecyrd.jspwiki.WikiEngine;
-import com.ecyrd.jspwiki.WikiPage;
import com.ecyrd.jspwiki.auth.permissions.PagePermission;
import com.ecyrd.jspwiki.log.Logger;
import com.ecyrd.jspwiki.log.LoggerFactory;
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=728430&r1=728429&r2=728430&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 Sun Dec 21 04:13:58 2008
@@ -6,9 +6,9 @@
import net.sourceforge.stripes.validation.ValidationErrors;
import org.apache.jspwiki.api.WikiException;
+import org.apache.jspwiki.api.WikiPage;
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;
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=728430&r1=728429&r2=728430&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 Sun Dec 21 04:13:58 2008
@@ -19,6 +19,7 @@
import net.sourceforge.stripes.util.ResolverUtil;
import org.apache.jspwiki.api.WikiException;
+import org.apache.jspwiki.api.WikiPage;
import com.ecyrd.jspwiki.*;
import com.ecyrd.jspwiki.auth.SessionMonitor;
@@ -113,8 +114,9 @@
*
* @param request the HTTP request
* @param context the WikiContext to save
+ * @throws WikiException
*/
- public static void saveContext( HttpServletRequest request, WikiContext context )
+ public static void saveContext( HttpServletRequest request, WikiContext context ) throws WikiException
{
// Stash WikiEngine as a request attribute (can be
// used later as ${wikiEngine} in EL markup)
@@ -604,8 +606,9 @@
* @param page the name of the page to look up; this page <em>must</em>
* exist
* @return the wiki page
+ * @throws WikiException
*/
- protected final WikiPage resolvePage( HttpServletRequest request, String page )
+ protected final WikiPage resolvePage( HttpServletRequest request, String page ) throws WikiException
{
// See if the user included a version parameter
WikiPage wikipage;
@@ -651,10 +654,11 @@
* page.
*
* @return A valid WikiContext.
+ * @throws WikiException
*/
// TODO: Should this be better called "newVirtualContext()" or something? "Empty" is not
// very descriptive.
- public WikiContext newEmptyContext()
+ public WikiContext newEmptyContext() throws WikiException
{
WikiPage page = m_engine.createPage( "__DUMMY__");
return newViewContext( null, null, page );
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=728430&r1=728429&r2=728430&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 Sun Dec 21 04:13:58 2008
@@ -20,9 +20,10 @@
*/
package com.ecyrd.jspwiki.attachment;
+import org.apache.jspwiki.api.WikiPage;
+
import com.ecyrd.jspwiki.JCRWikiPage;
import com.ecyrd.jspwiki.WikiEngine;
-import com.ecyrd.jspwiki.WikiPage;
/**
* Describes an attachment. Attachments are actually derivatives of
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=728430&r1=728429&r2=728430&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 Sun Dec 21 04:13:58 2008
@@ -28,6 +28,7 @@
import org.apache.commons.lang.StringUtils;
import org.apache.jspwiki.api.WikiException;
+import org.apache.jspwiki.api.WikiPage;
import com.ecyrd.jspwiki.content.WikiName;
import com.ecyrd.jspwiki.log.Logger;
@@ -88,10 +89,11 @@
* @param engine The wikiengine that owns this attachment manager.
* @param props A list of properties from which the AttachmentManager will seek
* its configuration. Typically this is the "jspwiki.properties".
+ * @throws WikiException
*/
// FIXME: Perhaps this should fail somehow.
- public AttachmentManager( WikiEngine engine, Properties props )
+ public AttachmentManager( WikiEngine engine, Properties props ) throws WikiException
{
String classname;
@@ -446,11 +448,11 @@
* @param source A file to read from.
*
* @throws IOException If writing the attachment failed.
- * @throws ProviderException If something else went wrong.
+ * @throws WikiException
*/
public void storeAttachment( Attachment att, File source )
throws IOException,
- ProviderException
+ WikiException
{
FileInputStream in = null;
@@ -474,11 +476,11 @@
* @param in InputStream from which the attachment contents will be read.
*
* @throws IOException If writing the attachment failed.
- * @throws ProviderException If something else went wrong.
+ * @throws WikiException
*/
public void storeAttachment( Attachment att, InputStream in )
throws IOException,
- ProviderException
+ WikiException
{
if( m_provider == null )
{
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/attachment/AttachmentServlet.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/attachment/AttachmentServlet.java?rev=728430&r1=728429&r2=728430&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/attachment/AttachmentServlet.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/attachment/AttachmentServlet.java Sun Dec 21 04:13:58 2008
@@ -43,6 +43,7 @@
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.apache.commons.fileupload.servlet.ServletFileUpload;
import org.apache.jspwiki.api.WikiException;
+import org.apache.jspwiki.api.WikiPage;
import com.ecyrd.jspwiki.log.Logger;
import com.ecyrd.jspwiki.log.LoggerFactory;
@@ -835,7 +836,7 @@
{
m_engine.getAttachmentManager().storeAttachment( att, data );
}
- catch (ProviderException pe)
+ catch (WikiException pe)
{
// this is a kludge, the exception that is caught here contains the i18n key
// here we have the context available, so we can internationalize it properly :
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/auth/AuthorizationManager.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/auth/AuthorizationManager.java?rev=728430&r1=728429&r2=728430&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/auth/AuthorizationManager.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/auth/AuthorizationManager.java Sun Dec 21 04:13:58 2008
@@ -33,12 +33,12 @@
import com.ecyrd.jspwiki.log.LoggerFactory;
import org.apache.jspwiki.api.WikiException;
+import org.apache.jspwiki.api.WikiPage;
import org.freshcookies.security.policy.LocalPolicy;
import org.freshcookies.security.policy.PolicyException;
import com.ecyrd.jspwiki.NoRequiredPropertyException;
import com.ecyrd.jspwiki.WikiEngine;
-import com.ecyrd.jspwiki.WikiPage;
import com.ecyrd.jspwiki.WikiSession;
import com.ecyrd.jspwiki.auth.acl.Acl;
import com.ecyrd.jspwiki.auth.acl.AclEntry;
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/auth/acl/AclManager.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/auth/acl/AclManager.java?rev=728430&r1=728429&r2=728430&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/auth/acl/AclManager.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/auth/acl/AclManager.java Sun Dec 21 04:13:58 2008
@@ -22,8 +22,9 @@
import java.util.Properties;
+import org.apache.jspwiki.api.WikiPage;
+
import com.ecyrd.jspwiki.WikiEngine;
-import com.ecyrd.jspwiki.WikiPage;
import com.ecyrd.jspwiki.auth.WikiSecurityException;
/**
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=728430&r1=728429&r2=728430&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 Sun Dec 21 04:13:58 2008
@@ -26,6 +26,8 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;
+import org.apache.jspwiki.api.WikiPage;
+
import com.ecyrd.jspwiki.log.Logger;
import com.ecyrd.jspwiki.log.LoggerFactory;
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/auth/permissions/PagePermission.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/auth/permissions/PagePermission.java?rev=728430&r1=728429&r2=728430&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/auth/permissions/PagePermission.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/auth/permissions/PagePermission.java Sun Dec 21 04:13:58 2008
@@ -26,8 +26,8 @@
import java.util.Arrays;
import org.apache.commons.lang.StringUtils;
+import org.apache.jspwiki.api.WikiPage;
-import com.ecyrd.jspwiki.WikiPage;
/**
* <p>
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/auth/permissions/PermissionFactory.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/auth/permissions/PermissionFactory.java?rev=728430&r1=728429&r2=728430&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/auth/permissions/PermissionFactory.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/auth/permissions/PermissionFactory.java Sun Dec 21 04:13:58 2008
@@ -22,7 +22,8 @@
import java.util.WeakHashMap;
-import com.ecyrd.jspwiki.WikiPage;
+import org.apache.jspwiki.api.WikiPage;
+
/**
* Provides a factory for Permission objects. Since the Permissions are immutable,
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=728430&r1=728429&r2=728430&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 Sun Dec 21 04:13:58 2008
@@ -38,6 +38,7 @@
import org.apache.commons.lang.ArrayUtils;
import org.apache.jspwiki.api.FilterException;
import org.apache.jspwiki.api.WikiException;
+import org.apache.jspwiki.api.WikiPage;
import org.priha.RepositoryManager;
import org.priha.util.ConfigurationException;
@@ -345,7 +346,7 @@
}
WikiContext ctx = m_engine.getWikiContextFactory().newViewContext( m_engine.createPage(path) );
- WikiPage p = getPage( ctx, path, version );
+ WikiPage p = getPage( ctx, WikiName.valueOf( path ), version );
return p.getContentAsString();
}
@@ -544,7 +545,7 @@
* @throws ProviderException If the repository fails.
*/
- public List<WikiPage> getVersionHistory( WikiContext ctx, String path )
+ public List<WikiPage> getVersionHistory( WikiContext ctx, WikiName path )
throws ProviderException
{
List<WikiPage> result = new ArrayList<WikiPage>();
@@ -615,10 +616,10 @@
* @throws ProviderException If the backend fails or the name is illegal.
*/
- public boolean pageExists( WikiContext ctx, String wikiPath )
+ public boolean pageExists( WikiContext ctx, WikiName wikiPath )
throws ProviderException
{
- if( wikiPath == null || wikiPath.length() == 0 )
+ if( wikiPath == null )
{
throw new ProviderException("Illegal page name");
}
@@ -627,7 +628,7 @@
{
Session session = getJCRSession( ctx );
- String jcrPath = getJCRPath( ctx, wikiPath );
+ String jcrPath = getJCRPath( wikiPath );
return session.getRootNode().hasNode( jcrPath );
}
@@ -646,10 +647,10 @@
* @return <code>true</code> if the page exists, <code>false</code> otherwise
* @throws ProviderException If backend fails or name is illegal
*/
- public boolean pageExists( WikiContext ctx, String path, int version )
+ public boolean pageExists( WikiContext ctx, WikiName path, int version )
throws WikiException
{
- if( path == null || path.length() == 0 )
+ if( path == null )
{
throw new WikiException("Illegal page name");
}
@@ -659,7 +660,7 @@
{
session = getJCRSession( ctx );
- return session.itemExists( getJCRPath( ctx, path ) );
+ return session.itemExists( getJCRPath( path ) );
}
catch( RepositoryException e )
{
@@ -936,44 +937,15 @@
* @param wikiName The WikiName.
* @return A full JCR path
*/
- protected static String getJCRPath( WikiContext ctx, String wikiName )
+ protected static String getJCRPath( WikiName wikiName )
{
String spaceName;
String spacePath;
- int colon = wikiName.indexOf(':');
-
- if( colon != -1 )
- {
- // This is a FQN
- spaceName = wikiName.substring( 0, colon );
- spacePath = wikiName.substring( colon+1 );
- }
- else if( ctx != null )
- {
- WikiPage contextPage = ctx.getPage();
-
- // Not an FQN, the wiki name is missing, so we'll use the context to figure it out
- spaceName = contextPage.getWiki();
-
- // If the wikipath starts with "/", we assume it is an absolute path within this
- // wiki space. Otherwise, it must be relative to the current path.
- if( wikiName.startsWith( "/" ) )
- {
- spacePath = wikiName;
- }
- else
- {
- spacePath = contextPage.getName()+"/"+wikiName;
- }
- }
- else
- {
- spaceName = DEFAULT_SPACE;
- spacePath = wikiName;
- }
-
- return "/pages/"+spaceName+"/"+spacePath;
+ spaceName = wikiName.getSpace();
+ spacePath = wikiName.getPath();
+
+ return "/"+JCR_PAGES_NODE+"/"+spaceName+"/"+spacePath;
}
// FIXME: Should be protected - fix once WikiPage moves to content-package
@@ -1003,13 +975,13 @@
* @param contentType
* @return
*/
- public JCRWikiPage addPage( WikiContext context, String path, String contentType ) throws WikiException
+ public JCRWikiPage addPage( WikiContext context, WikiName path, String contentType ) throws WikiException
{
try
{
Session session = getJCRSession( context );
- Node nd = session.getRootNode().addNode( getJCRPath(null, path) );
+ Node nd = session.getRootNode().addNode( getJCRPath(path) );
JCRWikiPage page = new JCRWikiPage(m_engine, nd);
@@ -1027,13 +999,13 @@
* @param path
* @return
*/
- public JCRWikiPage getPage( WikiContext context, String path ) throws ProviderException
+ public JCRWikiPage getPage( WikiContext context, WikiName path ) throws ProviderException
{
try
{
Session session = getJCRSession( context );
- Node nd = session.getRootNode().getNode( getJCRPath(context, path) );
+ Node nd = session.getRootNode().getNode( getJCRPath(path) );
JCRWikiPage page = new JCRWikiPage(m_engine, nd);
return page;
@@ -1052,13 +1024,13 @@
}
}
- public JCRWikiPage getPage( WikiContext context, String path, int version ) throws WikiException
+ public JCRWikiPage getPage( WikiContext context, WikiName path, int version ) throws WikiException
{
try
{
Session session = getJCRSession( context );
- Node nd = session.getRootNode().getNode( getJCRPath(null, path) );
+ Node nd = session.getRootNode().getNode( getJCRPath(path) );
VersionHistory vh = nd.getVersionHistory();
@@ -1126,7 +1098,7 @@
log.info( "Profile name change for '" + newPrincipal.toString() +
"' caused " + pagesChanged + " page ACLs to change also." );
}
- catch ( ProviderException e )
+ catch ( WikiException e )
{
// Oooo! This is really bad...
log.error( "Could not change user name in Page ACLs because of Provider error:" + e.getMessage() );
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/content/PageRenamer.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/content/PageRenamer.java?rev=728430&r1=728429&r2=728430&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/content/PageRenamer.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/content/PageRenamer.java Sun Dec 21 04:13:58 2008
@@ -27,6 +27,7 @@
import java.util.regex.Pattern;
import org.apache.jspwiki.api.WikiException;
+import org.apache.jspwiki.api.WikiPage;
import com.ecyrd.jspwiki.log.Logger;
import com.ecyrd.jspwiki.log.LoggerFactory;
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/dav/AttachmentDavProvider.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/dav/AttachmentDavProvider.java?rev=728430&r1=728429&r2=728430&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/dav/AttachmentDavProvider.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/dav/AttachmentDavProvider.java Sun Dec 21 04:13:58 2008
@@ -25,12 +25,13 @@
import java.util.Collections;
import java.util.Iterator;
+import org.apache.jspwiki.api.WikiPage;
+
import com.ecyrd.jspwiki.log.Logger;
import com.ecyrd.jspwiki.log.LoggerFactory;
import com.ecyrd.jspwiki.WikiContext;
import com.ecyrd.jspwiki.WikiEngine;
-import com.ecyrd.jspwiki.WikiPage;
import com.ecyrd.jspwiki.attachment.Attachment;
import com.ecyrd.jspwiki.dav.items.AttachmentItem;
import com.ecyrd.jspwiki.dav.items.DavItem;
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/dav/DavUtil.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/dav/DavUtil.java?rev=728430&r1=728429&r2=728430&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/dav/DavUtil.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/dav/DavUtil.java Sun Dec 21 04:13:58 2008
@@ -29,9 +29,9 @@
import org.apache.ecs.XhtmlDocument;
import org.apache.ecs.xhtml.li;
import org.apache.ecs.xhtml.ul;
+import org.apache.jspwiki.api.WikiPage;
import com.ecyrd.jspwiki.WikiContext;
-import com.ecyrd.jspwiki.WikiPage;
/**
*
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/dav/HTMLPagesDavProvider.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/dav/HTMLPagesDavProvider.java?rev=728430&r1=728429&r2=728430&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/dav/HTMLPagesDavProvider.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/dav/HTMLPagesDavProvider.java Sun Dec 21 04:13:58 2008
@@ -24,9 +24,10 @@
import java.util.Collection;
import java.util.Iterator;
+import org.apache.jspwiki.api.WikiPage;
+
import com.ecyrd.jspwiki.WikiContext;
import com.ecyrd.jspwiki.WikiEngine;
-import com.ecyrd.jspwiki.WikiPage;
import com.ecyrd.jspwiki.dav.items.DavItem;
import com.ecyrd.jspwiki.dav.items.DirectoryItem;
import com.ecyrd.jspwiki.dav.items.HTMLPageDavItem;
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/dav/RawPagesDavProvider.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/dav/RawPagesDavProvider.java?rev=728430&r1=728429&r2=728430&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/dav/RawPagesDavProvider.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/dav/RawPagesDavProvider.java Sun Dec 21 04:13:58 2008
@@ -25,12 +25,13 @@
import java.util.Collections;
import java.util.Iterator;
+import org.apache.jspwiki.api.WikiPage;
+
import com.ecyrd.jspwiki.log.Logger;
import com.ecyrd.jspwiki.log.LoggerFactory;
import com.ecyrd.jspwiki.WikiContext;
import com.ecyrd.jspwiki.WikiEngine;
-import com.ecyrd.jspwiki.WikiPage;
import com.ecyrd.jspwiki.dav.items.DavItem;
import com.ecyrd.jspwiki.dav.items.DirectoryItem;
import com.ecyrd.jspwiki.dav.items.PageDavItem;
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=728430&r1=728429&r2=728430&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 Sun Dec 21 04:13:58 2008
@@ -25,11 +25,11 @@
import java.io.UnsupportedEncodingException;
import java.util.Collection;
+import org.apache.jspwiki.api.WikiPage;
import org.jdom.Element;
import com.ecyrd.jspwiki.WikiContext;
import com.ecyrd.jspwiki.WikiEngine;
-import com.ecyrd.jspwiki.WikiPage;
import com.ecyrd.jspwiki.dav.DavPath;
import com.ecyrd.jspwiki.dav.DavProvider;
import com.ecyrd.jspwiki.dav.WikiDavProvider;
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/dav/items/PageDavItem.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/dav/items/PageDavItem.java?rev=728430&r1=728429&r2=728430&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/dav/items/PageDavItem.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/dav/items/PageDavItem.java Sun Dec 21 04:13:58 2008
@@ -27,10 +27,10 @@
import java.util.Collection;
import org.apache.commons.lang.time.DateFormatUtils;
+import org.apache.jspwiki.api.WikiPage;
import org.jdom.Element;
import org.jdom.Namespace;
-import com.ecyrd.jspwiki.WikiPage;
import com.ecyrd.jspwiki.dav.DavPath;
import com.ecyrd.jspwiki.dav.DavProvider;
import com.ecyrd.jspwiki.dav.WikiDavProvider;
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/diff/DifferenceManager.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/diff/DifferenceManager.java?rev=728430&r1=728429&r2=728430&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/diff/DifferenceManager.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/diff/DifferenceManager.java Sun Dec 21 04:13:58 2008
@@ -24,6 +24,8 @@
import java.io.IOException;
import java.util.Properties;
+import org.apache.jspwiki.api.WikiException;
+
import com.ecyrd.jspwiki.log.Logger;
import com.ecyrd.jspwiki.log.LoggerFactory;
@@ -54,8 +56,9 @@
*
* @param engine The WikiEngine.
* @param props A set of properties.
+ * @throws WikiException
*/
- public DifferenceManager(WikiEngine engine, Properties props)
+ public DifferenceManager(WikiEngine engine, Properties props) throws WikiException
{
loadProvider(props);
@@ -94,7 +97,7 @@
}
- private void initializeProvider(WikiEngine engine, Properties props)
+ private void initializeProvider(WikiEngine engine, Properties props) throws WikiException
{
try
{
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/filters/SpamFilter.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/filters/SpamFilter.java?rev=728430&r1=728429&r2=728430&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/filters/SpamFilter.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/filters/SpamFilter.java Sun Dec 21 04:13:58 2008
@@ -22,6 +22,10 @@
import java.io.*;
import java.util.*;
+import java.util.regex.MatchResult;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -33,9 +37,10 @@
import org.apache.commons.jrcs.diff.myers.MyersDiff;
import org.apache.commons.lang.time.StopWatch;
import org.apache.jspwiki.api.ModuleData;
+import org.apache.jspwiki.api.WikiPage;
+
import com.ecyrd.jspwiki.log.Logger;
import com.ecyrd.jspwiki.log.LoggerFactory;
-import org.apache.oro.text.regex.*;
import com.ecyrd.jspwiki.*;
import com.ecyrd.jspwiki.action.WikiContextFactory;
@@ -143,9 +148,6 @@
private String m_errorPage = "RejectedMessage";
private String m_blacklist = "SpamFilterWordList/blacklist.txt";
- private PatternMatcher m_matcher = new Perl5Matcher();
- private PatternCompiler m_compiler = new Perl5Compiler();
-
private Collection<Pattern> m_spamPatterns = null;
private Date m_lastRebuild = new Date( 0L );
@@ -240,9 +242,9 @@
try
{
- m_urlPattern = m_compiler.compile( URL_REGEXP );
+ m_urlPattern = Pattern.compile( URL_REGEXP );
}
- catch( MalformedPatternException e )
+ catch( PatternSyntaxException e )
{
log.error("Internal error: Someone put in a faulty pattern.",e);
throw new InternalWikiException("Faulty pattern.");
@@ -367,9 +369,9 @@
try
{
- compiledpatterns.add( m_compiler.compile( pattern ) );
+ compiledpatterns.add( Pattern.compile( pattern ) );
}
- catch( MalformedPatternException e )
+ catch( PatternSyntaxException e )
{
log.debug( "Malformed spam filter pattern "+pattern );
@@ -414,9 +416,9 @@
try
{
- compiledpatterns.add( m_compiler.compile( line ) );
+ compiledpatterns.add( Pattern.compile( line ) );
}
- catch( MalformedPatternException e )
+ catch( PatternSyntaxException e )
{
log.debug( "Malformed spam filter pattern "+line );
}
@@ -520,11 +522,12 @@
String tstChange = change;
int urlCounter = 0;
- while( m_matcher.contains(tstChange,m_urlPattern) )
+ Matcher matcher = m_urlPattern.matcher( tstChange );
+ while( matcher.find() )
{
- MatchResult m = m_matcher.getMatch();
+ MatchResult m = matcher.toMatchResult();
- tstChange = tstChange.substring( m.endOffset(0) );
+ tstChange = tstChange.substring( m.end(0) );
urlCounter++;
}
@@ -853,16 +856,17 @@
{
// log.debug("Attempting to match page contents with "+p.getPattern());
- if( m_matcher.contains( change, p ) )
+ Matcher matcher = p.matcher( change );
+ if( matcher.find( ) )
{
//
// Spam filter has a match.
//
- String uid = log( context, REJECT, REASON_REGEXP+"("+p.getPattern()+")", change);
+ String uid = log( context, REJECT, REASON_REGEXP+"("+p.pattern()+")", change);
- log.info("SPAM:Regexp ("+uid+"). Content matches the spam filter '"+p.getPattern()+"'");
+ log.info("SPAM:Regexp ("+uid+"). Content matches the spam filter '"+p.pattern()+"'");
- checkStrategy( context, REASON_REGEXP, "Herb says '"+p.getPattern()+"' is a bad spam word and I trust Herb! (Incident code "+uid+")");
+ checkStrategy( context, REASON_REGEXP, "Herb says '"+p.pattern()+"' is a bad spam word and I trust Herb! (Incident code "+uid+")");
}
}
}
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/log/LoggerFactory.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/log/LoggerFactory.java?rev=728430&r1=728429&r2=728430&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/log/LoggerFactory.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/log/LoggerFactory.java Sun Dec 21 04:13:58 2008
@@ -100,19 +100,17 @@
* @return A Logger instance.
*/
public static final synchronized Logger getLogger( String loggerName )
- {
- if( c_isLoggerFactoryClosed )
- {
- return null;
- }
-
+ {
if( c_registeredLoggers.get( loggerName ) == null )
{
LoggerImpl logger = new LoggerImpl( loggerName );
c_registeredLoggers.put( loggerName, logger );
if( c_isLog4jPresent )
{
- registerLoggerMBean( loggerName );
+ if( !c_isLoggerFactoryClosed )
+ {
+ registerLoggerMBean( loggerName );
+ }
}
return logger;
}
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/parser/JSPWikiMarkupParser.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/parser/JSPWikiMarkupParser.java?rev=728430&r1=728429&r2=728430&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/parser/JSPWikiMarkupParser.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/parser/JSPWikiMarkupParser.java Sun Dec 21 04:13:58 2008
@@ -25,6 +25,10 @@
import java.io.StringReader;
import java.text.MessageFormat;
import java.util.*;
+import java.util.regex.MatchResult;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
import javax.servlet.http.HttpServletResponse;
import javax.xml.transform.Result;
@@ -32,8 +36,7 @@
import org.apache.commons.lang.StringEscapeUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.jspwiki.api.PluginException;
-import org.apache.oro.text.GlobCompiler;
-import org.apache.oro.text.regex.*;
+import org.apache.jspwiki.api.WikiPage;
import org.jdom.*;
import com.ecyrd.jspwiki.*;
@@ -49,6 +52,7 @@
import com.ecyrd.jspwiki.providers.ProviderException;
import com.ecyrd.jspwiki.render.CleanTextRenderer;
import com.ecyrd.jspwiki.render.RenderingManager;
+import com.ecyrd.jspwiki.util.RegExpUtil;
import com.ecyrd.jspwiki.util.TextUtil;
/**
@@ -115,8 +119,6 @@
/** Parser for extended link functionality. */
private LinkParser m_linkParser = new LinkParser();
- private PatternMatcher m_inlineMatcher = new Perl5Matcher();
-
/** Keeps track of any plain text that gets put in the Text nodes */
private StringBuilder m_plainTextBuf = new StringBuilder(20);
@@ -167,11 +169,19 @@
private boolean m_useRelNofollow = false;
- private PatternCompiler m_compiler = new Perl5Compiler();
-
- static final String WIKIWORD_REGEX = "(^|[[:^alnum:]]+)([[:upper:]]+[[:lower:]]+[[:upper:]]+[[:alnum:]]*|(http://|https://|mailto:)([A-Za-z0-9_/\\.\\+\\?\\#\\-\\@=&;~%]+))";
+// static final String WIKIWORD_REGEX = "(^|[[:^alnum:]]+)([[:upper:]]+[[:lower:]]+[[:upper:]]+[[:alnum:]]*|(http://|https://|mailto:)([A-Za-z0-9_/\\.\\+\\?\\#\\-\\@=&;~%]+))";
+ private static final String ALNUM = "\\p{javaLetterOrDigit}";
+ private static final String NOT_ALNUM = "\\P{javaLetterOrDigit}";
+ private static final String UPPER = "\\p{Lu}";
+ private static final String LOWER = "\\p{Ll}";
+
+ static final String WIKIWORD_REGEX = "(^|["+NOT_ALNUM+"]+)("+
+ UPPER+"+"
+ +LOWER+"+"
+ +UPPER+"+"
+ +ALNUM+"*"
+ +"|(http://|https://|mailto:)([A-Za-z0-9_/\\.\\+\\?\\#\\-\\@=&;~%]+))";
- private PatternMatcher m_camelCaseMatcher = new Perl5Matcher();
private Pattern m_camelCasePattern;
private int m_rowNum = 1;
@@ -256,7 +266,6 @@
@SuppressWarnings("unchecked")
private void initialize()
{
- PatternCompiler compiler = new GlobCompiler();
List<Pattern> compiledpatterns;
//
@@ -278,10 +287,10 @@
{
try
{
- compiledpatterns.add( compiler.compile( (String)i.next(),
- GlobCompiler.DEFAULT_MASK|GlobCompiler.READ_ONLY_MASK ) );
+ compiledpatterns.add( Pattern.compile( RegExpUtil
+ .globToPerl5( ((String) i.next()).toCharArray(), RegExpUtil.DEFAULT_MASK|RegExpUtil.READ_ONLY_MASK ) ) );
}
- catch( MalformedPatternException e )
+ catch( PatternSyntaxException e )
{
log.error("Malformed pattern in properties: ", e );
}
@@ -297,10 +306,9 @@
{
try
{
- m_camelCasePattern = m_compiler.compile( WIKIWORD_REGEX,
- Perl5Compiler.DEFAULT_MASK|Perl5Compiler.READ_ONLY_MASK );
+ m_camelCasePattern = Pattern.compile( WIKIWORD_REGEX, RegExpUtil.DEFAULT_MASK | RegExpUtil.READ_ONLY_MASK );
}
- catch( MalformedPatternException e )
+ catch( PatternSyntaxException e )
{
log.error("Internal error: Someone put in a faulty pattern.",e);
throw new InternalWikiException("Faulty camelcasepattern in TranslatorReader");
@@ -694,7 +702,8 @@
for( Iterator i = m_inlineImagePatterns.iterator(); i.hasNext(); )
{
- if( m_inlineMatcher.matches( link, (Pattern) i.next() ) )
+ Matcher matcher = ((Pattern) i.next()).matcher( link );
+ if( matcher.matches() )
return true;
}
}
@@ -801,24 +810,24 @@
if( m_camelCaseLinks && !m_isEscaping && buf.length() > 3 )
{
- // System.out.println("Buffer="+buf);
-
- while( m_camelCaseMatcher.contains( buf, m_camelCasePattern ) )
+ Matcher camelCaseMatcher = null;
+ while (( camelCaseMatcher = m_camelCasePattern.matcher( buf )).find())
{
- MatchResult result = m_camelCaseMatcher.getMatch();
-
- String firstPart = buf.substring(0,result.beginOffset(0));
- String prefix = result.group(1);
+ MatchResult result = camelCaseMatcher.toMatchResult();
+
+ String firstPart = buf.substring( 0, result.start() );
+ String prefix = result.group( 1 );
- if( prefix == null ) prefix = "";
+ if( prefix == null )
+ prefix = "";
- String camelCase = result.group(2);
- String protocol = result.group(3);
- String uri = protocol+result.group(4);
- buf = buf.substring(result.endOffset(0));
+ String camelCase = result.group( 2 );
+ String protocol = result.group( 3 );
+ String uri = protocol + result.group( 4 );
+ buf = buf.substring( result.end() );
m_currentElement.addContent( firstPart );
-
+ result.group( 2 );
//
// Check if the user does not wish to do URL or WikiWord expansion
//
@@ -855,15 +864,11 @@
uri = uri.substring(0,uri.length()-1);
buf = c + buf;
}
- // System.out.println("URI match "+uri);
m_currentElement.addContent( prefix );
makeDirectURILink( uri );
}
else
{
- // System.out.println("Matched: '"+camelCase+"'");
- // System.out.println("Split to '"+firstPart+"', and '"+buf+"'");
- // System.out.println("prefix="+prefix);
m_currentElement.addContent( prefix );
makeCamelCaseLink( camelCase );
@@ -1343,7 +1348,6 @@
else if( ( linkExists( possiblePage ) ) != null &&
hasLinkText )
{
- // System.out.println("Orig="+link+", Matched: "+matchedLink);
callMutatorChain( m_localLinkMutatorChain, possiblePage );
return makeLink( IMAGEWIKILINK, reallink, link, null, null );
@@ -3015,6 +3019,4 @@
}
-
}
-
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/parser/WikiDocument.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/parser/WikiDocument.java?rev=728430&r1=728429&r2=728430&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/parser/WikiDocument.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/parser/WikiDocument.java Sun Dec 21 04:13:58 2008
@@ -22,10 +22,10 @@
import java.lang.ref.WeakReference;
+import org.apache.jspwiki.api.WikiPage;
import org.jdom.Document;
import com.ecyrd.jspwiki.WikiContext;
-import com.ecyrd.jspwiki.WikiPage;
/**
* Stores the DOM tree of a rendered WikiPage. This class
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/plugin/AbstractReferralPlugin.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/plugin/AbstractReferralPlugin.java?rev=728430&r1=728429&r2=728430&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/plugin/AbstractReferralPlugin.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/plugin/AbstractReferralPlugin.java Sun Dec 21 04:13:58 2008
@@ -23,11 +23,13 @@
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.*;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
import org.apache.commons.lang.StringUtils;
import org.apache.jspwiki.api.PluginException;
-import org.apache.oro.text.GlobCompiler;
-import org.apache.oro.text.regex.*;
+import org.apache.jspwiki.api.WikiPage;
import com.ecyrd.jspwiki.*;
import com.ecyrd.jspwiki.log.Logger;
@@ -37,6 +39,7 @@
import com.ecyrd.jspwiki.preferences.Preferences;
import com.ecyrd.jspwiki.preferences.Preferences.TimeFormat;
import com.ecyrd.jspwiki.render.RenderingManager;
+import com.ecyrd.jspwiki.util.RegExpUtil;
import com.ecyrd.jspwiki.util.TextUtil;
/**
@@ -99,7 +102,7 @@
protected String m_separator = ""; // null not blank
protected String m_after = "\\\\";
- protected Pattern[] m_exclude;
+ protected Pattern[] m_exclude;
protected Pattern[] m_include;
protected String m_show = "pages";
@@ -155,18 +158,18 @@
{
try
{
- PatternCompiler pc = new GlobCompiler();
-
String[] ptrns = StringUtils.split( s, "," );
m_exclude = new Pattern[ptrns.length];
for( int i = 0; i < ptrns.length; i++ )
{
- m_exclude[i] = pc.compile( ptrns[i] );
+ m_exclude[i] = Pattern
+ .compile( RegExpUtil.globToPerl5( ptrns[i].toCharArray(),
+ RegExpUtil.DEFAULT_MASK ) );
}
}
- catch( MalformedPatternException e )
+ catch( PatternSyntaxException e )
{
throw new PluginException("Exclude-parameter has a malformed pattern: "+e.getMessage());
}
@@ -179,18 +182,18 @@
{
try
{
- PatternCompiler pc = new GlobCompiler();
-
String[] ptrns = StringUtils.split( s, "," );
m_include = new Pattern[ptrns.length];
for( int i = 0; i < ptrns.length; i++ )
{
- m_include[i] = pc.compile( ptrns[i] );
+ m_include[i] = Pattern
+ .compile( RegExpUtil.globToPerl5( ptrns[i].toCharArray(),
+ RegExpUtil.DEFAULT_MASK ) );
}
}
- catch( MalformedPatternException e )
+ catch( PatternSyntaxException e )
{
throw new PluginException("Include-parameter has a malformed pattern: "+e.getMessage());
}
@@ -235,8 +238,6 @@
{
ArrayList<String> result = new ArrayList<String>();
- PatternMatcher pm = new Perl5Matcher();
-
for( Iterator i = c.iterator(); i.hasNext(); )
{
String pageName = (String) i.next();
@@ -253,7 +254,8 @@
{
for( int j = 0; j < m_include.length; j++ )
{
- if( pm.matches( pageName, m_include[j] ) )
+ Matcher matcher = m_include[j].matcher( pageName );
+ if( matcher.matches() )
{
includeThis = true;
break;
@@ -265,7 +267,8 @@
{
for( int j = 0; j < m_exclude.length; j++ )
{
- if( pm.matches( pageName, m_exclude[j] ) )
+ Matcher matcher = m_exclude[j].matcher( pageName );
+ if( matcher.matches() )
{
includeThis = false;
break; // The inner loop, continue on the next item
@@ -277,7 +280,7 @@
{
result.add( pageName );
//
- // if we want to show the last modified date of the most recently change page, we keep a "high watermark" here:
+ // if we want to show the last modified date of the most recently changed page, we keep a "high watermark" here:
WikiPage page = null;
if( m_lastModified )
{
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=728430&r1=728429&r2=728430&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 Sun Dec 21 04:13:58 2008
@@ -29,10 +29,10 @@
import org.apache.jspwiki.api.PluginException;
import org.apache.jspwiki.api.WikiException;
+import org.apache.jspwiki.api.WikiPage;
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;
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/plugin/IfPlugin.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/plugin/IfPlugin.java?rev=728430&r1=728429&r2=728430&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/plugin/IfPlugin.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/plugin/IfPlugin.java Sun Dec 21 04:13:58 2008
@@ -23,11 +23,12 @@
import java.security.Principal;
import java.util.Map;
+import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
import org.apache.commons.lang.StringUtils;
import org.apache.jspwiki.api.ModuleData;
import org.apache.jspwiki.api.PluginException;
-import org.apache.oro.text.regex.*;
import com.ecyrd.jspwiki.WikiContext;
import com.ecyrd.jspwiki.WikiProvider;
@@ -269,16 +270,13 @@
private static boolean doMatch( String content, String pattern )
throws PluginException
{
- PatternCompiler compiler = new Perl5Compiler();
- PatternMatcher matcher = new Perl5Matcher();
-
try
{
- Pattern matchp = compiler.compile( pattern, Perl5Compiler.SINGLELINE_MASK );
+ Pattern matchPattern = Pattern.compile( pattern );
// m_exceptPattern = compiler.compile( exceptPattern, Perl5Compiler.SINGLELINE_MASK );
- return matcher.matches( content, matchp );
+ return matchPattern.matcher( content ).matches();
}
- catch( MalformedPatternException e )
+ catch( PatternSyntaxException e )
{
throw new PluginException("Faulty pattern "+pattern);
}
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/plugin/InsertPage.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/plugin/InsertPage.java?rev=728430&r1=728429&r2=728430&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/plugin/InsertPage.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/plugin/InsertPage.java Sun Dec 21 04:13:58 2008
@@ -26,10 +26,10 @@
import java.util.ResourceBundle;
import org.apache.jspwiki.api.PluginException;
+import org.apache.jspwiki.api.WikiPage;
import com.ecyrd.jspwiki.WikiContext;
import com.ecyrd.jspwiki.WikiEngine;
-import com.ecyrd.jspwiki.WikiPage;
import com.ecyrd.jspwiki.auth.AuthorizationManager;
import com.ecyrd.jspwiki.auth.permissions.PermissionFactory;
import com.ecyrd.jspwiki.providers.ProviderException;
Modified: incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/plugin/PluginManager.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/plugin/PluginManager.java?rev=728430&r1=728429&r2=728430&view=diff
==============================================================================
--- incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/plugin/PluginManager.java (original)
+++ incubator/jspwiki/branches/JSPWIKI_JCR_BRANCH/src/com/ecyrd/jspwiki/plugin/PluginManager.java Sun Dec 21 04:13:58 2008
@@ -24,6 +24,10 @@
import java.lang.reflect.Modifier;
import java.text.MessageFormat;
import java.util.*;
+import java.util.regex.MatchResult;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
import net.sourceforge.stripes.util.ResolverUtil;
@@ -31,7 +35,6 @@
import org.apache.ecs.xhtml.*;
import org.apache.jspwiki.api.ModuleData;
import org.apache.jspwiki.api.PluginException;
-import org.apache.oro.text.regex.*;
import com.ecyrd.jspwiki.*;
import com.ecyrd.jspwiki.log.Logger;
@@ -208,13 +211,11 @@
m_searchPath.add( DEFAULT_PACKAGE );
m_searchPath.add( DEFAULT_FORMS_PACKAGE );
- PatternCompiler compiler = new Perl5Compiler();
-
try
{
- m_pluginPattern = compiler.compile( PLUGIN_INSERT_PATTERN );
+ m_pluginPattern = Pattern.compile( PLUGIN_INSERT_PATTERN );
}
- catch( MalformedPatternException e )
+ catch( PatternSyntaxException e )
{
log.error("Internal error: someone messed with pluginmanager patterns.", e );
throw new InternalWikiException( "PluginManager patterns are broken" );
@@ -564,19 +565,18 @@
ResourceBundle rb = context.getBundle(WikiPlugin.CORE_PLUGINS_RESOURCEBUNDLE);
Object[] obArgs = { commandline };
- PatternMatcher matcher = new Perl5Matcher();
+ Matcher matcher = m_pluginPattern.matcher( commandline );
try
{
- if( matcher.contains( commandline, m_pluginPattern ) )
+ if( matcher.find( ) )
{
- MatchResult res = matcher.getMatch();
+ MatchResult res = matcher.toMatchResult();
- String plugin = res.group(2);
- String args = commandline.substring(res.endOffset(0),
- commandline.length() -
- (commandline.charAt(commandline.length()-1) == '}' ? 1 : 0 ) );
- Map arglist = parseArgs( args );
+ String plugin = res.group( 2 );
+ String args = commandline.substring( res.end(), commandline.length()
+ - (commandline.charAt( commandline.length() - 1 ) == '}' ? 1 : 0) );
+ Map arglist = parseArgs( args );
return execute( context, plugin, arglist );
}
@@ -613,18 +613,18 @@
public PluginContent parsePluginLine( WikiContext context, String commandline, int pos )
throws PluginException
{
- PatternMatcher matcher = new Perl5Matcher();
+ Matcher matcher = m_pluginPattern.matcher( commandline );
try
{
- if( matcher.contains( commandline, m_pluginPattern ) )
+ if( matcher.find() )
{
- MatchResult res = matcher.getMatch();
+ MatchResult res = matcher.toMatchResult();
String plugin = res.group(2);
- String args = commandline.substring(res.endOffset(0),
- commandline.length() -
- (commandline.charAt(commandline.length()-1) == '}' ? 1 : 0 ) );
+ String args = commandline.substring( res.end( 0 ),
+ commandline.length()
+ - (commandline.charAt( commandline.length() - 1 ) == '}' ? 1 : 0) );
Map<String, Object> arglist = parseArgs( args );
// set wikitext bounds of plugin as '_bounds' parameter, e.g., [345,396]