Added removeProperty method to NodeService.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5558 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2007-04-26 08:34:43 +00:00
parent 6d39078356
commit d94db4e310
6 changed files with 74 additions and 4 deletions

View File

@@ -1022,6 +1022,27 @@ public class AVMNodeService extends AbstractNodeServiceImpl implements NodeServi
}
}
/**
* @inheritDoc
*/
public void removeProperty(NodeRef nodeRef, QName qname) throws InvalidNodeRefException
{
Pair<Integer, String> avmVersionPath = AVMNodeConverter.ToAVMVersionPath(nodeRef);
if (isBuiltInProperty(qname))
{
// Ignore
return;
}
try
{
fAVMService.deleteNodeProperty(avmVersionPath.getSecond(), qname);
}
catch (AVMNotFoundException e)
{
throw new InvalidNodeRefException(avmVersionPath.getSecond() + " not found.", nodeRef);
}
}
/**
* A Helper to spoof built in properties.
* @param avmVersionPath The broken out version and path from a NodeRef.