com.xpn.xwiki.atom
Class XWikiHelper

java.lang.Object
  extended bycom.xpn.xwiki.atom.XWikiHelper

public class XWikiHelper
extends java.lang.Object

Author:
Luis

Field Summary
private static int MAX_BLOGS
           
private  XWikiContext xwikiContext
           
 
Constructor Summary
XWikiHelper()
           
XWikiHelper(XWikiContext xwikiContext)
          This constructor has package visibility because it was initially written for unit testing purposes.
 
Method Summary
 java.lang.String getAtomAuthenticationToken(java.lang.String userName)
          The "Atom Authentication Token" is simply the password *as it is stored in the database".
 java.lang.String getBlogTitle(java.lang.String web, java.lang.String doc)
           
 javax.servlet.http.HttpServletRequest getRequest()
           
 javax.servlet.http.HttpServletResponse getResponse()
           
 javax.servlet.http.HttpSession getSession()
           
 java.net.URL getURL()
           
 UserBlog[] getUserBlogs()
           
 java.lang.String getWSSEHeader()
           
 XWikiContext getXwikiContext()
           
 void initXWikiContext(java.lang.String action, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.ServletContext servletContext)
          Initializes the XWiki context from a Struts action.
 java.util.List listUserBlogs(java.lang.String userName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

xwikiContext

private XWikiContext xwikiContext

MAX_BLOGS

private static final int MAX_BLOGS
See Also:
Constant Field Values
Constructor Detail

XWikiHelper

public XWikiHelper()

XWikiHelper

public XWikiHelper(XWikiContext xwikiContext)
This constructor has package visibility because it was initially written for unit testing purposes.

Parameters:
xwikiContext -
Method Detail

getXwikiContext

public XWikiContext getXwikiContext()
Returns:
Returns the xwikiContext.

getAtomAuthenticationToken

public java.lang.String getAtomAuthenticationToken(java.lang.String userName)
                                            throws XWikiException
The "Atom Authentication Token" is simply the password *as it is stored in the database". This means that if passwords are encrypted, the token is the encrypted password. Otherwise the token corresponds to the clear text password.

Returns:
Throws:
XWikiException

listUserBlogs

public java.util.List listUserBlogs(java.lang.String userName)
                             throws XWikiException,
                                    java.net.MalformedURLException
Throws:
XWikiException
java.net.MalformedURLException

initXWikiContext

public void initXWikiContext(java.lang.String action,
                             javax.servlet.http.HttpServletRequest request,
                             javax.servlet.http.HttpServletResponse response,
                             javax.servlet.ServletContext servletContext)
                      throws XWikiException
Initializes the XWiki context from a Struts action.

Returns:
Throws:
XWikiException

getURL

public java.net.URL getURL()

getBlogTitle

public java.lang.String getBlogTitle(java.lang.String web,
                                     java.lang.String doc)
                              throws XWikiException
Throws:
XWikiException

getUserBlogs

public UserBlog[] getUserBlogs()
                        throws XWikiException
Throws:
XWikiException

getSession

public javax.servlet.http.HttpSession getSession()

getRequest

public javax.servlet.http.HttpServletRequest getRequest()

getResponse

public javax.servlet.http.HttpServletResponse getResponse()

getWSSEHeader

public java.lang.String getWSSEHeader()


Copyright 2003 Ludovic Dubost