SK.gnome.dwarf.mail.store.cmd
Class ImportCmd

java.lang.Object
  extended bySK.gnome.dwarf.GenericService
      extended bySK.gnome.dwarf.thread.ThreadService
          extended bySK.gnome.dwarf.main.Command
              extended bySK.gnome.dwarf.mail.store.cmd.ImportCmd
All Implemented Interfaces:
java.lang.Runnable, SK.gnome.dwarf.Service

public class ImportCmd
extends SK.gnome.dwarf.main.Command

Imports mails from a JavaMail store.

This command imports the whole folder hierarchy from a given JavaMail URL to the local mail store. The user account name must be provided for this command, too.


Field Summary
 
Fields inherited from class SK.gnome.dwarf.thread.ThreadService
daemon, thread
 
Fields inherited from class SK.gnome.dwarf.GenericService
initParameters, parent
 
Fields inherited from interface SK.gnome.dwarf.Service
INITIALIZED, LOG_DEBUG, LOG_ERROR, LOG_FATAL, LOG_INFO, LOG_TRACE, LOG_WARN, LOG_XFER, SHUTDOWN, STARTED, STOPPED
 
Constructor Summary
ImportCmd(java.lang.String name)
          Creates a new ImportCmd.
 
Method Summary
protected  void execute(javax.security.auth.Subject subject, SK.gnome.dwarf.Service service, java.lang.String[] args, java.io.Writer out)
           
 java.lang.String getDescription()
           
static void importStore(java.lang.String user, java.lang.String url, boolean prefix, MailStore store)
          Imports the given JavaMail store to the local mail store.
 void init(SK.gnome.dwarf.Server parent)
           
 void printHelp(java.io.PrintWriter out)
           
 
Methods inherited from class SK.gnome.dwarf.thread.ThreadService
enableThread, finish, loop, run, setDaemon, shutdown, start, stop
 
Methods inherited from class SK.gnome.dwarf.GenericService
getAuthenticator, getAuthFacility, getFullName, getInitParameter, getInitParameterNames, getLogFacility, getLogger, getName, getParameters, getPrincipal, getShutdownTimeout, getState, log, log, login, logout, setAuthFacility, setInitParameters, setLogFacility, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ImportCmd

public ImportCmd(java.lang.String name)
Creates a new ImportCmd.

Method Detail

getDescription

public java.lang.String getDescription()

printHelp

public void printHelp(java.io.PrintWriter out)

init

public void init(SK.gnome.dwarf.Server parent)
          throws SK.gnome.dwarf.ServiceException
Throws:
SK.gnome.dwarf.ServiceException

importStore

public static void importStore(java.lang.String user,
                               java.lang.String url,
                               boolean prefix,
                               MailStore store)
                        throws MailException
Imports the given JavaMail store to the local mail store.

Parameters:
user - the user account name
url - URL to the JavaMail store
prefix - true if INBOX folder is parent of all nested source folders
store - the local mail store
Throws:
MailException - if an error occured

execute

protected void execute(javax.security.auth.Subject subject,
                       SK.gnome.dwarf.Service service,
                       java.lang.String[] args,
                       java.io.Writer out)
                throws SK.gnome.dwarf.main.CommandException
Throws:
SK.gnome.dwarf.main.CommandException


Copyright (c) 2004-2005, Gnome Ltd. All rights reserved.