org.ideahamster.metis.util
Class MetisOpt

java.lang.Object
  |
  +--org.ideahamster.metis.util.MetisOpt

public final class MetisOpt
extends java.lang.Object

This class handles the options for Metis.

Version:
1.4
Author:
Sacha Faust

Constructor Summary
MetisOpt()
           
 
Method Summary
 void addSiteToList(java.lang.String site, java.lang.String emailDomain)
           
 java.lang.String getEmailDomain(java.lang.String host)
           
static int getReportType()
           
static java.util.Vector getSiteList()
           
 void setAndInitSiteFileList(java.lang.String fileName)
           
 void setAndInitURLList(java.lang.String fileName)
           
 void setDebug(boolean debug)
           
 void setProxyHost(java.lang.String proxyHost)
           
 void setProxyPort(int proxyPort)
           
 void setReportType(int type)
           
 void setRequestMethod(int requestMethod)
           
 void setRequestPassword(java.lang.String password)
           
 void setRequestUserName(java.lang.String username)
           
static void usage()
          Prints the usage for Metis.
 boolean validateOptions()
          This method will validate if the required and optional options are all initialized correctly.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetisOpt

public MetisOpt()
Method Detail

setRequestMethod

public void setRequestMethod(int requestMethod)
Parameters:
requestMethod - The request method type. See faust.sacha.web.uti.WebGlobal for a listing of available request method types.

setDebug

public void setDebug(boolean debug)
Parameters:
debug - True will enable debugging. False will disable debugging.

setProxyHost

public void setProxyHost(java.lang.String proxyHost)
Parameters:
proxyHost - The host used for proxying.

setProxyPort

public void setProxyPort(int proxyPort)
Parameters:
proxyPort - The port used by the proxy server.

setReportType

public void setReportType(int type)
Parameters:
type - Report type to generate. See org.ideahamster.util.MetisGlobal for a listing of valid report types.

getReportType

public static int getReportType()
Returns:
The report type used.

setRequestUserName

public void setRequestUserName(java.lang.String username)
Parameters:
username - The user name used to authenticate to the server.

setRequestPassword

public void setRequestPassword(java.lang.String password)
Parameters:
password - The password used to authenticate to the server.

setAndInitSiteFileList

public void setAndInitSiteFileList(java.lang.String fileName)

setAndInitURLList

public void setAndInitURLList(java.lang.String fileName)

addSiteToList

public void addSiteToList(java.lang.String site,
                          java.lang.String emailDomain)

getSiteList

public static java.util.Vector getSiteList()

validateOptions

public boolean validateOptions()
This method will validate if the required and optional options are all initialized correctly.

Returns:
True : all options were set correctly. False : one of the options was not initiated correctly.

getEmailDomain

public java.lang.String getEmailDomain(java.lang.String host)

usage

public static void usage()
Prints the usage for Metis.