@Override public List<ValidationError> validate() { List<ValidationError> errors = new ArrayList<>(); errors.addAll(super.validate());
List<ValidationError> errors = validate(); if (errors.size() > 0) { if (log.isLoggable(Level.FINEST)) {
public List<ValidationError> validate() { List<ValidationError> errors = new ArrayList<>(); if (getType() != null) { // Only validate the graph if we have a device type - that means we validate only if there // actually is a fully hydrated graph, not just a discovered device of which we haven't even // retrieved the descriptor yet. This assumes that the descriptor will ALWAYS contain a device // type. Now that is a risky assumption... errors.addAll(getVersion().validate()); if(getIdentity() != null) { errors.addAll(getIdentity().validate()); } if (getDetails() != null) { errors.addAll(getDetails().validate()); } if (hasServices()) { for (Service service : getServices()) { if (service != null) errors.addAll(service.validate()); } } if (hasEmbeddedDevices()) { for (Device embeddedDevice : getEmbeddedDevices()) { if (embeddedDevice != null) errors.addAll(embeddedDevice.validate()); } } } return errors; }
@Override public List<ValidationError> validate() { List<ValidationError> errors = new ArrayList(); errors.addAll(super.validate());
List<ValidationError> errors = validate(); if (errors.size() > 0) { if (log.isLoggable(Level.FINEST)) {
public List<ValidationError> validate() { List<ValidationError> errors = new ArrayList(); if (getType() != null) { // Only validate the graph if we have a device type - that means we validate only if there // actually is a fully hydrated graph, not just a discovered device of which we haven't even // retrieved the descriptor yet. This assumes that the descriptor will ALWAYS contain a device // type. Now that is a risky assumption... errors.addAll(getVersion().validate()); if (getDetails() != null) { errors.addAll(getDetails().validate()); } if (hasServices()) { for (Service service : getServices()) { if (service != null) errors.addAll(service.validate()); } } if (hasEmbeddedDevices()) { for (Device embeddedDevice : getEmbeddedDevices()) { if (embeddedDevice != null) errors.addAll(embeddedDevice.validate()); } } } return errors; }
@Override public List<ValidationError> validate() { List<ValidationError> errors = new ArrayList<>(); errors.addAll(super.validate());
List<ValidationError> errors = validate(); if (errors.size() > 0) { if (log.isLoggable(Level.FINEST)) {
public List<ValidationError> validate() { List<ValidationError> errors = new ArrayList<>(); if (getType() != null) { // Only validate the graph if we have a device type - that means we validate only if there // actually is a fully hydrated graph, not just a discovered device of which we haven't even // retrieved the descriptor yet. This assumes that the descriptor will ALWAYS contain a device // type. Now that is a risky assumption... errors.addAll(getVersion().validate()); if(getIdentity() != null) { errors.addAll(getIdentity().validate()); } if (getDetails() != null) { errors.addAll(getDetails().validate()); } if (hasServices()) { for (Service service : getServices()) { if (service != null) errors.addAll(service.validate()); } } if (hasEmbeddedDevices()) { for (Device embeddedDevice : getEmbeddedDevices()) { if (embeddedDevice != null) errors.addAll(embeddedDevice.validate()); } } } return errors; }