Class HtmlCompressor
java.lang.Object
com.tunyk.mvn.plugins.htmlcompressor.HtmlCompressor
-
Field Summary
Modifier and TypeFieldDescriptionprivate boolean
The create json file.private static final String[]
The Constant FILE_EXT.private Charset
The file encoding.private String[]
The file extensions.private com.googlecode.htmlcompressor.compressor.HtmlCompressor
The html compressor.private String
The json integration file path.private String
The src dir path.private String
The target dir path.private String
The target json file path. -
Constructor Summary
ConstructorDescriptionHtmlCompressor
(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 TypeMethodDescriptionvoid
compress()
Compress.Gets the file encoding.String[]
Gets the file extensions.com.googlecode.htmlcompressor.compressor.HtmlCompressor
Gets 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.boolean
Checks if is creates the json file.void
setCreateJsonFile
(boolean createJsonFile) Sets the creates the json file.void
setFileEncoding
(Charset fileEncoding) Sets the file encoding.void
setFileExtensions
(String[] fileExtensions) Sets the file extensions.void
setHtmlCompressor
(com.googlecode.htmlcompressor.compressor.HtmlCompressor htmlCompressor) Sets the html compressor.void
setJsonIntegrationFilePath
(String jsonIntegrationFilePath) Sets the json integration file path.void
setSrcDirPath
(String srcDirPath) Sets the src dir path.void
setTargetDirPath
(String targetDirPath) Sets the target dir path.void
setTargetJsonFilePath
(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
-