Class HtmlCompressor
java.lang.Object
com.tunyk.mvn.plugins.htmlcompressor.HtmlCompressor
The Class HtmlCompressor.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanThe create json file.private static final String[]The Constant FILE_EXT.private CharsetThe file encoding.private String[]The file extensions.private com.googlecode.htmlcompressor.compressor.HtmlCompressorThe html compressor.private StringThe json integration file path.private StringThe src dir path.private StringThe target dir path.private StringThe target json file path. -
Constructor Summary
ConstructorsConstructorDescriptionHtmlCompressor(String srcDirPath, String targetDirPath) Instantiates a new html compressor.HtmlCompressor(String srcDirPath, String targetDirPath, boolean createJsonFile, String targetJsonFilePath, String jsonIntegrationFilePath) Instantiates a new html compressor. -
Method Summary
Modifier and TypeMethodDescriptionvoidcompress()Compress.Gets the file encoding.String[]Gets the file extensions.com.googlecode.htmlcompressor.compressor.HtmlCompressorGets the html compressor.Gets the json integration file path.Gets the src dir path.Gets the target dir path.Gets the target json file path.booleanChecks if is creates the json file.voidsetCreateJsonFile(boolean createJsonFile) Sets the creates the json file.voidsetFileEncoding(Charset fileEncoding) Sets the file encoding.voidsetFileExtensions(String[] fileExtensions) Sets the file extensions.voidsetHtmlCompressor(com.googlecode.htmlcompressor.compressor.HtmlCompressor htmlCompressor) Sets the html compressor.voidsetJsonIntegrationFilePath(String jsonIntegrationFilePath) Sets the json integration file path.voidsetSrcDirPath(String srcDirPath) Sets the src dir path.voidsetTargetDirPath(String targetDirPath) Sets the target dir path.voidsetTargetJsonFilePath(String targetJsonFilePath) Sets the target json file path.
-
Field Details
-
FILE_EXT
The Constant FILE_EXT. -
fileExtensions
The file extensions. -
srcDirPath
The src dir path. -
targetDirPath
The target dir path. -
fileEncoding
The file encoding. -
createJsonFile
private boolean createJsonFileThe create json file. -
targetJsonFilePath
The target json file path. -
jsonIntegrationFilePath
The json integration file path. -
htmlCompressor
private com.googlecode.htmlcompressor.compressor.HtmlCompressor htmlCompressorThe html compressor.
-
-
Constructor Details
-
HtmlCompressor
-
HtmlCompressor
public HtmlCompressor(String srcDirPath, String targetDirPath, boolean createJsonFile, String targetJsonFilePath, String jsonIntegrationFilePath) Instantiates a new html compressor.- Parameters:
srcDirPath- the src dir pathtargetDirPath- the target dir pathcreateJsonFile- the create json filetargetJsonFilePath- the target json file pathjsonIntegrationFilePath- the json integration file path
-
-
Method Details
-
compress
Compress.- Throws:
IOException- Signals that an I/O exception has occurred.
-
getFileExtensions
-
setFileExtensions
Sets the file extensions.- Parameters:
fileExtensions- the new file extensions
-
getSrcDirPath
-
setSrcDirPath
Sets the src dir path.- Parameters:
srcDirPath- the new src dir path
-
getTargetDirPath
-
setTargetDirPath
Sets the target dir path.- Parameters:
targetDirPath- the new target dir path
-
getFileEncoding
-
setFileEncoding
Sets the file encoding.- Parameters:
fileEncoding- the new file encoding
-
isCreateJsonFile
public boolean isCreateJsonFile()Checks if is creates the json file.- Returns:
- true, if is creates the json file
-
setCreateJsonFile
public void setCreateJsonFile(boolean createJsonFile) Sets the creates the json file.- Parameters:
createJsonFile- the new creates the json file
-
getTargetJsonFilePath
Gets the target json file path.- Returns:
- the target json file path
-
setTargetJsonFilePath
Sets the target json file path.- Parameters:
targetJsonFilePath- the new target json file path
-
getJsonIntegrationFilePath
Gets the json integration file path.- Returns:
- the json integration file path
-
setJsonIntegrationFilePath
Sets the json integration file path.- Parameters:
jsonIntegrationFilePath- the new json integration file path
-
getHtmlCompressor
public com.googlecode.htmlcompressor.compressor.HtmlCompressor getHtmlCompressor()Gets the html compressor.- Returns:
- the html compressor
-
setHtmlCompressor
public void setHtmlCompressor(com.googlecode.htmlcompressor.compressor.HtmlCompressor htmlCompressor) Sets the html compressor.- Parameters:
htmlCompressor- the new html compressor
-