Skip to content
Snippets Groups Projects
Commit a812d467 authored by Vincent Aravantinos's avatar Vincent Aravantinos
Browse files

constraint verifiers do not have now to run imperatively

refs 2334
parent a2220321
No related branches found
No related tags found
No related merge requests found
......@@ -31,7 +31,7 @@ import org.fortiss.tooling.kernel.service.IConstraintVerificationService.IFix;
* @author aravantinos
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: 98834BA99C412D6510C7C437C2047256
* @ConQAT.Rating YELLOW Hash: 9BD74A6B8A249173BEA76C726ACD4416
*/
public interface IConstraintVerifier {
......@@ -42,7 +42,7 @@ public interface IConstraintVerifier {
String getID();
/** Verify the given constraint. */
void verify(Constraint constraint);
IConstraintVerificationStatus verify(Constraint constraint);
/**
* @param obj
......
......@@ -39,9 +39,11 @@ import org.fortiss.tooling.kernel.model.constraints.ConstrainedWithChecksum;
import org.fortiss.tooling.kernel.model.constraints.Constraint;
import org.fortiss.tooling.kernel.model.constraints.ConstraintsFactory;
import org.fortiss.tooling.kernel.model.constraints.IConstrained;
import org.fortiss.tooling.kernel.model.constraints.IConstraintVerificationStatus;
import org.fortiss.tooling.kernel.service.IConstraintVerificationService;
import org.fortiss.tooling.kernel.service.IKernelIntrospectionSystemService;
import org.fortiss.tooling.kernel.service.IPersistencyService;
import org.fortiss.tooling.kernel.utils.ConstraintsUtils;
import org.fortiss.tooling.kernel.utils.EcoreUtils;
import org.fortiss.tooling.kernel.utils.LoggingUtils;
import org.osgi.framework.Bundle;
......@@ -52,7 +54,7 @@ import org.osgi.framework.Bundle;
* @author aravantinos
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: 28F933A29C87BB09AD7E9B8A74313878
* @ConQAT.Rating YELLOW Hash: CD9A6244C4050965CF48516EFF160EF4
*/
public final class ConstraintVerificationService implements IIntrospectiveKernelService,
IConstraintVerificationService {
......@@ -157,12 +159,13 @@ public final class ConstraintVerificationService implements IIntrospectiveKernel
// We update the checksums before verification to avoid detecting some fake
// changes during the verification.
updateChecksums(constraint);
verifier.verify(constraint);
IConstraintVerificationStatus status = verifier.verify(constraint);
ConstraintsUtils.setVerificationStatus(constraint, status);
// And we also update the checksums after in case the verification had some side
// effects...
updateChecksums(constraint);
if(constraint.getVerificationStatus() != null) {
constraint.getVerificationStatus().setConstraint(constraint);
if(status != null) {
status.setConstraint(constraint);
}
}
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment