org.mmbase.module.gui.flash
Class MMFlash
java.lang.Object
org.mmbase.util.functions.FunctionProvider
org.mmbase.util.functions.DescribedFunctionProvider
org.mmbase.module.Module
org.mmbase.module.gui.flash.MMFlash
- All Implemented Interfaces:
- Descriptor
public class MMFlash
- extends Module
Implements the parsing and generating of dynamic flash files
- Version:
- $Id: MMFlash.java 44751 2011-01-12 09:06:53Z michiel $
- Author:
- Johannes Verelst, Daniel Ockeloen
| Methods inherited from class org.mmbase.module.Module |
addInitParameters, checkModules, getInitParameter, getInitParameter, getInitParameter, getInitParameters, getInitParameters, getMaintainer, getModule, getModule, getModule, getModule, getModuleInfo, getModuleLoader, getModuleReader, getModuleReader, getModules, getState, getStates, getVersion, hasModule, hasStarted, loadInitParameters, loadInitParameters, maintainance, setInitParameter, setMaintainer, setState, setVersion, shutdown, shutdownModules, startModule, startModules |
| Methods inherited from class org.mmbase.util.functions.DescribedFunctionProvider |
getDefaultLocale, getDescription, getDescription, getGUIName, getGUIName, getLocalizedDescription, getLocalizedGUIName, getName, setDescription, setDescription, setGUIName, setGUIName, setLocalizedDescription, setLocalizedGUIName, setName |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
static final Logger log
scanp
scanparser scanp
subdir
String subdir
generatortemppath
String generatortemppath
generatorpath
String generatorpath
generatorprogram
String generatorprogram
lru
LRUHashtable lru
mmb
MMBase mmb
MMFlash
public MMFlash()
init
public void init()
- Overrides:
init in class Module
onload
public void onload()
- Overrides:
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(String flashXML,
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 templateworkingdir - 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
saveFile
static boolean saveFile(String filename,
String value)
- Save a stringvalue to a file on the filesystem
- Parameters:
filename - File to save the stringvalue tovalue - Value to save to disk
- Returns:
- Boolean indicating succes
saveFile
static boolean saveFile(String filename,
byte[] value)
- Save a byte-array to disk
- Parameters:
filename - The name of the file to save the data tovalue - The byte-array containing the data for the file
- Returns:
- Boolean indicating the success of the operation
replaceQuote
String replaceQuote(String unquoted)
- Escape quotes in a string, because flash generator will fail otherwise
- Parameters:
unquoted - The string with quotes (") in it
- Returns:
- The string where all quotes are escaped as \"
MMBase Scan 2.0-SNAPSHOT - 2013-03-30T06:50