* @see Batch#setMixins(NodeId, Name[])
*/
public void setMixins(NodeId nodeId, Name[] mixinNodeTypeIds) throws NoSuchNodeTypeException, VersionException, ConstraintViolationException, LockException, AccessDeniedException, UnsupportedRepositoryOperationException, RepositoryException {
checkConsumed();
try {
DavPropertySet setProperties;
DavPropertyNameSet removeProperties;
if (mixinNodeTypeIds == null || mixinNodeTypeIds.length == 0) {
setProperties = new DavPropertySet();
removeProperties = new DavPropertyNameSet();
removeProperties.add(JcrRemotingConstants.JCR_MIXINNODETYPES_LN, ItemResourceConstants.NAMESPACE);
} else {
String[] ntNames = new String[mixinNodeTypeIds.length];
for (int i = 0; i < mixinNodeTypeIds.length; i++) {
ntNames[i] = resolver.getJCRName(mixinNodeTypeIds[i]);
}
setProperties = new DavPropertySet();
setProperties.add(createNodeTypeProperty(JcrRemotingConstants.JCR_MIXINNODETYPES_LN, ntNames));
removeProperties = new DavPropertyNameSet();
}
String uri = getItemUri(nodeId, sessionInfo);
PropPatchMethod method = new PropPatchMethod(uri, setProperties, removeProperties);