Salome HOME
Refactoring: kernel and som are moved to Siman-Common.
[tools/siman.git] / Workspace / Siman-Common / src / org / splat / kernel / ObjectProperties.java
diff --git a/Workspace/Siman-Common/src/org/splat/kernel/ObjectProperties.java b/Workspace/Siman-Common/src/org/splat/kernel/ObjectProperties.java
new file mode 100644 (file)
index 0000000..5f4c15a
--- /dev/null
@@ -0,0 +1,32 @@
+package org.splat.kernel;
+/**
+ * Common interface of intermediate properties objects used for constructing persistent objects supporting the API Design Pattern
+ * provided by this package.
+ * This interface mainly provides a frame for checking the validity of arguments used by persistent object constructors.
+ * The validity check is implemented in classes inheriting from the Persistent.Properties abstract class through the checkValidity
+ * member function defined in this interface - see class User included in this package for an example of use.
+ * 
+ * @see Persistent
+ * @author    Daniel Brunier-Coulin
+ * @copyright OPEN CASCADE 2012
+ */
+public interface ObjectProperties {
+
+/**
+ * Checks the mutual compatibility of arguments previously set in the properties object.
+ * The validity of each individual argument is supposed to be check first in the setter function of the argument. 
+ * 
+ * @throws MissedPropertyException
+ * @throws InvalidPropertyException
+ * @throws MultiplyDefinedException
+ */ public void checkValidity () throws MissedPropertyException, InvalidPropertyException, MultiplyDefinedException;
+
+ /**
+ * Disables the validity check.
+ * The validity check is by default enabled when constructing an properties object.
+ */ public void disableCheck ();
+
+ /**
+ * Returns true if the validity check is enabled.
+ */ public boolean mustBeChecked ();
+}
\ No newline at end of file