org.rhq.enterprise.server.sync
Interface Synchronizer<Entity,ExportedEntity>

Type Parameters:
Entity - the domain model entity being synchronized
ExportedEntity - the type that is used to represent the entity in the export file
All Known Implementing Classes:
MetricTemplateSynchronizer, SystemSettingsSynchronizer

public interface Synchronizer<Entity,ExportedEntity>

Represents a synchronizer that can export and import entities.

Author:
Lukas Krejci

Method Summary
 Exporter<Entity,ExportedEntity> getExporter()
          The exporter to use to export the entities.
 Importer<Entity,ExportedEntity> getImporter()
          The importer to import the entities with.
 Set<ConsistencyValidator> getRequiredValidators()
          The set of validators that are required to validate the state of the export or the current installation during import.
 void initialize(org.rhq.core.domain.auth.Subject subject, javax.persistence.EntityManager entityManager)
          Initializes the synchronizer so that it can access database and is authorization aware.
 

Method Detail

initialize

void initialize(org.rhq.core.domain.auth.Subject subject,
                javax.persistence.EntityManager entityManager)
Initializes the synchronizer so that it can access database and is authorization aware.

Parameters:
subject - the currently logged in user
entityManager - the entity manager to access the database with (if not using one of the RHQ's SLSBs)

getExporter

Exporter<Entity,ExportedEntity> getExporter()
The exporter to use to export the entities.


getImporter

Importer<Entity,ExportedEntity> getImporter()
The importer to import the entities with.


getRequiredValidators

Set<ConsistencyValidator> getRequiredValidators()
The set of validators that are required to validate the state of the export or the current installation during import.

The validators need not to be initialized.



Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.