public interface ConsistencyValidator
Think about the necessity of the two RHQ installations having the same plugins deployed so that the metric templates can be fully matched between them.
The validators are required to have a public no-arg constructor. If some configuration
settings are required to be transfered over to the target installation, the implementation
is free to include such data in the XML during the exportState(ExportWriter) method.
| Modifier and Type | Method and Description |
|---|---|
void |
exportState(ExportWriter writer)
Exports the state this checker needs validated later on.
|
void |
initialize(org.rhq.core.domain.auth.Subject subject,
javax.persistence.EntityManager entityManager)
Initializes the validator with the current authentication info and access to database.
|
void |
initializeExportedStateValidation(ExportReader reader)
This method initializes the consistency checker to perform the
validateExportedState() method later on. |
void |
validateExportedState()
Validates that the current RHQ installation is consistent with the state
mandated during the export.
|
void initialize(org.rhq.core.domain.auth.Subject subject,
javax.persistence.EntityManager entityManager)
subject - the currently authenticated userentityManager - the entity manager that can be used to access the database if the
validator needs to do so.void exportState(ExportWriter writer) throws XMLStreamException
writer - XMLStreamExceptionvoid initializeExportedStateValidation(ExportReader reader) throws XMLStreamException
validateExportedState() method later on.
This method is called during import and the reader points to a structure
previously stored by the exportState(ExportWriter) method on
the source RHQ installation.
reader - XMLStreamExceptionvoid validateExportedState()
throws InconsistentStateException
This method is only ever called after the #initializeExportedStateValidation(XMLStreamReader)
is invoked.
InconsistentStateException - in case of failed consistency checkCopyright © 2008-2013 Red Hat, Inc.. All Rights Reserved.