"password": "Dn8t4gfHcK98o8hyPgLDhr5SgSji4JCxsfpMJsODikUp3nXgrM0UNCi45lLAK8ZOnmEneO44P9qpJ4QDqhctN6MxZodjJgdZTyoZKmSa+ECzEzLr/wPYNgxVaXrVotEy",\r
"timeout": 1000\r
},\r
- "projectRoot": {\r
- "address": "file://10.10.1.100/BRAAVOS/OCTOPUS",\r
- "userName": "mediacube",\r
- "password": "Dn8t4gfHcK98o8hyPgLDhr5SgSji4JCxsfpMJsODikUp3nXgrM0UNCi45lLAK8ZOnmEneO44P9qpJ4QDqhctN6MxZodjJgdZTyoZKmSa+ECzEzLr/wPYNgxVaXrVotEy",\r
- "timeout": 1000\r
- },\r
"templateName": "ALAPTIMELINE.ezp",\r
- "projectName": "%ID%-%TEXT%",\r
- "projectFormat": "%IDROOT%-%TEXT%/PROJECT",\r
+ "target": {\r
+ "label": "Projekt létrehozása",\r
+ "processor": "UNCTargetProcessor",\r
+ "outputFormat": "%ID%-%TEXT%",\r
+ "subFolderFormat": "%IDROOT%-%TEXT%/PROJECT",\r
+ "disableFileVersioning": true,\r
+ "remote": {\r
+ "address": "file://10.10.1.100/BRAAVOS/.MAESTRO",\r
+ "userName": "mediacube",\r
+ "password": "Dn8t4gfHcK98o8hyPgLDhr5SgSji4JCxsfpMJsODikUp3nXgrM0UNCi45lLAK8ZOnmEneO44P9qpJ4QDqhctN6MxZodjJgdZTyoZKmSa+ECzEzLr/wPYNgxVaXrVotEy",\r
+ "timeout": 1000\r
+ }\r
+ },\r
"disableProject": false,\r
"disableSourceOpen": false\r
}\r
break;\r
}\r
TargetProcessorParameter processorParameter = CreateProcessorParameter(target, sourceItem);\r
- ITargetProcessor processor = CreateProcessor(target, processorParameter);\r
+ ITargetProcessor processor = TargetProcessor.Create(target.Processor);\r
+ processor.Initialize(this, processorParameter);\r
if (result == null)\r
result = new List<ITargetProcessor>();\r
result.Add(processor);\r
return true;\r
}\r
\r
- private ITargetProcessor CreateProcessor(Target target, TargetProcessorParameter processorParameter) {\r
- string typeName = string.Format("{0}.{1}", typeof(ITargetProcessor).Namespace, target.Processor);\r
- Type type = typeof(ITargetProcessor).Assembly.GetType(typeName);\r
- ITargetProcessor result = Activator.CreateInstance(type) as ITargetProcessor;\r
- result.Initialize(this, processorParameter);\r
- return result;\r
- }\r
-\r
private TargetProcessorParameter CreateProcessorParameter(Target target, ISourceItem sourceItem) {\r
return new TargetProcessorParameter() {\r
MediaCubeApi = mediaCubeApi,\r
\r
public class ProjectSettings {\r
public Connection TemplateRoot { get; set; }\r
- public Connection ProjectRoot { get; set; }\r
+ public Target Target { get; set; }\r
public string TemplateName { get; set; }\r
- public string ProjectName { get; set; }\r
- public string ProjectFormat { get; set; }\r
public bool DisableProject { get; set; }\r
public bool DisableSourceOpen { get; set; }\r
public bool IsValid {\r
get {\r
- return TemplateRoot != null && TemplateRoot.Address != null &&\r
- ProjectRoot != null && ProjectRoot.Address != null &&\r
- !String.IsNullOrEmpty(TemplateName) &&\r
- !String.IsNullOrEmpty(ProjectName) &&\r
- !String.IsNullOrEmpty(ProjectFormat);\r
+ return Target?.Remote?.Address != null &&\r
+ TemplateRoot?.Address != null &&\r
+ !String.IsNullOrEmpty(TemplateName);\r
}\r
}\r
}\r
\r
public event PropertyChangedEventHandler PropertyChanged;\r
\r
+ public static ITargetProcessor Create(string processorName) {\r
+ string typeName = string.Format("{0}.{1}", typeof(ITargetProcessor).Namespace, processorName);\r
+ Type type = typeof(ITargetProcessor).Assembly.GetType(typeName);\r
+ return Activator.CreateInstance(type) as ITargetProcessor;\r
+ }\r
+\r
public virtual void Initialize(Control parent, TargetProcessorParameter parameters) {\r
this.parent = parent;\r
this.Parameters = parameters;\r
Local = projectConfiguration.TemplateRoot,\r
Remote = projectConfiguration.TemplateRoot\r
},\r
- TargetConfig = new Target() {\r
- Remote = projectConfiguration.ProjectRoot,\r
- OutputFormat = projectConfiguration.ProjectName,\r
- SubFolderFormat = projectConfiguration.ProjectFormat,\r
- DisableFileVersioning = true,\r
- DisableOverride = true\r
- },\r
+ TargetConfig = projectConfiguration.Target,\r
ID = node.Name,\r
MetadataText = String.IsNullOrEmpty(story.Format) ? story.Name : String.Format($"{story.Name}_{story.Format}"),\r
InputFileName = projectConfiguration.TemplateName,\r
UserName = parameters.UserName,\r
};\r
\r
- ITargetProcessor processor = new UNCTargetProcessor();\r
+ ITargetProcessor processor = TargetProcessor.Create(projectConfiguration.Target.Processor);\r
processor.Initialize(null, processorParameter);\r
processor.Execute();\r
\r