Author: ajaquith
Date: Thu Aug 7 20:15:27 2008
New Revision: 683818
URL: http://svn.apache.org/viewvc?rev=683818&view=rev
Log:
Beginning of Stripes JSP-tier refactoring.
Modified:
incubator/jspwiki/branches/JSPWIKI_2_9_STRIPES_BRANCH/src/com/ecyrd/jspwiki/WikiContext.java
incubator/jspwiki/branches/JSPWIKI_2_9_STRIPES_BRANCH/src/com/ecyrd/jspwiki/WikiEngine.java
incubator/jspwiki/branches/JSPWIKI_2_9_STRIPES_BRANCH/src/com/ecyrd/jspwiki/WikiPage.java
Modified:
incubator/jspwiki/branches/JSPWIKI_2_9_STRIPES_BRANCH/src/com/ecyrd/jspwiki/WikiContext.java
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_2_9_STRIPES_BRANCH/src/com/ecyrd/jspwiki/WikiContext.java?rev=683818&r1=683817&r2=683818&view=diff
==============================================================================
---
incubator/jspwiki/branches/JSPWIKI_2_9_STRIPES_BRANCH/src/com/ecyrd/jspwiki/WikiContext.java
(original)
+++
incubator/jspwiki/branches/JSPWIKI_2_9_STRIPES_BRANCH/src/com/ecyrd/jspwiki/WikiContext.java
Thu Aug 7 20:15:27 2008
@@ -169,24 +169,6 @@
}
/**
- * [EMAIL PROTECTED]
- * @see com.ecyrd.jspwiki.action.WikiActionBean#getContentTemplate()
- */
- public String getContentTemplate()
- {
- return super.getContentTemplate();
- }
-
- /**
- * [EMAIL PROTECTED]
- * @see com.ecyrd.jspwiki.action.WikiActionBean#getJSP()
- */
- public String getJSP()
- {
- return super.getJSP();
- }
-
- /**
* Sets a reference to the real page whose content is currently being
* rendered.
* <p>
@@ -650,7 +632,7 @@
*/
public static Locale getLocale( WikiContext context )
{
- return Preferences.getLocale( context );
+ return context.getContext().getLocale();
/*
HttpServletRequest request = context.getHttpRequest();
return ( request != null )
Modified:
incubator/jspwiki/branches/JSPWIKI_2_9_STRIPES_BRANCH/src/com/ecyrd/jspwiki/WikiEngine.java
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_2_9_STRIPES_BRANCH/src/com/ecyrd/jspwiki/WikiEngine.java?rev=683818&r1=683817&r2=683818&view=diff
==============================================================================
---
incubator/jspwiki/branches/JSPWIKI_2_9_STRIPES_BRANCH/src/com/ecyrd/jspwiki/WikiEngine.java
(original)
+++
incubator/jspwiki/branches/JSPWIKI_2_9_STRIPES_BRANCH/src/com/ecyrd/jspwiki/WikiEngine.java
Thu Aug 7 20:15:27 2008
@@ -2135,9 +2135,12 @@
actionBean.getContext().setEventName( handler.getEventName() );
if ( actionBean instanceof WikiContext )
{
+ // Stash the action bean/wiki context, and return it!
+ WikiActionBeanFactory.saveActionBean( request, actionBean );
return (WikiContext)actionBean;
}
- throw new IllegalArgumentException( "Context '" + requestContext +
"' resolved to non-WikiContext action bean class!" );
+ throw new IllegalArgumentException( "Context '" + requestContext +
"' resolved to non-WikiContext action bean class! " +
+ "Please use the <stripes:useActionBean> tag instead of
WikiEngine.createContext()." );
}
catch ( WikiException e )
{
Modified:
incubator/jspwiki/branches/JSPWIKI_2_9_STRIPES_BRANCH/src/com/ecyrd/jspwiki/WikiPage.java
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_2_9_STRIPES_BRANCH/src/com/ecyrd/jspwiki/WikiPage.java?rev=683818&r1=683817&r2=683818&view=diff
==============================================================================
---
incubator/jspwiki/branches/JSPWIKI_2_9_STRIPES_BRANCH/src/com/ecyrd/jspwiki/WikiPage.java
(original)
+++
incubator/jspwiki/branches/JSPWIKI_2_9_STRIPES_BRANCH/src/com/ecyrd/jspwiki/WikiPage.java
Thu Aug 7 20:15:27 2008
@@ -89,6 +89,17 @@
{
return m_name;
}
+
+ /**
+ * Returns the full, qualified, name of the WikiPage that includes the
wiki name.
+ * Used by the [EMAIL PROTECTED] com.ecyrd.jspwiki.action.HandlerInfo}
class and
+ * [EMAIL PROTECTED] com.ecyrd.jspwiki.action.HandlerPermission}
annotations.
+ * @return
+ */
+ public String getQualifiedName()
+ {
+ return m_wiki + ":" + m_name;
+ }
/**
* A WikiPage may have a number of attributes, which might or might not
be