|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Constraint
A constraint is a boolean Condition
, combined with a
Scope
. The scope indicates, when the constraint
is being applied. The condition indicates, whether the
constraint is violated or not. The constraints type indicates
its use.
By default, there are two types of constraints:
ReadOnlyConstraint
indicates, whether an
object or attribute may be modified. This may depend,
for example, on authorization issues.ValidationConstraint
indicates, whether
an object or attribute is valid. For example, an object
may be validated before saving it by applying all of
its constraints. If either of the constraints is
violated, then an error message should pop up, which
declines saving the object.ReadOnlyConstraint
, or ValidationConstraint
.
Of course, you may add more marker interfaces.
The Scope
is used to distinguish between an objects
lifecycle phases. For example, an object may be writable
in its development phase and read-only in production.
Nested Class Summary | |
---|---|
static interface |
Constraint.Context
The constraints context is the link between its environment
and the constraints implementation. |
static interface |
Constraint.Listener
The constraints listener is called, if the constraint
detects that its violated. |
Method Summary |
---|
Methods inherited from interface com.softwareag.centrasite.appl.framework.validation.Scope |
---|
isApplicable |
Methods inherited from interface com.softwareag.centrasite.appl.framework.validation.Condition |
---|
check |
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |