gov.nasa.pds.report.sawmill
Class PDSSawmillManager

java.lang.Object
  extended by gov.nasa.pds.report.sawmill.PDSSawmillManager
All Implemented Interfaces:
SawmillManager

public class PDSSawmillManager
extends Object
implements SawmillManager

This class creates a queue of Sawmill operations and executes them by invoking the outputCommands() method. This will make the queued commands execute in a manner specific to the implementation of SawmillInterface being used.

Author:
resneck TODO: Write a unit test for this class using a dummy SawmillInterface

Constructor Summary
PDSSawmillManager()
           
 
Method Summary
 void buildDatabase(String profileName)
          Add a Sawmill command to the queue to rebuild the database for a given Sawmill profile.
 void generateReport(String profileName, String reportName, String outputPath)
          Add a Sawmill command to the queue to generate a report specified using the given Sawmill profile and report at the given location.
 void outputCommands()
          Make the queued Sawmill commands execute in a manner determined by the SawmillInterface implementation being used.
 void updateDatabase(String profileName)
          Add a Sawmill command to the queue to update the database for a given Sawmill profile.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PDSSawmillManager

public PDSSawmillManager()
Method Detail

updateDatabase

public void updateDatabase(String profileName)
                    throws SawmillException
Description copied from interface: SawmillManager
Add a Sawmill command to the queue to update the database for a given Sawmill profile.

Specified by:
updateDatabase in interface SawmillManager
Parameters:
profileName - The name of the profile that will be updated
Throws:
SawmillException - If a null or empty profile name is given

buildDatabase

public void buildDatabase(String profileName)
                   throws SawmillException
Description copied from interface: SawmillManager
Add a Sawmill command to the queue to rebuild the database for a given Sawmill profile. This will delete all historical data and will most likely take a while.

Specified by:
buildDatabase in interface SawmillManager
Parameters:
profileName - The name of the profile that will be built
Throws:
SawmillException - If a null or empty profile name is given

generateReport

public void generateReport(String profileName,
                           String reportName,
                           String outputPath)
                    throws SawmillException
Description copied from interface: SawmillManager
Add a Sawmill command to the queue to generate a report specified using the given Sawmill profile and report at the given location.

Specified by:
generateReport in interface SawmillManager
Parameters:
profileName - The name of the profile that specifies the report
reportName - The name of the report
outputPath - The path to the directory where the report will be placed
Throws:
SawmillException - If any of the parameters are null or empty

outputCommands

public void outputCommands()
Description copied from interface: SawmillManager
Make the queued Sawmill commands execute in a manner determined by the SawmillInterface implementation being used.

Specified by:
outputCommands in interface SawmillManager


Copyright © 2010–2015 Planetary Data System. All rights reserved.