예제 #1
0
        protected static ImportPackageInfo GetPackageInfo(string manifestPath)
        {
            ImportPackageInfo packageInfo = null;

            Util.ReadJson(manifestPath, ref packageInfo);
            return(packageInfo);
        }
예제 #2
0
        protected static ExportFileInfo GetExportFileInfo(string manifestPath)
        {
            ImportPackageInfo packageInfo = null;

            Util.ReadJson(manifestPath, ref packageInfo);
            return(packageInfo?.Summary.ExportFileInfo);
        }
예제 #3
0
        /// <summary>Creates a package manifest.</summary>
        /// <param name="exportJob">The export job.</param>
        /// <param name="exportFileInfo">The export file info.</param>
        /// <param name="summary">The summary.</param>
        public void CreatePackageManifest(ExportImportJob exportJob, ExportFileInfo exportFileInfo, ImportExportSummary summary)
        {
            var filePath    = Path.Combine(ExportFolder, exportJob.Directory, Constants.ExportManifestName);
            var portal      = PortalController.Instance.GetPortal(exportJob.PortalId);
            var packageInfo = new ImportPackageInfo
            {
                Summary     = summary,
                PackageId   = exportJob.Directory,
                Name        = exportJob.Name,
                Description = exportJob.Description,
                ExporTime   = exportJob.CreatedOnDate,
                PortalName  = portal?.PortalName,
            };

            Util.WriteJson(filePath, packageInfo);
        }