org.blojsom.extension.atomapi
Class AtomUtils

java.lang.Object
  extended byorg.blojsom.extension.atomapi.AtomUtils
All Implemented Interfaces:
AtomAPIConstants

public class AtomUtils
extends java.lang.Object
implements AtomAPIConstants

AtomUtils

Since:
blojsom 2.0
Version:
$Id: AtomUtils.java,v 1.20 2006/01/04 16:24:06 czarneckid Exp $
Author:
Mark Lussier

Field Summary
 
Fields inherited from interface org.blojsom.extension.atomapi.AtomAPIConstants
ATOM_AUTH_PREFIX, ATOM_NAMESPACE, ATOM_SERVLETMAPPING, ATOM_TOKEN_NEXTNONCE, ATOMHEADER_AUTHENTICATION_INFO, ATOMHEADER_AUTHORIZATION, ATOMHEADER_WSSE_AUTHORIZATION, AUTHENTICATION_REALM, BLOG_ATOMAPI_ENTRY_EXTENSION_IP, CONTENTTYPE_ATOM, CONTENTTYPE_HTML, CONTENTTYPE_XML, DEFAULT_BLOG_ATOMAPI_ENTRY_EXTENSION, HEADER_AUTHORIZATION, HEADER_LOCATION, HEADER_SOAPACTION, HEADER_WWWAUTHENTICATE, KEY_ATOMALL, KEY_ATOMLAST, SOAPACTION_PUT
 
Constructor Summary
AtomUtils()
           
 
Method Summary
static org.intabulas.sandler.elements.Entry fromBlogEntry(Blog blog, BlogUser user, BlogEntry blogentry, java.lang.String servletPath)
          Generate an Atom Entry object from a Blojsom BlogEntry object
static org.intabulas.sandler.elements.Entry fromBlogEntrySearch(Blog blog, BlogUser user, BlogEntry blogentry, java.lang.String servletMapping)
          Generates a slim Entry object (tile and id only) from a BlogEntry object
static java.lang.String generateNextNonce(BlogUser user)
          Generate a NONCE value based on the the current blog
static java.lang.String getSOAPActionMethod(java.lang.String soapaction)
          Extract the AtomAPI Method off the end of the SOAPActionHeader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AtomUtils

public AtomUtils()
Method Detail

generateNextNonce

public static java.lang.String generateNextNonce(BlogUser user)
Generate a NONCE value based on the the current blog

Parameters:
user - BlogUser instance for the particular blog
Returns:
String that is a SHA digest (in hex) of the NONCE value todo Optimize the format we gen the nonce from

fromBlogEntry

public static org.intabulas.sandler.elements.Entry fromBlogEntry(Blog blog,
                                                                 BlogUser user,
                                                                 BlogEntry blogentry,
                                                                 java.lang.String servletPath)
Generate an Atom Entry object from a Blojsom BlogEntry object

Parameters:
blog - Blog instance
user - BlogUser instance
blogentry - BlogEntry to convert
servletPath - URL path to Atom API servlet
Returns:
Entry object populated from the BlogEntry

fromBlogEntrySearch

public static org.intabulas.sandler.elements.Entry fromBlogEntrySearch(Blog blog,
                                                                       BlogUser user,
                                                                       BlogEntry blogentry,
                                                                       java.lang.String servletMapping)
Generates a slim Entry object (tile and id only) from a BlogEntry object

Parameters:
blog - Blog instance
user - BlogUser instance
blogentry - BlogEntry to convert
servletMapping - Servlet mapping for the Atom API
Returns:
Entry object populated from the BlogEntry

getSOAPActionMethod

public static java.lang.String getSOAPActionMethod(java.lang.String soapaction)
Extract the AtomAPI Method off the end of the SOAPActionHeader

Parameters:
soapaction - the contents of the SOAPAction header
Returns:
the method