Class ProcessSchemaManager
The schema manager, that works with ProcessSchema items.
Inheritance
Implements
Inherited Members
Namespace: Terrasoft.Core.Process
Assembly: Terrasoft.Core.dll
Syntax
public class ProcessSchemaManager : BaseProcessSchemaManager<ProcessSchema>, IManager<ISchemaManagerItem<ProcessSchema>, ProcessSchema>, ISourceCodeSchemaManager, IBaseProcessSchemaManager, ISchemaManager, IManager
Constructors
ProcessSchemaManager()
Initializes a new instance of the ProcessSchemaManager class.
Declaration
public ProcessSchemaManager()
Properties
CanUseUserProperties
Gets a value indicating whether this instance can use user properties.
Declaration
protected override bool CanUseUserProperties { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
DefEmbeddedProcessSchema
Gets or sets the default embedded process schema.
Declaration
public EmbeddedProcessSchema DefEmbeddedProcessSchema { get; protected set; }
Property Value
Type | Description |
---|---|
EmbeddedProcessSchema | The default embedded process schema. |
ItemCaption
The caption for the schema manager item.
Declaration
public override string ItemCaption { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
ItemTypeName
Gets the name of the item type.
Declaration
protected override string ItemTypeName { get; }
Property Value
Type | Description |
---|---|
System.String | The name of the item type. |
Overrides
ResourceManagerName
The name of the resource manager.
Declaration
public override string ResourceManagerName { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
SysSchemaUserPropertyRightsOperations
Declaration
protected override string[] SysSchemaUserPropertyRightsOperations { get; }
Property Value
Type | Description |
---|---|
System.String[] |
Overrides
Methods
ActualizeSchemaMetaData(EntityCollection)
Actualizes the schema meta data.
Declaration
protected override Stream ActualizeSchemaMetaData(EntityCollection schemas)
Parameters
Type | Name | Description |
---|---|---|
EntityCollection | schemas | The schemas. |
Returns
Type | Description |
---|---|
System.IO.Stream | The actualized metadata. |
Overrides
AddEventHandler(ProcessSchema, String)
Adds the event handler for the given event in the given process schema. Event never be throw to the base element.
Declaration
public void AddEventHandler(ProcessSchema processSchema, string eventName)
Parameters
Type | Name | Description |
---|---|---|
ProcessSchema | processSchema | The process schema. |
System.String | eventName | Name of the event. |
AddEventHandler(ProcessSchema, String, Boolean)
Adds the event handler for the given event in the given process schema.
Declaration
public void AddEventHandler(ProcessSchema processSchema, string eventName, bool isOverride)
Parameters
Type | Name | Description |
---|---|---|
ProcessSchema | processSchema | The process schema. |
System.String | eventName | Name of the event. |
System.Boolean | isOverride |
|
BuildDefEventHandlerSchemaProperties(ProcessSchema, DesignModeEventDescriptor)
Prepares the default event handler schema properties.
Declaration
public void BuildDefEventHandlerSchemaProperties(ProcessSchema processSchema, DesignModeEventDescriptor eventDescriptor)
Parameters
Type | Name | Description |
---|---|---|
ProcessSchema | processSchema | The process schema. |
DesignModeEventDescriptor | eventDescriptor | The event descriptor. |
CheckOperationUserRights(UserConnection)
Checks whether the current user can modify the manager elements.
Declaration
protected override bool CheckOperationUserRights(UserConnection userConnection)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | userConnection | The user connection. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Overrides
Exceptions
Type | Condition |
---|---|
System.Security.SecurityException | The user doesn't have right to modify the process schema manager elements. |
ConvertPolylinePointPositions(ProcessSchema)
Performs convert for the process flow elements coordinates.
Declaration
public void ConvertPolylinePointPositions(ProcessSchema designedItem)
Parameters
Type | Name | Description |
---|---|---|
ProcessSchema | designedItem | The process schema. |
ConvertProcessSchema(ProcessSchema)
Converts the old format process schema item to the new format.
Declaration
public void ConvertProcessSchema(ProcessSchema designedItem)
Parameters
Type | Name | Description |
---|---|---|
ProcessSchema | designedItem | The process schema. |
CopyProcessSchema(UserConnection, Guid, String, String, Guid)
Copies the process schema.
Declaration
public ProcessSchema CopyProcessSchema(UserConnection userConnection, Guid sourceSchemaUId, string name, string caption, Guid packageUId)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | userConnection | The user connection. |
System.Guid | sourceSchemaUId | The unique identifier of the source schema. |
System.String | name | The name of the new schema. |
System.String | caption | The caption of the new schema. |
System.Guid | packageUId | The package identifier of the new schema. |
Returns
Type | Description |
---|---|
ProcessSchema | The new process schema instance. |
CreateDefEventHandlerSchema(ProcessBasedSchema, DesignModeEventDescriptor)
Creates the default event handler embedded process schema.
Declaration
public EmbeddedProcessSchema CreateDefEventHandlerSchema(ProcessBasedSchema ownerSchema, DesignModeEventDescriptor eventDescriptor)
Parameters
Type | Name | Description |
---|---|---|
ProcessBasedSchema | ownerSchema | The owner schema. |
DesignModeEventDescriptor | eventDescriptor | The event descriptor. |
Returns
Type | Description |
---|---|
EmbeddedProcessSchema | The embedded process schema with the default event handler. |
CreateInterpretationValidator(UserConnection)
Gets the interpretation validator for process schema.
Declaration
protected override IInterpretationValidator<ProcessSchema> CreateInterpretationValidator(UserConnection userConnection)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | userConnection | The user connection. |
Returns
Type | Description |
---|---|
IInterpretationValidator<ProcessSchema> | Interpretation validator instance. |
Overrides
CreateItem()
Creates the item.
Declaration
protected override ISchemaManagerItem<ProcessSchema> CreateItem()
Returns
Type | Description |
---|---|
ISchemaManagerItem<ProcessSchema> |
Overrides
GetCanUseFlowEngine(UserConnection, ISchemaManagerItem<ProcessSchema>)
Gets a value indicating whether the process can be executed in the interpreted environment according to the schema manager element.
Declaration
public static bool GetCanUseFlowEngine(UserConnection userConnection, ISchemaManagerItem<ProcessSchema> item)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | userConnection | The user connection. |
ISchemaManagerItem<ProcessSchema> | item | The item of the process schema manager. |
Returns
Type | Description |
---|---|
System.Boolean |
|
GetCanUseFlowEngine(UserConnection, BaseProcessSchema)
Gets a value indicating whether the process can be executed in the interpreted environment according to the given base process schema.
Declaration
public static bool GetCanUseFlowEngine(UserConnection userConnection, BaseProcessSchema schema)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | userConnection | The user connection. |
BaseProcessSchema | schema | The base process schema. |
Returns
Type | Description |
---|---|
System.Boolean |
|
GetCanUseFlowEngine(UserConnection, ProcessSchema)
Gets a value indicating whether the process can be executed in the interpreted environment according to the given process schema.
Declaration
public static bool GetCanUseFlowEngine(UserConnection userConnection, ProcessSchema processSchema)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | userConnection | The user connection. |
ProcessSchema | processSchema | The process schema. |
Returns
Type | Description |
---|---|
System.Boolean |
|
GetGenerator(UserConnection)
Returns the source code generator for the manager schemas.
Declaration
public override SchemaCodeGenerator<ProcessSchema> GetGenerator(UserConnection userConnection)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | userConnection | The user connection. |
Returns
Type | Description |
---|---|
SchemaCodeGenerator<ProcessSchema> | The source code generator. |
Overrides
GetIsProcessExistsInAssembly(ProcessSchema)
Returns flag that indicates if process compiled at least once and exists in assembly.
Declaration
public bool GetIsProcessExistsInAssembly(ProcessSchema processSchema)
Parameters
Type | Name | Description |
---|---|---|
ProcessSchema | processSchema |
Returns
Type | Description |
---|---|
System.Boolean | Flag that indicates if process compiled at least once and exists in assembly. |
GetItemsFromMetaDataByParentId(UserConnection, Guid)
Gets the items from meta data by the parent schema identifier.
Declaration
public List<ISchemaManagerItem<ProcessSchema>> GetItemsFromMetaDataByParentId(UserConnection userConnection, Guid parentSchemaId)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | userConnection | The user connection. |
System.Guid | parentSchemaId | The parent schema identifier. |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<ISchemaManagerItem<ProcessSchema>> | The manager item instance. |
GetMaxVersionByParentUId(Guid)
Gets the maximum version by parent schema unique identifier.
Declaration
public int GetMaxVersionByParentUId(Guid parentUId)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | parentUId | The parent schema unique identifier. |
Returns
Type | Description |
---|---|
System.Int32 | The version number. |
GetMaxVersionSchemaManagerItemByParentUId(Guid)
Gets the maximum version schema manager item by parent schema unique identifier.
Declaration
public ISchemaManagerItem<ProcessSchema> GetMaxVersionSchemaManagerItemByParentUId(Guid parentUId)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | parentUId | The parent schema unique identifier. |
Returns
Type | Description |
---|---|
ISchemaManagerItem<ProcessSchema> | The manager item, that has the maximum version number. |
GetProcessValidationResult(ProcessSchema, UserConnection)
Validates schema for ability to interpretation.
Declaration
public override ProcessValidationResult GetProcessValidationResult(ProcessSchema process, UserConnection userConnection)
Parameters
Type | Name | Description |
---|---|---|
ProcessSchema | process | Process schema. |
UserConnection | userConnection | User connection. |
Returns
Type | Description |
---|---|
ProcessValidationResult | Results of analyzes for ability to interpretation. |
Overrides
GetVersion(ISchemaManagerItem<ProcessSchema>)
Gets the version of the given manager item.
Declaration
public int GetVersion(ISchemaManagerItem<ProcessSchema> schemaManagerItem)
Parameters
Type | Name | Description |
---|---|---|
ISchemaManagerItem<ProcessSchema> | schemaManagerItem | The schema manager item. |
Returns
Type | Description |
---|---|
System.Int32 | The version number. |
Initialize(SchemaManagerProvider, SchemaManagerProviderConfigurationElement)
Performs manager initialization, using the specified schema manager provider and information from application configuration.
Declaration
public override void Initialize(SchemaManagerProvider provider, SchemaManagerProviderConfigurationElement configuration)
Parameters
Type | Name | Description |
---|---|---|
SchemaManagerProvider | provider | Schema manager provider. |
SchemaManagerProviderConfigurationElement | configuration | Configuration information. |
Overrides
InitializeDefSchema()
Initializes the default schema.
Declaration
protected override ProcessSchema InitializeDefSchema()
Returns
Type | Description |
---|---|
ProcessSchema | The default schema. |
Overrides
InternalCreateSchema(String, ProcessSchema, UserConnection, Guid, Boolean)
Internally creates new manager item.
Declaration
protected override ISchemaManagerItem<ProcessSchema> InternalCreateSchema(string name, ProcessSchema baseSchema, UserConnection userConnection, Guid uid, bool fromMetaData = false)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The item name. |
ProcessSchema | baseSchema | The base schema. |
UserConnection | userConnection | The user connection. |
System.Guid | uid | The unique identifier. |
System.Boolean | fromMetaData |
|
Returns
Type | Description |
---|---|
ISchemaManagerItem<ProcessSchema> | The new manager item. |
Overrides
LoadDesignedSchema(UserConnection, Guid)
Loads the designed process schema from the database.
Declaration
public ProcessSchema LoadDesignedSchema(UserConnection userConnection, Guid schemaUId)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | userConnection | The user connection. |
System.Guid | schemaUId | The schema unique identifier. |
Returns
Type | Description |
---|---|
ProcessSchema | The instance of the process schema. |
RemoveProcessRights(Guid)
Declaration
protected override void RemoveProcessRights(Guid processSchemaId)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | processSchemaId |
Overrides
Save(UserConnection, ISchemaManagerItem<ProcessSchema>, Boolean)
Saves the process schema instance of the specified item.
Declaration
public void Save(UserConnection userConnection, ISchemaManagerItem<ProcessSchema> managerItem, bool isNewSchema)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | userConnection | The user connection. |
ISchemaManagerItem<ProcessSchema> | managerItem | The manager item. |
System.Boolean | isNewSchema |
|
SaveDesignedSchema(UserConnection, ProcessSchema)
Saves the designed process schema.
Declaration
public void SaveDesignedSchema(UserConnection userConnection, ProcessSchema processSchema)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | userConnection | The user connection. |
ProcessSchema | processSchema | The process schema. |
SaveFlowSchema(ProcessSchema, UserConnection)
Saves the flow schema for the given process schema.
Declaration
protected override void SaveFlowSchema(ProcessSchema schema, UserConnection connection)
Parameters
Type | Name | Description |
---|---|---|
ProcessSchema | schema | The process schema. |
UserConnection | connection | The user connection. |