Class HttpAssociationRepository

Inheritance
System.Object
HttpAssociationRepository
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 HttpAssociationRepository : IAssociationRepository

Constructors

HttpAssociationRepository(IHttpClientFactory, IAssociationRequestFactory)

Declaration
public HttpAssociationRepository(IHttpClientFactory httpClientFactory, IAssociationRequestFactory requestFactory)
Parameters
Type Name Description
IHttpClientFactory httpClientFactory
IAssociationRequestFactory requestFactory

Methods

Add(Association)

Adds a new association to the underlying data store.

Declaration
public Association Add(Association association)
Parameters
Type Name Description
Association association

The partially populated association to be added

Returns
Type Description
Association

The fully populated association that was added.

Exceptions
Type Condition
SocialCommunicationException

Thrown when the cloud service cannot be reached.

Add<TExtension>(Association, TExtension)

Adds a new composite association to the underlying data store.

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

The partially populated association to be added

TExtension extension
Returns
Type Description
Composite<Association, TExtension>

The fully populated association that was added.

Type Parameters
Name Description
TExtension

Type of extension data for the association being added.

Exceptions
Type Condition
SocialCommunicationException

Thrown when the cloud service cannot be reached.

AddAsync(Association)

Asynchronously adds a new association to the underlying data store.

Declaration
public Task<Association> AddAsync(Association association)
Parameters
Type Name Description
Association association

The partially populated association to be added

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

The fully populated association that was added.

Exceptions
Type Condition
SocialCommunicationException

Thrown when the cloud service cannot be reached.

AddAsync<TExtension>(Association, TExtension)

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

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

The partially populated association to be added

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

The fully populated association that was added.

Type Parameters
Name Description
TExtension

Type of extension data for the association being added.

Exceptions
Type Condition
SocialCommunicationException

Thrown when the cloud service cannot be reached.

Get(Criteria<AssociationFilter>)

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

Declaration
public ResultPage<Association> Get(Criteria<AssociationFilter> criteria)
Parameters
Type Name Description
Criteria<AssociationFilter> criteria

Criteria by which to filter association items

Returns
Type Description
ResultPage<Association>

Page of association items

Exceptions
Type Condition
SocialCommunicationException

Thrown when the cloud service cannot be reached.

Get(AssociationId)

Finds a association by its identifier.

Declaration
public Association Get(AssociationId associationId)
Parameters
Type Name Description
AssociationId associationId

Id of association to retrieve.

Returns
Type Description
Association

The identified association

Exceptions
Type Condition
AssociationDoesNotExistException

Thrown when the identified association does not exist.

SocialCommunicationException

Thrown when the cloud service cannot be reached.

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

Retrieves a page of association 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<Association, TExtension>> Get<TExtension>(CompositeCriteria<AssociationFilter, TExtension> criteria)
    where TExtension : class
Parameters
Type Name Description
CompositeCriteria<AssociationFilter, TExtension> criteria

Criteria by which to filter association items

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

Page of association 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>(AssociationId)

Finds a association by its identifier.

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

Id of association to retrieve.

Returns
Type Description
Composite<Association, TExtension>

The identified association

Type Parameters
Name Description
TExtension

Type of extension data to retrieve.

Exceptions
Type Condition
AssociationDoesNotExistException

Thrown when the identified association does not exist.

SocialCommunicationException

Thrown when the cloud service cannot be reached.

GetAsync(Criteria<AssociationFilter>)

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

Declaration
public Task<ResultPage<Association>> GetAsync(Criteria<AssociationFilter> criteria)
Parameters
Type Name Description
Criteria<AssociationFilter> criteria

Criteria by which to filter association items

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

Page of association items

Exceptions
Type Condition
SocialCommunicationException

Thrown when the cloud service cannot be reached.

GetAsync(AssociationId)

Asynchronously finds a association by its identifier.

Declaration
public Task<Association> GetAsync(AssociationId associationId)
Parameters
Type Name Description
AssociationId associationId

Id of association to retrieve.

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

The identified association

Exceptions
Type Condition
AssociationDoesNotExistException

Thrown when the identified association does not exist.

SocialCommunicationException

Thrown when the cloud service cannot be reached.

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

Asynchronously retrieves a page of association 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<Association, TExtension>>> GetAsync<TExtension>(CompositeCriteria<AssociationFilter, TExtension> criteria)
    where TExtension : class
Parameters
Type Name Description
CompositeCriteria<AssociationFilter, TExtension> criteria

Criteria by which to filter association items

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

Page of association 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>(AssociationId)

Asynchronously finds a association by its identifier.

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

Id of association to retrieve.

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

The identified association

Type Parameters
Name Description
TExtension

Type of extension data to retrieve.

Exceptions
Type Condition
AssociationDoesNotExistException

Thrown when the identified association does not exist.

SocialCommunicationException

Thrown when the cloud service cannot be reached.

IsAssociated(GroupId, Reference)

Returns true if the specified resource is an association of the specified group, false otherwise.

Declaration
public bool IsAssociated(GroupId group, Reference resource)
Parameters
Type Name Description
GroupId group

ID of the group

Reference resource

Reference representing the resource whose associationship should be verfied

Returns
Type Description
System.Boolean

True if the specified resource is an association of the specified group, false otherwise

Exceptions
Type Condition
SocialCommunicationException

Thrown when the cloud service cannot be reached.

Remove(AssociationId)

Declaration
public void Remove(AssociationId association)
Parameters
Type Name Description
AssociationId association

RemoveAsync(AssociationId)

Declaration
public Task RemoveAsync(AssociationId associationId)
Parameters
Type Name Description
AssociationId associationId
Returns
Type Description
System.Threading.Tasks.Task

Update<TExtension>(AssociationId, TExtension)

Updates a association by its identifier.

Declaration
public Composite<Association, TExtension> Update<TExtension>(AssociationId associationId, TExtension extension)
    where TExtension : class
Parameters
Type Name Description
AssociationId associationId

id of the association to be updated.

TExtension extension

updated version of the extension data.

Returns
Type Description
Composite<Association, TExtension>

The identified group

Type Parameters
Name Description
TExtension

Type of extension data for the association being updated.

Exceptions
Type Condition
AssociationDoesNotExistException

Thrown when the identified association does not exist.

SocialCommunicationException

Thrown when the cloud service cannot be reached.

UpdateAsync<TExtension>(AssociationId, TExtension)

Asynchronously updates a association by its identifier.

Declaration
public Task<Composite<Association, TExtension>> UpdateAsync<TExtension>(AssociationId associationId, TExtension extension)
    where TExtension : class
Parameters
Type Name Description
AssociationId associationId

id of the association to be updated.

TExtension extension

updated version of the extension data.

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

The identified group

Type Parameters
Name Description
TExtension

Type of extension data for the association being updated.

Exceptions
Type Condition
AssociationDoesNotExistException

Thrown when the identified association does not exist.

SocialCommunicationException

Thrown when the cloud service cannot be reached.

Implements

arrow_upward