16 using System.Collections.Generic;
18 using erminas.SmartAPI.CMS.Project.Workflows;
20 namespace erminas.SmartAPI.CMS.Project.ContentClasses.Elements
24 private readonly WorkflowAssignments _workflowAssignments;
26 protected AbstractWorkflowAssignments(
IContentClass contentClass, XmlElement xmlElement)
27 : base(contentClass, xmlElement)
29 _workflowAssignments =
new WorkflowAssignments(
this);
32 public void CreateAndConnectContentWorkflow(
string workflowName, params
string[] languageVariants)
34 _workflowAssignments.CreateAndConnectContentWorkflow(workflowName, languageVariants);
37 public void CreateAndConnectContentWorkflow(
string workflowName, IEnumerable<ILanguageVariant> languageVariants)
39 _workflowAssignments.CreateAndConnectContentWorkflow(workflowName, languageVariants);
42 public void CreateAndConnectStructuralworkflow(
string workflowName)
44 _workflowAssignments.CreateAndConnectStructuralworkflow(workflowName);
47 public void DisconnectAllWorkflows()
49 _workflowAssignments.DisconnectAllWorkflows();
54 return _workflowAssignments.GetContentWorkflowFor(languageVariantId);
59 return _workflowAssignments.GetContentWorkflowFor(languageVariant);
64 return _workflowAssignments.GetContentWorkflowForCurrentLanguageVariant();
67 public void InvalidateCache()
69 _workflowAssignments.InvalidateCache();
72 public override void Refresh()
78 public void SetContentWorkflow(
IWorkflow workflow, IEnumerable<ILanguageVariant> languageVariants)
80 _workflowAssignments.SetContentWorkflow(workflow, languageVariants);
83 public void SetContentWorkflow(
IWorkflow workflow, params
string[] languageVariantIds)
85 _workflowAssignments.SetContentWorkflow(workflow, languageVariantIds);
90 get {
return _workflowAssignments.StructuralWorkflow; }
91 set { _workflowAssignments.StructuralWorkflow = value; }