Class EntityDefinition

Current version: 3.4

An entity definition.

Inheritance
object
EntityDefinition
Namespace: StylelabsStylelabs.MSdkStylelabs.M.Sdk.ModelsBase
Assembly: Stylelabs.M.Sdk.dll
Syntax
RequestResponse
public class EntityDefinition : IEntityDefinition, IResource

Properties

CreatedBy

Gets the id of the user who created this resource. null if it has not been created.

Declaration
RequestResponse
public long? CreatedBy { get; set; }
Property Value
TypeDescription
long

CreatedOn

Gets the date on which this resource was created. null if it has not been created.

Declaration
RequestResponse
public DateTime? CreatedOn { get; set; }
Property Value
TypeDescription
DateTime

DisplayTemplate

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

Declaration
RequestResponse
public 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
RequestResponse
public long? Id { get; set; }
Property Value
TypeDescription
long

IsManualSortingAllowed

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

Declaration
RequestResponse
public bool IsManualSortingAllowed { get; set; }
Property Value
TypeDescription
bool

IsNew

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

Declaration
RequestResponse
public 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
RequestResponse
public 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
RequestResponse
public 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
RequestResponse
public bool IsTaxonomyItemDefinition { get; set; }
Property Value
TypeDescription
bool

Labels

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

Declaration
RequestResponse
public IDictionary<CultureInfo, string> Labels { get; }
Property Value
TypeDescription
IDictionary<, >CultureInfostring

MemberGroups

Gets the collection of member groups. Never returns null.

Declaration
RequestResponse
public IList<IMemberGroup> MemberGroups { get; }
Property Value
TypeDescription
IList<>IMemberGroup

ModifiedBy

Gets the id of the user who modified this resource. null if it has not been created.

Declaration
RequestResponse
public long? ModifiedBy { get; set; }
Property Value
TypeDescription
long

ModifiedOn

Gets the date on which this resource was modified. null if it has not been created.

Declaration
RequestResponse
public DateTime? ModifiedOn { get; set; }
Property Value
TypeDescription
DateTime

Name

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

Declaration
RequestResponse
public string Name { get; set; }
Property Value
TypeDescription
string

Methods

GetPropertyDefinition(string)

Get the definition of the specified property.

Declaration
RequestResponse
public IPropertyDefinition GetPropertyDefinition(string name)
Parameters
TypeNameDescription
stringname

Name of the property.

Returns
TypeDescription
IPropertyDefinition

The property definition or null if it was not found.

GetPropertyDefinition<T>(string)

Generic version of GetPropertyDefinition(string).

Declaration
RequestResponse
public T GetPropertyDefinition<T>(string name) where T : IPropertyDefinition
Parameters
TypeNameDescription
stringname

Name of the property.

Returns
TypeDescription
T

The property definition or null if it was not found.

Type Parameters
NameDescription
T

A property (sub)type.

GetPropertyDefinitions()

Gets all property definitions.

Declaration
RequestResponse
public IList<IPropertyDefinition> GetPropertyDefinitions()
Returns
TypeDescription
IList<>IPropertyDefinition

A list of all property definitions (never null).

GetRelationDefinition(string, RelationRole)

Get the definition of the specified relation.

Declaration
RequestResponse
public IRelationDefinition GetRelationDefinition(string name, RelationRole role)
Parameters
TypeNameDescription
stringname

Name of the relation.

RelationRolerole

Relation role.

Returns
TypeDescription
IRelationDefinition

The relation definition or null if it was not found.

GetRelationDefinitions()

Gets all relation definitions.

Declaration
RequestResponse
public IList<IRelationDefinition> GetRelationDefinitions()
Returns
TypeDescription
IList<>IRelationDefinition

A list of all relation definitions (never null).

Implements

Do you have some feedback for us?

If you have suggestions for improving this article,