org.rhq.enterprise.server.sync.validators
Class UniquenessValidator<T>
java.lang.Object
org.rhq.enterprise.server.sync.validators.UniquenessValidator<T>
- All Implemented Interfaces:
- EntityValidator<T>
public class UniquenessValidator<T>
- extends Object
- implements EntityValidator<T>
This validator merely checks that there are no duplicates in the export file.
- Author:
- Lukas Krejci
|
Method Summary |
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 |
validateExportedEntity(T entity)
Validates a single entity before it is imported. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UniquenessValidator
public UniquenessValidator()
initialize
public void initialize(org.rhq.core.domain.auth.Subject subject,
javax.persistence.EntityManager entityManager)
- Description copied from interface:
EntityValidator
- Initializes the validator with the current authentication info and access to database.
This method is only called during import.
- Specified by:
initialize in interface EntityValidator<T>
- Parameters:
subject - the currently authenticated userentityManager - the entity manager that can be used to access the database if the
validator needs to do so.
validateExportedEntity
public void validateExportedEntity(T entity)
throws ValidationException
- Description copied from interface:
EntityValidator
- Validates a single entity before it is imported.
The supplied entity has one of the types returned by
#getValidatedEntityTypes().
- Specified by:
validateExportedEntity in interface EntityValidator<T>
- Throws:
ValidationException
Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.