Package org.opencms.ade.containerpage
Class CmsTypeAnalyzer
java.lang.Object
org.opencms.ade.containerpage.CmsTypeAnalyzer
Analyzes content type and formatter usage in a site / folder.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBean for formatter information.static classData for a single resource.static classRepresents all data collected by the CmsTypeAnalyzer class.static classData for a single content type. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetState()Gets the state.Process folder.static CmsTypeAnalyzer.StatereadState(byte[] data) Deserializes the state from a byte array.static CmsTypeAnalyzer.Staterun(CmsObject cms, String path, boolean skipDetailOnly, String excludeContainersStr, String templateRegex) Runs the type analysis and returns the state object with all the collected data.static byte[]writeState(CmsTypeAnalyzer.State state) Serializes a state to a byte array.
-
Field Details
-
UNKNOWN_FORMATTER
The Constant UNKNOWN_FORMATTER.
-
-
Constructor Details
-
CmsTypeAnalyzer
public CmsTypeAnalyzer(CmsObject cms, String siteRoot, String path, boolean skipDetailOnly, Set<String> excludedContainers, String templateRegex) throws CmsException Creates a new instance.- Parameters:
cms- the CMS contextsiteRoot- the site rootpath- the site path to analyze- Throws:
CmsException- if something goes wrong
-
-
Method Details
-
readState
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 contextpath- the pathskipDetailOnly- true if detail only pages should be skippedexcludeContainersStr- 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
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
-