This is an automated email from the ASF dual-hosted git repository. juanpablo pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jspwiki.git
commit 460263e29b31ac7bc0c6590f5d0dea3c972c2502 Author: juanpablo <[email protected]> AuthorDate: Sat Mar 28 14:08:37 2020 +0100 use public api on 210 template --- .../src/main/webapp/templates/210/AttachmentTab.jsp | 8 ++++---- .../src/main/webapp/templates/210/CommentContent.jsp | 6 +++--- jspwiki-war/src/main/webapp/templates/210/DiffTab.jsp | 4 ++-- jspwiki-war/src/main/webapp/templates/210/EditContent.jsp | 6 +++--- .../src/main/webapp/templates/210/EditGroupContent.jsp | 6 +++--- jspwiki-war/src/main/webapp/templates/210/Favorites.jsp | 2 +- jspwiki-war/src/main/webapp/templates/210/FindContent.jsp | 2 +- jspwiki-war/src/main/webapp/templates/210/Footer.jsp | 4 ++-- .../src/main/webapp/templates/210/GroupContent.jsp | 10 +++++----- jspwiki-war/src/main/webapp/templates/210/GroupTab.jsp | 8 ++++---- jspwiki-war/src/main/webapp/templates/210/Header.jsp | 4 ++-- jspwiki-war/src/main/webapp/templates/210/InfoContent.jsp | 15 +++++++-------- .../src/main/webapp/templates/210/LoginContent.jsp | 7 +++---- .../src/main/webapp/templates/210/NewGroupContent.jsp | 2 +- .../src/main/webapp/templates/210/PageActionsBottom.jsp | 6 +++--- .../src/main/webapp/templates/210/PageActionsTop.jsp | 2 +- jspwiki-war/src/main/webapp/templates/210/PageContent.jsp | 6 +++--- jspwiki-war/src/main/webapp/templates/210/PageTab.jsp | 7 ++++--- .../src/main/webapp/templates/210/PreferencesContent.jsp | 4 ++-- .../src/main/webapp/templates/210/PreferencesTab.jsp | 10 ++++------ jspwiki-war/src/main/webapp/templates/210/ProfileTab.jsp | 4 ++-- .../src/main/webapp/templates/210/UploadTemplate.jsp | 8 ++++---- jspwiki-war/src/main/webapp/templates/210/UserBox.jsp | 4 ++-- .../src/main/webapp/templates/210/ViewTemplate.jsp | 2 +- .../src/main/webapp/templates/210/WorkflowContent.jsp | 2 +- .../src/main/webapp/templates/210/admin/AdminTemplate.jsp | 7 ++++--- .../main/webapp/templates/210/admin/UserManagement.jsp | 2 +- .../src/main/webapp/templates/210/commonheader.jsp | 6 +++--- .../src/main/webapp/templates/210/editors/CKeditor.jsp | 10 ++++------ jspwiki-war/src/main/webapp/templates/210/editors/FCK.jsp | 5 ++--- .../src/main/webapp/templates/210/editors/TinyMCE.jsp | 8 +++----- .../src/main/webapp/templates/210/editors/plain.jsp | 5 ++--- .../src/main/webapp/templates/210/editors/preview.jsp | 7 +++---- .../src/main/webapp/templates/210/editors/wysiwyg.jsp | 5 ++--- 34 files changed, 92 insertions(+), 102 deletions(-) diff --git a/jspwiki-war/src/main/webapp/templates/210/AttachmentTab.jsp b/jspwiki-war/src/main/webapp/templates/210/AttachmentTab.jsp index aeb551c..9439e5b 100644 --- a/jspwiki-war/src/main/webapp/templates/210/AttachmentTab.jsp +++ b/jspwiki-war/src/main/webapp/templates/210/AttachmentTab.jsp @@ -18,7 +18,7 @@ --%> <%@ taglib uri="http://jspwiki.apache.org/tags" prefix="wiki" %> -<%@ page import="org.apache.wiki.*" %> +<%@ page import="org.apache.wiki.api.core.*" %> <%@ page import="org.apache.wiki.auth.*" %> <%@ page import="org.apache.wiki.ui.progress.*" %> <%@ page import="org.apache.wiki.auth.permissions.*" %> @@ -28,7 +28,7 @@ <fmt:setBundle basename="templates.default"/> <% int MAXATTACHNAMELENGTH = 30; - WikiContext c = WikiContext.findContext(pageContext); + Context c = Context.findContext(pageContext); String progressId = c.getEngine().getManager( ProgressManager.class ).getNewProgressIdentifier(); %> @@ -134,13 +134,13 @@ <td> <input type="button" value="<fmt:message key='attach.delete'/>" - src="<wiki:Link format='url' context='<%=WikiContext.DELETE%>' ><wiki:Param name='tab' value='attach'/></wiki:Link>" + src="<wiki:Link format='url' context='<%=ContextEnum.PAGE_DELETE.getRequestContext()%>' ><wiki:Param name='tab' value='attach'/></wiki:Link>" onclick="$('deleteForm').setProperty('action',this.src); $('delete-all').click();" /> </td> </wiki:Permission> <td class="changenote"> <% - String changeNote = (String)att.getAttribute(WikiPage.CHANGENOTE); + String changeNote = (String)att.getAttribute(Page.CHANGENOTE); if( changeNote != null ) { %><%=changeNote%><% } diff --git a/jspwiki-war/src/main/webapp/templates/210/CommentContent.jsp b/jspwiki-war/src/main/webapp/templates/210/CommentContent.jsp index 664e21a..c23606a 100644 --- a/jspwiki-war/src/main/webapp/templates/210/CommentContent.jsp +++ b/jspwiki-war/src/main/webapp/templates/210/CommentContent.jsp @@ -20,12 +20,12 @@ <%@ taglib uri="http://jspwiki.apache.org/tags" prefix="wiki" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> <%@ page import="javax.servlet.jsp.jstl.fmt.*" %> -<%@ page import="org.apache.wiki.*" %> +<%@ page import="org.apache.wiki.api.core.*" %> <%@ page import="org.apache.wiki.attachment.*" %> <fmt:setLocale value="${prefs.Language}" /> <fmt:setBundle basename="templates.default"/> <% - WikiContext c = WikiContext.findContext( pageContext ); + Context c = Context.findContext( pageContext ); int attCount = c.getEngine().getManager( AttachmentManager.class ).listAttachments(c.getPage()).size(); String attTitle = LocaleSupport.getLocalizedMessage(pageContext, "attach.tab"); if( attCount != 0 ) attTitle += " (" + attCount + ")"; @@ -46,7 +46,7 @@ </wiki:Tab> <wiki:Tab id="info" title='<%=LocaleSupport.getLocalizedMessage(pageContext, "info.tab")%>' - url="<%=c.getURL(WikiContext.INFO, c.getPage().getName())%>" + url="<%=c.getURL(ContextEnum.PAGE_INFO.getRequestContext(), c.getPage().getName())%>" accesskey="i" > </wiki:Tab> diff --git a/jspwiki-war/src/main/webapp/templates/210/DiffTab.jsp b/jspwiki-war/src/main/webapp/templates/210/DiffTab.jsp index e533567..85bab3a 100644 --- a/jspwiki-war/src/main/webapp/templates/210/DiffTab.jsp +++ b/jspwiki-war/src/main/webapp/templates/210/DiffTab.jsp @@ -19,7 +19,7 @@ <%@ page import="java.util.*" %> <%@ page import="javax.servlet.jsp.jstl.fmt.*" %> -<%@ page import="org.apache.wiki.*" %> +<%@ page import="org.apache.wiki.api.core.*" %> <%@ page import="org.apache.wiki.pages.PageManager" %> <%@ page import="org.apache.wiki.tags.InsertDiffTag" %> <%@ page import="org.apache.wiki.variables.VariableManager" %> @@ -30,7 +30,7 @@ <fmt:setBundle basename="templates.default"/> <% - WikiContext c = WikiContext.findContext( pageContext ); + Context c = Context.findContext( pageContext ); List history = c.getEngine().getManager( PageManager.class ).getVersionHistory(c.getPage().getName()); pageContext.setAttribute( "history", history ); pageContext.setAttribute( "diffprovider", c.getEngine().getManager( VariableManager.class ).getVariable(c,"jspwiki.diffProvider")); diff --git a/jspwiki-war/src/main/webapp/templates/210/EditContent.jsp b/jspwiki-war/src/main/webapp/templates/210/EditContent.jsp index f10741d..73b3ec3 100644 --- a/jspwiki-war/src/main/webapp/templates/210/EditContent.jsp +++ b/jspwiki-war/src/main/webapp/templates/210/EditContent.jsp @@ -19,14 +19,14 @@ <%@ taglib uri="http://jspwiki.apache.org/tags" prefix="wiki" %> <%@ page import="javax.servlet.jsp.jstl.fmt.*" %> -<%@ page import="org.apache.wiki.*" %> +<%@ page import="org.apache.wiki.api.core.*" %> <%@ page import="org.apache.wiki.attachment.AttachmentManager" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <fmt:setLocale value="${prefs.Language}" /> <fmt:setBundle basename="templates.default"/> <% - WikiContext c = WikiContext.findContext( pageContext ); + Context c = Context.findContext( pageContext ); int attCount = c.getEngine().getManager( AttachmentManager.class ).listAttachments(c.getPage()).size(); String attTitle = LocaleSupport.getLocalizedMessage(pageContext, "attach.tab"); if( attCount != 0 ) attTitle += " (" + attCount + ")"; @@ -62,7 +62,7 @@ </wiki:Tab> <wiki:Tab id="info" title='<%=LocaleSupport.getLocalizedMessage(pageContext, "info.tab")%>' - url="<%=c.getURL(WikiContext.INFO, c.getPage().getName())%>" + url="<%=c.getURL(ContextEnum.PAGE_INFO.getRequestContext(), c.getPage().getName())%>" accesskey="i" > </wiki:Tab> diff --git a/jspwiki-war/src/main/webapp/templates/210/EditGroupContent.jsp b/jspwiki-war/src/main/webapp/templates/210/EditGroupContent.jsp index 410e67a..aa8f516 100644 --- a/jspwiki-war/src/main/webapp/templates/210/EditGroupContent.jsp +++ b/jspwiki-war/src/main/webapp/templates/210/EditGroupContent.jsp @@ -21,7 +21,7 @@ <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> <%@ page import="java.security.Principal" %> <%@ page import="java.util.Arrays" %> -<%@ page import="org.apache.wiki.*" %> +<%@ page import="org.apache.wiki.api.core.*" %> <%@ page import="org.apache.wiki.auth.authorize.Group" %> <%@ page import="org.apache.wiki.util.TextUtil" %> <%@ page import="org.apache.wiki.util.comparators.PrincipalComparator" %> @@ -35,7 +35,7 @@ %> <% - WikiContext c = WikiContext.findContext( pageContext ); + Context c = Context.findContext( pageContext ); // Extract the group name and members String name = request.getParameter( "group" ); @@ -55,7 +55,7 @@ <wiki:Permission permission="viewGroup"> <wiki:Tab id="viewgroup" title='<%=LocaleSupport.getLocalizedMessage(pageContext, "actions.viewgroup")%>' - url='<%=c.getURL(WikiContext.NONE, "Group.jsp", "group="+request.getParameter("group") ) %>' + url='<%=c.getURL(ContextEnum.PAGE_NONE.getRequestContext(), "Group.jsp", "group="+request.getParameter("group") ) %>' accesskey="v" > </wiki:Tab> </wiki:Permission> diff --git a/jspwiki-war/src/main/webapp/templates/210/Favorites.jsp b/jspwiki-war/src/main/webapp/templates/210/Favorites.jsp index fd2ee5d..716d8ec 100644 --- a/jspwiki-war/src/main/webapp/templates/210/Favorites.jsp +++ b/jspwiki-war/src/main/webapp/templates/210/Favorites.jsp @@ -20,7 +20,7 @@ <%@ taglib uri="http://jspwiki.apache.org/tags" prefix="wiki" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> <%@ page import="javax.servlet.jsp.jstl.fmt.*" %> -<%@ page import="org.apache.wiki.*" %> +<%@ page import="org.apache.wiki.api.core.*" %> <%@ page import="org.apache.wiki.api.Release" %> <fmt:setLocale value="${prefs.Language}" /> <fmt:setBundle basename="templates.default"/> diff --git a/jspwiki-war/src/main/webapp/templates/210/FindContent.jsp b/jspwiki-war/src/main/webapp/templates/210/FindContent.jsp index d065727..9ebf4ce 100644 --- a/jspwiki-war/src/main/webapp/templates/210/FindContent.jsp +++ b/jspwiki-war/src/main/webapp/templates/210/FindContent.jsp @@ -18,7 +18,7 @@ --%> <%@ taglib uri="http://jspwiki.apache.org/tags" prefix="wiki" %> -<%@ page import="org.apache.wiki.*" %> +<%@ page import="org.apache.wiki.api.core.*" %> <%@ page import="org.apache.wiki.ui.*" %> <%@ page import="java.util.*" %> <%@ page import="org.apache.commons.lang3.*" %> diff --git a/jspwiki-war/src/main/webapp/templates/210/Footer.jsp b/jspwiki-war/src/main/webapp/templates/210/Footer.jsp index 8cc7c35..c48c0f5 100644 --- a/jspwiki-war/src/main/webapp/templates/210/Footer.jsp +++ b/jspwiki-war/src/main/webapp/templates/210/Footer.jsp @@ -19,13 +19,13 @@ <%@ taglib uri="http://jspwiki.apache.org/tags" prefix="wiki" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> -<%@ page import="org.apache.wiki.*" %> <%@ page import="org.apache.wiki.api.Release" %> +<%@ page import="org.apache.wiki.api.core.*" %> <%@ page import="javax.servlet.jsp.jstl.fmt.*" %> <fmt:setLocale value="${prefs.Language}" /> <fmt:setBundle basename="templates.default"/> <% - WikiContext c = WikiContext.findContext(pageContext); + Context c = Context.findContext(pageContext); String frontpage = c.getEngine().getFrontPage(); %> <div id="footer"> diff --git a/jspwiki-war/src/main/webapp/templates/210/GroupContent.jsp b/jspwiki-war/src/main/webapp/templates/210/GroupContent.jsp index 51c270a..c8c0796 100644 --- a/jspwiki-war/src/main/webapp/templates/210/GroupContent.jsp +++ b/jspwiki-war/src/main/webapp/templates/210/GroupContent.jsp @@ -21,7 +21,7 @@ <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> <%@ page import="java.security.Principal" %> <%@ page import="java.util.*" %> -<%@ page import="org.apache.wiki.*" %> +<%@ page import="org.apache.wiki.api.core.*" %> <%@ page import="org.apache.wiki.auth.authorize.Group" %> <%@ page import="org.apache.wiki.auth.authorize.GroupManager" %> <%@ page import="org.apache.wiki.preferences.Preferences" %> @@ -37,7 +37,7 @@ %> <% - WikiContext c = WikiContext.findContext( pageContext ); + Context c = Context.findContext( pageContext ); // Extract the group name and members String name = request.getParameter( "group" ); @@ -56,12 +56,12 @@ creator = group.getCreator(); if ( group.getCreated() != null ) { - created = Preferences.renderDate(WikiContext.findContext( pageContext ), group.getCreated(),Preferences.TimeFormat.DATETIME); + created = Preferences.renderDate(Context.findContext( pageContext ), group.getCreated(),Preferences.TimeFormat.DATETIME); } modifier = group.getModifier(); if ( group.getLastModified() != null ) { - modified = Preferences.renderDate(WikiContext.findContext( pageContext ), group.getLastModified(),Preferences.TimeFormat.DATETIME) ; + modified = Preferences.renderDate(Context.findContext( pageContext ), group.getLastModified(),Preferences.TimeFormat.DATETIME) ; } } name = TextUtil.replaceEntities(name); @@ -162,7 +162,7 @@ <wiki:Permission permission="editGroup"> <wiki:Tab id="editgroup" title='<%=LocaleSupport.getLocalizedMessage(pageContext, "actions.editgroup")%>' - url='<%=c.getURL(WikiContext.NONE, "EditGroup.jsp", "group="+request.getParameter("group") ) %>' + url='<%=c.getURL(ContextEnum.PAGE_NONE.getRequestContext(), "EditGroup.jsp", "group="+request.getParameter("group") ) %>' accesskey="e" > </wiki:Tab> </wiki:Permission> diff --git a/jspwiki-war/src/main/webapp/templates/210/GroupTab.jsp b/jspwiki-war/src/main/webapp/templates/210/GroupTab.jsp index 447ef60..025ece7 100644 --- a/jspwiki-war/src/main/webapp/templates/210/GroupTab.jsp +++ b/jspwiki-war/src/main/webapp/templates/210/GroupTab.jsp @@ -22,7 +22,7 @@ <%@ page import="java.text.MessageFormat" %> <%@ page import="java.util.*" %> <%@ page import="javax.servlet.jsp.jstl.fmt.*" %> -<%@ page import="org.apache.wiki.WikiContext" %> +<%@ page import="org.apache.wiki.api.core.Context" %> <%@ page import="org.apache.wiki.auth.*" %> <%@ page import="org.apache.wiki.auth.authorize.Group" %> <%@ page import="org.apache.wiki.auth.authorize.GroupManager" %> @@ -54,11 +54,11 @@ ss.append( delim ); mf = new MessageFormat(LocaleSupport.getLocalizedMessage(pageContext, "grp.createdon") ); - args = new Object[]{(group.getCreated()==null) ? "" : Preferences.renderDate(WikiContext.findContext( pageContext ), group.getCreated(),Preferences.TimeFormat.DATETIME), group.getCreator()}; + args = new Object[]{(group.getCreated()==null) ? "" : Preferences.renderDate(Context.findContext( pageContext ), group.getCreated(),Preferences.TimeFormat.DATETIME), group.getCreator()}; ss.append( mf.format( args ) ); mf = new MessageFormat(LocaleSupport.getLocalizedMessage(pageContext, "grp.lastmodified") ); - args = new Object[]{(group.getLastModified()==null) ? "" : Preferences.renderDate(WikiContext.findContext( pageContext ), group.getLastModified(),Preferences.TimeFormat.DATETIME), group.getModifier()}; + args = new Object[]{(group.getLastModified()==null) ? "" : Preferences.renderDate(Context.findContext( pageContext ), group.getLastModified(),Preferences.TimeFormat.DATETIME), group.getModifier()}; ss.append( mf.format( args ) ); ss.append( "\", " ); @@ -158,7 +158,7 @@ <script type="text/javascript">//<![CDATA[ <% - WikiContext c = WikiContext.findContext( pageContext ); + Context c = Context.findContext( pageContext ); Principal[] roles = c.getWikiSession().getRoles(); for( int i = 0; i < roles.length; i++ ) diff --git a/jspwiki-war/src/main/webapp/templates/210/Header.jsp b/jspwiki-war/src/main/webapp/templates/210/Header.jsp index 550d6fb..b479bb1 100644 --- a/jspwiki-war/src/main/webapp/templates/210/Header.jsp +++ b/jspwiki-war/src/main/webapp/templates/210/Header.jsp @@ -19,11 +19,11 @@ <%@ taglib uri="http://jspwiki.apache.org/tags" prefix="wiki" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> -<%@ page import="org.apache.wiki.*" %> +<%@ page import="org.apache.wiki.api.core.*" %> <fmt:setLocale value="${prefs.Language}" /> <fmt:setBundle basename="templates.default"/> <% - WikiContext c = WikiContext.findContext(pageContext); + Context c = Context.findContext(pageContext); String frontpage = c.getEngine().getFrontPage(); %> diff --git a/jspwiki-war/src/main/webapp/templates/210/InfoContent.jsp b/jspwiki-war/src/main/webapp/templates/210/InfoContent.jsp index 6f91642..3942fe0 100644 --- a/jspwiki-war/src/main/webapp/templates/210/InfoContent.jsp +++ b/jspwiki-war/src/main/webapp/templates/210/InfoContent.jsp @@ -20,7 +20,6 @@ <%@ taglib uri="http://jspwiki.apache.org/tags" prefix="wiki" %> <%@ page import="java.security.Permission" %> <%@ page import="javax.servlet.jsp.jstl.fmt.*" %> -<%@ page import="org.apache.wiki.*" %> <%@ page import="org.apache.wiki.api.core.*" %> <%@ page import="org.apache.wiki.attachment.AttachmentManager" %> <%@ page import="org.apache.wiki.auth.*" %> @@ -35,7 +34,7 @@ <fmt:setLocale value="${prefs.Language}" /> <fmt:setBundle basename="templates.default"/> <% - Context c = WikiContext.findContext(pageContext); + Context c = Context.findContext(pageContext); Page wikiPage = c.getPage(); int attCount = c.getEngine().getManager( AttachmentManager.class ).listAttachments( c.getPage() ).size(); String attTitle = LocaleSupport.getLocalizedMessage(pageContext, "attach.tab"); @@ -91,7 +90,7 @@ <wiki:Tab id="pagecontent" title='<%=LocaleSupport.getLocalizedMessage(pageContext, "actions.view")%>' accesskey="v" - url="<%=c.getURL(WikiContext.VIEW, c.getPage().getName())%>"> + url="<%=c.getURL(ContextEnum.PAGE_VIEW.getRequestContext(), c.getPage().getName())%>"> <%--<wiki:Include page="PageTab.jsp"/> --%> </wiki:Tab> @@ -156,7 +155,7 @@ </wiki:Permission> <wiki:Permission permission="delete"> - <form action="<wiki:Link format='url' context='<%=WikiContext.DELETE%>' />" + <form action="<wiki:Link format='url' context='<%=ContextEnum.PAGE_DELETE.getRequestContext()%>' />" class="wikiform" id="deleteForm" method="post" accept-charset="<wiki:ContentEncoding />" @@ -198,7 +197,7 @@ <wiki:SetPagination start="<%=startitem%>" total="<%=itemcount%>" pagesize="<%=pagesize%>" maxlinks="9" fmtkey="info.pagination" - href='<%=c.getURL(WikiContext.INFO, c.getPage().getName(), "start=%s")%>' /> + href='<%=c.getURL(ContextEnum.PAGE_INFO.getRequestContext(), c.getPage().getName(), "start=%s")%>' /> <div class="zebra-table sortable table-filter"> <table class="wikitable" > @@ -275,7 +274,7 @@ <wiki:Tab id="pagecontent" title='<%=LocaleSupport.getLocalizedMessage(pageContext, "info.parent")%>' accesskey="v" - url="<%=c.getURL(WikiContext.VIEW, ((Attachment)wikiPage).getParentName()) %>"> + url="<%=c.getURL(ContextEnum.PAGE_VIEW.getRequestContext(), ((Attachment)wikiPage).getParentName()) %>"> </wiki:Tab> <wiki:Tab id="info" title='<%=LocaleSupport.getLocalizedMessage(pageContext, "info.attachment.tab")%>' accesskey="i" > @@ -326,7 +325,7 @@ <wiki:Permission permission="delete"> <h3><fmt:message key="info.deleteattachment"/></h3> - <form action="<wiki:Link format='url' context='<%=WikiContext.DELETE%>' />" + <form action="<wiki:Link format='url' context='<%=ContextEnum.PAGE_DELETE.getRequestContext()%>' />" class="wikiform" id="deleteForm" method="post" accept-charset="<wiki:ContentEncoding />" @@ -392,7 +391,7 @@ <td> <input type="button" value="Restore" - url="<wiki:Link format='url' context='<%=WikiContext.UPLOAD%>'/>"/> + url="<wiki:Link format='url' context='<%=ContextEnum.PAGE_UPLOAD.getRequestContext()%>'/>"/> </td> </wiki:Permission> --%> diff --git a/jspwiki-war/src/main/webapp/templates/210/LoginContent.jsp b/jspwiki-war/src/main/webapp/templates/210/LoginContent.jsp index 542631e..3a2e8fe 100644 --- a/jspwiki-war/src/main/webapp/templates/210/LoginContent.jsp +++ b/jspwiki-war/src/main/webapp/templates/210/LoginContent.jsp @@ -18,8 +18,7 @@ --%> <%@ taglib uri="http://jspwiki.apache.org/tags" prefix="wiki" %> -<%@ page import="org.apache.wiki.*" %> -<%@ page import="org.apache.wiki.*" %> +<%@ page import="org.apache.wiki.api.core.*" %> <%@ page import="org.apache.wiki.auth.*" %> <%@ page errorPage="/Error.jsp" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> @@ -29,7 +28,7 @@ <fmt:setBundle basename="templates.default"/> <% String postURL = ""; - WikiContext ctx = WikiContext.findContext( pageContext ); + Context ctx = Context.findContext( pageContext ); AuthenticationManager mgr = ctx.getEngine().getManager( AuthenticationManager.class ); if( mgr.isContainerAuthenticated() ) @@ -40,7 +39,7 @@ { String redir = (String)ctx.getVariable("redirect"); if( redir == null ) redir = ctx.getEngine().getFrontPage(); - postURL = ctx.getURL( WikiContext.LOGIN, redir ); + postURL = ctx.getURL( ContextEnum.WIKI_LOGIN.getRequestContext(), redir ); } boolean supportsCookieAuthentication = mgr.allowsCookieAuthentication(); diff --git a/jspwiki-war/src/main/webapp/templates/210/NewGroupContent.jsp b/jspwiki-war/src/main/webapp/templates/210/NewGroupContent.jsp index 56f8cdb..0b85b72 100644 --- a/jspwiki-war/src/main/webapp/templates/210/NewGroupContent.jsp +++ b/jspwiki-war/src/main/webapp/templates/210/NewGroupContent.jsp @@ -21,7 +21,7 @@ <%@ page import="java.security.Principal" %> <%@ page import="java.util.Arrays" %> <%@ page import="java.util.ResourceBundle" %> -<%@ page import="org.apache.wiki.*" %> +<%@ page import="org.apache.wiki.api.core.*" %> <%@ page import="org.apache.wiki.auth.authorize.Group" %> <%@ page import="org.apache.wiki.auth.authorize.GroupManager" %> <%@ page import="org.apache.wiki.util.TextUtil" %> diff --git a/jspwiki-war/src/main/webapp/templates/210/PageActionsBottom.jsp b/jspwiki-war/src/main/webapp/templates/210/PageActionsBottom.jsp index 8ed265f..483032d 100644 --- a/jspwiki-war/src/main/webapp/templates/210/PageActionsBottom.jsp +++ b/jspwiki-war/src/main/webapp/templates/210/PageActionsBottom.jsp @@ -18,14 +18,14 @@ --%> <%@ taglib uri="http://jspwiki.apache.org/tags" prefix="wiki" %> -<%@ page import="org.apache.wiki.*" %> +<%@ page import="org.apache.wiki.api.core.*" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> <fmt:setLocale value="${prefs.Language}" /> <fmt:setBundle basename="templates.default"/> <% - WikiContext c = WikiContext.findContext(pageContext); - WikiPage wikipage = c.getPage(); + Context c = Context.findContext(pageContext); + Page wikipage = c.getPage(); %> <wiki:CheckRequestContext context='view|diff|edit|upload|info'> <div id='actionsBottom' class="pageactions"> diff --git a/jspwiki-war/src/main/webapp/templates/210/PageActionsTop.jsp b/jspwiki-war/src/main/webapp/templates/210/PageActionsTop.jsp index 8666c00..b9072db 100644 --- a/jspwiki-war/src/main/webapp/templates/210/PageActionsTop.jsp +++ b/jspwiki-war/src/main/webapp/templates/210/PageActionsTop.jsp @@ -18,7 +18,7 @@ --%> <%@ taglib uri="http://jspwiki.apache.org/tags" prefix="wiki" %> -<%@ page import="org.apache.wiki.*" %> +<%@ page import="org.apache.wiki.api.core.*" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> <fmt:setLocale value="${prefs.Language}" /> diff --git a/jspwiki-war/src/main/webapp/templates/210/PageContent.jsp b/jspwiki-war/src/main/webapp/templates/210/PageContent.jsp index 48ee36e..fdc40a7 100644 --- a/jspwiki-war/src/main/webapp/templates/210/PageContent.jsp +++ b/jspwiki-war/src/main/webapp/templates/210/PageContent.jsp @@ -19,13 +19,13 @@ <%@ taglib uri="http://jspwiki.apache.org/tags" prefix="wiki" %> <%@ page import="javax.servlet.jsp.jstl.fmt.*" %> -<%@ page import="org.apache.wiki.*" %> +<%@ page import="org.apache.wiki.api.core.*" %> <%@ page import="org.apache.wiki.attachment.*" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> <fmt:setLocale value="${prefs.Language}" /> <fmt:setBundle basename="templates.default"/> <% - WikiContext c = WikiContext.findContext( pageContext ); + Context c = Context.findContext( pageContext ); int attCount = c.getEngine().getManager( AttachmentManager.class ).listAttachments( c.getPage() ).size(); String attTitle = LocaleSupport.getLocalizedMessage(pageContext, "attach.tab"); if( attCount != 0 ) attTitle += " (" + attCount + ")"; @@ -56,7 +56,7 @@ </wiki:PageType> <wiki:Tab id="info" title='<%=LocaleSupport.getLocalizedMessage(pageContext, "info.tab")%>' - url="<%=c.getURL(WikiContext.INFO, c.getPage().getName())%>" + url="<%=c.getURL(ContextEnum.PAGE_INFO.getRequestContext(), c.getPage().getName())%>" accesskey="i" > </wiki:Tab> diff --git a/jspwiki-war/src/main/webapp/templates/210/PageTab.jsp b/jspwiki-war/src/main/webapp/templates/210/PageTab.jsp index 40393af..ac77fa7 100644 --- a/jspwiki-war/src/main/webapp/templates/210/PageTab.jsp +++ b/jspwiki-war/src/main/webapp/templates/210/PageTab.jsp @@ -18,7 +18,8 @@ --%> <%@ taglib uri="http://jspwiki.apache.org/tags" prefix="wiki" %> -<%@ page import="org.apache.wiki.*" %> +<%@ page import="org.apache.wiki.api.core.*" %> +<%@ page import="org.apache.wiki.api.providers.WikiProvider" %> <%@ page import="org.apache.wiki.pages.PageManager" %> <%@ page import="org.apache.wiki.util.TextUtil" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> @@ -26,8 +27,8 @@ <fmt:setLocale value="${prefs.Language}" /> <fmt:setBundle basename="templates.default"/> <% - WikiContext c = WikiContext.findContext( pageContext ); - WikiPage p = c.getPage(); + Context c = Context.findContext( pageContext ); + Page p = c.getPage(); String pagename = p.getName(); /* check possible permalink (blogentry) pages */ diff --git a/jspwiki-war/src/main/webapp/templates/210/PreferencesContent.jsp b/jspwiki-war/src/main/webapp/templates/210/PreferencesContent.jsp index 4346030..d146582 100644 --- a/jspwiki-war/src/main/webapp/templates/210/PreferencesContent.jsp +++ b/jspwiki-war/src/main/webapp/templates/210/PreferencesContent.jsp @@ -18,14 +18,14 @@ --%> <%@ taglib uri="http://jspwiki.apache.org/tags" prefix="wiki" %> -<%@ page import="org.apache.wiki.*" %> +<%@ page import="org.apache.wiki.api.core.*" %> <%@ page import="org.apache.wiki.ui.*" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> <%@ page import="javax.servlet.jsp.jstl.fmt.*" %> <fmt:setLocale value="${prefs.Language}" /> <fmt:setBundle basename="templates.default"/> <% - WikiContext context = WikiContext.findContext( pageContext ); + Context context = Context.findContext( pageContext ); TemplateManager.addResourceRequest( context, TemplateManager.RESOURCE_SCRIPT, "scripts/jspwiki-prefs.js" ); %> diff --git a/jspwiki-war/src/main/webapp/templates/210/PreferencesTab.jsp b/jspwiki-war/src/main/webapp/templates/210/PreferencesTab.jsp index 7ba04fe..8cb15aa 100644 --- a/jspwiki-war/src/main/webapp/templates/210/PreferencesTab.jsp +++ b/jspwiki-war/src/main/webapp/templates/210/PreferencesTab.jsp @@ -18,14 +18,12 @@ --%> <%@ page errorPage="/Error.jsp" %> -<%@ page import="java.util.*" %> -<%@ page import="java.lang.*" %> -<%@ page import="org.apache.wiki.*" %> <%@ page import="java.io.*" %> +<%@ page import="java.util.*" %> <%@ page import="java.util.jar.*" %> - -<%@ page import="org.apache.wiki.ui.*" %> +<%@ page import="org.apache.wiki.api.core.*" %> <%@ page import="org.apache.wiki.preferences.*" %> +<%@ page import="org.apache.wiki.ui.*" %> <%@ taglib uri="http://jspwiki.apache.org/tags" prefix="wiki" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> @@ -36,7 +34,7 @@ <fmt:setBundle basename="templates.default"/> <% //FIXME: this should better move to UserPreferences.jsp but that doesn't seem to work. Ugh ? - WikiContext c = WikiContext.findContext( pageContext ); + Context c = Context.findContext( pageContext ); TemplateManager t = c.getEngine().getManager( TemplateManager.class ); pageContext.setAttribute( "skins", t.listSkins(pageContext, c.getTemplate() ) ); pageContext.setAttribute( "languages", t.listLanguages(pageContext) ); diff --git a/jspwiki-war/src/main/webapp/templates/210/ProfileTab.jsp b/jspwiki-war/src/main/webapp/templates/210/ProfileTab.jsp index 173dc2a..50349af 100644 --- a/jspwiki-war/src/main/webapp/templates/210/ProfileTab.jsp +++ b/jspwiki-war/src/main/webapp/templates/210/ProfileTab.jsp @@ -18,7 +18,7 @@ --%> <%@ taglib uri="http://jspwiki.apache.org/tags" prefix="wiki" %> -<%@ page import="org.apache.wiki.*" %> +<%@ page import="org.apache.wiki.api.core.*" %> <%@ page import="org.apache.wiki.auth.*" %> <%@ page import="org.apache.wiki.auth.user.*" %> <%@ page errorPage="/Error.jsp" %> @@ -29,7 +29,7 @@ <fmt:setBundle basename="templates.default"/> <% /* dateformatting not yet supported by wiki:UserProfile tag - diy */ - WikiContext wikiContext = WikiContext.findContext(pageContext); + Context wikiContext = Context.findContext(pageContext); UserManager manager = wikiContext.getEngine().getManager( UserManager.class ); UserProfile profile = manager.getUserProfile( wikiContext.getWikiSession() ); %> diff --git a/jspwiki-war/src/main/webapp/templates/210/UploadTemplate.jsp b/jspwiki-war/src/main/webapp/templates/210/UploadTemplate.jsp index 32265f2..816df0f 100644 --- a/jspwiki-war/src/main/webapp/templates/210/UploadTemplate.jsp +++ b/jspwiki-war/src/main/webapp/templates/210/UploadTemplate.jsp @@ -19,13 +19,13 @@ <%@ taglib uri="http://jspwiki.apache.org/tags" prefix="wiki" %> <%@ page import="javax.servlet.jsp.jstl.fmt.*" %> -<%@ page import="org.apache.wiki.*" %> +<%@ page import="org.apache.wiki.api.core.*" %> <%@ page import="org.apache.wiki.attachment.AttachmentManager" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> <fmt:setLocale value="${prefs.Language}" /> <fmt:setBundle basename="templates.default"/> <% - WikiContext c = WikiContext.findContext( pageContext ); + Context c = Context.findContext( pageContext ); int attCount = c.getEngine().getManager( AttachmentManager.class ).listAttachments(c.getPage()).size(); String attTitle = LocaleSupport.getLocalizedMessage(pageContext, "attach.tab"); if( attCount != 0 ) attTitle += " (" + attCount + ")"; @@ -54,7 +54,7 @@ <wiki:TabbedSection defaultTab="attachments" > <wiki:Tab id="pagecontent" title='<%=LocaleSupport.getLocalizedMessage(pageContext, "view.tab")%>' - url="<%=c.getURL(WikiContext.VIEW, c.getPage().getName())%>" + url="<%=c.getURL(ContextEnum.PAGE_VIEW.getRequestContext(), c.getPage().getName())%>" accesskey="v" > </wiki:Tab> @@ -63,7 +63,7 @@ <wiki:Include page="AttachmentTab.jsp"/> </wiki:Tab> <wiki:Tab id="info" title='<%=LocaleSupport.getLocalizedMessage(pageContext, "info.tab")%>' - url="<%=c.getURL(WikiContext.INFO, c.getPage().getName())%>" + url="<%=c.getURL(ContextEnum.PAGE_INFO.getRequestContext(), c.getPage().getName())%>" accesskey="i" > </wiki:Tab> diff --git a/jspwiki-war/src/main/webapp/templates/210/UserBox.jsp b/jspwiki-war/src/main/webapp/templates/210/UserBox.jsp index 5f27298..d2d8c0e 100644 --- a/jspwiki-war/src/main/webapp/templates/210/UserBox.jsp +++ b/jspwiki-war/src/main/webapp/templates/210/UserBox.jsp @@ -20,11 +20,11 @@ <%@ taglib uri="http://jspwiki.apache.org/tags" prefix="wiki" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> <%@ page import="javax.servlet.jsp.jstl.fmt.*" %> -<%@ page import="org.apache.wiki.*" %> +<%@ page import="org.apache.wiki.api.core.*" %> <fmt:setLocale value="${prefs.Language}" /> <fmt:setBundle basename="templates.default"/> <% - WikiContext c = WikiContext.findContext(pageContext); + Context c = Context.findContext(pageContext); %> <div class="userbox"> diff --git a/jspwiki-war/src/main/webapp/templates/210/ViewTemplate.jsp b/jspwiki-war/src/main/webapp/templates/210/ViewTemplate.jsp index ce15ff5..451dbef 100644 --- a/jspwiki-war/src/main/webapp/templates/210/ViewTemplate.jsp +++ b/jspwiki-war/src/main/webapp/templates/210/ViewTemplate.jsp @@ -19,7 +19,7 @@ <%@ taglib uri="http://jspwiki.apache.org/tags" prefix="wiki" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> -<%@ page import="org.apache.wiki.*" %> +<%@ page import="org.apache.wiki.api.core.*" %> <fmt:setBundle basename="templates.default"/> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> diff --git a/jspwiki-war/src/main/webapp/templates/210/WorkflowContent.jsp b/jspwiki-war/src/main/webapp/templates/210/WorkflowContent.jsp index e0d4082..9bb25f9 100644 --- a/jspwiki-war/src/main/webapp/templates/210/WorkflowContent.jsp +++ b/jspwiki-war/src/main/webapp/templates/210/WorkflowContent.jsp @@ -18,7 +18,7 @@ --%> <%@ page errorPage="/Error.jsp" %> -<%@ page import="org.apache.wiki.*" %> +<%@ page import="org.apache.wiki.api.core.*" %> <%@ taglib uri="http://jspwiki.apache.org/tags" prefix="wiki" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> diff --git a/jspwiki-war/src/main/webapp/templates/210/admin/AdminTemplate.jsp b/jspwiki-war/src/main/webapp/templates/210/admin/AdminTemplate.jsp index 5d60314..536f8c4 100644 --- a/jspwiki-war/src/main/webapp/templates/210/admin/AdminTemplate.jsp +++ b/jspwiki-war/src/main/webapp/templates/210/admin/AdminTemplate.jsp @@ -18,7 +18,8 @@ --%> <%@ page import="java.util.*" %> -<%@ page import="org.apache.wiki.*" %> +<%@ page import="org.apache.wiki.api.core.*" %> +<%@ page import="org.apache.wiki.api.spi.Wiki" %> <%@ page import="org.apache.wiki.ui.*" %> <%@ page import="org.apache.wiki.ui.admin.*" %> <%@ page errorPage="/Error.jsp" %> @@ -39,8 +40,8 @@ in your <code>jspwiki.properties</code> file.</div> <% - WikiEngine wiki = WikiEngine.getInstance( getServletConfig() ); - WikiContext ctx = WikiContext.findContext(pageContext); + Engine wiki = Wiki.engine().find( getServletConfig() ); + Context ctx = Context.findContext(pageContext); AdminBeanManager mgr = wiki.getManager( AdminBeanManager.class ); %> diff --git a/jspwiki-war/src/main/webapp/templates/210/admin/UserManagement.jsp b/jspwiki-war/src/main/webapp/templates/210/admin/UserManagement.jsp index f7ab0bc..2c681c9 100644 --- a/jspwiki-war/src/main/webapp/templates/210/admin/UserManagement.jsp +++ b/jspwiki-war/src/main/webapp/templates/210/admin/UserManagement.jsp @@ -18,7 +18,7 @@ --%> <%@ page import="java.util.*" %> -<%@ page import="org.apache.wiki.*" %> +<%@ page import="org.apache.wiki.api.core.*" %> <%@ page import="org.apache.wiki.ui.admin.*" %> <%@ page errorPage="/Error.jsp" %> <%@ taglib uri="http://jspwiki.apache.org/tags" prefix="wiki" %> diff --git a/jspwiki-war/src/main/webapp/templates/210/commonheader.jsp b/jspwiki-war/src/main/webapp/templates/210/commonheader.jsp index 5ae691d..8738173 100644 --- a/jspwiki-war/src/main/webapp/templates/210/commonheader.jsp +++ b/jspwiki-war/src/main/webapp/templates/210/commonheader.jsp @@ -18,7 +18,7 @@ --%> <%@ taglib uri="http://jspwiki.apache.org/tags" prefix="wiki" %> -<%@ page import="org.apache.wiki.*" %> +<%@ page import="org.apache.wiki.api.core.*" %> <%@ page import="org.apache.wiki.ui.*" %> <%@ page import="org.apache.wiki.util.*" %> <%@ page import="org.apache.wiki.preferences.Preferences" %> @@ -67,7 +67,7 @@ <meta name="wikiBaseUrl" content='<wiki:BaseURL />' /> <meta name="wikiPageUrl" content='<wiki:Link format="url" page="#$%"/>' /> <meta name="wikiEditUrl" content='<wiki:EditLink format="url" />' /> -<meta name="wikiJsonUrl" content='<%= WikiContext.findContext(pageContext).getURL( WikiContext.NONE, "ajax" ) %>' /><%--unusual pagename--%> +<meta name="wikiJsonUrl" content='<%= Context.findContext(pageContext).getURL( ContextEnum.PAGE_NONE.getRequestContext(), "ajax" ) %>' /><%--unusual pagename--%> <meta name="wikiPageName" content='<wiki:Variable var="pagename" />' /><%--pagename without blanks--%> <meta name="wikiUserName" content='<wiki:UserName />' /> <meta name="wikiTemplateUrl" content='<wiki:Link format="url" templatefile="" />' /> @@ -85,7 +85,7 @@ <link rel="help" href="<wiki:LinkTo format='url' page='TextFormattingRules'/>" title="Help" /> <% - WikiContext c = WikiContext.findContext( pageContext ); + Context c = Context.findContext( pageContext ); String frontpage = c.getEngine().getFrontPage(); %> <link rel="start" href="<wiki:LinkTo format='url' page='<%=frontpage%>' />" diff --git a/jspwiki-war/src/main/webapp/templates/210/editors/CKeditor.jsp b/jspwiki-war/src/main/webapp/templates/210/editors/CKeditor.jsp index d0d8265..b113830 100644 --- a/jspwiki-war/src/main/webapp/templates/210/editors/CKeditor.jsp +++ b/jspwiki-war/src/main/webapp/templates/210/editors/CKeditor.jsp @@ -20,7 +20,6 @@ <%@ taglib uri="http://jspwiki.apache.org/tags" prefix="wiki" %> <%@ page import="java.util.Properties"%> <%@ page import="org.apache.commons.text.*" %> -<%@ page import="org.apache.wiki.*" %> <%@ page import="org.apache.wiki.api.core.*" %> <%@ page import="org.apache.wiki.auth.*" %> <%@ page import="org.apache.wiki.auth.permissions.*" %> @@ -40,16 +39,15 @@ This provides the WYSIWYG CKeditor for JSPWiki. --%> <% - Context context = WikiContext.findContext( pageContext ); + Context context = Context.findContext( pageContext ); Engine engine = context.getEngine(); /* local download of CKeditor */ TemplateManager.addResourceRequest( context, TemplateManager.RESOURCE_SCRIPT, - context.getURL( WikiContext.NONE, "scripts/ckeditor/ckeditor.js" ) ); + context.getURL( ContextEnum.PAGE_NONE.getRequestContext(), "scripts/ckeditor/ckeditor.js" ) ); /* Use CKEditor from a CDN - TemplateManager.addResourceRequest( context, TemplateManager.RESOURCE_SCRIPT, - "//cdn.ckeditor.com/4.5.1/standard/ckeditor.js" ); + TemplateManager.addResourceRequest( context, TemplateManager.RESOURCE_SCRIPT, "//cdn.ckeditor.com/4.5.1/standard/ckeditor.js" ); */ context.setVariable( Context.VAR_WYSIWYG_EDITOR_MODE, Boolean.TRUE ); @@ -110,7 +108,7 @@ // Disable the WYSIWYG_EDITOR_MODE and reset the other properties immediately // after the XHTML for CKeditor has been rendered. - context.setVariable( WikiContext.VAR_WYSIWYG_EDITOR_MODE, Boolean.FALSE ); + context.setVariable( Context.VAR_WYSIWYG_EDITOR_MODE, Boolean.FALSE ); context.setVariable( VariableManager.VAR_RUNFILTERS, null ); wikiPage.setAttribute( MarkupParser.PROP_CAMELCASELINKS, originalCCLOption ); diff --git a/jspwiki-war/src/main/webapp/templates/210/editors/FCK.jsp b/jspwiki-war/src/main/webapp/templates/210/editors/FCK.jsp index 0a103ff..7735d36 100644 --- a/jspwiki-war/src/main/webapp/templates/210/editors/FCK.jsp +++ b/jspwiki-war/src/main/webapp/templates/210/editors/FCK.jsp @@ -21,7 +21,6 @@ <%@ taglib uri="http://jspwiki.apache.org/tags" prefix="wiki" %> <%@ page import="java.util.Properties"%> <%@ page import="org.apache.commons.text.*" %> -<%@ page import="org.apache.wiki.*" %> <%@ page import="org.apache.wiki.api.core.*" %> <%@ page import="org.apache.wiki.auth.*" %> <%@ page import="org.apache.wiki.auth.permissions.*" %> @@ -39,7 +38,7 @@ <%-- This provides the FCK editor for JSPWiki. --%> -<% Context context = WikiContext.findContext( pageContext ); +<% Context context = Context.findContext( pageContext ); Engine engine = context.getEngine(); context.setVariable( Context.VAR_WYSIWYG_EDITOR_MODE, Boolean.TRUE ); context.setVariable( VariableManager.VAR_RUNFILTERS, "false" ); @@ -50,7 +49,7 @@ String usertext = EditorManager.getEditedText(pageContext); TemplateManager.addResourceRequest( context, TemplateManager.RESOURCE_SCRIPT, - context.getURL( WikiContext.NONE, "scripts/fckeditor/fckeditor.js" ) ); %> + context.getURL( ContextEnum.PAGE_NONE.getRequestContext(), "scripts/fckeditor/fckeditor.js" ) ); %> <wiki:CheckRequestContext context="edit"> <wiki:NoSuchPage> <%-- this is a new page, check if we're cloning --%> diff --git a/jspwiki-war/src/main/webapp/templates/210/editors/TinyMCE.jsp b/jspwiki-war/src/main/webapp/templates/210/editors/TinyMCE.jsp index 55088d0..3fbaafb 100644 --- a/jspwiki-war/src/main/webapp/templates/210/editors/TinyMCE.jsp +++ b/jspwiki-war/src/main/webapp/templates/210/editors/TinyMCE.jsp @@ -20,7 +20,6 @@ <%@ taglib uri="http://jspwiki.apache.org/tags" prefix="wiki" %> <%@ page import="java.util.Properties"%> <%@ page import="org.apache.commons.text.*" %> -<%@ page import="org.apache.wiki.*" %> <%@ page import="org.apache.wiki.api.core.*" %> <%@ page import="org.apache.wiki.auth.*" %> <%@ page import="org.apache.wiki.auth.permissions.*" %> @@ -39,16 +38,15 @@ This provides the WYSIWYG TinyMCE for JSPWiki. --%> <% - Context context = WikiContext.findContext( pageContext ); + Context context = Context.findContext( pageContext ); Engine engine = context.getEngine(); /* local download of TinyMCE */ TemplateManager.addResourceRequest( context, TemplateManager.RESOURCE_SCRIPT, - context.getURL( WikiContext.NONE, "scripts/tinymce/js/tinymce/tinymce.min.js" ) ); + context.getURL( ContextEnum.PAGE_NONE.getRequestContext(), "scripts/tinymce/js/tinymce/tinymce.min.js" ) ); /* Use TinyMCE from a CDN - TemplateManager.addResourceRequest( context, TemplateManager.RESOURCE_SCRIPT, - "//tinymce.cachefly.net/4.2/tinymce.min.js" ); + TemplateManager.addResourceRequest( context, TemplateManager.RESOURCE_SCRIPT, "//tinymce.cachefly.net/4.2/tinymce.min.js" ); */ context.setVariable( Context.VAR_WYSIWYG_EDITOR_MODE, Boolean.TRUE ); diff --git a/jspwiki-war/src/main/webapp/templates/210/editors/plain.jsp b/jspwiki-war/src/main/webapp/templates/210/editors/plain.jsp index 9fa858c..e725ef5 100644 --- a/jspwiki-war/src/main/webapp/templates/210/editors/plain.jsp +++ b/jspwiki-war/src/main/webapp/templates/210/editors/plain.jsp @@ -19,7 +19,6 @@ <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <%@ taglib uri="http://jspwiki.apache.org/tags" prefix="wiki" %> -<%@ page import="org.apache.wiki.*" %> <%@ page import="org.apache.wiki.api.core.*" %> <%@ page import="org.apache.wiki.auth.*" %> <%@ page import="org.apache.wiki.auth.permissions.*" %> @@ -36,11 +35,11 @@ This is a plain editor for JSPWiki. --%> <% - Context context = WikiContext.findContext( pageContext ); + Context context = Context.findContext( pageContext ); Engine engine = context.getEngine(); TemplateManager.addResourceRequest( context, TemplateManager.RESOURCE_SCRIPT, - context.getURL( WikiContext.NONE, "scripts/jspwiki-edit.js" ) ); + context.getURL( ContextEnum.PAGE_NONE.getRequestContext(), "scripts/jspwiki-edit.js" ) ); String usertext = EditorManager.getEditedText( pageContext ); %> diff --git a/jspwiki-war/src/main/webapp/templates/210/editors/preview.jsp b/jspwiki-war/src/main/webapp/templates/210/editors/preview.jsp index b687efb..13bdac0 100644 --- a/jspwiki-war/src/main/webapp/templates/210/editors/preview.jsp +++ b/jspwiki-war/src/main/webapp/templates/210/editors/preview.jsp @@ -19,7 +19,6 @@ <%@ page language="java" pageEncoding="UTF-8"%> <%@ taglib uri="http://jspwiki.apache.org/tags" prefix="wiki" %> -<%@ page import="org.apache.wiki.*" %> <%@ page import="org.apache.wiki.api.core.*" %> <%@ page import="org.apache.wiki.ui.*" %> <%@ page import="org.apache.wiki.util.TextUtil" %> @@ -32,13 +31,13 @@ This is a special editor component for JSPWiki preview storage. --%> <% - Context context = WikiContext.findContext( pageContext ); + Context context = Context.findContext( pageContext ); String usertext = (String)pageContext.getAttribute( EditorManager.ATTR_EDITEDTEXT, PageContext.REQUEST_SCOPE ); if( usertext == null ) usertext = ""; String action = "comment".equals(request.getParameter("action")) ? - context.getURL(WikiContext.COMMENT,context.getName()) : - context.getURL(WikiContext.EDIT,context.getName()); + context.getURL(ContextEnum.PAGE_COMMENT.getRequestContext(),context.getName()) : + context.getURL(ContextEnum.PAGE_EDIT.getRequestContext(),context.getName()); %> <form action="<%=action%>" method="post" accept-charset="<wiki:ContentEncoding/>" diff --git a/jspwiki-war/src/main/webapp/templates/210/editors/wysiwyg.jsp b/jspwiki-war/src/main/webapp/templates/210/editors/wysiwyg.jsp index f853733..acc4fb0 100644 --- a/jspwiki-war/src/main/webapp/templates/210/editors/wysiwyg.jsp +++ b/jspwiki-war/src/main/webapp/templates/210/editors/wysiwyg.jsp @@ -19,7 +19,6 @@ <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <%@ taglib uri="http://jspwiki.apache.org/tags" prefix="wiki" %> -<%@ page import="org.apache.wiki.*" %> <%@ page import="org.apache.wiki.api.core.*" %> <%@ page import="org.apache.wiki.auth.*" %> <%@ page import="org.apache.wiki.auth.permissions.*" %> @@ -36,11 +35,11 @@ This is a plain editor for JSPWiki. --%> <% - Context context = WikiContext.findContext( pageContext ); + Context context = Context.findContext( pageContext ); Engine engine = context.getEngine(); TemplateManager.addResourceRequest( context, TemplateManager.RESOURCE_SCRIPT, - context.getURL( WikiContext.NONE, "scripts/jspwiki-edit.js" ) ); + context.getURL( ContextEnum.PAGE_NONE.getRequestContext(), "scripts/jspwiki-edit.js" ) ); String usertext = EditorManager.getEditedText( pageContext ); %>
