public class GlobalContentConsistencyGenerator extends ServiceableGenerator
Modifier and Type | Class and Description |
---|---|
class |
GlobalContentConsistencyGenerator.ConsistencyExpression
Expression which tests if contents have consistency informations.
|
Modifier and Type | Field and Description |
---|---|
protected ConsistencyChecker |
_consistencyChecker
The consistency checker
|
protected ContentTypeExtensionPoint |
_cTypeExtPt
The content type extension point
|
protected ContentTypesHelper |
_cTypesHelper
Helper for content types
|
protected Map<UserIdentity,String> |
_nameCache
The name cache
|
protected AmetysObjectResolver |
_resolver
The ametys object resolver.
|
protected UserManager |
_userManager
The user manager
|
manager
objectModel, parameters, resolver, source
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer
Constructor and Description |
---|
GlobalContentConsistencyGenerator() |
Modifier and Type | Method and Description |
---|---|
protected AmetysObjectIterable<Content> |
_getContents()
Get the contents with inconsistency information.
|
protected void |
_saxAdditionalContentAttributes(Content content,
AttributesImpl atts)
Sax additional data on the content
|
protected 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 name
|
void |
service(ServiceManager serviceManager) |
dispose
recycle, setup
setConsumer, setContentHandler, setLexicalHandler
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setConsumer
protected AmetysObjectResolver _resolver
protected ConsistencyChecker _consistencyChecker
protected UserManager _userManager
protected ContentTypeExtensionPoint _cTypeExtPt
protected ContentTypesHelper _cTypesHelper
protected Map<UserIdentity,String> _nameCache
public GlobalContentConsistencyGenerator()
public void service(ServiceManager serviceManager) throws ServiceException
service
in interface Serviceable
service
in class ServiceableGenerator
ServiceException
public void generate() throws IOException, SAXException, ProcessingException
protected AmetysObjectIterable<Content> _getContents()
protected void _saxContentConsistency(Content content, int successCount, int unknownCount, int unauthorizedCount, int notFoundCount, int serverErrorCount) throws SAXException
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.SAXException
- if an errors occurs generating the data.protected void _saxAdditionalContentAttributes(Content content, AttributesImpl atts)
content
- the content.atts
- the attributes the will be saxed?protected String getName(UserIdentity userIdentity)
userIdentity
- the user