List<CategoryVO> categories = CategoryController.getController().getAllActiveCategories();
List<SiteNodeTypeDefinition> siteNodeTypeDefinitions = SiteNodeTypeDefinitionController.getController().getSiteNodeTypeDefinitionList(db);
processBean.updateProcess("Content type and categories exported in " + (t.getElapsedTime() / 1000) + " seconds");
InfoGlueExportImpl infoGlueExportImpl = new InfoGlueExportImpl();
names = new VisualFormatter().replaceNonAscii(names, '_');
if(repositories.length > 2 || names.length() > 40)
names = "" + repositories.length + "_repositories";
String fileName = exportId;
if(exportFileName != null && !exportFileName.equals(""))
fileName = exportFileName;
//String filePath = CmsPropertyHandler.getDigitalAssetPath();
String fileSystemName = folderName + File.separator + "ExportMain.xml";
String archiveFileSystemName = CmsPropertyHandler.getDigitalAssetPath() + File.separator + fileName;
String encoding = "UTF-8";
File file = new File(fileSystemName);
FileOutputStream fos = new FileOutputStream(file);
OutputStreamWriter osw = new OutputStreamWriter(fos, encoding);
Marshaller marshaller = new Marshaller(osw);
marshaller.setMapping(map);
marshaller.setEncoding(encoding);
marshaller.setValidation(false);
DigitalAssetBytesHandler.setMaxSize(assetMaxSize);
processBean.updateProcess("Starting marshalling main export file");
//infoGlueExportImpl.getRootContent().addAll(contents);
//infoGlueExportImpl.getRootSiteNode().addAll(siteNodes);
logger.info("repositoryList:" + repositoryList.size());
infoGlueExportImpl.setRepositories(repositoryList);
infoGlueExportImpl.setLanguages(languages);
infoGlueExportImpl.setContentTypeDefinitions(contentTypeDefinitions);
infoGlueExportImpl.setCategories(categories);
infoGlueExportImpl.setSiteNodeTypeDefinitions(siteNodeTypeDefinitions);
infoGlueExportImpl.setRepositoryProperties(allRepositoryProperties);
infoGlueExportImpl.setContentProperties(allContentProperties);
infoGlueExportImpl.setSiteNodeProperties(allSiteNodeProperties);
infoGlueExportImpl.setAccessRights(allAccessRights);
//infoGlueExportImpl.setContents(allContents);
//infoGlueExportImpl.setContentVersions(allContentVersions);
//infoGlueExportImpl.setSiteNodes(allSiteNodes);
//infoGlueExportImpl.setSiteNodeVersions(allSiteNodeVersions);