org.blojsom.plugin.moblog
Class MoblogPluginUtils

java.lang.Object
  extended byorg.blojsom.plugin.moblog.MoblogPluginUtils

public class MoblogPluginUtils
extends java.lang.Object

Moblog Plugin Utils

Since:
blojsom 2.16
Version:
$Id: MoblogPluginUtils.java,v 1.9 2006/01/04 16:53:12 czarneckid Exp $
Author:
David Czarnecki

Constructor Summary
MoblogPluginUtils()
           
 
Method Summary
static Mailbox readMailboxSettingsForUser(BlojsomConfiguration blojsomConfiguration, javax.servlet.ServletConfig servletConfig, BlogUser blogUser)
          Read in the mailbox settings for a given user
static int saveFile(java.lang.String filename, java.lang.String extension, java.io.InputStream input)
          Save a file to disk
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MoblogPluginUtils

public MoblogPluginUtils()
Method Detail

readMailboxSettingsForUser

public static Mailbox readMailboxSettingsForUser(BlojsomConfiguration blojsomConfiguration,
                                                 javax.servlet.ServletConfig servletConfig,
                                                 BlogUser blogUser)
Read in the mailbox settings for a given user

Parameters:
blojsomConfiguration - BlojsomConfiguration
servletConfig - ServletConfig
blogUser - BlogUser
Returns:
Mailbox populated with settings and authorized e-mail addresses or null if there was an error reading any configuration information

saveFile

public static int saveFile(java.lang.String filename,
                           java.lang.String extension,
                           java.io.InputStream input)
                    throws java.io.IOException
Save a file to disk

Parameters:
filename - Base filename
extension - File extension
input - Input from which to read and write a file
Returns:
# of bytes written to disk
Throws:
java.io.IOException - If there is an error writing the file