Class EntitySchemaManager
Inheritance
System.Object
EntitySchemaManager
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: Terrasoft.Core.dll
Syntax
public class EntitySchemaManager : FileSystemEnabledSchemaManager<EntitySchema>, IManager<ISchemaManagerItem<EntitySchema>, EntitySchema>, IInternalSchemaManager, ISchemaManager, IManager, ISourceCodeSchemaManager
Constructors
EntitySchemaManager()
Declaration
public EntitySchemaManager()
Properties
DataValueTypeManager
Manager of the data type values.
Declaration
public DataValueTypeManager DataValueTypeManager { get; protected set; }
Property Value
HashFunc
Hash function. MD5 by default.
Declaration
public Func<byte[], string> HashFunc { get; }
Property Value
Type |
Description |
System.Func<System.Byte[], System.String> |
|
Exceptions
IsResolveAssemblyFromStandalonePackage
Declaration
protected override bool IsResolveAssemblyFromStandalonePackage { get; }
Property Value
Type |
Description |
System.Boolean |
|
Overrides
Terrasoft.Core.FileSystemEnabledSchemaManager<Terrasoft.Core.Entities.EntitySchema>.IsResolveAssemblyFromStandalonePackage
ItemCaption
Header of the manager item.
Declaration
public override string ItemCaption { get; }
Property Value
Type |
Description |
System.String |
|
Overrides
Terrasoft.Core.SchemaManager<Terrasoft.Core.Entities.EntitySchema>.ItemCaption
ItemTypeName
Declaration
protected override string ItemTypeName { get; }
Property Value
Type |
Description |
System.String |
|
Overrides
Terrasoft.Core.SchemaManager<Terrasoft.Core.Entities.EntitySchema>.ItemTypeName
ResourceManagerName
Name of a resource manager.
Declaration
public override string ResourceManagerName { get; }
Property Value
Type |
Description |
System.String |
|
Overrides
Terrasoft.Core.FileSystemEnabledSchemaManager<Terrasoft.Core.Entities.EntitySchema>.ResourceManagerName
SystemValueManager
Declaration
public SystemValueManager SystemValueManager { get; }
Property Value
Methods
ActualizeItemDescriptor(ISchemaManagerItem)
Actualizes schema manager item descriptor.
Declaration
public override void ActualizeItemDescriptor(ISchemaManagerItem item)
Parameters
Type |
Name |
Description |
ISchemaManagerItem |
item |
Schema manager item that needs actualization.
|
Overrides
Terrasoft.Core.SchemaManager<Terrasoft.Core.Entities.EntitySchema>.ActualizeItemDescriptor(Terrasoft.Core.ISchemaManagerItem)
ActualizeSchemaDifferencePackage(JsonDataDifferencePackage)
Declaration
protected override void ActualizeSchemaDifferencePackage(JsonDataDifferencePackage differencePackage)
Parameters
Overrides
Terrasoft.Core.SchemaManager<Terrasoft.Core.Entities.EntitySchema>.ActualizeSchemaDifferencePackage(Terrasoft.Common.JsonDataDifferencePackage)
AddSchemaParentUIdItem(JsonDataDifferencePackage, Guid)
Declaration
protected override void AddSchemaParentUIdItem(JsonDataDifferencePackage package, Guid parentSchemaUId)
Parameters
Overrides
Terrasoft.Core.SchemaManager<Terrasoft.Core.Entities.EntitySchema>.AddSchemaParentUIdItem(Terrasoft.Common.JsonDataDifferencePackage, System.Guid)
CreateItem()
Declaration
protected override ISchemaManagerItem<EntitySchema> CreateItem()
Returns
Overrides
Terrasoft.Core.SchemaManager<Terrasoft.Core.Entities.EntitySchema>.CreateItem()
Declaration
protected override EntitySchema CreateRuntimeSchemaFromMetaData(Guid schemaUId, UserConnection userConnection)
Parameters
Type |
Name |
Description |
System.Guid |
schemaUId |
|
UserConnection |
userConnection |
|
Returns
Overrides
Terrasoft.Core.SchemaManager<Terrasoft.Core.Entities.EntitySchema>.CreateRuntimeSchemaFromMetaData(System.Guid, Terrasoft.Core.UserConnection)
Declaration
protected override EntitySchema CreateRuntimeSchemaFromMetaData(Guid schemaUId, UserConnection userConnection, bool initResources)
Parameters
Type |
Name |
Description |
System.Guid |
schemaUId |
|
UserConnection |
userConnection |
|
System.Boolean |
initResources |
|
Returns
Overrides
Terrasoft.Core.SchemaManager<Terrasoft.Core.Entities.EntitySchema>.CreateRuntimeSchemaFromMetaData(System.Guid, Terrasoft.Core.UserConnection, System.Boolean)
ForceGetSchema(EntitySchemaProcessData, Boolean)
Declaration
public EntitySchema ForceGetSchema(EntitySchemaProcessData processData, bool shouldRecreateSchema = false)
Parameters
Returns
GenerateReferenceSchemaSources(IEnumerable<Guid>, UserConnection)
Declaration
protected override void GenerateReferenceSchemaSources(IEnumerable<Guid> referenceSchemaUIds, UserConnection userConnection)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<System.Guid> |
referenceSchemaUIds |
|
UserConnection |
userConnection |
|
Overrides
Terrasoft.Core.SchemaManager<Terrasoft.Core.Entities.EntitySchema>.GenerateReferenceSchemaSources(System.Collections.Generic.IEnumerable<System.Guid>, Terrasoft.Core.UserConnection)
GetEntityByName(String, UserConnection)
Returns an instance of Entity for schema with the given name.
Declaration
public virtual Entity GetEntityByName(string schemaName, UserConnection userConnection)
Parameters
Type |
Name |
Description |
System.String |
schemaName |
Name of the schema.
|
UserConnection |
userConnection |
User connection.
|
Returns
Type |
Description |
Entity |
An instance of Entity for schema with the given name.
|
GetGenerator(UserConnection)
Returns schema source code generator, using specified user connection.
Declaration
public override SchemaCodeGenerator<EntitySchema> GetGenerator(UserConnection userConnection)
Parameters
Returns
Overrides
Terrasoft.Core.SchemaManager<Terrasoft.Core.Entities.EntitySchema>.GetGenerator(Terrasoft.Core.UserConnection)
GetItemReferenceSchemaUIds(Guid, UserConnection)
Declaration
protected override IEnumerable<Guid> GetItemReferenceSchemaUIds(Guid schemaId, UserConnection userConnection)
Parameters
Type |
Name |
Description |
System.Guid |
schemaId |
|
UserConnection |
userConnection |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<System.Guid> |
|
Overrides
Terrasoft.Core.SchemaManager<Terrasoft.Core.Entities.EntitySchema>.GetItemReferenceSchemaUIds(System.Guid, Terrasoft.Core.UserConnection)
Gets the schema metadata serializer using the specified user connection.
Declaration
public override IMetaDataSerializer GetMetaDataSerializer(UserConnection userConnection)
Parameters
Returns
Overrides
Terrasoft.Core.SchemaManager<Terrasoft.Core.Entities.EntitySchema>.GetMetaDataSerializer(Terrasoft.Core.UserConnection)
GetProcessSchemaGenerator(UserConnection)
Gets the process schema generator, using the specified user connection.
Declaration
public override ProcessSchemaGenerator GetProcessSchemaGenerator(UserConnection userConnection)
Parameters
Returns
Overrides
Terrasoft.Core.SchemaManager<Terrasoft.Core.Entities.EntitySchema>.GetProcessSchemaGenerator(Terrasoft.Core.UserConnection)
GetSchemaChildren(Guid)
Returns child schema references collection.
Declaration
public EntitySchemaOppositeReferenceInfoCollection GetSchemaChildren(Guid schemaUId)
Parameters
Type |
Name |
Description |
System.Guid |
schemaUId |
Parent schema identifier.
|
Returns
GetSchemaMetaDataDifferencePackageText(Guid, UserConnection)
Gets metadata difference package string with target identifier.
Declaration
public virtual string GetSchemaMetaDataDifferencePackageText(Guid schemaUId, UserConnection userConnection)
Parameters
Type |
Name |
Description |
System.Guid |
schemaUId |
Identifier of schema.
|
UserConnection |
userConnection |
Users connection.
|
Returns
Type |
Description |
System.String |
metadata difference package string of schema with target id schemaUId
or null .
|
GetSchemaOppositeReferences(Guid, EntitySchemaColumnUsageType, UserConnection, Boolean)
Returns collection of references to schema with specified schemaUId
,
usageType
and userConnection
.
Declaration
public EntitySchemaOppositeReferenceInfoCollection GetSchemaOppositeReferences(Guid schemaUId, EntitySchemaColumnUsageType usageType, UserConnection userConnection, bool includeSysTable = false)
Parameters
Type |
Name |
Description |
System.Guid |
schemaUId |
Referenced schema identifier.
|
EntitySchemaColumnUsageType |
usageType |
Specifies column usage type.
|
UserConnection |
userConnection |
User connection.
|
System.Boolean |
includeSysTable |
Specifies whether to use system tables.
|
Returns
GetSchemaSources(EntitySchema, Guid, UserConnection)
Declaration
protected override EntityCollection GetSchemaSources(EntitySchema schema, Guid schemaId, UserConnection userConnection)
Parameters
Returns
Overrides
Terrasoft.Core.SchemaManager<Terrasoft.Core.Entities.EntitySchema>.GetSchemaSources(Terrasoft.Core.Entities.EntitySchema, System.Guid, Terrasoft.Core.UserConnection)
Initialize(SchemaManagerProvider, SchemaManagerProviderConfigurationElement)
Initializes the schema manager, using the specified provider and the information from the configuration file.
Declaration
public override void Initialize(SchemaManagerProvider provider, SchemaManagerProviderConfigurationElement configuration)
Parameters
Overrides
Terrasoft.Core.FileSystemEnabledSchemaManager<Terrasoft.Core.Entities.EntitySchema>.Initialize(Terrasoft.Core.SchemaManagerProvider, Terrasoft.Core.SchemaManagerProviderConfigurationElement)
InitializeDefSchema()
Declaration
protected override EntitySchema InitializeDefSchema()
Returns
Overrides
Terrasoft.Core.SchemaManager<Terrasoft.Core.Entities.EntitySchema>.InitializeDefSchema()
InitializeEntitySchemaColumnRights()
Declaration
protected virtual void InitializeEntitySchemaColumnRights()
InitializeEntitySchemaRights()
Declaration
protected virtual void InitializeEntitySchemaRights()
InitializeEntitySchemaRights(IEnumerable<Guid>)
Declaration
protected virtual void InitializeEntitySchemaRights(IEnumerable<Guid> itemUIds)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<System.Guid> |
itemUIds |
|
InitializeEvents()
Declaration
protected virtual void InitializeEvents()
InitializeItems()
Declaration
protected override bool InitializeItems()
Returns
Type |
Description |
System.Boolean |
|
Overrides
Terrasoft.Core.SchemaManager<Terrasoft.Core.Entities.EntitySchema>.InitializeItems()
InitializeItems(IEnumerable<Guid>)
Declaration
protected override bool InitializeItems(IEnumerable<Guid> itemUIds)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<System.Guid> |
itemUIds |
|
Returns
Type |
Description |
System.Boolean |
|
Overrides
Terrasoft.Core.SchemaManager<Terrasoft.Core.Entities.EntitySchema>.InitializeItems(System.Collections.Generic.IEnumerable<System.Guid>)
InitializeItems(Guid)
Declaration
protected override bool InitializeItems(Guid itemUId)
Parameters
Type |
Name |
Description |
System.Guid |
itemUId |
|
Returns
Type |
Description |
System.Boolean |
|
Overrides
Terrasoft.Core.SchemaManager<Terrasoft.Core.Entities.EntitySchema>.InitializeItems(System.Guid)
InitializeSafeSchema(ISchemaManagerItem, Assembly)
Creates an instance of the EntitySchema type schema.
If type not found in assembly then returns null
.
Declaration
public override IManagerItemInstance InitializeSafeSchema(ISchemaManagerItem schemaManagerItem, Assembly assembly)
Parameters
Type |
Name |
Description |
ISchemaManagerItem |
schemaManagerItem |
Item of manager.
|
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 or null if the type of
schema schemaManagerItem not found in assembly .
|
Overrides
Terrasoft.Core.SchemaManager<Terrasoft.Core.Entities.EntitySchema>.InitializeSafeSchema(Terrasoft.Core.ISchemaManagerItem, System.Reflection.Assembly)
InitializeSchema(ISchemaManagerItem, Assembly)
Declaration
public override IManagerItemInstance InitializeSchema(ISchemaManagerItem schemaManagerItem, Assembly assembly)
Parameters
Type |
Name |
Description |
ISchemaManagerItem |
schemaManagerItem |
Item of manager.
|
System.Reflection.Assembly |
assembly |
An assembly that contains the type of the schema that is being created.
|
Returns
Overrides
Terrasoft.Core.SchemaManager<Terrasoft.Core.Entities.EntitySchema>.InitializeSchema(Terrasoft.Core.ISchemaManagerItem, System.Reflection.Assembly)
Exceptions
InternalCreateSchema(String, EntitySchema, UserConnection, Guid, Boolean)
Declaration
protected override ISchemaManagerItem<EntitySchema> InternalCreateSchema(string name, EntitySchema baseSchema, UserConnection userConnection, Guid uid, bool fromMetaData = false)
Parameters
Type |
Name |
Description |
System.String |
name |
|
EntitySchema |
baseSchema |
|
UserConnection |
userConnection |
|
System.Guid |
uid |
|
System.Boolean |
fromMetaData |
|
Returns
Overrides
Terrasoft.Core.SchemaManager<Terrasoft.Core.Entities.EntitySchema>.InternalCreateSchema(System.String, Terrasoft.Core.Entities.EntitySchema, Terrasoft.Core.UserConnection, System.Guid, System.Boolean)
InternalSaveSchema(ISchemaManagerItem<EntitySchema>, Guid, Boolean, UserConnection, Boolean)
Declaration
protected override bool InternalSaveSchema(ISchemaManagerItem<EntitySchema> designItem, Guid packageUId, bool removeDesignItem, UserConnection userConnection, bool generateBundles)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Overrides
Terrasoft.Core.SchemaManager<Terrasoft.Core.Entities.EntitySchema>.InternalSaveSchema(Terrasoft.Core.ISchemaManagerItem<Terrasoft.Core.Entities.EntitySchema>, System.Guid, System.Boolean, Terrasoft.Core.UserConnection, System.Boolean)
InternalSaveSchema(ISchemaManagerItem<EntitySchema>, Guid, Boolean, UserConnection, Boolean, Boolean)
Declaration
protected override bool InternalSaveSchema(ISchemaManagerItem<EntitySchema> designItem, Guid packageUId, bool removeDesignItem, UserConnection userConnection, bool generateBundles, bool validateNamePrefixes)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Overrides
Terrasoft.Core.SchemaManager<Terrasoft.Core.Entities.EntitySchema>.InternalSaveSchema(Terrasoft.Core.ISchemaManagerItem<Terrasoft.Core.Entities.EntitySchema>, System.Guid, System.Boolean, Terrasoft.Core.UserConnection, System.Boolean, System.Boolean)
InternalSaveSchema(ISchemaManagerItem<EntitySchema>, Guid, Boolean, UserConnection, Boolean, Boolean, Boolean)
Declaration
protected override bool InternalSaveSchema(ISchemaManagerItem<EntitySchema> designItem, Guid packageUId, bool removeDesignItem, UserConnection userConnection, bool generateBundles, bool validateNamePrefixes, bool lockSchemaInSourceControlStorage)
Parameters
Type |
Name |
Description |
ISchemaManagerItem<EntitySchema> |
designItem |
|
System.Guid |
packageUId |
|
System.Boolean |
removeDesignItem |
|
UserConnection |
userConnection |
|
System.Boolean |
generateBundles |
|
System.Boolean |
validateNamePrefixes |
|
System.Boolean |
lockSchemaInSourceControlStorage |
|
Returns
Type |
Description |
System.Boolean |
|
Overrides
Terrasoft.Core.SchemaManager<Terrasoft.Core.Entities.EntitySchema>.InternalSaveSchema(Terrasoft.Core.ISchemaManagerItem<Terrasoft.Core.Entities.EntitySchema>, System.Guid, System.Boolean, Terrasoft.Core.UserConnection, System.Boolean, System.Boolean, System.Boolean)
InternalSaveSchema(ISchemaManagerItem<EntitySchema>, Guid, Boolean, UserConnection, Boolean, Boolean, Boolean, Boolean)
Declaration
protected override bool InternalSaveSchema(ISchemaManagerItem<EntitySchema> designItem, Guid packageUId, bool removeDesignItem, UserConnection userConnection, bool generateBundles, bool validateNamePrefixes, bool lockSchemaInSourceControlStorage, bool useFullHierarchy)
Parameters
Type |
Name |
Description |
ISchemaManagerItem<EntitySchema> |
designItem |
|
System.Guid |
packageUId |
|
System.Boolean |
removeDesignItem |
|
UserConnection |
userConnection |
|
System.Boolean |
generateBundles |
|
System.Boolean |
validateNamePrefixes |
|
System.Boolean |
lockSchemaInSourceControlStorage |
|
System.Boolean |
useFullHierarchy |
|
Returns
Type |
Description |
System.Boolean |
|
Overrides
Terrasoft.Core.SchemaManager<Terrasoft.Core.Entities.EntitySchema>.InternalSaveSchema(Terrasoft.Core.ISchemaManagerItem<Terrasoft.Core.Entities.EntitySchema>, System.Guid, System.Boolean, Terrasoft.Core.UserConnection, System.Boolean, System.Boolean, System.Boolean, System.Boolean)
Declaration
protected override void ModifyMetaDataProperty(JsonDataDifferencePackage package, EntitySchema schema)
Parameters
Overrides
Terrasoft.Core.SchemaManager<Terrasoft.Core.Entities.EntitySchema>.ModifyMetaDataProperty(Terrasoft.Common.JsonDataDifferencePackage, Terrasoft.Core.Entities.EntitySchema)
Declaration
protected override void ModifyMetaDataProperty(JsonDataDifferencePackage package, EntitySchema schema, bool useFullHierarchy)
Parameters
Overrides
Terrasoft.Core.SchemaManager<Terrasoft.Core.Entities.EntitySchema>.ModifyMetaDataProperty(Terrasoft.Common.JsonDataDifferencePackage, Terrasoft.Core.Entities.EntitySchema, System.Boolean)
SaveEntitySchemaReferences(Guid, EntitySchema)
Declaration
public void SaveEntitySchemaReferences(Guid sysSchemaId, EntitySchema schema)
Parameters
Type |
Name |
Description |
System.Guid |
sysSchemaId |
|
EntitySchema |
schema |
|
SaveSchema(Guid, UserConnection, Boolean, Boolean, Boolean)
Declaration
public bool SaveSchema(Guid uid, UserConnection userConnection, bool validateNamePrefixes, bool generateBundles = true, bool lockSchemaInSourceControlStorage = false)
Parameters
Type |
Name |
Description |
System.Guid |
uid |
Specified designed schema UId.
|
UserConnection |
userConnection |
Specified instance of UserConnection.
|
System.Boolean |
validateNamePrefixes |
Determines if need to validate prefixes of the schema's and its
elements names before save.
|
System.Boolean |
generateBundles |
Determines if schema bundles should be generated after save.
|
System.Boolean |
lockSchemaInSourceControlStorage |
Determines if schema bundles should be generated after save.
|
Returns
Type |
Description |
System.Boolean |
true if schema is successfully saved; otherwise, false .
|
Exceptions
Type |
Condition |
System.Security.SecurityException |
If user have no rights to modify schema.
|
SaveSchemaContent(ISchemaManagerItem<EntitySchema>)
Declaration
protected override void SaveSchemaContent(ISchemaManagerItem<EntitySchema> item)
Parameters
Overrides
Terrasoft.Core.SchemaManager<Terrasoft.Core.Entities.EntitySchema>.SaveSchemaContent(Terrasoft.Core.ISchemaManagerItem<Terrasoft.Core.Entities.EntitySchema>)
SaveSchemaItem(ISchemaManagerItem<EntitySchema>, Guid, Boolean, UserConnection, Boolean)
Declaration
protected override SchemaManagerItemInfo SaveSchemaItem(ISchemaManagerItem<EntitySchema> item, Guid packageId, bool validateNamePrefixes, UserConnection userConnection = null, bool lockSchemaInSourceControlStorage = false)
Parameters
Returns
Overrides
Terrasoft.Core.SchemaManager<Terrasoft.Core.Entities.EntitySchema>.SaveSchemaItem(Terrasoft.Core.ISchemaManagerItem<Terrasoft.Core.Entities.EntitySchema>, System.Guid, System.Boolean, Terrasoft.Core.UserConnection, System.Boolean)
Implements
Extension Methods