if (serversNode != null) {
// servers node exists, this is Pro, and is versioned, use standard ways to get it's version
// and enforce version presence
if (versionNode != null) {
if (Strings.isNullOrEmpty(versionNode.getValue())) {
throw new CorruptModelException("Nexus Pro LDAP XML model invalid: empty 'version' node");
}
return versionNode.getValue();
}
else {
throw new CorruptModelException("Passed in LDAP model does not have 'version' node");
}
}
else {
// servers node not exists, this is OSS and only one model version exists of it
return OSS_VERSION_MARKER;
}
}
catch (XmlPullParserException e) {
throw new CorruptModelException("Passed in XML model cannot be parsed", e);
}
}
}