Table of Contents

Class ConditionBuilderPage<TInfo>

Namespace
Kentico.Xperience.Admin.Base
Assembly
Kentico.Xperience.Admin.Base.dll

Represents page with condition builder component to edit macro conditions.

public abstract class ConditionBuilderPage<TInfo> : Page<ConditionBuilderTemplateClientProperties>, IPage where TInfo : AbstractInfoBase<TInfo>, new()

Type Parameters

TInfo

Info object

Inheritance
object
ConditionBuilderPage<TInfo>
Implements
Derived
Inherited Members
Extension Methods

Constructors

ConditionBuilderPage(IAuthenticatedUserAccessor)

Base constructor for derived classes.

protected ConditionBuilderPage(IAuthenticatedUserAccessor authenticatedUserAccessor)

Parameters

authenticatedUserAccessor IAuthenticatedUserAccessor

Currently logged in user accessor.

Properties

ConditionColumnName

Name of the condition column.

protected abstract string ConditionColumnName { get; }

Property Value

string

ObjectId

ID of the object.

public abstract int ObjectId { get; set; }

Property Value

int

ObjectType

Type of the info objects that are edited. Corresponds to the OBJECT_TYPE property of the info object or PredefinedObjectType.

protected virtual string ObjectType { get; }

Property Value

string

PageConfiguration

Page configuration

public ConditionBuilderConfiguration PageConfiguration { get; set; }

Property Value

ConditionBuilderConfiguration

ResolverName

Gets or sets macro resolver name.

[Obsolete("Member is deprecated and will be removed in next version.")]
[ObsoleteSince(29, 0)]
protected virtual string ResolverName { get; }

Property Value

string

RuleCategoryNames

Gets or sets name(s) of the Macro rule data category(ies) which should be displayed in condition builder.

protected virtual IEnumerable<string> RuleCategoryNames { get; }

Property Value

IEnumerable<string>

UsageLocation

Specifies the context in which the condition builder component is used. It determines the set of macros that will be available for use within the component.

protected virtual MacroRuleUsageLocation UsageLocation { get; }

Property Value

MacroRuleUsageLocation

Methods

ConfigurePage()

Set up page's configuration. Configures the submit action.

public override Task ConfigurePage()

Returns

Task

ConfigureTemplateProperties(ConditionBuilderTemplateClientProperties)

Transforms the configuration to template properties.

public override Task<ConditionBuilderTemplateClientProperties> ConfigureTemplateProperties(ConditionBuilderTemplateClientProperties properties)

Parameters

properties ConditionBuilderTemplateClientProperties

Returns

Task<ConditionBuilderTemplateClientProperties>

GetInfoObject(CancellationToken?)

protected Task<TInfo> GetInfoObject(CancellationToken? cancellationToken = null)

Parameters

cancellationToken CancellationToken?

Returns

Task<TInfo>

GetSuccessResponse(TInfo)

Response that has to be returned after successful form submission.

protected virtual ICommandResponse GetSuccessResponse(TInfo savedInfoObject)

Parameters

savedInfoObject TInfo

Object info after persisting.

Returns

ICommandResponse

SetInfoObject(TInfo)

Sets the infoObject.

protected virtual void SetInfoObject(TInfo infoObject)

Parameters

infoObject TInfo

Submit(SelectedConditionTree)

Handles the condition builder submit command.

public virtual Task<ICommandResponse> Submit(SelectedConditionTree conditiontree)

Parameters

conditiontree SelectedConditionTree

Condition to save.

Returns

Task<ICommandResponse>

Returns the form submission result.

ValidatePage()

Validates the page state prior invocation of the ConfigurePage() method.

public override Task<PageValidationResult> ValidatePage()

Returns

Task<PageValidationResult>