void ensureIsUsable() throws ConstraintViolationException {
  boolean isUsable=true;
  List<LocalizableMessage> reasons=new LinkedList<>();
  for (  Constraint constraint : definition.getAllConstraints()) {
    for (    ServerConstraintHandler handler : constraint.getServerConstraintHandlers()) {
      try {
        if (!handler.isUsable(this,reasons)) {
          isUsable=false;
        }
      }
 catch (      ConfigException e) {
        LocalizableMessage message=ERR_SERVER_CONSTRAINT_EXCEPTION.get(e.getMessageObject());
        reasons.add(message);
        isUsable=false;
      }
    }
  }
  if (!isUsable) {
    throw new ConstraintViolationException(this,reasons);
  }
}

void ensureIsUsable ( ) throws ConstraintViolationException { boolean isUsable = true ; List < LocalizableMessage > reasons = new LinkedList < > ( ) ; for ( Constraint constraint : definition . getAllConstraints ( ) ) { for ( ServerConstraintHandler handler : constraint . getServerConstraintHandlers ( ) ) { try { if ( ! handler . isUsable ( this , reasons ) ) { isUsable = false ; } } catch ( ConfigException e ) { LocalizableMessage message = ERR_SERVER_CONSTRAINT_EXCEPTION . get ( e . getMessageObject ( ) ) ; reasons . add ( message ) ; isUsable = false ; } } } if ( ! isUsable ) { throw new ConstraintViolationException ( this , reasons ) ; } }
determines whether this managed object can be used by the server .
