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)
Typed interface of the item of the schema manager.
Declaration
void ActualizeItemDescriptor(ISchemaManagerItem item)
Parameters
Type | Name | Description |
---|---|---|
ISchemaManagerItem | item | Manager item in which the descriptor needs to be updated. |
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 | Indicates that the schema is added to the list of designed items. |
Returns
Type | Description |
---|---|
ISchemaManagerItem | The manager item that contains the schema that was created. |
Remarks
Method is overloaded.
DeleteSchemaSource(Guid)
Delte schema source codes from database.
Declaration
void DeleteSchemaSource(Guid schemaId)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | schemaId | Schema identifier. |
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)
Loads the source code of the specified schema to the passed-in collection.
Declaration
void FillSourceCollection(Collection<ISchemaManagerItem> compileCollection, Guid uid)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.ObjectModel.Collection<ISchemaManagerItem> | compileCollection | The collection to which the source code of the schema is loaded. |
System.Guid | uid | Identifier of the schema whose source code is loaded. |
FindDesignItem(UserConnection, Guid)
Searches for the designed manager item with the specified identifier.
Declaration
ISchemaManagerItem FindDesignItem(UserConnection userConnection, Guid uid)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | userConnection | User connection. |
System.Guid | uid | The identifier of the item to get. |
Returns
Type | Description |
---|---|
ISchemaManagerItem | The designed item with the |
GenerateItemUniqueCaption(String)
Generates the unique header of the manager item, using the specified prefix.
Declaration
string GenerateItemUniqueCaption(string prefix)
Parameters
Type | Name | Description |
---|---|---|
System.String | prefix | The prefix. |
Returns
Type | Description |
---|---|
System.String | The unique header of the manager item with the |
GenerateItemUniqueName(String)
Generates the unique name of the manager item, using the specified prefix.
Declaration
string GenerateItemUniqueName(string prefix)
Parameters
Type | Name | Description |
---|---|---|
System.String | prefix | Prefix. |
Returns
Type | Description |
---|---|
System.String | The unique name of the manager item with the |
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()
Gets the identifier of the schema from which all base schemas of the schema manager derive.
Declaration
Guid GetDefSchemaUId()
Returns
Type | Description |
---|---|
System.Guid | The identifier of the schema from which all base schemas of the schema manager derive. |
GetDesignItem(UserConnection, Guid)
Gets the designed item with the specified identifier. If no such item is found, an exception is thrown.
Declaration
ISchemaManagerItem GetDesignItem(UserConnection userConnection, Guid uid)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | userConnection | User connection. |
System.Guid | uid | The identifier of the returned item. |
Returns
Type | Description |
---|---|
ISchemaManagerItem | The designed item with the |
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 |
GetParentSchemaUIds(UserConnection, Guid, String, Guid, Boolean)
Gets the parent schema's unique identifiers for the given one.
Declaration
Guid[] GetParentSchemaUIds(UserConnection userConnection, Guid schemaUId, string schemaName, Guid packageUId, bool usePackageHierarchy)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | userConnection | The user connection. |
System.Guid | schemaUId | The schema unique identifier. |
System.String | schemaName | Filter by schema name. |
System.Guid | packageUId | The package unique identifier. |
System.Boolean | usePackageHierarchy |
|
Returns
Type | Description |
---|---|
System.Guid[] | The collection of schema's unique identifiers, which are parent for the given one. |
GetProcessSchemaGenerator(UserConnection)
Returns the source code generator for schemas of all processes.
Declaration
ProcessSchemaGenerator GetProcessSchemaGenerator(UserConnection userConnection)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | userConnection | User connection. |
Returns
Type | Description |
---|---|
ProcessSchemaGenerator | Process schema generator. |
GetReadableSchemaMetaData(Guid, UserConnection)
Gets the metadata of the schema with the specified identifier in a readable format.
Declaration
Stream GetReadableSchemaMetaData(Guid schemaId, UserConnection userConnection)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | schemaId | The identifier of the schema whose metadata is to be obtained. |
UserConnection | userConnection | User connection. |
Returns
Type | Description |
---|---|
System.IO.Stream | The stream that contains the metadata of the schema with the |
GetReadableSchemaMetaData(MetaSchema, UserConnection)
Gets the metadata of the specified schema in a readable format.
Declaration
Stream GetReadableSchemaMetaData(MetaSchema schema, UserConnection userConnection)
Parameters
Type | Name | Description |
---|---|---|
MetaSchema | schema | The schema whose metadata is to be obtained. |
UserConnection | userConnection | User connection. |
Returns
Type | Description |
---|---|
System.IO.Stream | The stream that contains the metadata of the |
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)
Gets metadata of the schema with the specified identifier.
Declaration
Stream GetSchemaMetaData(Guid schemaUId, UserConnection userConnection)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | schemaUId | Schema identifier. |
UserConnection | userConnection | User connection. |
Returns
Type | Description |
---|---|
System.IO.Stream | The stream containing the metadata of the schema with the |
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)
Gets the source code of the schema with the specified identifier.
Declaration
EntityCollection GetSchemaSources(Guid uid, Guid schemaInSolutionUId, UserConnection userConnection, out string errorMessage)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | uid | Identifier of the schema whose source code to get. |
System.Guid | schemaInSolutionUId | The identifier of the record in the SysSchemaInSolution table. |
UserConnection | userConnection | User connection. |
System.String | errorMessage | The error message when getting the source code of the schema. |
Returns
Type | Description |
---|---|
EntityCollection | Collection of entities with the source code of the schema with the |
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)
Initializes the manager item with the specified identifier.
Declaration
bool InitializeItem(Guid itemUId)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | itemUId | Identifier of the manager item to initialize. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Exceptions
Type | Condition |
---|---|
ArgumentEmptyException | If the empty value is passed as the |
InitializeSchema(ISchemaManagerItem, Assembly)
Creates the schema instance for the type specified in the passed-in manager item. If the type of the schema of the manager item is not found, an exception is thrown.
Declaration
IManagerItemInstance InitializeSchema(ISchemaManagerItem schemaManagerItem, Assembly assembly)
Parameters
Type | Name | Description |
---|---|---|
ISchemaManagerItem | schemaManagerItem | The manager item where the schema is to be initialized. |
System.Reflection.Assembly | assembly | An assembly that contains the type of the schema that is being created. |
Returns
Type | Description |
---|---|
IManagerItemInstance | The initialized instance of the schema. |
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()
RefreshItems(IEnumerable<Guid>)
Declaration
void RefreshItems(IEnumerable<Guid> itemUIds)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.Guid> | itemUIds |
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)
Saves the passed-in identifier of the catalog which contains the designed item schema with the specified identifier to the session data.
Declaration
void SaveDesignedItemFolderIdInSessionData(UserConnection userConnection, Guid designedItemId, Guid designedItemFolderId)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | userConnection | User connection. |
System.Guid | designedItemId | The identifier of the designed item. |
System.Guid | designedItemFolderId | Identifier of the catalog that contains the designed item schema with the |
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)
Serializes and saves the instance of the designed item with the specified identifier to the session data.
Declaration
void SaveDesignedItemInSessionData(UserConnection userConnection, MetaSchema designedItem, Guid designedItemId)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | userConnection | User connection. |
MetaSchema | designedItem | The designed manager item. |
System.Guid | designedItemId | Identifier of the designed item to save. |
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)
Saves the source code from the passed-in collection.
Declaration
bool SaveSchemaSources(EntityCollection sources)
Parameters
Type | Name | Description |
---|---|---|
EntityCollection | sources | Collection of the source code to preserve. |
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 |
UpdatePackagePosition(UserConnection, ISchemaManagerItem, Guid)
Update package position for manager item
Declaration
void UpdatePackagePosition(UserConnection userConnection, ISchemaManagerItem managerItem, Guid packageUId)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | userConnection | Instance of UserConnection. |
ISchemaManagerItem | managerItem | Instance of ISchemaManagerItem<TSchemaManagerSchema>. |
System.Guid | packageUId | Identifier of package. |
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> |