Class HttpGroupRepository

Inheritance
System.Object
HttpGroupRepository
Implements
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Social.Groups.Rest
Assembly: EPiServer.Social.Groups.Rest.dll
Version: 1.5.4
Syntax
public class HttpGroupRepository : IGroupRepository

Constructors

HttpGroupRepository(IHttpClientFactory, IGroupRequestFactory)

Declaration
public HttpGroupRepository(IHttpClientFactory httpClientFactory, IGroupRequestFactory requestFactory)
Parameters
Type Name Description
IHttpClientFactory httpClientFactory
IGroupRequestFactory requestFactory

Methods

Add(Group)

Adds a new group to the underlying data store.

Declaration
public Group Add(Group group)
Parameters
Type Name Description
Group group

The partially populated group to be added

Returns
Type Description
Group

The fully populated group that was added.

Exceptions
Type Condition
SocialCommunicationException

Thrown when the cloud service cannot be reached.

Add<TExtension>(Group, TExtension)

Adds a new composite group to the underlying data store.

Declaration
public Composite<Group, TExtension> Add<TExtension>(Group group, TExtension extension)
    where TExtension : class
Parameters
Type Name Description
Group group

The partially populated group to be added

TExtension extension
Returns
Type Description
Composite<Group, TExtension>

The fully populated group that was added.

Type Parameters
Name Description
TExtension

Type of extension data for the group being added.

Exceptions
Type Condition
SocialCommunicationException

Thrown when the cloud service cannot be reached.

AddAsync(Group)

Asynchronously adds a new group to the underlying data store.

Declaration
public Task<Group> AddAsync(Group group)
Parameters
Type Name Description
Group group

The partially populated group to be added

Returns
Type Description
System.Threading.Tasks.Task<Group>

The fully populated group that was added.

Exceptions
Type Condition
SocialCommunicationException

Thrown when the cloud service cannot be reached.

AddAsync<TExtension>(Group, TExtension)

Asynchronously adds a new composite group to the underlying data store.

Declaration
public Task<Composite<Group, TExtension>> AddAsync<TExtension>(Group group, TExtension extension)
    where TExtension : class
Parameters
Type Name Description
Group group

The partially populated group to be added

TExtension extension
Returns
Type Description
System.Threading.Tasks.Task<Composite<Group, TExtension>>

The fully populated group that was added.

Type Parameters
Name Description
TExtension

Type of extension data for the group being added.

Exceptions
Type Condition
SocialCommunicationException

Thrown when the cloud service cannot be reached.

Get(Criteria<GroupFilter>)

Retrieves a page of group items composed without their extension data from the database, as described by the specified criteria.

Declaration
public ResultPage<Group> Get(Criteria<GroupFilter> criteria)
Parameters
Type Name Description
Criteria<GroupFilter> criteria

Criteria by which to filter group items

Returns
Type Description
ResultPage<Group>

Page of group items

Exceptions
Type Condition
SocialCommunicationException

Thrown when the cloud service cannot be reached.

Get(GroupId)

Finds a group by its identifier.

Declaration
public Group Get(GroupId groupId)
Parameters
Type Name Description
GroupId groupId

Id of group to retrieve.

Returns
Type Description
Group

The identified group

Exceptions
Type Condition
GroupDoesNotExistException

Thrown when the identified group does not exist.

SocialCommunicationException

Thrown when the cloud service cannot be reached.

Get<TExtension>(CompositeCriteria<GroupFilter, TExtension>)

Retrieves a page of group items composed with their extension data from the database, as described by the specified criteria. The result set will be filtered to items of the type supplied as a type param.

Declaration
public ResultPage<Composite<Group, TExtension>> Get<TExtension>(CompositeCriteria<GroupFilter, TExtension> criteria)
    where TExtension : class
Parameters
Type Name Description
CompositeCriteria<GroupFilter, TExtension> criteria

Criteria by which to filter group items

Returns
Type Description
ResultPage<Composite<Group, TExtension>>

Page of group items composed with their extension data

Type Parameters
Name Description
TExtension

Type of extension data associated with the items to be retrieved

Exceptions
Type Condition
SocialCommunicationException

Thrown when the cloud service cannot be reached.

Get<TExtension>(GroupId)

Finds a group by its identifier.

Declaration
public Composite<Group, TExtension> Get<TExtension>(GroupId id)
    where TExtension : class
Parameters
Type Name Description
GroupId id

Id of group to retrieve.

Returns
Type Description
Composite<Group, TExtension>

The identified group

Type Parameters
Name Description
TExtension

Type of extension data to retrieve.

Exceptions
Type Condition
GroupDoesNotExistException

Thrown when the identified group does not exist.

SocialCommunicationException

Thrown when the cloud service cannot be reached.

GetAsync(Criteria<GroupFilter>)

Asynchronously retrieves a page of group items composed without their extension data from the database, as described by the specified criteria.

