Node newNode = null;
if (session.nodeExists(newNodePath))
newNode = session.getNode(newNodePath);
- else
- throw new CmsException("Data " + newNodePath + " does not exist");
+ else {
+// throw new CmsException("Data " + newNodePath + " does not exist");
+ newNode = null;
+ }
setNode(newNode);
}
String title = publishMetaData(getNode());
private String publishMetaData(Node node) throws RepositoryException {
// Title
String title;
- if (node.isNodeType(NodeType.MIX_TITLE) && node.hasProperty(Property.JCR_TITLE))
+ if (node!=null && node.isNodeType(NodeType.MIX_TITLE) && node.hasProperty(Property.JCR_TITLE))
title = node.getProperty(Property.JCR_TITLE).getString() + " - " + getBaseTitle();
else
title = getBaseTitle();