net.sf.sfac.editor
Interface Validable


public interface Validable

An interface to be implemented by objects wanting to provide validation.

Author:
Olivier Berlanger

Method Summary
 void validateCreation(ValidationReport report)
          Validate creation of the object.
 void validateDelete(ValidationReport report)
          Validate deletion of the object.
 void validateModification(ValidationReport report)
          Validate modification of the object.
 

Method Detail

validateCreation

void validateCreation(ValidationReport report)
Validate creation of the object.
Any problem (info/warning/error) is added in the given ValidationReport. If this object contains Validable sub-objects, it can forward the validation call to them. In this case, the path must be correctly updated.

Parameters:
report - the ValidationReport where to add any info/warning/error raised by the validation.

validateModification

void validateModification(ValidationReport report)
Validate modification of the object.
Any problem (info/warning/error) is added in the given ValidationReport. If this object contains Validablme sub-objects, it can forward the validation call to them. In this case, the path must be correctly updated.

Parameters:
report - the ValidationReport where to add any info/warning/error raised by the validation.

validateDelete

void validateDelete(ValidationReport report)
Validate deletion of the object.
This method is called before the object is actually deleted (so before the links it may have to other objects are cut).
Any problem (info/warning/error) is added in the given ValidationReport. If this object contains Validable sub-objects, it can forward the validation call to them. In this case, the path must be correctly updated.

Parameters:
report - the ValidationReport where to add any info/warning/error raised by the validation.


Copyright © 2011. All Rights Reserved.