Interface IRelationshipController
Namespace: DotNetNuke.Entities.Users.Social
Assembly: DotNetNuke.dll
Syntax
public interface IRelationshipController
Methods
| Improve this Doc View SourceAcceptUserRelationship(Int32)
Declaration
void AcceptUserRelationship(int userRelationshipId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | userRelationshipId |
CreateDefaultRelationshipsForPortal(Int32)
Declaration
void CreateDefaultRelationshipsForPortal(int portalId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | portalId |
DeleteRelationship(Relationship)
Delete Relationship.
Declaration
void DeleteRelationship(Relationship relationship)
Parameters
Type | Name | Description |
---|---|---|
Relationship | relationship | Relationship. |
DeleteRelationshipType(RelationshipType)
Delete RelationshipType.
Declaration
void DeleteRelationshipType(RelationshipType relationshipType)
Parameters
Type | Name | Description |
---|---|---|
RelationshipType | relationshipType | RelationshipType. |
DeleteUserRelationship(UserRelationship)
Delete UserRelationship.
Declaration
void DeleteUserRelationship(UserRelationship userRelationship)
Parameters
Type | Name | Description |
---|---|---|
UserRelationship | userRelationship | UserRelationship to delete. |
DeleteUserRelationshipPreference(UserRelationshipPreference)
Delete UserRelationshipPreference.
Declaration
void DeleteUserRelationshipPreference(UserRelationshipPreference userRelationshipPreference)
Parameters
Type | Name | Description |
---|---|---|
UserRelationshipPreference | userRelationshipPreference | UserRelationshipPreference to delete. |
GetAllRelationshipTypes()
Get list of All RelationshipTypes defined in system.
Declaration
IList<RelationshipType> GetAllRelationshipTypes()
Returns
Type | Description |
---|---|
IList<RelationshipType> | An |
GetFollowerRelationship(UserInfo, UserInfo)
Declaration
UserRelationship GetFollowerRelationship(UserInfo initiatingUser, UserInfo targetUser)
Parameters
Type | Name | Description |
---|---|---|
UserInfo | initiatingUser | |
UserInfo | targetUser |
Returns
Type | Description |
---|---|
UserRelationship |
GetFollowerRelationship(UserInfo)
Declaration
UserRelationship GetFollowerRelationship(UserInfo targetUser)
Parameters
Type | Name | Description |
---|---|---|
UserInfo | targetUser |
Returns
Type | Description |
---|---|
UserRelationship |
GetFollowersRelationshipByPortal(Int32)
Declaration
Relationship GetFollowersRelationshipByPortal(int portalId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | portalId |
Returns
Type | Description |
---|---|
Relationship |
GetFollowingRelationship(UserInfo, UserInfo)
Declaration
UserRelationship GetFollowingRelationship(UserInfo initiatingUser, UserInfo targetUser)
Parameters
Type | Name | Description |
---|---|---|
UserInfo | initiatingUser | |
UserInfo | targetUser |
Returns
Type | Description |
---|---|
UserRelationship |
GetFollowingRelationship(UserInfo)
Declaration
UserRelationship GetFollowingRelationship(UserInfo targetUser)
Parameters
Type | Name | Description |
---|---|---|
UserInfo | targetUser |
Returns
Type | Description |
---|---|
UserRelationship |
GetFriendRelationship(UserInfo, UserInfo)
Declaration
UserRelationship GetFriendRelationship(UserInfo initiatingUser, UserInfo targetUser)
Parameters
Type | Name | Description |
---|---|---|
UserInfo | initiatingUser | |
UserInfo | targetUser |
Returns
Type | Description |
---|---|
UserRelationship |
GetFriendRelationship(UserInfo)
Declaration
UserRelationship GetFriendRelationship(UserInfo targetUser)
Parameters
Type | Name | Description |
---|---|---|
UserInfo | targetUser |
Returns
Type | Description |
---|---|
UserRelationship |
GetFriendsRelationshipByPortal(Int32)
Declaration
Relationship GetFriendsRelationshipByPortal(int portalId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | portalId |
Returns
Type | Description |
---|---|
Relationship |
GetRelationship(Int32)
Get Relationship By RelationshipId.
Declaration
Relationship GetRelationship(int relationshipId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | relationshipId | Relationship ID. |
Returns
Type | Description |
---|---|
Relationship | The Relationship instance or null. |
GetRelationshipsByPortalId(Int32)
Get Relationships By PortalId.
Declaration
IList<Relationship> GetRelationshipsByPortalId(int portalId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | portalId | Portal ID. |
Returns
Type | Description |
---|---|
IList<Relationship> | An |
GetRelationshipsByUserId(Int32)
Get Relationships By UserId.
Declaration
IList<Relationship> GetRelationshipsByUserId(int userId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | userId | User ID. |
Returns
Type | Description |
---|---|
IList<Relationship> | An |
GetRelationshipType(Int32)
Get RelationshipType By RelationshipTypeId.
Declaration
RelationshipType GetRelationshipType(int relationshipTypeId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | relationshipTypeId | Relationship Type ID. |
Returns
Type | Description |
---|---|
RelationshipType | The RelationshipType instance or null. |
GetUserRelationship(UserInfo, UserInfo, Relationship)
Get UserRelationship by its members.
Declaration
UserRelationship GetUserRelationship(UserInfo user, UserInfo relatedUser, Relationship relationship)
Parameters
Type | Name | Description |
---|---|---|
UserInfo | user | User. |
UserInfo | relatedUser | Related User. |
Relationship | relationship | Relationship Object. |
Returns
Type | Description |
---|---|
UserRelationship | The UserRelationship instance or null. |
GetUserRelationship(Int32)
Get UserRelationship By UserRelationshipId.
Declaration
UserRelationship GetUserRelationship(int userRelationshipId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | userRelationshipId | User Relationship ID. |
Returns
Type | Description |
---|---|
UserRelationship | The UserRelationship instance or null. |
GetUserRelationshipPreference(Int32, Int32)
Get UserRelationshipPreference By UserId and RelationshipId.
Declaration
UserRelationshipPreference GetUserRelationshipPreference(int userId, int relationshipId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | userId | User ID. |
System.Int32 | relationshipId | Relationship ID. |
Returns
Type | Description |
---|---|
UserRelationshipPreference | The UserRelationshipPreference instance or null. |
GetUserRelationshipPreference(Int32)
Get UserRelationshipPreference By ID.
Declaration
UserRelationshipPreference GetUserRelationshipPreference(int preferenceId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | preferenceId | Preference ID. |
Returns
Type | Description |
---|---|
UserRelationshipPreference | The UserRelationshipPreference instance or null. |
GetUserRelationships(UserInfo)
This method gets a Dictionary of all the relationships that a User belongs to and the members of these relationships.
Declaration
IList<UserRelationship> GetUserRelationships(UserInfo user)
Parameters
Type | Name | Description |
---|---|---|
UserInfo | user | The user. |
Returns
Type | Description |
---|---|
IList<UserRelationship> | A Dictionary of Lists of UserRelationship, keyed by the Relationship. |
InitiateUserRelationship(UserInfo, UserInfo, Relationship)
Declaration
UserRelationship InitiateUserRelationship(UserInfo initiatingUser, UserInfo targetUser, Relationship relationship)
Parameters
Type | Name | Description |
---|---|---|
UserInfo | initiatingUser | |
UserInfo | targetUser | |
Relationship | relationship |
Returns
Type | Description |
---|---|
UserRelationship |
RemoveUserRelationship(Int32)
Declaration
void RemoveUserRelationship(int userRelationshipId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | userRelationshipId |
SaveRelationship(Relationship)
Save Relationship.
Declaration
void SaveRelationship(Relationship relationship)
Parameters
Type | Name | Description |
---|---|---|
Relationship | relationship | Relationship object. |
Remarks
If RelationshipId is -1 (Null.NullInteger), then a new Relationship is created, else existing Relationship is updated.
SaveRelationshipType(RelationshipType)
Save RelationshipType.
Declaration
void SaveRelationshipType(RelationshipType relationshipType)
Parameters
Type | Name | Description |
---|---|---|
RelationshipType | relationshipType | RelationshipType object. |
Remarks
If RelationshipTypeId is -1 (Null.NullInteger), then a new RelationshipType is created, else existing RelationshipType is updated.
SaveUserRelationship(UserRelationship)
Save UserRelationship.
Declaration
void SaveUserRelationship(UserRelationship userRelationship)
Parameters
Type | Name | Description |
---|---|---|
UserRelationship | userRelationship | UserRelationship object. |
Remarks
If UserRelationshipId is -1 (Null.NullInteger), then a new UserRelationship is created, else existing UserRelationship is updated.
SaveUserRelationshipPreference(UserRelationshipPreference)
Save UserRelationshipPreference.
Declaration
void SaveUserRelationshipPreference(UserRelationshipPreference userRelationshipPreference)
Parameters
Type | Name | Description |
---|---|---|
UserRelationshipPreference | userRelationshipPreference | UserRelationshipPreference object. |
Remarks
If PreferenceId is -1 (Null.NullInteger), then a new UserRelationshipPreference is created, else existing UserRelationshipPreference is updated.