CkTypeGraph
Namespace: Meshmakers.Octo.ConstructionKit.Contracts.DependencyGraph
Represents a construction kit type in the dependency graph
public class CkTypeGraph : CkTypeWithAttributesGraph
Inheritance Object → CkTypeWithAttributesGraph → CkTypeGraph
Properties
DerivedFromCkTypeId
Defines the base type of this type. Only one type may not have a base type: System/Entity
public CkId<CkTypeId> DerivedFromCkTypeId { get; }
Property Value
CkTypeId
Gets or sets the construction kit id
public CkId<CkTypeId> CkTypeId { get; }
Property Value
IsFinal
If true, the type cannot be inherited again
public bool IsFinal { get; }
Property Value
IsAbstract
If true, the type cannot be instantiated by a runtime entity
public bool IsAbstract { get; }
Property Value
DefiningCollectionRootCkTypeId
Gets or sets the defining construction kit type id, which defines the collection in repository.
public CkId<CkTypeId> DefiningCollectionRootCkTypeId { get; private set; }
Property Value
IsCollectionRoot
Gets or sets a value indicating whether this type is a collection root. When true this type creates a collection in the database.
public bool IsCollectionRoot { get; private set; }
Property Value
BaseTypes
Returns a list of base types for the given construction kit type
public IReadOnlyCollection<CkGraphTypeInheritance> BaseTypes { get; }
Property Value
IReadOnlyCollection<CkGraphTypeInheritance>
DerivedTypes
Returns a list of derived types for the given construction kit type
public IReadOnlyCollection<CkGraphTypeInheritance> DerivedTypes { get; }
Property Value
IReadOnlyCollection<CkGraphTypeInheritance>
Associations
Returns a list of associations including inherited ones.
public CkGraphDirectedAssociations Associations { get; }
Property Value
Indexes
Returns a list of indexes including inherited ones.
public IReadOnlyCollection<CkTypeIndexDto> Indexes { get; set; }
Property Value
IReadOnlyCollection<CkTypeIndexDto>
EnableChangeStreamPreAndPostImages
Gets a value indicating whether the change stream should include pre- and post-images
for this type's collection. Required on the collection-root CK type for
fullDocumentBeforeChange filters to evaluate.
public bool EnableChangeStreamPreAndPostImages { get; }
Property Value
Description
An optional description of the type
public string Description { get; set; }
Property Value
DisplayNameRule
The effective rule computing rtDisplayName on save. Initialized with the rule declared on this type; during inheritance resolution an empty rule is filled from the nearest base type that declares one (see ).
public string DisplayNameRule { get; private set; }
Property Value
DisplayDescriptionRule
The effective rule computing rtDisplayDescription on save. Same inheritance semantics as CkTypeGraph.DisplayNameRule.
public string DisplayDescriptionRule { get; private set; }
Property Value
DisplayNameRuleDeclared
True when CkTypeGraph.DisplayNameRule was declared on this type itself (not inherited). Used to report rule validation errors only at the declaring type.
public bool DisplayNameRuleDeclared { get; }
Property Value
DisplayDescriptionRuleDeclared
True when CkTypeGraph.DisplayDescriptionRule was declared on this type itself (not inherited).
public bool DisplayDescriptionRuleDeclared { get; }
Property Value
OwnerAttributePath
The effective owner attribute path for owned-only data permissions (AB#4978): the String-terminated attribute path (Record segments allowed) whose value identifies the owning subject. Initialized with the path declared on this type; during inheritance resolution an empty path is filled from the nearest base type that declares one (see ). Null means ownership is the server-stamped rtCreatedBy.
public string OwnerAttributePath { get; private set; }
Property Value
OwnerAttributePathDeclared
True when CkTypeGraph.OwnerAttributePath was declared on this type itself (not inherited). Used to report validation errors only at the declaring type.
public bool OwnerAttributePathDeclared { get; }
Property Value
Path
Returns a string that describes the inheritance chain
public string Path { get; }
Property Value
DefinedAttributes
Gets or sets a list of attributes that are defined by the current type
public IReadOnlyCollection<CkTypeAttributeDto> DefinedAttributes { get; }
Property Value
IReadOnlyCollection<CkTypeAttributeDto>
AllAttributes
Gets or sets a list of attributes including inherited ones.
public IReadOnlyDictionary<CkId<CkAttributeId>, CkTypeAttributeGraph> AllAttributes { get; }
Property Value
IReadOnlyDictionary<CkId<CkAttributeId>, CkTypeAttributeGraph>
AllAttributesByName
Gets or sets a list of attributes including inherited ones.
public IReadOnlyDictionary<string, CkTypeAttributeGraph> AllAttributesByName { get; }
Property Value
IReadOnlyDictionary<String, CkTypeAttributeGraph>
Constructors
CkTypeGraph(CkId<CkTypeId>, CkCompiledTypeDto)
Creates a new instance of CkTypeGraph.
public CkTypeGraph(CkId<CkTypeId> ckTypeId, CkCompiledTypeDto ckTypeDto)
Parameters
ckTypeId CkId<CkTypeId>
ckTypeDto CkCompiledTypeDto
CkTypeGraph(CkId<CkTypeId>, Boolean, Boolean, Boolean, IReadOnlyCollection<CkGraphTypeInheritance>, CkId<CkTypeId>, CkId<CkTypeId>, IReadOnlyCollection<CkGraphTypeInheritance>, IReadOnlyCollection<CkTypeAttributeDto>, IReadOnlyDictionary<CkId<CkAttributeId>, CkTypeAttributeGraph>, IReadOnlyCollection<CkTypeIndexDto>, CkGraphDirectedAssociations, String, Boolean, String, String, String)
Creates a new instance of CkTypeGraph.
public CkTypeGraph(CkId<CkTypeId> ckTypeId, bool isAbstract, bool isFinal, bool isCollectionRoot, IReadOnlyCollection<CkGraphTypeInheritance> baseTypes, CkId<CkTypeId> derivedFromCkTypeId, CkId<CkTypeId> definingCollectionRootCkTypeId, IReadOnlyCollection<CkGraphTypeInheritance> derivedTypes, IReadOnlyCollection<CkTypeAttributeDto> definedAttributes, IReadOnlyDictionary<CkId<CkAttributeId>, CkTypeAttributeGraph> allAttributes, IReadOnlyCollection<CkTypeIndexDto> indexes, CkGraphDirectedAssociations associations, string description, bool enableChangeStreamPreAndPostImages, string displayNameRule, string displayDescriptionRule, string ownerAttributePath)
Parameters
ckTypeId CkId<CkTypeId>
isAbstract Boolean
isFinal Boolean
isCollectionRoot Boolean
baseTypes IReadOnlyCollection<CkGraphTypeInheritance>
derivedFromCkTypeId CkId<CkTypeId>
definingCollectionRootCkTypeId CkId<CkTypeId>
derivedTypes IReadOnlyCollection<CkGraphTypeInheritance>
definedAttributes IReadOnlyCollection<CkTypeAttributeDto>
allAttributes IReadOnlyDictionary<CkId<CkAttributeId>, CkTypeAttributeGraph>
indexes IReadOnlyCollection<CkTypeIndexDto>
associations CkGraphDirectedAssociations
description String
enableChangeStreamPreAndPostImages Boolean
displayNameRule String
displayDescriptionRule String
ownerAttributePath String
Methods
SetDefiningCollectionCkTypeId(CkId<CkTypeId>)
Sets the defining collection rot type id
internal void SetDefiningCollectionCkTypeId(CkId<CkTypeId> ckTypeId)
Parameters
ckTypeId CkId<CkTypeId>
CkTypeId of the defining collection
SetIsCollectionRoot(Boolean)
Defines if the current type is a collection
internal void SetIsCollectionRoot(bool isCollectionRoot)
Parameters
isCollectionRoot Boolean
Indicates if the current type is a collection root
InheritDisplayRules(String, String)
Fills empty display rules from a base type. Called during inheritance resolution walking from the nearest base type upward, so the nearest declared rule wins. A rule already set (declared on this type or inherited from a nearer base) is never overwritten.
internal void InheritDisplayRules(string baseDisplayNameRule, string baseDisplayDescriptionRule)
Parameters
baseDisplayNameRule String
The base type's effective display name rule
baseDisplayDescriptionRule String
The base type's effective display description rule
InheritOwnerAttribute(String)
Fills an empty owner attribute from a base type (AB#4978). Same nearest-wins semantics as : a name already set (declared on this type or inherited from a nearer base) is never overwritten.
internal void InheritOwnerAttribute(string baseOwnerAttributePath)
Parameters
baseOwnerAttributePath String
The base type's effective owner attribute name
AddBaseTypes(IEnumerable<CkGraphTypeInheritance>)
Adds a list of base types of the current type
internal void AddBaseTypes(IEnumerable<CkGraphTypeInheritance> baseTypeList)
Parameters
baseTypeList IEnumerable<CkGraphTypeInheritance>
AddDerivedTypes(CkGraphTypeInheritance)
Adds a derived types of the current type
internal void AddDerivedTypes(CkGraphTypeInheritance ckGraphTypeInheritance)
Parameters
ckGraphTypeInheritance CkGraphTypeInheritance
MergeTextIndexes(IReadOnlyCollection<CkTypeIndexDto>)
Appends a list of indexes to the current type
internal void MergeTextIndexes(IReadOnlyCollection<CkTypeIndexDto> indexesToMerge)
Parameters
indexesToMerge IReadOnlyCollection<CkTypeIndexDto>
GetAllDerivedTypes(Boolean)
Returns a list of derived types for the given construction kit type
public IReadOnlyCollection<CkId<CkTypeId>> GetAllDerivedTypes(bool includeSelf)
Parameters
includeSelf Boolean
When true, the current type is included to the list
Returns
IReadOnlyCollection<CkId<CkTypeId>>
GetBaseTypes(Boolean)
Returns a list of base types for the given construction kit type
public IReadOnlyCollection<CkId<CkTypeId>> GetBaseTypes(bool includeSelf)
Parameters
includeSelf Boolean
When true, the current type is included to the list
Returns
IReadOnlyCollection<CkId<CkTypeId>>
ToString()
public string ToString()