Examples of InfoGlueExportImpl


Examples of org.infoglue.cms.entities.management.impl.simple.InfoGlueExportImpl

      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);
View Full Code Here

Examples of org.infoglue.cms.entities.management.impl.simple.InfoGlueExportImpl

          exportedEntities = assetCount;
        }
       
        if(!type.equals("DigitalAssets"))
        {
          InfoGlueExportImpl infoGlueExportImpl = new InfoGlueExportImpl();
         
          String name = new VisualFormatter().replaceNonAscii(repository.getName(), '_');
         
          String fileName = type + "_" + repository.getId() + ".xml";
         
          /*
          if(exportFileName != null && !exportFileName.equals(""))
            fileName = exportFileName;
          */
         
          String fileSystemName =  folderName + File.separator + fileName;
          logger.info("Dumping to:" + fileSystemName)
         
          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);
          if(type.equals("ContentVersions"))
            DigitalAssetBytesHandler.setMaxSize(0);
          else
            DigitalAssetBytesHandler.setMaxSize(assetMaxSize);
             
          infoGlueExportImpl.setContents(allContents);
          infoGlueExportImpl.setContentVersions(allContentVersions);
          infoGlueExportImpl.setSiteNodes(allSiteNodes);
          infoGlueExportImpl.setSiteNodeVersions(allSiteNodeVersions);
          infoGlueExportImpl.setDigitalAssets(allDigitalAssets);
         
          allReturningSiteNodes.addAll(allSiteNodes);
          allReturningContents.addAll(allContents);
          marshaller.marshal(infoGlueExportImpl);
         
View Full Code Here

Examples of org.infoglue.cms.entities.management.impl.simple.InfoGlueExportImpl

      }
     
      List contentTypeDefinitions = ContentTypeDefinitionController.getController().getContentTypeDefinitionList(db);
      List categories = CategoryController.getController().getAllActiveCategories();
     
      InfoGlueExportImpl infoGlueExportImpl = new InfoGlueExportImpl();
     
      VisualFormatter visualFormatter = new VisualFormatter();
      names = new VisualFormatter().replaceNonAscii(names, '_');

      if(repositories.length > 2 || names.length() > 40)
        names = "" + repositories.length + "_repositories";
     
      String fileName = "Export_" + names + "_" + visualFormatter.formatDate(new Date(), "yyyy-MM-dd_HHmm") + ".xml";
      if(exportFileName != null && !exportFileName.equals(""))
        fileName = exportFileName;
     
      String filePath = CmsPropertyHandler.getDigitalAssetPath();
      String fileSystemName =  filePath + File.separator + fileName;
           
      fileUrl = CmsPropertyHandler.getWebServerAddress() + "/" + CmsPropertyHandler.getDigitalAssetBaseUrl() + "/" + fileName;
      this.fileName = 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);
      DigitalAssetBytesHandler.setMaxSize(assetMaxSize);

      infoGlueExportImpl.getRootContent().addAll(contents);
      infoGlueExportImpl.getRootSiteNode().addAll(siteNodes);
     
      infoGlueExportImpl.setContentTypeDefinitions(contentTypeDefinitions);
      infoGlueExportImpl.setCategories(categories);
     
      infoGlueExportImpl.setRepositoryProperties(allRepositoryProperties);
      infoGlueExportImpl.setContentProperties(allContentProperties);
      infoGlueExportImpl.setSiteNodeProperties(allSiteNodeProperties);
      infoGlueExportImpl.setAccessRights(allAccessRights);
     
      marshaller.marshal(infoGlueExportImpl);
     
      osw.flush();
      osw.close();
View Full Code Here

Examples of org.infoglue.cms.entities.management.impl.simple.InfoGlueExportImpl

      allRepositoryProperties.putAll(OptimizedExportController.getRepositoryProperties(ps, repositoryId));
     
      List contentTypeDefinitions = ContentTypeDefinitionController.getController().getContentTypeDefinitionList(db);
      List categories = CategoryController.getController().getAllActiveCategories();
     
      InfoGlueExportImpl infoGlueExportImpl = new InfoGlueExportImpl();
     
      VisualFormatter visualFormatter = new VisualFormatter();
      names = new VisualFormatter().replaceNonAscii(names, '_');

      String fileName = "RepositoryCopy_" + names + "_" + visualFormatter.formatDate(new Date(), "yyyy-MM-dd_HHmm") + ".xml";
     
      String filePath = CmsPropertyHandler.getDigitalAssetPath();
      String fileSystemName =  filePath + File.separator + fileName;
     
      String encoding = "UTF-8";
      file = new File(fileSystemName);
            FileOutputStream fos = new FileOutputStream(file);
            BufferedOutputStream bos = new BufferedOutputStream(fos);
            OutputStreamWriter osw = new OutputStreamWriter(bos, encoding);
            Marshaller marshaller = new Marshaller(osw);
            marshaller.setMapping(map);
      marshaller.setEncoding(encoding);
      DigitalAssetBytesHandler.setMaxSize(-1);

      infoGlueExportImpl.getRootContent().addAll(contents);
      infoGlueExportImpl.getRootSiteNode().addAll(siteNodes);
     
      infoGlueExportImpl.setContentTypeDefinitions(new ArrayList());
      infoGlueExportImpl.setCategories(new ArrayList());
     
      infoGlueExportImpl.setRepositoryProperties(allRepositoryProperties);
      infoGlueExportImpl.setContentProperties(allContentProperties);
      infoGlueExportImpl.setSiteNodeProperties(allSiteNodeProperties);
      infoGlueExportImpl.setAccessRights(allAccessRights);
     
      marshaller.marshal(infoGlueExportImpl);
     
      osw.flush();
      osw.close();
View Full Code Here

Examples of org.infoglue.cms.entities.management.impl.simple.InfoGlueExportImpl

    Unmarshaller unmarshaller = new Unmarshaller(map);
    unmarshaller.setWhitespacePreserve(true);
    unmarshaller.setValidation(false);
   
    InfoGlueExportImpl infoGlueExportImplRead = (InfoGlueExportImpl)unmarshaller.unmarshal(reader);

    //if(mergeExistingRepositories && !isCopyAction)
    //  mergeCopyRepository(db, infoGlueExportImplRead, version, onlyLatestVersions, isCopyAction, contentIdMap, siteNodeIdMap, allContentIds, replaceMap, mergeExistingRepositories);
    //else
      copyRepository(db, infoGlueExportImplRead, version, onlyLatestVersions, isCopyAction, contentIdMap, siteNodeIdMap, allContentIds, replaceMap);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.