code: public Response importCND( HttpServletRequest request,
                                 String repositoryName,
                                 String workspaceName,
                                 boolean allowUpdate,
                                 InputStream cndInputStream ) throws RepositoryException {
          CheckArg.isNotNull(cndInputStream, "request body");
          Session session = getSession(request, repositoryName, workspaceName);
          NodeTypeManager nodeTypeManager = session.getWorkspace().getNodeTypeManager();
          if (!(nodeTypeManager instanceof org.modeshape.jcr.api.nodetype.NodeTypeManager)) {
              //501 = not implemented
              return Response.status(Response.Status.fromStatusCode(HTTP_NOT_IMPLEMENTED)).build();
          }
          org.modeshape.jcr.api.nodetype.NodeTypeManager modeshapeTypeManager = (org.modeshape.jcr.api.nodetype.NodeTypeManager)nodeTypeManager;
          try {
              List<RestNodeType> registeredTypes = registerCND(request, allowUpdate, cndInputStream, modeshapeTypeManager);
              return createOkResponse(registeredTypes);
          } catch (IOException e) {
              throw new RepositoryException(e);
          }
      }
docs: Imports a CND file into the repository, providing that the repository's {@link NodeTypeManager} is a valid ModeShape
  node type manager.
  
  @param request a non-null {@link HttpServletRequest}
  @param repositoryName a non-null, URL encoded {@link String} representing the name of a repository
  @param workspaceName a non-null, URL encoded {@link String} representing the name of a workspace
  @param allowUpdate a flag which indicates whether existing types should be updated or not.
  @param cndInputStream a {@link InputStream} which is expected to be the input stream of a CND file.
  @return a non-null {@link Response} instance
  @throws RepositoryException if any JCR related operation fails