Class BindingPageBase<TBindingValueType, TBindingPageConfiguration, TBindingPageListingProperties>
Base page for creating and listing bindings between two objects.
public abstract class BindingPageBase<TBindingValueType, TBindingPageConfiguration, TBindingPageListingProperties> : Page<BindingPageClientProperties>, IPage where TBindingPageConfiguration : BindingPageConfigurationBase<TBindingPageListingProperties>, new() where TBindingPageListingProperties : ListingConfiguration, new()
Type Parameters
TBindingValueType
Type of the value that is used for binding.
TBindingPageConfiguration
Type of the binding page configuration.
TBindingPageListingProperties
Type of the listing properties.
- Inheritance
-
objectBindingPageBase<TBindingValueType, TBindingPageConfiguration, TBindingPageListingProperties>
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
BindingPageBase()
Initializes a new instance of the BindingPageBase<TBindingValueType, TBindingPageConfiguration, TBindingPageListingProperties> class.
protected BindingPageBase()
Fields
PageConfiguration
Binding page configuration.
protected TBindingPageConfiguration PageConfiguration
Field Value
- TBindingPageConfiguration
Properties
EditedObjectId
Identifier of the object for which the bindings are edited.
public abstract TBindingValueType EditedObjectId { get; set; }
Property Value
- TBindingValueType
Methods
ConfigureTemplateProperties(BindingPageClientProperties)
Gets the object representing client side template properties.
public override Task<BindingPageClientProperties> ConfigureTemplateProperties(BindingPageClientProperties properties)
Parameters
properties
BindingPageClientPropertiesInitialized properties object.
Returns
GetSelectedIdentifiers(CancellationToken)
Gets the selected identifiers.
protected abstract Task<ICollection<TBindingValueType>> GetSelectedIdentifiers(CancellationToken cancellationToken = default)
Parameters
cancellationToken
CancellationTokenCancellation token.
Returns
- Task<ICollection<TBindingValueType>>
GetSelection(CancellationToken)
Gets the default selection.
public Task<ICommandResponse<GetSelectionCommandResult<TBindingValueType>>> GetSelection(CancellationToken cancellationToken = default)
Parameters
cancellationToken
CancellationToken
Returns
- Task<ICommandResponse<GetSelectionCommandResult<TBindingValueType>>>
LoadExistingBindings(LoadDataCommandArguments, CancellationToken)
Returns result containing existing binding data and the number of total items.
public Task<ICommandResponse<LoadDataResult>> LoadExistingBindings(LoadDataCommandArguments args, CancellationToken cancellationToken = default)
Parameters
args
LoadDataCommandArgumentsCommand arguments provided by client.
cancellationToken
CancellationTokenCancellation token.
Returns
- Task<ICommandResponse<LoadDataResult>>
LoadExistingBindingsInternal(LoadDataCommandArguments, CancellationToken)
Load existing bindings.
protected abstract Task<LoadDataResult> LoadExistingBindingsInternal(LoadDataCommandArguments args, CancellationToken cancellationToken = default)
Parameters
args
LoadDataCommandArgumentsLoad data arguments.
cancellationToken
CancellationTokenCancellation token.
Returns
- Task<LoadDataResult>
LoadSidePanelData(LoadDataCommandArguments, CancellationToken)
Returns result containing data for binding side panel and the number of total items.
public Task<ICommandResponse<LoadDataResult>> LoadSidePanelData(LoadDataCommandArguments args, CancellationToken cancellationToken = default)
Parameters
args
LoadDataCommandArgumentsCommand arguments provided by client.
cancellationToken
CancellationTokenCancellation token.
Returns
- Task<ICommandResponse<LoadDataResult>>
LoadSidePanelDataInternal(LoadDataCommandArguments, CancellationToken)
Load items eligible for selection in the binding side panel.
protected abstract Task<LoadDataResult> LoadSidePanelDataInternal(LoadDataCommandArguments args, CancellationToken cancellationToken = default)
Parameters
args
LoadDataCommandArgumentsLoad data arguments.
cancellationToken
CancellationTokenCancellation token.
Returns
- Task<LoadDataResult>
SetBindings(SetBindingsCommandArguments<TBindingValueType>, CancellationToken)
Command which sets the bindings.
public virtual Task<ICommandResponse<FormSubmissionResult>> SetBindings(SetBindingsCommandArguments<TBindingValueType> args, CancellationToken cancellationToken = default)
Parameters
args
SetBindingsCommandArguments<TBindingValueType>Set bindings command arguments containing list of binding identifiers to set.
cancellationToken
CancellationTokenCancellation token.
Returns
SetBindingsInternal(SetBindingsCommandArguments<TBindingValueType>, CancellationToken)
Sets the current bindings.
protected abstract Task SetBindingsInternal(SetBindingsCommandArguments<TBindingValueType> args, CancellationToken cancellationToken = default)
Parameters
args
SetBindingsCommandArguments<TBindingValueType>Set bindings arguments.
cancellationToken
CancellationTokenCancellation token.
Returns
- Task
ValidateBindings(ICollection<TBindingValueType>)
Validates the bindings received from the template. Returns true if bindings satisfy all requirements, otherwise false.
protected abstract bool ValidateBindings(ICollection<TBindingValueType> identifiers)
Parameters
identifiers
ICollection<TBindingValueType>
Returns
- bool