Class SchemeFilePersistence
OptimaJet.Workflow.Core.Persistence.SchemeFilePersistence
Stores and retrieves unparsed source schemes, Scheme Inlining relationships, and scheme tags in the file system.
Namespace: OptimaJet.Workflow.Core.Persistence
public class SchemeFilePersistenceConstructors
public SchemeFilePersistence(string storePath, WorkflowRuntime runtime) #Creates a file-system scheme store backed by the specified directory.
Parameters
Name
Type
Description
storePathStringThe directory that contains source scheme XML files and scheme settings.
Methods
public void AddSchemeTags(string schemeCode, IEnumerable<string> tags) #Adds tags to the source scheme identified by
schemeCode.Parameters
Name
Type
Description
schemeCodeStringThe code of the source scheme to update.
tagsIEnumerable<String>The scheme tags to add.
Exceptions
Type
Description
SchemeNotFoundExceptionThrown when no source scheme with
schemeCode exists.public List<string> GetInlinedSchemeCodes() #Gets the codes of schemes available for use as inlinable schemes.
Returns
Type
Description
List<String>The inlinable scheme codes.
public XElement GetScheme(string code) #Gets the unparsed source scheme identified by a scheme code.
Parameters
Name
Type
Description
codeStringThe code of the source scheme to retrieve.
Returns
Type
Description
XElementThe XElement that contains the unparsed source scheme.
Exceptions
Type
Description
SchemeNotFoundExceptionThrown when no source scheme with
code exists.public void RemoveSchemeTags(string schemeCode, IEnumerable<string> tags) #Removes tags from the source scheme identified by
schemeCode.Parameters
Name
Type
Description
schemeCodeStringThe code of the source scheme to update.
tagsIEnumerable<String>The scheme tags to remove.
Exceptions
Type
Description
SchemeNotFoundExceptionThrown when no source scheme with
schemeCode exists.public void SaveScheme(string schemeCode, bool canBeInlined, List<string> inlinedSchemes, string scheme, List<string> tags) #Saves an unparsed source scheme together with its Scheme Inlining relationships and tags.
Parameters
Name
Type
Description
schemeCodeStringThe code under which the source scheme is stored.
inlinedSchemesList<String>The codes of the inlinable schemes referenced by this scheme.
schemeStringThe serialized unparsed source scheme.
tagsList<String>The scheme tags to store.
public List<string> SearchSchemesByTags(IEnumerable<string> tags) #Gets the codes of schemes that match at least one specified tag.
Parameters
Name
Type
Description
tagsIEnumerable<String>The scheme tags to match.
Returns
Type
Description
List<String>The codes of schemes that match at least one tag in
tags.Exceptions
Type
Description
ArgumentExceptionThrown when
tags is null or empty.public void SetSchemeTags(string schemeCode, IEnumerable<string> tags) #Replaces all tags on the source scheme identified by
schemeCode.Parameters
Name
Type
Description
schemeCodeStringThe code of the source scheme to update.
tagsIEnumerable<String>The replacement scheme tags; an empty collection removes all tags.
Exceptions
Type
Description
SchemeNotFoundExceptionThrown when no source scheme with
schemeCode exists.public List<string> GetSchemeCodes() #Gets the codes of all source schemes in the store directory.
Returns
Type
Description
List<String>The scheme codes derived from the source scheme XML file names.
public void DeleteScheme(string schemeCode) #Deletes a source scheme and its associated settings from the store.
Parameters
Name
Type
Description
schemeCodeStringThe code of the source scheme to delete.
Exceptions
Type
Description
SchemeNotFoundExceptionThrown when no source scheme with
schemeCode exists.