Class HtmlCompressor

java.lang.Object
com.tunyk.mvn.plugins.htmlcompressor.HtmlCompressor

public class HtmlCompressor extends Object
The Class HtmlCompressor.
  • Field Details

    • FILE_EXT

      private static final String[] FILE_EXT
      The Constant FILE_EXT.
    • fileExtensions

      private String[] fileExtensions
      The file extensions.
    • srcDirPath

      private String srcDirPath
      The src dir path.
    • targetDirPath

      private String targetDirPath
      The target dir path.
    • fileEncoding

      private Charset fileEncoding
      The file encoding.
    • createJsonFile

      private boolean createJsonFile
      The create json file.
    • targetJsonFilePath

      private String targetJsonFilePath
      The target json file path.
    • jsonIntegrationFilePath

      private String jsonIntegrationFilePath
      The json integration file path.
    • htmlCompressor

      private com.googlecode.htmlcompressor.compressor.HtmlCompressor htmlCompressor
      The html compressor.
  • Constructor Details

    • HtmlCompressor

      public HtmlCompressor(String srcDirPath, String targetDirPath)
      Instantiates a new html compressor.
      Parameters:
      srcDirPath - the src dir path
      targetDirPath - the target dir path
    • HtmlCompressor

      public HtmlCompressor(String srcDirPath, String targetDirPath, boolean createJsonFile, String targetJsonFilePath, String jsonIntegrationFilePath)
      Instantiates a new html compressor.
      Parameters:
      srcDirPath - the src dir path
      targetDirPath - the target dir path
      createJsonFile - the create json file
      targetJsonFilePath - the target json file path
      jsonIntegrationFilePath - the json integration file path
  • Method Details

    • compress

      public void compress() throws IOException
      Compress.
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • getFileExtensions

      public String[] getFileExtensions()
      Gets the file extensions.
      Returns:
      the file extensions
    • setFileExtensions

      public void setFileExtensions(String[] fileExtensions)
      Sets the file extensions.
      Parameters:
      fileExtensions - the new file extensions
    • getSrcDirPath

      public String getSrcDirPath()
      Gets the src dir path.
      Returns:
      the src dir path
    • setSrcDirPath

      public void setSrcDirPath(String srcDirPath)
      Sets the src dir path.
      Parameters:
      srcDirPath - the new src dir path
    • getTargetDirPath

      public String getTargetDirPath()
      Gets the target dir path.
      Returns:
      the target dir path
    • setTargetDirPath

      public void setTargetDirPath(String targetDirPath)
      Sets the target dir path.
      Parameters:
      targetDirPath - the new target dir path
    • getFileEncoding

      public Charset getFileEncoding()
      Gets the file encoding.
      Returns:
      the file encoding
    • setFileEncoding

      public void setFileEncoding(Charset fileEncoding)
      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

      public String getTargetJsonFilePath()
      Gets the target json file path.
      Returns:
      the target json file path
    • setTargetJsonFilePath

      public void setTargetJsonFilePath(String targetJsonFilePath)
      Sets the target json file path.
      Parameters:
      targetJsonFilePath - the new target json file path
    • getJsonIntegrationFilePath

      public String getJsonIntegrationFilePath()
      Gets the json integration file path.
      Returns:
      the json integration file path
    • setJsonIntegrationFilePath

      public void setJsonIntegrationFilePath(String jsonIntegrationFilePath)
      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