org.weborganic.ox.tool
Class PackageDOCXCommand

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

public class PackageDOCXCommand
extends Object
implements Command<PackageDOCXCommand.PackageDOCXResult>

Version:
28 October 2013
Author:
Christophe Lauret

Nested Class Summary
 class PackageDOCXCommand.PackageDOCXResult
           
 
Constructor Summary
PackageDOCXCommand(Model model)
          Create a new command.
 
Method Summary
 Model getModel()
          Return the model this command uses.
 PackageDOCXCommand.PackageDOCXResult process(PackageData data)
          Processes the specified package data according to the model defined for this command.
 void setBaseDOCX(String path)
           
 void setDownload(File download)
           
 void setSourcePath(String path)
           
 void setTemplatePath(String path)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PackageDOCXCommand

public PackageDOCXCommand(Model model)
Create a new command.

Parameters:
model - The model to use
Method Detail

getModel

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

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

setBaseDOCX

public void setBaseDOCX(String path)
Parameters:
path - The path to the source within the data package.

setSourcePath

public void setSourcePath(String path)
Parameters:
path - The path to the source within the data package.

setTemplatePath

public void setTemplatePath(String path)
Parameters:
path - The path to the templates within the model.

setDownload

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

process

public PackageDOCXCommand.PackageDOCXResult 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<PackageDOCXCommand.PackageDOCXResult>
Returns:
the result of processing specific to this command and data.