org.mmbase.module.gui.flash
Class MMFlash

java.lang.Object
  extended byorg.mmbase.module.Module
      extended byorg.mmbase.module.gui.flash.MMFlash

public class MMFlash
extends Module

Implements the parsing and generating of dynamic flash files

Version:
$Id: MMFlash.java,v 1.20.2.1 2005/02/24 16:02:05 michiel Exp $
Author:
Johannes Verelst, Daniel Ockeloen

Constructor Summary
MMFlash()
           
 
Method Summary
 byte[] getDebugSwt(scanpage sp)
          Return the generated flash with debug information.
 byte[] getParsedFlash(java.lang.String flashXML, java.lang.String workingdir)
          This function will try to generate a new flash thingie, generated from a template.
 byte[] getScanParsedFlash(scanpage sp)
          Dynamically generated flash.
 void init()
          Initializes the module.
 void onload()
          prepares the module when loaded.
 
Methods inherited from class org.mmbase.module.Module
getInitParameter, getInitParameters, getMaintainer, getMimeType, getMimeTypeFile, getModule, getModule, getModuleInfo, getModules, getName, getProperties, getProperty, getVersion, hasStarted, loadModulesFromDisk, maintainance, setInitParameter, setMaintainer, setName, setVersion, shutdown, shutdownModules, startModule, startModules, state
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MMFlash

public MMFlash()
Method Detail

init

public void init()
Description copied from class: Module
Initializes the module. Init must be overridden to read the environment variables it needs.
This method is called by Module.startModule(), which makes sure it is not called more than once. You should not call init() directly, call startModule() instead.

Specified by:
init in class Module

onload

public void onload()
Description copied from class: Module
prepares the module when loaded. Onload must be overridden to execute methods that need to be performed when the module is loaded but before any other modules are initailized.
This method is called by Module.startModules(). You should not call onload() directly.

Specified by:
onload in class Module

getDebugSwt

public byte[] getDebugSwt(scanpage sp)
Return the generated flash with debug information.

Parameters:
sp - the scanpage that includes the parameters needed to generate the flash
Returns:
array of bytes containing the flash data

getScanParsedFlash

public byte[] getScanParsedFlash(scanpage sp)
Dynamically generated flash. This method parses a xml-script and generate flash. This is done in 2 stages, first the xml is parsed through scan, the next stage will generate the flash which will then be returned.

Parameters:
sp - scanpage
Returns:
the dynamically generated flash or null when error occured

getParsedFlash

public byte[] getParsedFlash(java.lang.String flashXML,
                             java.lang.String workingdir)
This function will try to generate a new flash thingie, generated from a template. the only thing which has to be specified is the XML, and the working direcotory. This function was added, so that there is the possibility to use the generater from a place without SCAN

Parameters:
flashXML - a xml which contains the manipulations on the flash template
workingdir - the path where there has to be searched for the template and the other things, like pictures.(THIS LOOKS BELOW THE mmbase.htmlroot !!)
Returns:
a byte thingie, which contains the newly generated flash file


MMBase build 1.7.4.20050922