OpenNMS API 1.2.9

## org.opennms.web
Class ReportMailer

    java.lang.Object
      org.opennms.web.ReportMailer

All Implemented Interfaces:
  java.lang.Runnable

public class ReportMailer
extends java.lang.Object
implements java.lang.Runnable

Author:
  Jacinta Remedios , OpenNMS

Field Summary
`protected java.lang.String` `categoryName`
`protected java.lang.String` `commandParms`
`protected java.lang.String` `filename`
`protected java.lang.String` `finalEmailAddr`
`protected java.lang.String` `format`
`(package private) org.apache.log4j.Category` `log`
`private static java.lang.String` `LOG4J_CATEGORY` The log4j category used to log debug messsages and statements.
`protected java.lang.String` `logoUrl`
`private static java.lang.String` `MONTH_FORMAT_CLASSIC`
`protected java.lang.String` `monthFormat`
`protected java.lang.String` `scriptGenerateReport`
`protected java.lang.String` `scriptMailReport`
`protected java.lang.String` `startDate`
`protected java.lang.String` `startMonth`
`protected java.lang.String` `startYear`
`protected UserFactory` `userFactory`
`protected boolean` `useScript`

Constructor Summary
`ReportMailer()`

Method Summary
`protected void` `generateFile(java.lang.String shellScript)` returns the fully-qualified filename of the generated PDF report
`java.lang.String` `getCategoryName()`
`java.lang.String` `getEmailAddress()`
`protected java.lang.String` `getEmailAddress(java.lang.String username)` returns null if no email address is configured for the user
`java.lang.String` `getFormat()`
`java.lang.String` `getLogoUrl()`
`java.lang.String` `getMonthFormat()`
`java.lang.String` `getStartDate()`
`java.lang.String` `getStartMonth()`
`java.lang.String` `getStartYear()`
`void` `initialise(java.lang.String fileName, java.lang.String userName, java.lang.String generateReport, java.lang.String mailReport, java.lang.String parms, java.lang.String fmt, java.lang.String monthFmt, java.lang.String startMonth, java.lang.String startDate, java.lang.String startYear)`
`boolean` `isUseScript()`
`protected void` `mailFileToUser(java.lang.String filename, java.lang.String emailAddr)`
`protected void` `mailFileToUser(java.lang.String mailScript, java.lang.String filename, java.lang.String emailAddr)`
`void` `run()`
`void` `setCategoryName(java.lang.String categoryName)`
`void` `setFormat(java.lang.String format)`
`void` `setLogoUrl(java.lang.String logo)`
`void` `setMonthFormat(java.lang.String monthFormat)`
`void` `setStartDate(java.lang.String startMonth)`
`void` `setStartMonth(java.lang.String startMonth)`
`void` `setStartYear(java.lang.String startYear)`
`void` `setUseScript(boolean useScript)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### LOG4J_CATEGORY

    private static final java.lang.String LOG4J_CATEGORY

  The log4j category used to log debug messsages and statements.

  See Also:
    Constant Field Values

### MONTH_FORMAT_CLASSIC

    private static final java.lang.String MONTH_FORMAT_CLASSIC

See Also:
  Constant Field Values

### scriptGenerateReport

    protected java.lang.String scriptGenerateReport

### scriptMailReport

    protected java.lang.String scriptMailReport

### finalEmailAddr

    protected java.lang.String finalEmailAddr

### userFactory

    protected UserFactory userFactory

### filename

    protected java.lang.String filename

### commandParms

    protected java.lang.String commandParms

### useScript

    protected boolean useScript

### logoUrl

    protected java.lang.String logoUrl

### format

    protected java.lang.String format

### monthFormat

    protected java.lang.String monthFormat

### startMonth

    protected java.lang.String startMonth

### startDate

    protected java.lang.String startDate

### startYear

    protected java.lang.String startYear

### categoryName

    protected java.lang.String categoryName

### log

    org.apache.log4j.Category log

Constructor Detail

### ReportMailer

    public ReportMailer()
                 throws javax.servlet.ServletException

Method Detail

### initialise

    public void initialise(java.lang.String fileName,
                           java.lang.String userName,
                           java.lang.String generateReport,
                           java.lang.String mailReport,
                           java.lang.String parms,
                           java.lang.String fmt,
                           java.lang.String monthFmt,
                           java.lang.String startMonth,
                           java.lang.String startDate,
                           java.lang.String startYear)
                    throws javax.servlet.ServletException

  Throws:
    `javax.servlet.ServletException`

### getEmailAddress

    public java.lang.String getEmailAddress()

### run

    public void run()

  Specified by:
    `run` in interface `java.lang.Runnable`

### getEmailAddress

    protected java.lang.String getEmailAddress(java.lang.String username)
                                        throws java.io.IOException,
                                               org.exolab.castor.xml.MarshalException,
                                               org.exolab.castor.xml.ValidationException

  returns null if no email address is configured for the user

  Throws:
    `java.io.IOException`
    `org.exolab.castor.xml.MarshalException`
    `org.exolab.castor.xml.ValidationException`

### generateFile

    protected void generateFile(java.lang.String shellScript)
                         throws java.io.IOException,
                                java.lang.InterruptedException

  returns the fully-qualified filename of the generated PDF report

  Throws:
    `java.io.IOException`
    `java.lang.InterruptedException`

### mailFileToUser

    protected void mailFileToUser(java.lang.String mailScript,
                                  java.lang.String filename,
                                  java.lang.String emailAddr)
                           throws java.io.IOException

  Throws:
    `java.io.IOException`

### mailFileToUser

    protected void mailFileToUser(java.lang.String filename,
                                  java.lang.String emailAddr)
                           throws java.io.IOException

  Throws:
    `java.io.IOException`

### isUseScript

    public boolean isUseScript()

  Returns:
    Returns the useScript value.

### setUseScript

    public void setUseScript(boolean useScript)

  Parameters:
    `useScript` - Set this to use the script specified.

### getLogoUrl

    public java.lang.String getLogoUrl()

  Returns:
    Returns the logo.

### setLogoUrl

    public void setLogoUrl(java.lang.String logo)

  Parameters:
    `logo` - The logo to set.

### getCategoryName

    public java.lang.String getCategoryName()

  Returns:
    Returns the categoryName.

### setCategoryName

    public void setCategoryName(java.lang.String categoryName)

  Parameters:
    `categoryName` - The categoryName to set.

### getMonthFormat

    public java.lang.String getMonthFormat()

  Returns:
    Returns the monthFormat.

### setMonthFormat

    public void setMonthFormat(java.lang.String monthFormat)

### getFormat

    public java.lang.String getFormat()

  Returns:
    Returns the format.

### setFormat

    public void setFormat(java.lang.String format)

  Parameters:
    `format` - The format to set.

### getStartMonth

    public java.lang.String getStartMonth()

  Returns:
    Returns the startMonth.

### setStartMonth

    public void setStartMonth(java.lang.String startMonth)

### getStartDate

    public java.lang.String getStartDate()

  Returns:
    Returns the startDate.

### setStartDate

    public void setStartDate(java.lang.String startMonth)

### getStartYear

    public java.lang.String getStartYear()

  Returns:
    Returns the startYear.

### setStartYear

    public void setStartYear(java.lang.String startYear)

OpenNMS API 1.2.9

Generated by ranger on May 19 2007 2335.