Return-Path: Delivered-To: apmail-incubator-jspwiki-commits-archive@locus.apache.org Received: (qmail 50295 invoked from network); 3 Aug 2008 12:07:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Aug 2008 12:07:34 -0000 Received: (qmail 98323 invoked by uid 500); 3 Aug 2008 12:07:33 -0000 Delivered-To: apmail-incubator-jspwiki-commits-archive@incubator.apache.org Received: (qmail 98312 invoked by uid 500); 3 Aug 2008 12:07:33 -0000 Mailing-List: contact jspwiki-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jspwiki-dev@incubator.apache.org Delivered-To: mailing list jspwiki-commits@incubator.apache.org Received: (qmail 98303 invoked by uid 99); 3 Aug 2008 12:07:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Aug 2008 05:07:33 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Aug 2008 12:06:46 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 6D15B2388A03; Sun, 3 Aug 2008 05:07:13 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r682133 [3/3] - /incubator/jspwiki/branches/JSPWIKI_2_9_STRIPES_BRANCH/doc/ Date: Sun, 03 Aug 2008 12:07:12 -0000 To: jspwiki-commits@incubator.apache.org From: ajaquith@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080803120713.6D15B2388A03@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Modified: incubator/jspwiki/branches/JSPWIKI_2_9_STRIPES_BRANCH/doc/Java 5 changes URL: http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_2_9_STRIPES_BRANCH/doc/Java%205%20changes?rev=682133&r1=682132&r2=682133&view=diff ============================================================================== --- incubator/jspwiki/branches/JSPWIKI_2_9_STRIPES_BRANCH/doc/Java 5 changes (original) +++ incubator/jspwiki/branches/JSPWIKI_2_9_STRIPES_BRANCH/doc/Java 5 changes Sun Aug 3 05:07:12 2008 @@ -103,6 +103,91 @@ Some classes currently call the URLConstructor directly. Mostly, this is WikiContext and WikiEngine (about 22 references in the JSPWiki core classes, plus 2 in the JSPs). However, most classes get their URLs by calling WikiContext.getViewURL(), getRedirectURL(), and getURL()/getURL() -- 73 references within the core, and 23 references in the templates. These probably should not be changed for compatibility's sake. However, we could easily cause these WikiContext/WikiEngine references to URLContructor instead to use Resolution.getURL + response.encodeURL(). +WIKICONTEXT OVERHAUL +-------------------- +In JSPWiki versions prior to 3.0, WikiContext objects were created by calling a public constructor, followed by a call to setRequestContext(String). In 3.0, however, WikiContext becomes an interface [abtract class?] so contructors don't work. Instead, callers wishing to create WikiContexts should instead use the factory method WikiActionBeanFactory.newActionBean(request,response,beanClass). As an alternative, callers may also call WikiEngine.createContext(request,String). + +FORWARDING METHODS +getContentTemplate(): to super +getJSP(): to super -- do we calculate it? put it in as an annotation? +getEngine(): to super +getRequestContext(): to super +getVariable(String): to super +setVariable(String,Object): to super +getHttpParameter(String): to super +getHttpRequest(): to super +setTemplate(): to super +getTemplate(): to super +getCurrentUser(): to super +getWikiSession(): to super +getBundle() to super + +WIKI-CONTEXT-SPECIFIC +setRealPage() +getRealPage() +getName(): refactored slightly +getURL(String, String) -- essentially the same, although it assumes StripesURLConstructor is used (?) +getViewURL() +setPage() +findContext() -- no change +hasAdminPermissions() +getLocale(m_context) forwards to m_context.getContext().getLocale(); +D hasAccess(HttpServletResponse) -- used in MANY JSPs. Refactored to look up the permission info for the method that contains @DefaultHander annotation. +D hasAccess(HttpServletResponse,boolean) -- referenced only by other hasAccess(). +setRequestContext() -- refactor to set the action bean event (if request context matches, otherwise throw error; NONE always matches) +clone() -- needs refactoring + +BACKWARDS INCOMPATIBILITIES + +WikiContext(WikiEngine,WikiPage) +WikiContext(WikiEngine,HttpServletRequest,Command) +WikiContext(WikiEngine,HttpServletRequest,WikiPage) +getRedirectURL(). Used in exactly 2 places... Wiki.jsp + WikiEngine (forward to WikiContext) +getTarget() +getURLPattern() +getCommand() +requiredPermission() -- only used in tests and WikiContext itself. Ok to kill +targetedCommand() +setDefaultTemplate() [Protected] +findCommand() [Protected] +updateCommand() [Protected] + +WIKIENGINE +---------- +WikiEngine.createContext(req, String) changes its internal behavior. It delegates to m_engine.getWikiActionBeanFactory().newActionBean(Class