Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum.webservices.server
Class WSUtil

java.lang.Object
  extended by com.jivesoftware.forum.webservices.server.WSUtil

public final class WSUtil
extends java.lang.Object

Utilities for working with webservices


Method Summary
static void cleanup()
          Cleans up thread locals
static Announcement convert(Announcement announcement)
           
static Forum convert(Forum forum)
          Converts a Forum object to a webservice Forum object.
static ForumCategory convert(ForumCategory category)
          Converts a ForumCategory object to a webservice ForumCategory object.
static ForumMessage convert(ForumMessage message)
          Converts a ForumMessage object to a webservice ForumMessage object.
static ForumThread convert(ForumThread thread)
          Converts a ForumThread object to a webservice ForumThread object.
static ForumThread convert(ForumThread thread, boolean reduceData)
          Converts a ForumThread object to a webservice ForumThread object and allows forum name, unfilteredSubject, and unfilteredBody to be set to null to reduce response size.
static Group convert(Group group)
          Converts a Group to a webservices Group object.
static java.util.Locale convert(Locale l)
          Converts a webservices locale object to java locale object
static Locale convert(java.util.Locale l)
          Converts a java locale to a locale we can use for webservices
static PrivateMessage convert(PrivateMessage privateMessage)
           
static PrivateMessageFolder convert(PrivateMessageFolder privateMessageFolder)
           
static ResultFilter convert(ResultFilter filter)
          Converts a webservice ResultFilter object to a ResultFilter.
static User convert(User user)
          Converts a User to a webservices User.
static Watch convert(Watch watch)
          Converts a Watch to a webservices Watch object.
static AuthToken getAuthToken()
          Returns the current thread's AuthToken.
static ForumFactory getForumFactory()
          Creates a forum factory using the AuthToken from the current Thread.
static void setAuthToken(AuthToken token)
          Used to set the authtoken on a thread local variable.
static void setForumFactory(ForumFactory factory)
          For internal testing purposes only!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

convert

public static Forum convert(Forum forum)
Converts a Forum object to a webservice Forum object.

Parameters:
forum - forum object.
Returns:
webservice forum object.

convert

public static ForumCategory convert(ForumCategory category)
Converts a ForumCategory object to a webservice ForumCategory object.

Parameters:
category - category object.
Returns:
webservice category object.

convert

public static ForumThread convert(ForumThread thread)
Converts a ForumThread object to a webservice ForumThread object.

Parameters:
thread - thread object.
Returns:
webservice thread object.

convert

public static ForumThread convert(ForumThread thread,
                                  boolean reduceData)
Converts a ForumThread object to a webservice ForumThread object and allows forum name, unfilteredSubject, and unfilteredBody to be set to null to reduce response size.

Parameters:
thread - thread object.
reduceData - set forum name, unfiltered subject and unfiltered body to null.
Returns:
webservice thread object.

convert

public static ForumMessage convert(ForumMessage message)
Converts a ForumMessage object to a webservice ForumMessage object.

Parameters:
message - message object.
Returns:
webservice message object.

convert

public static User convert(User user)
Converts a User to a webservices User.

Parameters:
user - user to convert.
Returns:
The webservices user object.

convert

public static Group convert(Group group)
Converts a Group to a webservices Group object.

Parameters:
group - Group to convert to a webservices object.
Returns:
The converted webservices object.

convert

public static Watch convert(Watch watch)
Converts a Watch to a webservices Watch object.

Parameters:
watch - Watch to convert to a webservices watch object.
Returns:
The converted webservices watch object.

convert

public static ResultFilter convert(ResultFilter filter)
Converts a webservice ResultFilter object to a ResultFilter.

Parameters:
filter - Webservices ResultFilter to convert.
Returns:
The converted ResultFilter.

convert

public static PrivateMessage convert(PrivateMessage privateMessage)

convert

public static PrivateMessageFolder convert(PrivateMessageFolder privateMessageFolder)

convert

public static Announcement convert(Announcement announcement)

getAuthToken

public static AuthToken getAuthToken()
Returns the current thread's AuthToken.

Returns:
the current thread's AuthToken.

getForumFactory

public static ForumFactory getForumFactory()
Creates a forum factory using the AuthToken from the current Thread.

Returns:
forum factory created from the authToken on the current thread.

convert

public static java.util.Locale convert(Locale l)
Converts a webservices locale object to java locale object

Parameters:
l - webservices locale object
Returns:
java locale object

convert

public static Locale convert(java.util.Locale l)
Converts a java locale to a locale we can use for webservices

Parameters:
l - The java locale object
Returns:
The webservices locale object

setAuthToken

public static void setAuthToken(AuthToken token)
Used to set the authtoken on a thread local variable.

Parameters:
token - auth token to set on a thread local variable

cleanup

public static void cleanup()
Cleans up thread locals


setForumFactory

public static void setForumFactory(ForumFactory factory)
For internal testing purposes only!

Parameters:
factory - Test forum factory

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.