Class MediaFileDetail
Media library general edit page.
[UIPageLocation(PageLocationEnum.SidePanel)]
[UIEvaluatePermission("View")]
[UINavigation(false)]
[UIBreadcrumbs(false)]
public sealed class MediaFileDetail : InfoEditPage<MediaFileInfo>, IPage
- Inheritance
-
objectMediaFileDetail
- Implements
- Inherited Members
- Extension Methods
Constructors
MediaFileDetail(IFormDataBinder, IInfoProvider<MediaLibraryInfo>, IAssetItemMapper, IFormComponentMapper, IUIPermissionEvaluator)
Initializes an instance of the MediaFileDetail class.
public MediaFileDetail(IFormDataBinder formDataBinder, IInfoProvider<MediaLibraryInfo> mediaLibraryInfoProvider, IAssetItemMapper assetItemMapper, IFormComponentMapper formComponentMapper, IUIPermissionEvaluator uiPermissionEvaluator)
Parameters
formDataBinder
IFormDataBindermediaLibraryInfoProvider
IInfoProvider<MediaLibraryInfo>assetItemMapper
IAssetItemMapperformComponentMapper
IFormComponentMapperuiPermissionEvaluator
IUIPermissionEvaluator
Properties
ObjectId
ID of the object.
[PageParameter(typeof(IntPageModelBinder))]
public override int ObjectId { get; set; }
Property Value
- int
Methods
ConfigurePage()
Set up page's configuration. Configures the submit action.
public override Task ConfigurePage()
Returns
- Task
ConfigureTemplateProperties(EditTemplateClientProperties)
Transforms the configuration to template properties.
public override Task<EditTemplateClientProperties> ConfigureTemplateProperties(EditTemplateClientProperties properties)
Parameters
properties
EditTemplateClientProperties
Returns
Remarks
Performs also permission evaluation.
GetFormItems()
Prepares form items for editing object of the specified ObjectType.
protected override Task<ICollection<IFormItem>> GetFormItems()
Returns
- Task<ICollection<IFormItem>>
Returns the collection of form items.
GetSubmitSuccessResponse(MediaFileInfo, ICollection<IFormItem>)
Response that has to be returned after successful form submission.
protected override Task<ICommandResponse> GetSubmitSuccessResponse(MediaFileInfo savedInfoObject, ICollection<IFormItem> items)
Parameters
savedInfoObject
MediaFileInfoObject info after persisting.
items
ICollection<IFormItem>Collection with updated form items.
Returns
- Task<ICommandResponse>
SetFormData(MediaFileInfo, IFormFieldValueProvider)
Sets the infoObject
and renames media file.
protected override Task SetFormData(MediaFileInfo infoObject, IFormFieldValueProvider fieldValueProvider)
Parameters
infoObject
MediaFileInfoInfo object to be set.
fieldValueProvider
IFormFieldValueProviderProvider of form field values.
Returns
- Task
Submit(FormSubmissionCommandArguments)
Handles the form submit command.
public override Task<ICommandResponse> Submit(FormSubmissionCommandArguments args)
Parameters
args
FormSubmissionCommandArgumentsForm submission arguments.
Returns
- Task<ICommandResponse>
Returns the form submission result.
Remarks
The default implementation calls the SubmitInternal(FormSubmissionCommandArguments, ICollection<IFormItem>, IFormFieldValueProvider) method.
- See Also
SubmitInternal(FormSubmissionCommandArguments, ICollection<IFormItem>, IFormFieldValueProvider)
Handles the internal specific processing of form submit command.
protected override Task<ICommandResponse> SubmitInternal(FormSubmissionCommandArguments args, ICollection<IFormItem> items, IFormFieldValueProvider formFieldValueProvider)
Parameters
args
FormSubmissionCommandArgumentsForm submission arguments.
items
ICollection<IFormItem>Form items with bound component values.
formFieldValueProvider
IFormFieldValueProviderProvider of form field values.
Returns
- Task<ICommandResponse>
Returns the form submission result.
Remarks
This method is called by the default implementation of the Submit(FormSubmissionCommandArguments) method.
- See Also