/**
* {@inheritDoc}
*/
public void registerNodeTypes(SessionInfo sessionInfo, QNodeTypeDefinition[] nodeTypeDefinitions, boolean allowUpdate) throws InvalidNodeTypeDefinitionException, NodeTypeExistsException, UnsupportedRepositoryOperationException, RepositoryException {
PropPatchMethod method = null;
try {
DavPropertySet setProperties = new DavPropertySet();
setProperties.add(createRegisterNodeTypesProperty(sessionInfo, nodeTypeDefinitions, allowUpdate));
String uri = uriResolver.getWorkspaceUri(sessionInfo.getWorkspaceName());
method = new PropPatchMethod(uri, setProperties, new DavPropertyNameSet());
initMethod(method, sessionInfo, true);
getClient(sessionInfo).executeMethod(method);
method.checkSuccess();
} catch (IOException e) {
throw new RepositoryException(e);
} catch (DavException e) {
throw ExceptionConverter.generate(e);
} finally {
if (method != null) {
method.releaseConnection();
}
}
}