documents.setRequiredPrimaryTypes(new Name[]{document.getName()});
documents.setName(nameFactory.create("", "documents"));
documents.setDeclaringNodeType(folder.getName());
folder.setChildNodeDefs(new QNodeDefinition[]{
folders.build(), documents.build()});
ntDefCollection = new LinkedList<QNodeTypeDefinition>();
ntDefCollection.add(folder.build());
ntDefCollection.add(document.build());
ntDefCollection.add(cmsObject.build());