public Link add(String path, org.apache.lenya.cms.publication.Document doc)
throws SiteException {
if (contains(path)) {
SiteNode node = getNode(path);
if (node.getLanguages().length > 0 && !node.getUuid().equals(doc.getUUID())) {
throw new SiteException("Node for path [" + path + "] exists with different UUID!");
}
}
SiteTreeNodeImpl node = addNode(path, doc.getUUID(), true, null, "", false);
node.addLabel(doc.getLanguage(), "");
if (node.getLanguages().length == 1) {
node.setUUID(doc.getUUID());
}
return node.getLink(doc.getLanguage());
}