Class StandardBoilerplateServiceImpl
java.lang.Object
ch.tocco.nice2.conversion.impl.phantomjs.StandardBoilerplateServiceImpl
- All Implemented Interfaces:
StandardBoilerplateService
@Component
public class StandardBoilerplateServiceImpl
extends Object
implements StandardBoilerplateService
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddStandardBoilerplate
(String content, String css) Checks if the content has a<body>
tag if no<body>
tag is found thecontent
and thecss
are put into the standard-boilerplate.ftladdStandardBoilerplateToInputStream
(InputStream source, String css) Converts the source into aString
and hands it over toStandardBoilerplateService.addStandardBoilerplate(String, String)
for further processing
-
Constructor Details
-
StandardBoilerplateServiceImpl
-
-
Method Details
-
addStandardBoilerplateToInputStream
public InputStream addStandardBoilerplateToInputStream(InputStream source, String css) throws IOException Description copied from interface:StandardBoilerplateService
Converts the source into aString
and hands it over toStandardBoilerplateService.addStandardBoilerplate(String, String)
for further processing- Specified by:
addStandardBoilerplateToInputStream
in interfaceStandardBoilerplateService
- Parameters:
source
- is the content of the freemarker fieldcss
- used for the report- Returns:
- an
InputStream
of the template - Throws:
IOException
-
addStandardBoilerplate
Description copied from interface:StandardBoilerplateService
Checks if the content has a<body>
tag if no<body>
tag is found thecontent
and thecss
are put into the standard-boilerplate.ftl- Specified by:
addStandardBoilerplate
in interfaceStandardBoilerplateService
- Parameters:
content
- of the reportcss
- used for the report- Returns:
- the content of the report as String
- Throws:
IOException
-