org.fopps.model
Class ConfigurationExporter

java.lang.Object
  |
  +--org.fopps.model.ConfigurationExporter

public class ConfigurationExporter
extends java.lang.Object

ConfigurationExporter is the base class for all classes dealing with configuration exports. It provides generation of Makefile and config.h which contains the current configuration setting. In addition it copies the attached files to the target directory.


Constructor Summary
ConfigurationExporter(java.util.List pProductList)
           
ConfigurationExporter(Product pProduct)
           
 
Method Summary
 void addCompilationListener(CompilationListener pListener)
          Adds a compilation listener
 void addMandatoryFiles(java.util.List pAttachedFiles, CompileContext pContext)
          Adds mandatory files.
 void compileAll()
          Compiles all products
 void generateAlternative(Alternative pItem, java.util.List pAttachedFiles, CompileContext pContext)
          Generates an alternative.
 void generateOption(Option pItem, java.util.List pAttachedFiles, CompileContext pContext)
          Generates an option.
 void generateParameter(Parameter pItem, java.util.List pAttachedFiles, CompileContext pContext)
          Generates a parameter.
 java.util.List getProducts()
           
protected  void notifyCompilationError(Product pProduct, java.lang.Throwable pException)
          Notify all compilation listeners that a file has copied successfully
protected  void notifyCompilationFinished()
          Notify all compilation listeners that compilation has finished
protected  void notifyCompilationStarted()
          Notify all compilation listeners that compilation has finished
 void notifyFileCopied(CompilationEvent pEvent, java.lang.String pSource, java.lang.String pDest)
          Notify all compilation listeners that a file was copied
 void notifyFileGenerated(CompilationEvent pEvent, java.lang.String pDest)
          Notify all compilation listeners that a file was generated
 void notifyFileSkipped(CompilationEvent pEvent, java.lang.String pSource)
          Notify all compilation listeners that a file was skipped
 void removeAllCompilationListener()
          Removes all compilation listeners
 void removeCompilationListener(CompilationListener pListener)
          Removes a compilation listener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurationExporter

public ConfigurationExporter(Product pProduct)

ConfigurationExporter

public ConfigurationExporter(java.util.List pProductList)
Method Detail

getProducts

public java.util.List getProducts()

addCompilationListener

public void addCompilationListener(CompilationListener pListener)
Adds a compilation listener

Parameters:
pListener - Listener to add

removeCompilationListener

public void removeCompilationListener(CompilationListener pListener)
Removes a compilation listener

Parameters:
pListener - Listener to remove

removeAllCompilationListener

public void removeAllCompilationListener()
Removes all compilation listeners


compileAll

public void compileAll()
                throws CompileException
Compiles all products

CompileException

addMandatoryFiles

public void addMandatoryFiles(java.util.List pAttachedFiles,
                              CompileContext pContext)
Adds mandatory files. This method is called if feature has no corresponding configuration item.

Parameters:
pAttachedFiles - Attached files of feature
pContext - Compileation context

generateAlternative

public void generateAlternative(Alternative pItem,
                                java.util.List pAttachedFiles,
                                CompileContext pContext)
                         throws CompileException
Generates an alternative. The current value of the alternative is evaluated and exported into the generated files. Attached source files are added to the file list in the Makefile.

Parameters:
pAttachedFiles - Attached files of feature
pContext - Compilation context
CompileException

generateOption

public void generateOption(Option pItem,
                           java.util.List pAttachedFiles,
                           CompileContext pContext)
                    throws CompileException
Generates an option. The current value of the option is evaluated and exported into the generated files. If the option is set, the attached files are scheduled for copy. Attached source files are added to the file list in the Makefile.

Parameters:
pAttachedFiles - Attached files of feature
pContext - Compilation context
CompileException

generateParameter

public void generateParameter(Parameter pItem,
                              java.util.List pAttachedFiles,
                              CompileContext pContext)
                       throws CompileException
Generates a parameter. Attached source files are added to the file list in the Makefile.

Parameters:
pItem - Parameter to generate
pAttachedFiles - Attached files of feature
pContext - Compilation context
CompileException

notifyFileSkipped

public void notifyFileSkipped(CompilationEvent pEvent,
                              java.lang.String pSource)
Notify all compilation listeners that a file was skipped


notifyFileGenerated

public void notifyFileGenerated(CompilationEvent pEvent,
                                java.lang.String pDest)
Notify all compilation listeners that a file was generated


notifyFileCopied

public void notifyFileCopied(CompilationEvent pEvent,
                             java.lang.String pSource,
                             java.lang.String pDest)
Notify all compilation listeners that a file was copied


notifyCompilationError

protected void notifyCompilationError(Product pProduct,
                                      java.lang.Throwable pException)
Notify all compilation listeners that a file has copied successfully


notifyCompilationStarted

protected void notifyCompilationStarted()
Notify all compilation listeners that compilation has finished


notifyCompilationFinished

protected void notifyCompilationFinished()
Notify all compilation listeners that compilation has finished



Fopps 0.19 - Copyright © 2002 Oliver Wieland. All Rights Reserved.