|
JAC project AOPSYS CEDRIC & LIP6 labs |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.objectweb.jac.aspects.integrity.GenericConditions
Some basic methods for constraints on fields values.
Constraint methods must return a Boolean that is
Boolean.TRUE
if the test has been validated (passed),
Boolean.FALSE
else. Their parameters are :
Wrappee wrappee
: the the substance object
(holding the fieldFieldItem field
: the constrained fieldObject value
: the proposed future value of the
field (can be refused by the contraintObject[] values
: some configuration params that
can be used in the test
IntegrityAC.addPreCondition(ClassItem,String,MethodItem,Object[],String)
,
IntegrityAC.addPostCondition(ClassItem,String,MethodItem,Object[],String)
,
IntegrityAC.doCheck()
Constructor Summary | |
GenericConditions()
|
Method Summary | |
static Boolean |
authorizedValues(Wrappee substance,
FieldItem field,
Object value,
Object[] values)
Check if field's value is equal to one of the authorized values. |
static Boolean |
forbiddenValues(Wrappee substance,
FieldItem field,
Object value,
Object[] values)
Check if field's value is not equal to the forbidden values. |
static Boolean |
isBeginingWithLetter(Wrappee substance,
FieldItem field,
Object value,
Object[] values)
Tells if the value is a letter begining string. |
static Boolean |
isBeginingWithUpperCaseChar(Wrappee substance,
FieldItem field,
Object value,
Object[] values)
Tells if the value is an upper-case char begining string. |
static Boolean |
isGreaterThan(Wrappee substance,
FieldItem field,
Object value,
Object[] values)
Tells if the value is greater than a given number. |
static Boolean |
isJavaIdentifier(Wrappee substance,
FieldItem field,
Object value,
Object[] values)
Tells if the value is a valid java identifier. |
static Boolean |
isLowerThan(Wrappee substance,
FieldItem field,
Object value,
Object[] values)
|
static Boolean |
isUniqueValue(Wrappee substance,
FieldItem field,
Object value,
Object[] values)
Check if this field already has the same value in another object of the same type. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public GenericConditions()
Method Detail |
public static Boolean forbiddenValues(Wrappee substance, FieldItem field, Object value, Object[] values)
Boolean.FALSE
.
field
- the tested fieldvalue
- the value that is about to be setvalues
- the forbidden valuespublic static Boolean authorizedValues(Wrappee substance, FieldItem field, Object value, Object[] values)
Boolean.FALSE
.
field
- the tested fieldvalue
- the value that is about to be setvalues
- the authorized valuespublic static Boolean isUniqueValue(Wrappee substance, FieldItem field, Object value, Object[] values)
field
- the tested fieldvalue
- the value that is about to be setvalues
- unusedpublic static Boolean isBeginingWithUpperCaseChar(Wrappee substance, FieldItem field, Object value, Object[] values)
field
- the tested fieldvalue
- the value that is about to be setvalues
- unusedpublic static Boolean isBeginingWithLetter(Wrappee substance, FieldItem field, Object value, Object[] values)
field
- the tested fieldvalue
- the value that is about to be setvalues
- unusedpublic static Boolean isJavaIdentifier(Wrappee substance, FieldItem field, Object value, Object[] values)
field
- the tested fieldvalue
- the value that is about to be setvalues
- unusedpublic static Boolean isGreaterThan(Wrappee substance, FieldItem field, Object value, Object[] values) throws Exception
field
- the tested fieldvalue
- the value that is about to be setvalues
- unused
Exception
public static Boolean isLowerThan(Wrappee substance, FieldItem field, Object value, Object[] values) throws Exception
Exception
|
Contact JAC development team: Renaud Pawlak Lionel Seinturier Laurent Martelli |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |