if (!typologies.isEmpty()) {
Node termsBase = JcrUtils.getOrAdd(customBaseNode, EntityType.terms.name(), EntityType.typologies.get());
for (String terms : typologies) {
if (!typologies.isEmpty()) {
Node termsBase = JcrUtils.getOrAdd(customBaseNode, EntityType.terms.name(), EntityType.typologies.get());
for (String terms : typologies) {
termsBase.getSession().save();
}
}
protected void loadTerms(Node termsBase, String name) throws IOException, RepositoryException {
try {
termsBase.getSession().save();
}
}
protected void loadTerms(Node termsBase, String name) throws IOException, RepositoryException {
try {
String termsLoadPath = getTypologiesLoadBase() + '/' + name + ".xml";
URL termsUrl = getClass().getClassLoader().getResource(termsLoadPath);
if (termsUrl == null)
String termsLoadPath = getTypologiesLoadBase() + '/' + name + ".xml";
URL termsUrl = getClass().getClassLoader().getResource(termsLoadPath);
if (termsUrl == null)
termsBase.getSession().save();
} catch (RepositoryException | IOException e) {
log.error("Cannot load terms '" + name + "': " + e.getMessage());
termsBase.getSession().save();
} catch (RepositoryException | IOException e) {
log.error("Cannot load terms '" + name + "': " + e.getMessage());