org.weborganic.ox.tool
Class SimplifyDOCXCommand

java.lang.Object
  extended by org.weborganic.ox.tool.SimplifyDOCXCommand
All Implemented Interfaces:
Command<SimplifyDOCXCommand.SimplifierResult>

public class SimplifyDOCXCommand
extends Object
implements Command<SimplifyDOCXCommand.SimplifierResult>

Version:
25 October 2013
Author:
Christophe Lauret

Nested Class Summary
 class SimplifyDOCXCommand.SimplifierResult
           
 
Field Summary
static List<String> SIMPLIFIER_SETTINGS
           
 
Constructor Summary
SimplifyDOCXCommand(Model model)
          Create a new command.
 
Method Summary
 Model getModel()
          Return the model this command uses.
 SimplifyDOCXCommand.SimplifierResult process(PackageData data)
          Processes the specified package data according to the model defined for this command.
 void setDownload(File download)
           
 void setParameters(Map<String,String> parameters)
           
 void setSourceDir(String dir)
           
 void setTargetDir(String dir)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SIMPLIFIER_SETTINGS

public static final List<String> SIMPLIFIER_SETTINGS
Constructor Detail

SimplifyDOCXCommand

public SimplifyDOCXCommand(Model model)
Create a new command.

Parameters:
model - The model to use
Method Detail

setSourceDir

public void setSourceDir(String dir)
Parameters:
dir - The path to a Word directory within the data package.

setTargetDir

public void setTargetDir(String dir)
Parameters:
dir - The path to a Word directory within the data package.

setParameters

public void setParameters(Map<String,String> parameters)
Parameters:
parameters - the parameters to set

setDownload

public void setDownload(File download)
Parameters:
download - The public download folder.

getModel

public Model getModel()
Description copied from interface: Command
Return the model this command uses.

Specified by:
getModel in interface Command<SimplifyDOCXCommand.SimplifierResult>
Returns:
the model this command uses.

process

public SimplifyDOCXCommand.SimplifierResult process(PackageData data)
Description copied from interface: Command
Processes the specified package data according to the model defined for this command.

This method should intercept errors occurring during processing and include them in the results.

Specified by:
process in interface Command<SimplifyDOCXCommand.SimplifierResult>
Returns:
the result of processing specific to this command and data.