net.sf.whatsnew.mode
Class Mode

java.lang.Object
  |
  +--net.sf.whatsnew.mode.Mode
Direct Known Subclasses:
Change, Release

public abstract class Mode
extends java.lang.Object

The abtract application execution mode

Version:
$Id: Mode.java,v 1.1 2004/05/13 01:22:34 dquintela Exp $
Author:
Diogo Quintela

Field Summary
static java.lang.Integer CHANGE
          Mode new file change
protected  Options options
          Application options
static java.lang.Integer RELEASE
          Mode new file release
 
Constructor Summary
Mode(Options options)
          Constructs a new execution mode
 
Method Summary
protected  void checkOptions()
          Validade minimal mode options
protected abstract  ConcatFilter getConcatFilter()
          Get concatenation filter to use
protected abstract  Filter[] getExtraFilters()
          Get the filters to be applied to extra input
protected abstract  java.lang.String[] getExtraInput()
          Get extra input
static Mode getFactory(Options options)
          Instantiates a new application mode
protected abstract  Filter[] getFileFilters()
          Get the filters to be applied to file input
protected abstract  java.lang.String[] getFileInput(java.io.File inputFile)
          Get file input
protected abstract  OutputWriter getOutputWriter()
          Get output writer
 void run()
          Main mode execution method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CHANGE

public static final java.lang.Integer CHANGE
Mode new file change

RELEASE

public static final java.lang.Integer RELEASE
Mode new file release

options

protected Options options
Application options
Constructor Detail

Mode

public Mode(Options options)
     throws AppException
Constructs a new execution mode
Parameters:
options - Application options
Throws:
AppException - in case of options checking error
Method Detail

getFactory

public static Mode getFactory(Options options)
                       throws AppException
Instantiates a new application mode
Parameters:
options - Application options
Returns:
The created instance
Throws:
AppException - in case of error

run

public void run()
         throws AppException
Main mode execution method
Throws:
AppException - in case of error

getConcatFilter

protected abstract ConcatFilter getConcatFilter()
                                         throws AppException
Get concatenation filter to use
Returns:
The filter to use
Throws:
AppException - in case of error

getExtraFilters

protected abstract Filter[] getExtraFilters()
                                     throws AppException
Get the filters to be applied to extra input
Returns:
The filters to use
Throws:
AppException - in case of error

getExtraInput

protected abstract java.lang.String[] getExtraInput()
                                             throws AppException
Get extra input
Returns:
Extra input
Throws:
AppException - in case of error

getFileFilters

protected abstract Filter[] getFileFilters()
                                    throws AppException
Get the filters to be applied to file input
Returns:
The filters to use
Throws:
AppException - in case of error

getFileInput

protected abstract java.lang.String[] getFileInput(java.io.File inputFile)
                                            throws AppException
Get file input
Parameters:
inputFile - The file to use
Returns:
File input
Throws:
AppException - in case of error

getOutputWriter

protected abstract OutputWriter getOutputWriter()
                                         throws AppException
Get output writer
Returns:
The output writter
Throws:
AppException - in case of error

checkOptions

protected void checkOptions()
                     throws AppException
Validade minimal mode options
Throws:
AppException - in case of error


Copyright © 2004 Sourceforge. All Rights Reserved.