17 using System.Security;
18 using erminas.SmartAPI.CMS.ServerManagement;
19 using erminas.SmartAPI.Utils;
21 namespace erminas.SmartAPI.CMS.Project
25 bool IsIncludingAdministrationSettings {
get;
set; }
26 bool IsIncludingArchive {
get;
set; }
27 bool IsLoggingOffActiveUsersInProject {
get;
set; }
28 string TargetPath {
get;
set; }
31 internal sealed
class ProjectExportJob : AbstractAsyncProjectJob, IProjectExportJob
33 internal ProjectExportJob(IProject project,
string targetPath) : base(project)
35 TargetPath = targetPath;
36 EmailSubject = String.Format(
"Project: {0}", project.Name);
37 EmailMessage =
"Project export finished";
38 IsLoggingOffActiveUsersInProject =
true;
39 IsIncludingAdministrationSettings =
true;
40 IsIncludingArchive =
false;
43 public bool IsIncludingAdministrationSettings {
get;
set; }
44 public bool IsIncludingArchive {
get;
set; }
45 public bool IsLoggingOffActiveUsersInProject {
get;
set; }
47 public override void RunAsync()
50 @"<ADMINISTRATION><PROJECT action=""export"" projectguid=""{0}"" targetpath=""{1}"" emailnotification=""{2}""
51 editorialserver=""{3}"" includearchive=""{4}"" to=""{5}"" provider="""" subject=""{6}""
52 message=""{7}"" logoutusers=""{8}"" reddotserverguid=""{3}"" includeadmindata=""{9}"" />
54 var query = EXPORT.RQLFormat(Project, SecurityElement.Escape(TargetPath), IsSendingEmailOnCompletion, Server,
55 IsIncludingArchive, EmailReceipient, SecurityElement.Escape(EmailSubject),
56 SecurityElement.Escape(EmailMessage), IsLoggingOffActiveUsersInProject,
57 IsIncludingAdministrationSettings);
59 Session.ExecuteRQL(query, RQL.IODataFormat.LogonGuidOnly);
62 public override void RunSync(TimeSpan maxWait)
65 Session.WaitForAsyncProcess(maxWait,
69 public string TargetPath {
get;
set; }