Expand CalabashHelper to support parameter values which are instances of String, File, URI, or URL (previously only String was supported)

This commit is contained in:
Sam Harwell
2013-08-23 08:41:31 -05:00
parent 101e754369
commit d6f3b64982
6 changed files with 55 additions and 21 deletions

View File

@@ -167,7 +167,7 @@ public class PDFBuilder {
FileUtils.extractJaredDirectory("fonts",PDFBuilder.class,imageParentDirectory);
}
public File processSources(Map<String,String> map) throws MojoExecutionException{
public File processSources(Map<String, Object> map) throws MojoExecutionException {
final String[] included = scanIncludedFiles();
// configure a resolver for catalog files
final CatalogManager catalogManager = createCatalogManager();
@@ -1063,7 +1063,7 @@ public class PDFBuilder {
return filter;
}
protected Source createSource(String inputFilename, File sourceFile, PreprocessingFilter filter, Map<String,String> map)
protected Source createSource(String inputFilename, File sourceFile, PreprocessingFilter filter, Map<String, Object> map)
throws MojoExecutionException {
String pathToPipelineFile = "classpath:/pdf.xpl"; //use "classpath:/path" for this to work
@@ -1072,7 +1072,7 @@ public class PDFBuilder {
final InputSource inputSource = new InputSource(sourceFileNameNormalized);
Source source = new SAXSource(filter, inputSource);
Map<String,String> localMap = new HashMap<String,String>(map);
Map<String, Object> localMap = new HashMap<String, Object>(map);
localMap.put("outputType", "pdf");
//removing webhelp specific settings from map