Plugin that enables programmatic conversion between content types
IContentConverter is defined in the Telligent.Evolution.Extensibility.ContentConversion.Version3 namespace.
Definition
interface IContentConverter : IPlugin
{
Guid SourceContentTypeId { get; }
Guid TargetContentTypeId { get; }
Guid Convert(Guid sourceContentId, Guid targetApplicationId, Guid targetApplicationTypeId, IDictionary<string,string> options);
PropertyGroup[] GetConversionOptions(Guid sourceContentId, Guid targetApplicationId, Guid targetApplicationTypeId);
bool Validate(Guid sourceContentId);
}
Properties
| Name | Type | Description | Default | Options |
|---|---|---|---|---|
| SourceContentTypeId | Guid | Content Type Id to convert from | ||
| TargetContentTypeId | Guid | Content Type Id to convert to |
Methods
Guid Convert(Guid sourceContentId, Guid targetApplicationId, Guid targetApplicationTypeId, IDictionary<string,string> options);
Implements conversion from SourceContentTypeId to TargetContentTypeId for a given piece of content. Content ID of newly converted content.
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| sourceContentId | Guid | Source content to convert | Required | ||
| targetApplicationId | Guid | Target application for resulting new content | Required | ||
| targetApplicationTypeId | Guid | Target application type for resulting new content | Required | ||
| options | IDictionary<string,string> | Optional extra parameters | Required |
Return Type
PropertyGroup[] GetConversionOptions(Guid sourceContentId, Guid targetApplicationId, Guid targetApplicationTypeId);
Configuration metadata
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| sourceContentId | Guid | Source content being converted | Required | ||
| targetApplicationId | Guid | Target Application Id | Required | ||
| targetApplicationTypeId | Guid | Target Application Type Id | Required |
Return Type
bool Validate(Guid sourceContentId);
Implements validation of when the converter should be available for a given source and target content type id pair. When false, the converter is not returned when listing available target content types, even if source's content type matches.
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| sourceContentId | Guid | Implements validation of when the converter should be available for a given source and target content type id pair. When false, the converter is not returned when listing available target content types, even if source's content type matches. | Required |