Class IntegrityChecker

java.lang.Object
org.alfresco.repo.node.integrity.IntegrityChecker
All Implemented Interfaces:
NodeServicePolicies.OnAddAspectPolicy, NodeServicePolicies.OnCreateAssociationPolicy, NodeServicePolicies.OnCreateChildAssociationPolicy, NodeServicePolicies.OnCreateNodePolicy, NodeServicePolicies.OnDeleteAssociationPolicy, NodeServicePolicies.OnDeleteChildAssociationPolicy, NodeServicePolicies.OnDeleteNodePolicy, NodeServicePolicies.OnRemoveAspectPolicy, NodeServicePolicies.OnUpdatePropertiesPolicy, AssociationPolicy, ClassPolicy, Policy, org.alfresco.util.transaction.TransactionListener

Component that generates and processes integrity events, enforcing the dictionary model's node structure.

In order to fulfill the contract of the interface, this class registers to receive notifications pertinent to changes in the node structure. These are then store away in the persistent store until the request to check integrity is made.

In order to ensure registration of these events, the init() method must be called.

By default, this service is enabled, but can be disabled using setEnabled(boolean).
Tracing of the event stacks is, for performance reasons, disabled by default but can be enabled using setTraceOn(boolean).
When enabled, the integrity check can either fail with a RuntimeException or not. In either case, the integrity violations are logged as warnings or errors. This behaviour is controleed using setFailOnViolation(boolean) and is off by default. In other words, if not set, this service will only log warnings about integrity violations.

Some integrity checks are not performed here as they are dealt with directly during the modification operation in the node service.

Author:
Derek Hulley
See Also: