Class ContentConsistencyManager
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.cms.content.consistency.ContentConsistencyManager
org.ametys.web.content.consistency.ContentConsistencyManager
- All Implemented Interfaces:
LogEnabled
,Initializable
,Component
,Contextualizable
,Serviceable
ContentConsistencyManager with support for site information
-
Nested Class Summary
Nested classes/interfaces inherited from class org.ametys.cms.content.consistency.ContentConsistencyManager
ContentConsistencyManager.ConsistenciesReport, ContentConsistencyManager.ConsistencyExpression
-
Field Summary
Fields inherited from class org.ametys.cms.content.consistency.ContentConsistencyManager
_consistencyChecker, _resolver, ROLE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncheckContentsFromSite
(String siteName) Check every content from the given site for broken links.Check every contents without an associated site for broken linksprotected ContentConsistencyResult
storeResult
(WorkflowAwareContent content, int successCount, int unknownCount, int unauthorizedCount, int notFoundCount, int serverErrorCount) Store the result of the consistency check done on the contentMethods inherited from class org.ametys.cms.content.consistency.ContentConsistencyManager
_checkContents, _getContents, checkAllContents, contextualize, initialize, removeOutdatedResult, resultToJSON, service
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Constructor Details
-
ContentConsistencyManager
public ContentConsistencyManager()
-
-
Method Details
-
storeResult
protected ContentConsistencyResult storeResult(WorkflowAwareContent content, int successCount, int unknownCount, int unauthorizedCount, int notFoundCount, int serverErrorCount) Description copied from class:ContentConsistencyManager
Store the result of the consistency check done on the content- Overrides:
storeResult
in classContentConsistencyManager
- Parameters:
content
- the content checkedsuccessCount
- the number of successunknownCount
- the number of unknownunauthorizedCount
- the number of unauthorizednotFoundCount
- the number of not foundserverErrorCount
- the number of server error- Returns:
- the result
-
checkContentsWithoutSite
Check every contents without an associated site for broken links- Returns:
- record describing the results of the checks
-
checkContentsFromSite
Check every content from the given site for broken links. Note that content with no associated site won't be check by this methods. See forcheckContentsWithoutSite()
for this.- Parameters:
siteName
- the site of the contents- Returns:
- record describing the results of the checks
-