Class GlobalContentConsistencyGenerator
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.xml.AbstractXMLProducer
org.apache.cocoon.generation.AbstractGenerator
org.apache.cocoon.generation.ServiceableGenerator
org.ametys.cms.content.consistency.GlobalContentConsistencyGenerator
- All Implemented Interfaces:
Poolable
,Recyclable
,Disposable
,Initializable
,Component
,LogEnabled
,Serviceable
,Generator
,SitemapModelComponent
,XMLProducer
- Direct Known Subclasses:
GlobalContentConsistencyGenerator
public class GlobalContentConsistencyGenerator
extends ServiceableGenerator
implements Initializable
Generate content with consistency information.
Parameters:
Parameters:
- short-test: set to true to make a short test, false to make a full one (default false).
- omit-consistent: set to true to omit consistent contents and generate only contents with unknown or failed consistency information (default false).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
Expression which tests if contents have consistency informations. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AbstractCacheManager
CacheManager used to create and get cacheprotected ConsistencyChecker
The consistency checkerprotected ContentTypeExtensionPoint
The content type extension pointprotected ContentTypesHelper
Helper for content typesprotected AmetysObjectResolver
The ametys object resolver.protected UserManager
The user managerFields inherited from class org.apache.cocoon.generation.ServiceableGenerator
manager
Fields inherited from class org.apache.cocoon.generation.AbstractGenerator
objectModel, parameters, resolver, source
Fields inherited from class org.apache.cocoon.xml.AbstractXMLProducer
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected AmetysObjectIterable<Content>
Get the contents with inconsistency information.protected void
_saxAdditionalContentAttributes
(Content content, AttributesImpl atts) Sax additional data on the contentprotected void
_saxContentConsistency
(Content content, int successCount, int unknownCount, int unauthorizedCount, int notFoundCount, int serverErrorCount) Generate information on content consistency.void
generate()
protected String
getName
(UserIdentity userIdentity) Get the user namevoid
void
service
(ServiceManager serviceManager) Methods inherited from class org.apache.cocoon.generation.ServiceableGenerator
dispose
Methods inherited from class org.apache.cocoon.generation.AbstractGenerator
recycle, setup
Methods inherited from class org.apache.cocoon.xml.AbstractXMLProducer
setConsumer, setContentHandler, setLexicalHandler
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.cocoon.xml.XMLProducer
setConsumer
-
Field Details
-
_resolver
The ametys object resolver. -
_consistencyChecker
The consistency checker -
_userManager
The user manager -
_cTypeExtPt
The content type extension point -
_cTypesHelper
Helper for content types -
_cacheManager
CacheManager used to create and get cache
-
-
Constructor Details
-
GlobalContentConsistencyGenerator
public GlobalContentConsistencyGenerator()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classServiceableGenerator
- Throws:
ServiceException
-
initialize
- Specified by:
initialize
in interfaceInitializable
- Throws:
Exception
-
generate
- Specified by:
generate
in interfaceGenerator
- Throws:
IOException
SAXException
ProcessingException
-
_getContents
Get the contents with inconsistency information.- Returns:
- an iterator on contents.
-
_saxContentConsistency
protected void _saxContentConsistency(Content content, int successCount, int unknownCount, int unauthorizedCount, int notFoundCount, int serverErrorCount) throws SAXException Generate information on content consistency.- Parameters:
content
- the content.successCount
- the count of consistent information.unknownCount
- the count of information of unknown consistency.unauthorizedCount
- the count of unauthorized links.notFoundCount
- the count of not found links.serverErrorCount
- the count of inconsistent information.- Throws:
SAXException
- if an errors occurs generating the data.
-
_saxAdditionalContentAttributes
Sax additional data on the content- Parameters:
content
- the content.atts
- the attributes the will be saxed?
-
getName
Get the user name- Parameters:
userIdentity
- the user- Returns:
- the user name
-