Interface IGroupService
The IGroupService interface describes a component responsible for facilitating the addition, update, removal, and retrieval of social groups.
Namespace: EPiServer.Social.Groups.Core
Assembly: EPiServer.Social.Groups.Core.dll
Version: 1.5.4Syntax
public interface IGroupService
Methods
Add(Group)
Adds a new group.
Declaration
Group Add(Group group)
Parameters
| Type | Name | Description |
|---|---|---|
| Group | group | Group to be added |
Returns
| Type | Description |
|---|---|
| Group | Group which was just added |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown when the parameter passed in is null. |
| System.ArgumentException | Thrown when any of the parameters passed in are invalid. |
| 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. |
Add<TExtension>(Group, TExtension)
Adds a new group.
Declaration
Composite<Group, TExtension> Add<TExtension>(Group group, TExtension extension)
where TExtension : class
Parameters
| Type | Name | Description |
|---|---|---|
| Group | group | Group to be added |
| TExtension | extension | Extension data to be created |
Returns
| Type | Description |
|---|---|
| Composite<Group, TExtension> | Group which was just added with extension data |
Type Parameters
| Name | Description |
|---|---|
| TExtension |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown when the parameter passed in is null. |
| System.ArgumentException | Thrown when any of the parameters passed in are invalid. |
| 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. |
AddAsync(Group)
Asynchronously adds a new group.
Declaration
Task<Group> AddAsync(Group group)
Parameters
| Type | Name | Description |
|---|---|---|
| Group | group | Group to be added |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<Group> | Group which was just added |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown when the parameter passed in is null. |
| System.ArgumentException | Thrown when any of the parameters passed in are invalid. |
| 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. |
AddAsync<TExtension>(Group, TExtension)
Asynchronously adds a new group.
Declaration
Task<Composite<Group, TExtension>> AddAsync<TExtension>(Group group, TExtension extension)
where TExtension : class
Parameters
| Type | Name | Description |
|---|---|---|
| Group | group | Group to be added |
| TExtension | extension | Extension data to be created |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<Composite<Group, TExtension>> | Group which was just added with extension data |
Type Parameters
| Name | Description |
|---|---|
| TExtension |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown when the parameter passed in is null. |
| System.ArgumentException | Thrown when any of the parameters passed in are invalid. |
| 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(Criteria<GroupFilter>)
Retrieves a page of groups as specified by the provided criteria.
Declaration
ResultPage<Group> Get(Criteria<GroupFilter> criteria)
Parameters
| Type | Name | Description |
|---|---|---|
| Criteria<GroupFilter> | criteria | Filters the result set of groups |
Returns
| Type | Description |
|---|---|
| ResultPage<Group> | Page of groups filtered according to the specified criteria |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown when any of the parameters passed in are null or invalid. |
| 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(GroupId)
Gets a group as identified by the specified ID.
Declaration
Group Get(GroupId id)
Parameters
| Type | Name | Description |
|---|---|---|
| GroupId | id | Group identifier |
Returns
| Type | Description |
|---|---|
| Group | Group corresponding to the specified ID |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown when any of the parameters passed in are null or invalid. |
| GroupDoesNotExistException | Thrown when the identified group document does not exist. |
| 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<GroupFilter, TExtension>)
Retrieves a result page of composites. Each composite contains a group and its extension data, as specified by the provided criteria.
Declaration
ResultPage<Composite<Group, TExtension>> Get<TExtension>(CompositeCriteria<GroupFilter, TExtension> criteria)
where TExtension : class
Parameters
| Type | Name | Description |
|---|---|---|
| CompositeCriteria<GroupFilter, TExtension> | criteria | Filters the result set of groups and the extension data |
Returns
| Type | Description |
|---|---|
| ResultPage<Composite<Group, TExtension>> | Page of composites that contain groups and their extension data filtered according to the specified criteria |
Type Parameters
| Name | Description |
|---|---|
| TExtension |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown when any of the parameters passed in are null or invalid. |
| 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>(GroupId)
Gets a group as identified by the specified ID.
Declaration
Composite<Group, TExtension> Get<TExtension>(GroupId id)
where TExtension : class
Parameters
| Type | Name | Description |
|---|---|---|
| GroupId | id | Group identifier |
Returns
| Type | Description |
|---|---|
| Composite<Group, TExtension> | Composite of a group and its extension data corresponding to the specified ID |
Type Parameters
| Name | Description |
|---|---|
| TExtension |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown when any of the parameters passed in are null or invalid. |
| GroupDoesNotExistException | Thrown when the identified group document does not exist. |
| 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<GroupFilter>)
Asynchronously retrieves a page of groups as specified by the provided criteria.
Declaration
Task<ResultPage<Group>> GetAsync(Criteria<GroupFilter> criteria)
Parameters
| Type | Name | Description |
|---|---|---|
| Criteria<GroupFilter> | criteria | Filters the result set of groups |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<ResultPage<Group>> | Page of groups filtered according to the specified criteria |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown when any of the parameters passed in are null or invalid. |
| 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(GroupId)
Asynchronously gets a group as identified by the specified ID.
Declaration
Task<Group> GetAsync(GroupId id)
Parameters
| Type | Name | Description |
|---|---|---|
| GroupId | id | Group identifier |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<Group> | Group corresponding to the specified ID |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown when any of the parameters passed in are null or invalid. |
| GroupDoesNotExistException | Thrown when the identified group document does not exist. |
| 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<GroupFilter, TExtension>)
Asynchronously retrieves a result page of composites. Each composite contains a group and its extension data, as specified by the provided criteria.
Declaration
Task<ResultPage<Composite<Group, TExtension>>> GetAsync<TExtension>(CompositeCriteria<GroupFilter, TExtension> criteria)
where TExtension : class
Parameters
| Type | Name | Description |
|---|---|---|
| CompositeCriteria<GroupFilter, TExtension> | criteria | Filters the result set of groups and the extension data |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<ResultPage<Composite<Group, TExtension>>> | Page of composites that contain groups and their extension data filtered according to the specified criteria |
Type Parameters
| Name | Description |
|---|---|
| TExtension |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown when any of the parameters passed in are null or invalid. |
| 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>(GroupId)
Asynchronously gets a group as identified by the specified ID.
Declaration
Task<Composite<Group, TExtension>> GetAsync<TExtension>(GroupId id)
where TExtension : class
Parameters
| Type | Name | Description |
|---|---|---|
| GroupId | id | Group identifier |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<Composite<Group, TExtension>> | Composite of a group and its extension data corresponding to the specified ID |
Type Parameters
| Name | Description |
|---|---|
| TExtension |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown when any of the parameters passed in are null or invalid. |
| GroupDoesNotExistException | Thrown when the identified group document does not exist. |
| 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. |
Remove(GroupId)
Removes an existing group from the system.
Declaration
void Remove(GroupId id)
Parameters
| Type | Name | Description |
|---|---|---|
| GroupId | id | ID of the group to be removed |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown when any of the parameters passed in are null or invalid. |
| MemberStillExistsException | Thrown when members still exist in the system for the group being deleted. |
| AssociationStillExistsException | Thrown when content associations still exist in the system for the group being deleted. |
| 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. |
RemoveAsync(GroupId)
Asynchronously removes an existing group from the system.
Declaration
Task RemoveAsync(GroupId id)
Parameters
| Type | Name | Description |
|---|---|---|
| GroupId | id | ID of the group to be removed |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown when any of the parameters passed in are null or invalid. |
| MemberStillExistsException | Thrown when members still exist in the system for the group being deleted. |
| AssociationStillExistsException | Thrown when content associations still exist in the system for the group being deleted. |
| 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(Group)
Saves an update to an existing group.
Declaration
Group Update(Group group)
Parameters
| Type | Name | Description |
|---|---|---|
| Group | group | Group information to be updated |
Returns
| Type | Description |
|---|---|
| Group | Group which was just updated |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown when any of the parameters passed in are null. |
| System.ArgumentException | Thrown when any of the parameters passed in are invalid. |
| GroupDoesNotExistException | Thrown when the identified group document does not exist. |
| 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>(Group, TExtension)
Saves an update to an existing group.
Declaration
Composite<Group, TExtension> Update<TExtension>(Group group, TExtension extension)
where TExtension : class
Parameters
| Type | Name | Description |
|---|---|---|
| Group | group | Group information to be updated |
| TExtension | extension | Extension Data to be updated |
Returns
| Type | Description |
|---|---|
| Composite<Group, TExtension> | Group which was just updated |
Type Parameters
| Name | Description |
|---|---|
| TExtension |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown when any of the parameters passed in are null. |
| System.ArgumentException | Thrown when any of the parameters passed in are invalid. |
| GroupDoesNotExistException | Thrown when the identified group document does not exist. |
| 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(Group)
Asynchronously saves an update to an existing group.
Declaration
Task<Group> UpdateAsync(Group group)
Parameters
| Type | Name | Description |
|---|---|---|
| Group | group | Group information to be updated |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<Group> | Group which was just updated |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown when any of the parameters passed in are null. |
| System.ArgumentException | Thrown when any of the parameters passed in are invalid. |
| GroupDoesNotExistException | Thrown when the identified group document does not exist. |
| 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>(Group, TExtension)
Asynchronously saves an update to an existing group.
Declaration
Task<Composite<Group, TExtension>> UpdateAsync<TExtension>(Group group, TExtension extension)
where TExtension : class
Parameters
| Type | Name | Description |
|---|---|---|
| Group | group | Group information to be updated |
| TExtension | extension | Extension Data to be updated |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<Composite<Group, TExtension>> | Group which was just updated |
Type Parameters
| Name | Description |
|---|---|
| TExtension |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown when any of the parameters passed in are null. |
| System.ArgumentException | Thrown when any of the parameters passed in are invalid. |
| GroupDoesNotExistException | Thrown when the identified group document does not exist. |
| 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. |