Interface ISchemaManager
Interface of the manager of schema.
Inherited Members
Namespace: Terrasoft.Core
Assembly: Terrasoft.Core.dll
Syntax
public interface ISchemaManager : IManager
Properties
AppConnection
System connection.
Declaration
AppConnection AppConnection { get; }
Property Value
Type | Description |
---|---|
AppConnection |
CompileDependencies
List of dependent managers.
Declaration
IEnumerable<string> CompileDependencies { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> |
ItemCaption
Caption of manager item.
Declaration
string ItemCaption { get; }
Property Value
Type | Description |
---|---|
System.String |
ItemName
Name of manager item.
Declaration
string ItemName { get; }
Property Value
Type | Description |
---|---|
System.String |
ResourceManagerName
Name of resource manager.
Declaration
string ResourceManagerName { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
ActualizeItemDescriptor(ISchemaManagerItem)
Актуализирует дескриптор элемента менеджера схем.
Declaration
void ActualizeItemDescriptor(ISchemaManagerItem item)
Parameters
Type | Name | Description |
---|---|---|
ISchemaManagerItem | item | Элемент менеджера, в котором необходимо актуализировать дескриптор. |
AddSchema(Guid, String, LocalizableString, LocalizableString, Guid)
Adds schema with specified parameters to schema manager.
Declaration
ISchemaManagerItem AddSchema(Guid uid, string name, LocalizableString caption, LocalizableString description, Guid parentUId)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | uid | Unique identifier of schema. |
System.String | name | Name of schema. |
LocalizableString | caption | Caption of schema. |
LocalizableString | description | Description of schema. |
System.Guid | parentUId | Parent schema's identifier. |
Returns
Type | Description |
---|---|
ISchemaManagerItem | Item of manager that is contains adding schema with specified parameters. |
CheckUserPropertyRights(UserConnection)
Check access for SysSchemaUserProperty operations.
Declaration
void CheckUserPropertyRights(UserConnection userConnection)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | userConnection | User connection. |
CreateDesignSchema(UserConnection, Guid, Guid, Boolean)
Creates new schema with specified parent schema parentSchemaUId
and in
specified package packageUId
.
Declaration
ISchemaManagerItem CreateDesignSchema(UserConnection userConnection, Guid parentSchemaUId, Guid packageUId, bool extendParent)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | userConnection | User connection. |
System.Guid | parentSchemaUId | Parent schema's UId. |
System.Guid | packageUId | Package UId where schema is created. |
System.Boolean | extendParent | Flag that indicates if created schema will be extended or inherited from parent. |
Returns
Type | Description |
---|---|
ISchemaManagerItem | Item of manager with created schema. |
CreateSchema(String, ISchemaManagerItem, UserConnection, Boolean)
Creates new schema with specified name and parent schema with flag of creating schema from metadata.
Declaration
ISchemaManagerItem CreateSchema(string name, ISchemaManagerItem baseSchema, UserConnection userConnection, bool fromMetaData)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Name of schema. |
ISchemaManagerItem | baseSchema | Item with parent schema. |
UserConnection | userConnection | User connection. |
System.Boolean | fromMetaData | Flag of creating schema from metadata. |
Returns
Type | Description |
---|---|
ISchemaManagerItem | Item of manager with created schema. |
Remarks
Overriden method.
CreateSchema(String, ISchemaManagerItem, UserConnection, Guid, Boolean)
Creates new schema with specified name, parent schema and flag of adding schema to list of editing items.
Declaration
ISchemaManagerItem CreateSchema(string name, ISchemaManagerItem baseSchema, UserConnection userConnection, Guid uid, bool addToDesignItems)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Name of schema. |
ISchemaManagerItem | baseSchema | Item with parent schema. |
UserConnection | userConnection | User connection. |
System.Guid | uid | Identifier of schema. |
System.Boolean | addToDesignItems | Признак добавления схемы к списку редактируемых элементов. |
Returns
Type | Description |
---|---|
ISchemaManagerItem | Элемент менеджера, содержащий созданную схему. |
Remarks
Метод перегружен.
DesignItem(UserConnection, Guid)
Declaration
ISchemaManagerItem DesignItem(UserConnection userConnection, Guid uid)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | userConnection | |
System.Guid | uid |
Returns
Type | Description |
---|---|
ISchemaManagerItem |
DesignItemInCustomPackage(UserConnection, Guid)
Declaration
ISchemaManagerItem DesignItemInCustomPackage(UserConnection userConnection, Guid uid)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | userConnection | |
System.Guid | uid |
Returns
Type | Description |
---|---|
ISchemaManagerItem |
DesignSchema(UserConnection, Guid)
Declaration
ISchemaManagerItem DesignSchema(UserConnection userConnection, Guid realUId)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | userConnection | |
System.Guid | realUId |
Returns
Type | Description |
---|---|
ISchemaManagerItem |
FillSourceCollection(Collection<ISchemaManagerItem>, Guid)
Загружает в переданную коллекцию исходные коды заданной схемы.
Declaration
void FillSourceCollection(Collection<ISchemaManagerItem> compileCollection, Guid uid)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.ObjectModel.Collection<ISchemaManagerItem> | compileCollection | Коллекция, в которую загружаются исходные коды схемы. |
System.Guid | uid | Идентификатор схемы, исходные коды которой загружаются. |
FindDesignItem(UserConnection, Guid)
Осуществляет поиск редактируемого элемента менеджера с заданным идентификатором.
Declaration
ISchemaManagerItem FindDesignItem(UserConnection userConnection, Guid uid)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | userConnection | Пользовательское подключение. |
System.Guid | uid | Идентификатор искомого элемента. |
Returns
Type | Description |
---|---|
ISchemaManagerItem | Редактируемый элемент с идентификатором |
GenerateItemUniqueCaption(String)
Генерирует уникальный заголовок элемента менеджера с использованием заданного префикса.
Declaration
string GenerateItemUniqueCaption(string prefix)
Parameters
Type | Name | Description |
---|---|---|
System.String | prefix | Префикс. |
Returns
Type | Description |
---|---|
System.String | Уникальный заголовок элемента менеджера с префиксом |
GenerateItemUniqueName(String)
Генерирует уникальное имя элемента менеджера с использованием заданного префикса.
Declaration
string GenerateItemUniqueName(string prefix)
Parameters
Type | Name | Description |
---|---|---|
System.String | prefix | Префикс. |
Returns
Type | Description |
---|---|
System.String | Уникальное имя элемента менеджера с префиксом |
GenerateSchemaSources(Guid, ISchemaManagerItem, UserConnection)
Declaration
void GenerateSchemaSources(Guid sysSchemaId, ISchemaManagerItem schemaManagerItem, UserConnection userConnection)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | sysSchemaId | |
ISchemaManagerItem | schemaManagerItem | |
UserConnection | userConnection |
GetDefSchemaUId()
Возвращает идентификатор схемы, от которой наследуются все базовые схемы менеджера схем.
Declaration
Guid GetDefSchemaUId()
Returns
Type | Description |
---|---|
System.Guid | Идентификатор схемы, от которой наследуются все базовые схемы менеджера схем. |
GetDesignItem(UserConnection, Guid)
Возвращает редактируемый элемент с заданным идентификатором. Если такой элемент не найден, генерируется исключение.
Declaration
ISchemaManagerItem GetDesignItem(UserConnection userConnection, Guid uid)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | userConnection | Пользовательское подключение. |
System.Guid | uid | Идентификатор возвращаемого элемента. |
Returns
Type | Description |
---|---|
ISchemaManagerItem | Редактируемый элемента с идентификатором |
GetHash()
Returns the hash for this item.
Declaration
string GetHash()
Returns
Type | Description |
---|---|
System.String |
GetItemFromMetaData(Guid, Guid, UserConnection)
Declaration
ISchemaManagerItem GetItemFromMetaData(Guid sysSchemaUId, Guid sysPackageUId, UserConnection userConnection)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | sysSchemaUId | |
System.Guid | sysPackageUId | |
UserConnection | userConnection |
Returns
Type | Description |
---|---|
ISchemaManagerItem |
GetItemFromMetaData(Guid, UserConnection)
Declaration
ISchemaManagerItem GetItemFromMetaData(Guid sysSchemaUId, UserConnection userConnection)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | sysSchemaUId | |
UserConnection | userConnection |
Returns
Type | Description |
---|---|
ISchemaManagerItem |
GetItemIdByUId(Guid)
Declaration
Guid GetItemIdByUId(Guid itemUId)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | itemUId |
Returns
Type | Description |
---|---|
System.Guid |
GetProcessSchemaGenerator(UserConnection)
Возвращает генератор исходных кодов схем процессов.
Declaration
ProcessSchemaGenerator GetProcessSchemaGenerator(UserConnection userConnection)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | userConnection | Пользовательское подключение. |
Returns
Type | Description |
---|---|
ProcessSchemaGenerator | Генератор схем процессов. |
GetReadableSchemaMetaData(Guid, UserConnection)
Получает метаданные схемы с заданным идентификатором в формате, удобном для чтения.
Declaration
Stream GetReadableSchemaMetaData(Guid schemaId, UserConnection userConnection)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | schemaId | Идентификатор схемы, метаданные которой нужно получить. |
UserConnection | userConnection | Пользовательское подключение. |
Returns
Type | Description |
---|---|
System.IO.Stream | Поток, содержащий метаданные схемы с идентификатором |
GetReadableSchemaMetaData(MetaSchema, UserConnection)
Получает метаданные заданной схемы в формате, удобном для чтения.
Declaration
Stream GetReadableSchemaMetaData(MetaSchema schema, UserConnection userConnection)
Parameters
Type | Name | Description |
---|---|---|
MetaSchema | schema | Схема, метаданные которой нужно получить. |
UserConnection | userConnection | Пользовательское подключение. |
Returns
Type | Description |
---|---|
System.IO.Stream | Поток, содержащий метаданные схемы |
GetReadableSchemaMetaData(MetaSchema, UserConnection, Boolean)
Gets the metadata of the specified schema in a format that is easy to read.
Declaration
Stream GetReadableSchemaMetaData(MetaSchema schema, UserConnection userConnection, bool toLowerCamelCase)
Parameters
Type | Name | Description |
---|---|---|
MetaSchema | schema | The schema whose metadata is to be retrieved. |
UserConnection | userConnection | User connection. |
System.Boolean | toLowerCamelCase | A characteristic of the generation of property names in the style of LowerCamelCase. |
Returns
Type | Description |
---|---|
System.IO.Stream | A thread containing schema metadata |
GetReadableSchemaMetaDataText(Guid, UserConnection)
Gets metadata string with target identifier in a format that is easy to read.
Declaration
string GetReadableSchemaMetaDataText(Guid schemaUId, UserConnection userConnection)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | schemaUId | Identifier of schema. |
UserConnection | userConnection | User connection. |
Returns
Type | Description |
---|---|
System.String | Schema metadata with target identifier |
GetReadableSchemaMetaDataText(MetaSchema, UserConnection, Boolean, Boolean)
Gets the metadata text of the specified schema in a format that is easy to read.
Declaration
string GetReadableSchemaMetaDataText(MetaSchema schema, UserConnection userConnection, bool toLowerCamelCase, bool formatJson)
Parameters
Type | Name | Description |
---|---|---|
MetaSchema | schema | The schema whose metadata is to be retrieved. |
UserConnection | userConnection | User connection. |
System.Boolean | toLowerCamelCase | A characteristic of the generation of property names in the style of LowerCamelCase. |
System.Boolean | formatJson | A characteristic of the generation of property names in the style of indent formatted json. |
Returns
Type | Description |
---|---|
System.String | A thread containing schema metadata |
GetSchemaMetaData(Guid, UserConnection)
Получает метаданные схемы с заданным идентификатором.
Declaration
Stream GetSchemaMetaData(Guid schemaUId, UserConnection userConnection)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | schemaUId | Идентификатор схемы. |
UserConnection | userConnection | Пользовательское подключение. |
Returns
Type | Description |
---|---|
System.IO.Stream | Поток, содержащий метаданные схемы с идентификатором |
GetSchemaMetaDataText(Guid, UserConnection)
Gets metadata string with target identifier.
Declaration
string GetSchemaMetaDataText(Guid schemaUId, UserConnection userConnection)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | schemaUId | Identifier of schema. |
UserConnection | userConnection | Users connection. |
Returns
Type | Description |
---|---|
System.String | Metadata string of schema with target id |
GetSchemaSources(Guid, Guid, UserConnection, out String)
Получение исходных кодов схемы с заданным идентификатором.
Declaration
EntityCollection GetSchemaSources(Guid uid, Guid schemaInSolutionUId, UserConnection userConnection, out string errorMessage)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | uid | Идентификатор схемы, исходные коды которой нужно получить. |
System.Guid | schemaInSolutionUId | Идентификатор записи в таблице SysSchemaInSolution. |
UserConnection | userConnection | Пользовательское подключение. |
System.String | errorMessage | Сообщение об ошибке при получении исходных кодов схемы. |
Returns
Type | Description |
---|---|
EntityCollection | Коллекция объектов с исходными кодами схемы с идентификатором |
Initialize(SchemaManagerProvider, SchemaManagerProviderConfigurationElement)
Creates the manager of schema, using specified provider and information from configuration file.
Declaration
void Initialize(SchemaManagerProvider provider, SchemaManagerProviderConfigurationElement configuration)
Parameters
Type | Name | Description |
---|---|---|
SchemaManagerProvider | provider | Provider of schema manager. |
SchemaManagerProviderConfigurationElement | configuration | Information from configuration file. |
InitializeItem(Guid)
Выполняет инициализацию элемента менеджера с заданным идентификатором.
Declaration
bool InitializeItem(Guid itemUId)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | itemUId | Идентификатор элемента менеджера, который нужно проинициализировать. |
Returns
Type | Description |
---|---|
System.Boolean |
|
InitializeSchema(ISchemaManagerItem, Assembly)
Создает экземпляр схемы по типу, указанному в переданном элементе менеджера. Если тип схемы элемента менеджера не найден в сборке, генерируется исключение.
Declaration
IManagerItemInstance InitializeSchema(ISchemaManagerItem schemaManagerItem, Assembly assembly)
Parameters
Type | Name | Description |
---|---|---|
ISchemaManagerItem | schemaManagerItem | Элемент менеджера, в котором должна быть проинициализирована схема. |
System.Reflection.Assembly | assembly | Сборка, которая содержит тип создаваемой схемы. |
Returns
Type | Description |
---|---|
IManagerItemInstance | Пронициализированный экземпляр схемы. |
IsInheritedFrom(Guid, Guid)
Returns flag that indicates if schema is inherited from specified parent schema.
Declaration
bool IsInheritedFrom(Guid schemaUId, Guid parentUId)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | schemaUId | Schema identifier. |
System.Guid | parentUId | Parent schema identifier. |
Returns
Type | Description |
---|---|
System.Boolean |
MoveSchema(Guid, Guid)
Declaration
void MoveSchema(Guid schemaUId, Guid targetPackageUId)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | schemaUId | |
System.Guid | targetPackageUId |
MoveSchemas(IEnumerable<Guid>, Guid)
Declaration
void MoveSchemas(IEnumerable<Guid> schemaUIds, Guid targetPackageUId)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.Guid> | schemaUIds | |
System.Guid | targetPackageUId |
RefreshItems()
Declaration
void RefreshItems()
RemoveItemByName(Guid, String, UserConnection)
Declaration
void RemoveItemByName(Guid packageUId, string name, UserConnection userConnection)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | packageUId | |
System.String | name | |
UserConnection | userConnection |
RemoveItemByUId(Guid, UserConnection)
Removes item with specified identifier from current manager of schemas.
Declaration
void RemoveItemByUId(Guid uid, UserConnection userConnection)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | uid | Identifier of removing item. |
UserConnection | userConnection | User connection. |
RemoveSchema(Guid, UserConnection)
Removes schema with specified id from manager.
Declaration
Guid RemoveSchema(Guid schemaId, UserConnection userConnection)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | schemaId | Identifier of schema. |
UserConnection | userConnection | User connection. |
Returns
Type | Description |
---|---|
System.Guid | Identifier of record in SysSchemaInSolution for deleting schema. |
SaveDesignedItemFolderIdInSessionData(UserConnection, Guid, Guid)
Сохраняет в данные сессии переданный идентификатор каталога, в котором хранится редактируемая схема элемента с заданным идентификатором.
Declaration
void SaveDesignedItemFolderIdInSessionData(UserConnection userConnection, Guid designedItemId, Guid designedItemFolderId)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | userConnection | Пользовательское подключение. |
System.Guid | designedItemId | Идентификатор редактируемого элемента. |
System.Guid | designedItemFolderId | Идентификатор каталога, котором хранится редактируемая схема элемента с
идентификатором |
SaveDesignedItemIdInSessionData(UserConnection, Guid, Guid)
Declaration
void SaveDesignedItemIdInSessionData(UserConnection userConnection, Guid uid, Guid designedItemId)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | userConnection | |
System.Guid | uid | |
System.Guid | designedItemId |
SaveDesignedItemInSessionData(UserConnection, MetaSchema, Guid)
Сериализует и сохраняет в данные сессии экземпляр редактируемого элемента с заданным идентификатором.
Declaration
void SaveDesignedItemInSessionData(UserConnection userConnection, MetaSchema designedItem, Guid designedItemId)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | userConnection | Пользовательское подключение. |
MetaSchema | designedItem | Редактируемый элемент менеджера. |
System.Guid | designedItemId | Идентификатор сохраняемого редактируемого элемента. |
SaveDesignedItemPackageUIdInSessionData(UserConnection, Guid, Guid)
Declaration
void SaveDesignedItemPackageUIdInSessionData(UserConnection userConnection, Guid uid, Guid packageId)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | userConnection | |
System.Guid | uid | |
System.Guid | packageId |
SaveSchemaMetaData(ISchemaManagerItem, Guid, UserConnection)
Declaration
void SaveSchemaMetaData(ISchemaManagerItem schemaManagerItem, Guid schemaId, UserConnection userConnection)
Parameters
Type | Name | Description |
---|---|---|
ISchemaManagerItem | schemaManagerItem | |
System.Guid | schemaId | |
UserConnection | userConnection |
SaveSchemaPackageDifference(UserConnection, PackageElementInfo, String)
Save package difference for package element.
Declaration
void SaveSchemaPackageDifference(UserConnection userConnection, PackageElementInfo schemaInfo, string packageDifferenceValue)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | userConnection | Instance of UserConnection. |
PackageElementInfo | schemaInfo | Instance of PackageElementInfo. |
System.String | packageDifferenceValue | Value of difference. |
SaveSchemaSources(EntityCollection)
Сохраняет исходные коды из переданной коллекции.
Declaration
bool SaveSchemaSources(EntityCollection sources)
Parameters
Type | Name | Description |
---|---|---|
EntityCollection | sources | Коллекция исходных кодов, которые нужно сохранить. |
Returns
Type | Description |
---|---|
System.Boolean |
|
SetProvider(SchemaManagerProvider)
Declaration
void SetProvider(SchemaManagerProvider schemaManagerProvider)
Parameters
Type | Name | Description |
---|---|---|
SchemaManagerProvider | schemaManagerProvider |
TryGenerateSchemaSources(Guid, ISchemaManagerItem, UserConnection)
Declaration
bool TryGenerateSchemaSources(Guid sysSchemaId, ISchemaManagerItem schemaManagerItem, UserConnection userConnection)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | sysSchemaId | |
ISchemaManagerItem | schemaManagerItem | |
UserConnection | userConnection |
Returns
Type | Description |
---|---|
System.Boolean |
Events
Changed
Declaration
event EventHandler Changed
Event Type
Type | Description |
---|---|
System.EventHandler |
ItemAdded
Occurs after adding the item to manager.
Declaration
event EventHandler<SchemaManagerItemAfterAddEventArgs> ItemAdded
Event Type
Type | Description |
---|---|
System.EventHandler<SchemaManagerItemAfterAddEventArgs> |
ItemAdding
Occurs before adding the item to manager.
Declaration
event EventHandler<SchemaManagerItemBeforeAddEventArgs> ItemAdding
Event Type
Type | Description |
---|---|
System.EventHandler<SchemaManagerItemBeforeAddEventArgs> |
ItemRemoved
Occurs after removing the item from manager.
Declaration
event EventHandler<SchemaManagerItemAfterRemoveEventArgs> ItemRemoved
Event Type
Type | Description |
---|---|
System.EventHandler<SchemaManagerItemAfterRemoveEventArgs> |
ItemRemoving
Occurs before removing the item from manager.
Declaration
event EventHandler<SchemaManagerItemBeforeRemoveEventArgs> ItemRemoving
Event Type
Type | Description |
---|---|
System.EventHandler<SchemaManagerItemBeforeRemoveEventArgs> |
ItemSaved
Occurs after saving the item.
Declaration
event EventHandler<SchemaManagerItemAfterSaveEventArgs> ItemSaved
Event Type
Type | Description |
---|---|
System.EventHandler<SchemaManagerItemAfterSaveEventArgs> |
ItemSaving
Occurs before saving the item.
Declaration
event EventHandler<SchemaManagerItemBeforeSaveEventArgs> ItemSaving
Event Type
Type | Description |
---|---|
System.EventHandler<SchemaManagerItemBeforeSaveEventArgs> |