Interface IRatingStatisticsService
This interface exposes functionality to retrieve and update ratings statistics.
Namespace: EPiServer.Social.Ratings.Core
Assembly: EPiServer.Social.Ratings.Core.dll
Version: 1.5.4Syntax
public interface IRatingStatisticsService
Methods
Get(Criteria<RatingStatisticsFilter>)
Gets a page of existing rating statistics filtered by the specified criteria.
Declaration
ResultPage<RatingStatistics> Get(Criteria<RatingStatisticsFilter> criteria)
Parameters
| Type | Name | Description |
|---|---|---|
| Criteria<RatingStatisticsFilter> | criteria | The criteria for retrieving rating statistics. |
Returns
| Type | Description |
|---|---|
| ResultPage<RatingStatistics> | Page of rating statistics filtered according to the specified criteria |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown when null passed for criteria. |
| InvalidPageInfoException | Thrown when the page info is invalid such as using a negative value for PageOffset or PageSize or using a PageSize that exceeds 1000. |
| SocialException | Thrown when an error occurs while processing the request. |
| SocialAuthenticationException | Thrown when an authentication error occurs while processing the request. |
| MaximumDataSizeExceededException | Thrown when a Social object is submitted, which exceeds the size restrictions of the system. |
| SocialCommunicationException | Thrown when errors occur communicating with the cloud services. |
Get<TExtension>(CompositeCriteria<RatingStatisticsFilter, TExtension>)
Gets a page of composite rating statistics filtered by the specified criteria.
Declaration
ResultPage<Composite<RatingStatistics, TExtension>> Get<TExtension>(CompositeCriteria<RatingStatisticsFilter, TExtension> criteria)
where TExtension : class
Parameters
| Type | Name | Description |
|---|---|---|
| CompositeCriteria<RatingStatisticsFilter, TExtension> | criteria | The criteria for retrieving composite rating statistics. |
Returns
| Type | Description |
|---|---|
| ResultPage<Composite<RatingStatistics, TExtension>> | Page of composite rating statistics filtered according to the specified criteria |
Type Parameters
| Name | Description |
|---|---|
| TExtension |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown when null passed for criteria. |
| InvalidPageInfoException | Thrown when the page info is invalid such as using a negative value for PageOffset or PageSize or using a PageSize that exceeds 1000. |
| SocialException | Thrown when an error occurs while processing the request. |
| SocialAuthenticationException | Thrown when an authentication error occurs while processing the request. |
| MaximumDataSizeExceededException | Thrown when a Social object is submitted, which exceeds the size restrictions of the system. |
| SocialCommunicationException | Thrown when errors occur communicating with the cloud services. |
GetAsync(Criteria<RatingStatisticsFilter>)
Gets a page of existing rating statistics filtered by the specified criteria.
Declaration
Task<ResultPage<RatingStatistics>> GetAsync(Criteria<RatingStatisticsFilter> criteria)
Parameters
| Type | Name | Description |
|---|---|---|
| Criteria<RatingStatisticsFilter> | criteria | The criteria for retrieving rating statistics. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<ResultPage<RatingStatistics>> | Page of rating statistics filtered according to the specified criteria |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown when null passed for criteria. |
| InvalidPageInfoException | Thrown when the page info is invalid such as using a negative value for PageOffset or PageSize or using a PageSize that exceeds 1000. |
| SocialException | Thrown when an error occurs while processing the request. |
| SocialAuthenticationException | Thrown when an authentication error occurs while processing the request. |
| MaximumDataSizeExceededException | Thrown when a Social object is submitted, which exceeds the size restrictions of the system. |
| SocialCommunicationException | Thrown when errors occur communicating with the cloud services. |
GetAsync<TExtension>(CompositeCriteria<RatingStatisticsFilter, TExtension>)
Gets a page of composite rating statistics filtered by the specified criteria.
Declaration
Task<ResultPage<Composite<RatingStatistics, TExtension>>> GetAsync<TExtension>(CompositeCriteria<RatingStatisticsFilter, TExtension> criteria)
where TExtension : class
Parameters
| Type | Name | Description |
|---|---|---|
| CompositeCriteria<RatingStatisticsFilter, TExtension> | criteria | The criteria for retrieving composite rating statistics. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<ResultPage<Composite<RatingStatistics, TExtension>>> | Page of composite rating statistics filtered according to the specified criteria |
Type Parameters
| Name | Description |
|---|---|
| TExtension |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown when null passed for criteria. |
| InvalidPageInfoException | Thrown when the page info is invalid such as using a negative value for PageOffset or PageSize or using a PageSize that exceeds 1000. |
| SocialException | Thrown when an error occurs while processing the request. |
| SocialAuthenticationException | Thrown when an authentication error occurs while processing the request. |
| MaximumDataSizeExceededException | Thrown when a Social object is submitted, which exceeds the size restrictions of the system. |
| SocialCommunicationException | Thrown when errors occur communicating with the cloud services. |
Update<TExtension>(Reference, TExtension)
Updates the extension data for the composite rating statistics with the specified target.
Declaration
Composite<RatingStatistics, TExtension> Update<TExtension>(Reference target, TExtension extension)
where TExtension : class
Parameters
| Type | Name | Description |
|---|---|---|
| Reference | target | Target of the rating statistics to be updated |
| TExtension | extension | Extended data supporting the rating statistic |
Returns
| Type | Description |
|---|---|
| Composite<RatingStatistics, TExtension> | The updated composite rating statistics with the specified extension data |
Type Parameters
| Name | Description |
|---|---|
| TExtension | Type of data applied as an extension of the rating statistics |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentException | Thrown when the specified statistics data is invalid. |
| System.ArgumentNullException | Thrown when the specified statistics data is invalid. |
| RatingStatisticsDoNotExistException | Thrown when the rating statistics for the specified target does not exists. |
| SocialException | Thrown when an error occurs while processing the request. |
| SocialAuthenticationException | Thrown when an authentication error occurs while processing the request. |
| MaximumDataSizeExceededException | Thrown when a Social object is submitted, which exceeds the size restrictions of the system. |
| SocialCommunicationException | Thrown when errors occur communicating with the cloud services. |
UpdateAsync<TExtension>(Reference, TExtension)
Updates the extension data for the composite rating statistics with the specified target.
Declaration
Task<Composite<RatingStatistics, TExtension>> UpdateAsync<TExtension>(Reference target, TExtension extension)
where TExtension : class
Parameters
| Type | Name | Description |
|---|---|---|
| Reference | target | Target of the composite rating statistics to be updated |
| TExtension | extension | Extended data supporting the composite rating statistic |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<Composite<RatingStatistics, TExtension>> | The updated composite rating statistics with the specified extension data |
Type Parameters
| Name | Description |
|---|---|
| TExtension | Type of extension data to be applied to the composite rating statistics |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentException | Thrown when the specified statistics data is invalid. |
| System.ArgumentNullException | Thrown when the specified statistics data is invalid. |
| RatingStatisticsDoNotExistException | Thrown when the rating statistics for the specified target does not exists. |
| SocialException | Thrown when an error occurs while processing the request. |
| SocialAuthenticationException | Thrown when an authentication error occurs while processing the request. |
| MaximumDataSizeExceededException | Thrown when a Social object is submitted, which exceeds the size restrictions of the system. |
| SocialCommunicationException | Thrown when errors occur communicating with the cloud services. |