|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ConsistencyValidator
Implementations of this interface can export a state and validate that the exported state is consistent with the environment the export is being imported to.
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.
| Method Summary | |
|---|---|
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. |
| Method Detail |
|---|
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 -
XMLStreamException
void 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 -
XMLStreamException
void validateExportedState()
throws InconsistentStateException
This method is only ever called after the #initializeExportedStateValidation(XMLStreamReader)
is invoked.
InconsistentStateException - in case of failed consistency check
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||