1. Stylelabs.M.Sdk.Contracts.Base

Interface IEntityDefinition

Represents a data schema / domain model for entities.

Inherited Members

IResource.CreatedBy

IResource.CreatedOn

IResource.ModifiedBy

IResource.ModifiedOn

Namespace: StylelabsStylelabs.MSdkStylelabs.M.Sdk.ContractsBase

Assembly: Stylelabs.M.Sdk.dll

Syntax

public interface IEntityDefinition : IResource

Properties

DisplayTemplate

Gets or sets the language agnostic display format for entities of this definition. Formatted as follows: {PropertyName}.

Declaration

string DisplayTemplate { get; set; }

Property Value

TypeDescription
string

Id

Gets the id of this definition. This is an automatically assigned unique and strictly positive number identifying the entity definition. null if has not been created.

Declaration

long? Id { get; }

Property Value

TypeDescription
long

IsManualSortingAllowed

Gets or sets a value indicating whether the items of this definition can be sorted manually (UI related).

Declaration

bool IsManualSortingAllowed { get; set; }

Property Value

TypeDescription
bool

IsNew

Gets a value indicating whether the entity definition is new (id is null).

Declaration

bool IsNew { get; }

Property Value

TypeDescription
bool

IsPathEnabledDefinition

Gets or sets a value indicating whether entities of this entity definition can be part of the so called paths, which are technically UI breadcrumbs. Example use cases are taxonomy entity definitions or Sitecore Content Hub Project block entity definitions.

Declaration

bool IsPathEnabledDefinition { get; set; }

Property Value

TypeDescription
bool

IsSystemOwned

Gets or sets a value indicating whether the entity definition is owned by the system and cannot be modified or deleted by the regular users.

Declaration

bool IsSystemOwned { get; set; }

Property Value

TypeDescription
bool

IsTaxonomyItemDefinition

Gets or sets a value indicating whether entities of this entity definition are taxonomy items, they can be used as a search facet on the web pages.

Declaration

bool IsTaxonomyItemDefinition { get; set; }

Property Value

TypeDescription
bool

Labels

Gets a collection of the culture specific definition labels. Never returns null.

Declaration

IDictionary<CultureInfo, string> Labels { get; }

Property Value

TypeDescription
IDictionary<, >CultureInfostring

MemberGroups

Gets the collection of member groups. Never returns null.

Declaration

IList<IMemberGroup> MemberGroups { get; }

Property Value

TypeDescription
IList<>IMemberGroup

Name

Gets the unique and language agnostic name of the entity definition. It should be handled as case sensitive.

Declaration

string Name { get; }

Property Value

TypeDescription
string

Methods

GetPropertyDefinition(string)

Get the definition of the specified property.

Declaration

IPropertyDefinition GetPropertyDefinition(string name)

Parameters

TypeNameDescription
stringnameName of the property.

Returns

TypeDescription
IPropertyDefinitionThe property definition or null if it was not found.

GetPropertyDefinition(string)

Generic version of GetPropertyDefinition(string).

Declaration

T GetPropertyDefinition<T>(string name) where T : IPropertyDefinition

Parameters

TypeNameDescription
stringnameName of the property.

Returns

TypeDescription
TThe property definition or null if it was not found.

Type Parameters

NameDescription
TA property (sub)type.

GetPropertyDefinitions()

Gets all property definitions.

Declaration

IList<IPropertyDefinition> GetPropertyDefinitions()

Returns

TypeDescription
IList<>IPropertyDefinitionA list of all property definitions (never null).

GetRelationDefinition(string, RelationRole)

Get the definition of the specified relation.

Declaration

IRelationDefinition GetRelationDefinition(string name, RelationRole role)

Parameters

TypeNameDescription
stringnameName of the relation.
RelationRoleroleRelation role.

Returns

TypeDescription
IRelationDefinitionThe relation definition or null if it was not found.

GetRelationDefinitions()

Gets all relation definitions.

Declaration

IList<IRelationDefinition> GetRelationDefinitions()

Returns

TypeDescription
IList<>IRelationDefinitionA list of all relation definitions (never null).
If you have suggestions for improving this article, let us know!