Content created on the site must implement this interface for the social services to support it.
Content is defined in the Telligent.Evolution.Extensibility.Api.Entities.Version1 namespace.
Definition
class Content : ApiEntity, IApiEntity, IAuditable, IContent { Content(AdditionalInfo additionalInfo); Content(Error error); Content(Warning warning); Content(IContent content); Content(IList<Warning> warnings, IList<Error> errors); Content(IContent content, IContentService contentService); Application Application { get; } string AvatarUrl { get; } Guid ContentId { get; } Guid ContentTypeId { get; } int? CreatedByUserId { get; } DateTime CreatedDate { get; } Guid DataTypeId { get; } IList<Error> Errors { get; } bool IsEnabled { get; } string Url { get; set; } IList<Warning> Warnings { get; } bool HasErrors(); bool HasWarnings(); bool HasWarningsOrErrors(); string HtmlDescription(string target); string HtmlName(string target); void ThrowErrors(); string ViewHtml(); string ViewHtml(string target); }
Constructors
Content(AdditionalInfo additionalInfo);
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| additionalInfo | AdditionalInfo | Additional Info | Required |
Content(Error error);
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| error | Error | Error | Required |
Content(Warning warning);
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| warning | Warning | Warning | Required |
Content(IContent content);
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| content | IContent | Content | Required |
Content(IList<Warning> warnings, IList<Error> errors);
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| warnings | IList<Warning> | Warnings | Required | ||
| errors | IList<Error> | Errors | Required |
Content(IContent content, IContentService contentService);
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| content | IContent | Content | Required | ||
| contentService | IContentService | Content Service | Required |
Properties
| Name | Type | Description | Default | Options |
|---|---|---|---|---|
| Application | Application | |||
| AvatarUrl | string | Url to an image particular to the content or content type. If none, return null. | ||
| ContentId | Guid | A Guid uniquely identifying the content. | ||
| ContentTypeId | Guid | A Guid identifying the type of content. All content of the same type (i.e. wiki page) will have the same value here. | ||
| CreatedByUserId | int? | The Id of the user who originated the content. | ||
| CreatedDate | DateTime | The date the content was created. | ||
| DataTypeId Obsolete | Guid | Obsolete in 13 | ||
| Errors | IList<Error> | |||
| IsEnabled | bool | A flag representing whether the content is enabled. This can be a wrapper for approval states, etc. | ||
| Url | string | A Url to the content on the site. | ||
| Warnings | IList<Warning> |
Methods
bool HasErrors();
Return Type
bool HasWarnings();
Return Type
bool HasWarningsOrErrors();
Return Type
string HtmlDescription(string target);
Return the Html encoded description of the content (the body, for example). Possible values for “target” are “Web”, “Email”, “WebServices”, or “raw”. When “raw” is specified as the target, the description should not be encoded or have any special rendering done to it.
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| target | string | Target | Required |
Return Type
string HtmlName(string target);
Return the Html encoded name of the content (the subject for example). Possible values for “target” are “Web”, “Email”, or “raw”. When “raw” is specified as the target, the name should not be encoded.
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| target | string | Target | Required |
Return Type
void ThrowErrors();
string ViewHtml();
Return Type
string ViewHtml(string target);
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| target | string | Target | Required |