Class CmsTypeAnalyzer

java.lang.Object
org.opencms.ade.containerpage.CmsTypeAnalyzer

public class CmsTypeAnalyzer extends Object
Analyzes content type and formatter usage in a site / folder.
  • Field Details

  • Constructor Details

  • Method Details

    • readState

      public static CmsTypeAnalyzer.State readState(byte[] data) throws Exception
      Deserializes the state from a byte array.
      Parameters:
      data - the data
      Returns:
      the deserialized state
      Throws:
      Exception - if something goes wrong
    • run

      public static CmsTypeAnalyzer.State run(CmsObject cms, String path, boolean skipDetailOnly, String excludeContainersStr, String templateRegex) throws CmsException
      Runs the type analysis and returns the state object with all the collected data.
      Parameters:
      cms - the CMS context
      path - the path
      skipDetailOnly - true if detail only pages should be skipped
      excludeContainersStr - a comma-separated list of container names to exclude from analysis (only direct elements)
      templateRegex - a regular expression such that only pages whose template matches that regex should be processed
      Returns:
      the state
      Throws:
      CmsException - if something goes wrong
    • writeState

      public static byte[] writeState(CmsTypeAnalyzer.State state) throws IOException
      Serializes a state to a byte array.
      Parameters:
      state - the state
      Returns:
      the serialized data
      Throws:
      IOException - if something goes wrong with serialization
    • getState

      Gets the state.
      Returns:
      the state
    • processFolder

      Process folder.
      Returns:
      the state
      Throws:
      CmsException - the cms exception