Declaration
public Task<ResultPage<Group>> GetAsync(Criteria<GroupFilter> criteria)
Parameters
Type Name Description
Criteria<GroupFilter> criteria

Criteria by which to filter group items

Returns
Type Description
System.Threading.Tasks.Task<ResultPage<Group>>

Page of group items

Exceptions
Type Condition
SocialCommunicationException

Thrown when the cloud service cannot be reached.

GetAsync(GroupId)

Asynchronously finds a group by its identifier.

Declaration
public Task<Group> GetAsync(GroupId groupId)
Parameters
Type Name Description
GroupId groupId

Id of group to retrieve.

Returns
Type Description
System.Threading.Tasks.Task<Group>

The identified group

Exceptions
Type Condition
GroupDoesNotExistException

Thrown when the identified group does not exist.

SocialCommunicationException

Thrown when the cloud service cannot be reached.

GetAsync<TExtension>(CompositeCriteria<GroupFilter, TExtension>)

Asynchronously retrieves a page of group items composed with their extension data from the database, as described by the specified criteria. The result set will be filtered to items of the type supplied as a type param.

Declaration
public Task<ResultPage<Composite<Group, TExtension>>> GetAsync<TExtension>(CompositeCriteria<GroupFilter, TExtension> criteria)
    where TExtension : class
Parameters
Type Name Description
CompositeCriteria<GroupFilter, TExtension> criteria

Criteria by which to filter group items

Returns
Type Description
System.Threading.Tasks.Task<ResultPage<Composite<Group, TExtension>>>

Page of group items composed with their extension data

Type Parameters
Name Description
TExtension

Type of extension data associated with the items to be retrieved

Exceptions
Type Condition
SocialCommunicationException

Thrown when the cloud service cannot be reached.

GetAsync<TExtension>(GroupId)

Asynchronously finds a group by its identifier.

Declaration
public Task<Composite<Group, TExtension>> GetAsync<TExtension>(GroupId id)
    where TExtension : class
Parameters
Type Name Description
GroupId id

Id of group to retrieve.

Returns
Type Description
System.Threading.Tasks.Task<Composite<Group, TExtension>>

The identified group

Type Parameters
Name Description
TExtension

Type of extension data to retrieve.

Exceptions
Type Condition
GroupDoesNotExistException

Thrown when the identified group does not exist.

SocialCommunicationException

Thrown when the cloud service cannot be reached.

Remove(GroupId)

Declaration
public void Remove(GroupId groupId)
Parameters
Type Name Description
GroupId groupId

RemoveAsync(GroupId)

Declaration
public Task RemoveAsync(GroupId groupId)
Parameters
Type Name Description
GroupId groupId
Returns
Type Description
System.Threading.Tasks.Task

Update(Group)

Updates a group by its identifier.

Declaration
public Group Update(Group group)
Parameters
Type Name Description
Group group

updated version of the group.

Returns
Type Description
Group

The identified group

Exceptions
Type Condition
GroupDoesNotExistException

Thrown when the identified group does not exist.

SocialCommunicationException

Thrown when the cloud service cannot be reached.

Update<TExtension>(Group, TExtension)

Updates a group by its identifier.

Declaration
public Composite<Group, TExtension> Update<TExtension>(Group group, TExtension extension)
    where TExtension : class
Parameters
Type Name Description
Group group

updated version of the group.

TExtension extension

updated version of the extension data.

Returns
Type Description
Composite<Group, TExtension>

The identified group

Type Parameters
Name Description
TExtension

Type of extension data for the group being updated.

Exceptions
Type Condition
GroupDoesNotExistException

Thrown when the identified group does not exist.

SocialCommunicationException

Thrown when the cloud service cannot be reached.

UpdateAsync(Group)

Asynchronously updates a group by its identifier.

Declaration
public Task<Group> UpdateAsync(Group group)
Parameters
Type Name Description
Group group

updated version of the group.

Returns
Type Description
System.Threading.Tasks.Task<Group>

The identified group

Exceptions
Type Condition
GroupDoesNotExistException

Thrown when the identified group does not exist.

SocialCommunicationException

Thrown when the cloud service cannot be reached.

UpdateAsync<TExtension>(Group, TExtension)

Asynchronously updates a group by its identifier.

Declaration
public Task<Composite<Group, TExtension>> UpdateAsync<TExtension>(Group group, TExtension extension)
    where TExtension : class
Parameters
Type Name Description
Group group

updated version of the group.

TExtension extension

updated version of the extension data.

Returns
Type Description
System.Threading.Tasks.Task<Composite<Group, TExtension>>

The identified group

Type Parameters
Name Description
TExtension

Type of extension data for the group being updated.

Exceptions
Type Condition
GroupDoesNotExistException

Thrown when the identified group does not exist.

SocialCommunicationException

Thrown when the cloud service cannot be reached.

Implements

arrow_upward