{
// First, loop on all attributes
for ( EntryAttribute attribute : entry )
{
AttributeType attributeType = ( ( ServerAttribute ) attribute ).getAttributeType();
SyntaxChecker syntaxChecker = attributeType.getSyntax().getSyntaxChecker();
if ( syntaxChecker instanceof AcceptAllSyntaxChecker )
{
// This is a speedup : no need to check the syntax of any value
// if all the syntaxes are accepted...
continue;
}
// Then loop on all values
for ( Value<?> value : attribute )
{
try
{
syntaxChecker.assertSyntax( value.get() );
}
catch ( Exception ne )
{
String message = "Attribute value '" + value.getString()
+ "' for attribute '" + attribute.getUpId() + "' is syntactically incorrect";