Added JcrPropertyUtil.getProperty(node, name, defaultValue)
@@ -318,6 +318,11 @@ public class JcrPropertyUtil {
}
}
+ public static <T> T getProperty(Node node, String name, T defaultValue) {
+ T value = getProperty(node, name, true);
+ return value == null ? defaultValue : value;
+ }
+
public static Map<String, Object> getProperties(Node node) {
try {
Map<String, Object> propMap = new HashMap<>();
