I am trying to delete a property of a node. I could manually do it in the crx explorer but there is just way to many properties that I need to delete. Below is the sample code that is currently working. However just changing its value will not solve what I am trying to accomplish. Therefore my question is:
How can I delete a property of a node?
void deleteJob(Node node, Session jcr) throws RepositoryException {
Node jobDescNode = (Node)jcr.getItem(node.getPath() + "/jcr:content/contentpar/jobsdescription");
if(jobDescNode.hasProperty("foo")) {
jobDescNode.setProperty("foo", "null");
jcr.save();
}
}