|
Clearspace API (2.5.29) Core Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface UserRelationshipManager
| Method Summary | |
|---|---|
void |
approveRelationship(com.jivesoftware.community.user.relationships.UserRelationship userRelationship,
String responseMessage)
|
boolean |
canViewRelationshipLists(User user)
|
com.jivesoftware.community.user.relationships.UserRelationship |
createRelationship(long userID,
long relatedUserID,
int relationshipType,
long relationshipGraphID,
String requestMessage)
Create a relationship between two users. |
com.jivesoftware.community.user.relationships.UserRelationship |
createRelationship(User user,
User relatedUser,
com.jivesoftware.community.user.relationships.UserRelationshipGraph relationshipGraph,
String requestMessage)
Create a relationship between two users. |
com.jivesoftware.community.user.relationships.UserRelationshipGraph |
createRelationshipGraph(String name,
com.jivesoftware.community.user.relationships.UserRelationshipGraph.GraphType graphType)
Create a new relationship graph with a given name and persist it. |
com.jivesoftware.community.user.relationships.UserRelationshipList |
createRelationshipList(String name,
String label,
User owner)
Create a new UserRelationshipList. |
void |
deleteRelationshipGraph(long relationshipGraphID)
Remove the graph from the peristence layer. |
void |
deleteRelationshipList(com.jivesoftware.community.user.relationships.UserRelationshipList list)
Delete a list and all child relationships from the DB. |
void |
deleteUserRelationships(User user)
Delete all relationships related to the given user, regardless of which end of the relationship the given user exists. |
Iterable<com.jivesoftware.community.user.relationships.UserRelationshipView> |
getAllActiveRelationships(com.jivesoftware.community.user.relationships.UserRelationshipManagerImpl.UserRelationshipResultFilter filter)
Get a list of active user relationships for a given graph (for admin console purposes). |
com.jivesoftware.community.user.relationships.UserRelationshipView |
getApprovalViewForUserRelationship(com.jivesoftware.community.user.relationships.UserRelationship rel,
long requestingUserID)
Create a specific view for a relationship depending on who is requesting the view. |
Set<Long> |
getApproverUserIDs(User requester,
com.jivesoftware.community.user.relationships.UserRelationship userRelationship)
|
List<User> |
getColleagues(User user,
com.jivesoftware.community.user.relationships.HierarchicalUserRelationshipGraph graph)
Get a list of a user's colleagues (people who report to the same manager, minus the user) (may return empty list, but not null). |
Map<com.jivesoftware.community.user.relationships.UserRelationshipGraph,Collection<com.jivesoftware.community.user.relationships.UserRelationshipView>> |
getCurrentRelationshipMap(User user,
boolean approvedOnly)
Get a map of relationship views revolving around the user argument. |
Collection<com.jivesoftware.community.user.relationships.UserRelationshipView> |
getCurrentRelationships(User user,
com.jivesoftware.community.user.relationships.UserRelationshipGraph graph,
boolean approvedOnly)
Get a collection of relationship views revolving around the user argument. |
com.jivesoftware.community.user.relationships.HierarchicalUserRelationshipGraph |
getDefaultHierarchicalRelationshipGraph()
Find the default (primary) HierarchicalUserRelationshipGraph. |
com.jivesoftware.community.user.relationships.MeshUserRelationshipGraph |
getDefaultMeshRelationshipGraph()
Find the default (primary) MeshUserRelationshipGraph. |
List<User> |
getDirectReports(User manager,
com.jivesoftware.community.user.relationships.HierarchicalUserRelationshipGraph graph)
Get a list of a user's direct reports (may return empty list, but not null). |
List<User> |
getEscalationChain(User user,
com.jivesoftware.community.user.relationships.HierarchicalUserRelationshipGraph graph)
Build a list of people upward in the hierarchical org from a given user. |
com.jivesoftware.community.user.relationships.UserRelationship |
getFriendRelationship(User user1,
User user2,
com.jivesoftware.community.user.relationships.MeshUserRelationshipGraph graph)
If two users have a relationship in a given graph, return it, else return null. |
List<com.jivesoftware.community.user.relationships.UserRelationshipView> |
getFriends(User user)
Get an list of a user's friends from the default mesh graph. |
List<com.jivesoftware.community.user.relationships.UserRelationshipView> |
getFriends(User user,
com.jivesoftware.community.user.relationships.MeshUserRelationshipGraph graph)
Get an list of a user's friends in a given mesh graph. |
List<com.jivesoftware.community.user.relationships.UserRelationshipView> |
getInverseFriends(User user,
com.jivesoftware.community.user.relationships.MeshUserRelationshipGraph graph)
Get a list of who has friended a user, for a non-reflexive graph. |
User |
getManager(User user,
com.jivesoftware.community.user.relationships.HierarchicalUserRelationshipGraph graph)
Get a user's current manager in a hierarchical graph, or null if no manager is found. |
com.jivesoftware.community.user.relationships.UserRelationship |
getManagerRelationship(User user,
com.jivesoftware.community.user.relationships.HierarchicalUserRelationshipGraph graph)
Get a user's current manager. |
Set<Long> |
getNotificationUserIDs(User requester,
com.jivesoftware.community.user.relationships.UserRelationship userRelationship)
|
Collection<com.jivesoftware.community.user.relationships.UserRelationshipView> |
getPendingRelationships(User user,
com.jivesoftware.community.user.relationships.UserRelationshipGraph graph)
Get a list of not-yet-approved relationships for a given graph. |
Map<com.jivesoftware.community.user.relationships.UserRelationshipGraph,Collection<com.jivesoftware.community.user.relationships.UserRelationshipView>> |
getPossibleRelationshipMap(User user,
User relatedUser)
|
Collection<com.jivesoftware.community.user.relationships.UserRelationshipView> |
getPossibleRelationships(User user,
User relatedUser,
com.jivesoftware.community.user.relationships.UserRelationshipGraph graph)
Get a collection of relationship views (per graph) showing the possible relationships between two users. |
com.jivesoftware.community.user.relationships.UserRelationship |
getRelationship(long relationshipID)
Get a given relationship for its ID. |
com.jivesoftware.community.user.relationships.UserRelationshipGraph |
getRelationshipGraph(long relationshipGraphID)
Get a graph for a given graph ID. |
Collection<com.jivesoftware.community.user.relationships.UserRelationshipGraph> |
getRelationshipGraphs(boolean enabledOnly)
Get a collection of all graphs in the system, regardless of state (enabled or disabled). |
com.jivesoftware.community.user.relationships.UserRelationshipList |
getRelationshipList(long listID)
Retrive a relationship list by ID. |
Collection<com.jivesoftware.community.user.relationships.UserRelationshipList> |
getRelationshipListsByOwner(User owner)
Retrieves a collection of lists based on an owner userID. |
Collection<com.jivesoftware.community.user.relationships.UserRelationshipList> |
getRelationshipListsByPerson(User person,
User owner)
Retrieves a collection of lists based on an owner userID and a person who is on the list. |
List<com.jivesoftware.community.user.relationships.UserRelationshipView> |
getRelationshipListUsers(com.jivesoftware.community.user.relationships.UserRelationshipList list)
Get a list of users from a user relationship list. |
int |
getUserRelationshipCount()
Get a count of all UserRelationships. |
int |
getUserRelationshipCount(com.jivesoftware.community.user.relationships.UserRelationshipManagerImpl.UserRelationshipResultFilter filter)
Get a filtered count of all UserRelationships. |
boolean |
isFriend(User user1,
User user2,
com.jivesoftware.community.user.relationships.MeshUserRelationshipGraph graph)
In a reflexive mesh graph, are user1 and user2 friends? |
boolean |
isFriendingEnabled()
Is the friending feature enabled? |
boolean |
isOrgChartingEnabled()
Is the organizational relationship feature enabled? |
void |
notifyUsers(String key,
User requester,
com.jivesoftware.community.user.relationships.UserRelationship relationship,
Map<String,Object> additonalContext)
Send a notification corresponding to an event (creation, approval, rejection, retirement) of a UserRelationship. |
void |
rejectRelationship(com.jivesoftware.community.user.relationships.UserRelationship userRelationship,
String responseMessage)
|
void |
retireRelationship(User retirer,
com.jivesoftware.community.user.relationships.UserRelationship userRelationship)
Set relationship to be retired and persist the change in the DB. |
void |
retireRelationships(User user)
Retire all current relationships for a given user (for example, on disabling an account). |
void |
updateRelationship(com.jivesoftware.community.user.relationships.UserRelationship userRelationship)
|
void |
updateRelationshipGraph(com.jivesoftware.community.user.relationships.UserRelationshipGraph relationshipGraph)
Persist any changes to the graph. |
void |
updateRelationshipList(com.jivesoftware.community.user.relationships.UserRelationshipList list)
Update the name or labelStyle of a list. |
| Method Detail |
|---|
boolean isOrgChartingEnabled()
boolean isFriendingEnabled()
com.jivesoftware.community.user.relationships.UserRelationshipGraph createRelationshipGraph(String name,
com.jivesoftware.community.user.relationships.UserRelationshipGraph.GraphType graphType)
name - The name (title) of this graph.graphType - The GraphType (Hierarchical or Mesh) of the graph that is being created.
com.jivesoftware.community.user.relationships.UserRelationshipGraph getRelationshipGraph(long relationshipGraphID)
relationshipGraphID - The ID of the graph to return.
void updateRelationshipGraph(com.jivesoftware.community.user.relationships.UserRelationshipGraph relationshipGraph)
relationshipGraph - an object that implements UserRelationshipGraph.void deleteRelationshipGraph(long relationshipGraphID)
relationshipGraphID - The ID of the graph to delete.com.jivesoftware.community.user.relationships.HierarchicalUserRelationshipGraph getDefaultHierarchicalRelationshipGraph()
com.jivesoftware.community.user.relationships.MeshUserRelationshipGraph getDefaultMeshRelationshipGraph()
Collection<com.jivesoftware.community.user.relationships.UserRelationshipGraph> getRelationshipGraphs(boolean enabledOnly)
enabledOnly -
com.jivesoftware.community.user.relationships.UserRelationship createRelationship(long userID,
long relatedUserID,
int relationshipType,
long relationshipGraphID,
String requestMessage)
throws com.jivesoftware.community.user.relationships.UserRelationshipException
userID - relatedUserID - relationshipType - relationshipGraphID - requestMessage -
UserRelationshipAlreadyExistsException
com.jivesoftware.community.user.relationships.UserRelationshipException
com.jivesoftware.community.user.relationships.UserRelationship createRelationship(User user,
User relatedUser,
com.jivesoftware.community.user.relationships.UserRelationshipGraph relationshipGraph,
String requestMessage)
throws com.jivesoftware.community.user.relationships.UserRelationshipException
user - relatedUser - relationshipGraph -
UserRelationshipAlreadyExistsException - If this relationship already exists (in either direction for peer
relationships, or if relatedUser already has a manager for hierarchical relationships).
com.jivesoftware.community.user.relationships.UserRelationshipException
void deleteUserRelationships(User user)
throws UnauthorizedException
user - The user or relatedUser within the relationships being deleted.
UnauthorizedException - If the currently authenticated user is not a sys-admin or user-admin.
Map<com.jivesoftware.community.user.relationships.UserRelationshipGraph,Collection<com.jivesoftware.community.user.relationships.UserRelationshipView>> getCurrentRelationshipMap(User user,
boolean approvedOnly)
user - approvedOnly -
Collection<com.jivesoftware.community.user.relationships.UserRelationshipView> getCurrentRelationships(User user,
com.jivesoftware.community.user.relationships.UserRelationshipGraph graph,
boolean approvedOnly)
user - graph - approvedOnly -
Map<com.jivesoftware.community.user.relationships.UserRelationshipGraph,Collection<com.jivesoftware.community.user.relationships.UserRelationshipView>> getPossibleRelationshipMap(User user,
User relatedUser)
Collection<com.jivesoftware.community.user.relationships.UserRelationshipView> getPossibleRelationships(User user,
User relatedUser,
com.jivesoftware.community.user.relationships.UserRelationshipGraph graph)
user - graph -
Collection<com.jivesoftware.community.user.relationships.UserRelationshipView> getPendingRelationships(User user,
com.jivesoftware.community.user.relationships.UserRelationshipGraph graph)
user - graph -
com.jivesoftware.community.user.relationships.UserRelationship getRelationship(long relationshipID)
relationshipID -
com.jivesoftware.community.user.relationships.UserRelationship getManagerRelationship(User user,
com.jivesoftware.community.user.relationships.HierarchicalUserRelationshipGraph graph)
void retireRelationships(User user)
the - user to disable all relationships for.
void retireRelationship(User retirer,
com.jivesoftware.community.user.relationships.UserRelationship userRelationship)
userRelationship - void updateRelationship(com.jivesoftware.community.user.relationships.UserRelationship userRelationship)
void approveRelationship(com.jivesoftware.community.user.relationships.UserRelationship userRelationship,
String responseMessage)
void rejectRelationship(com.jivesoftware.community.user.relationships.UserRelationship userRelationship,
String responseMessage)
Set<Long> getApproverUserIDs(User requester,
com.jivesoftware.community.user.relationships.UserRelationship userRelationship)
Set<Long> getNotificationUserIDs(User requester,
com.jivesoftware.community.user.relationships.UserRelationship userRelationship)
com.jivesoftware.community.user.relationships.UserRelationshipView getApprovalViewForUserRelationship(com.jivesoftware.community.user.relationships.UserRelationship rel,
long requestingUserID)
rel - requestingUserID -
void notifyUsers(String key,
User requester,
com.jivesoftware.community.user.relationships.UserRelationship relationship,
Map<String,Object> additonalContext)
key - requester - relationship - additonalContext -
List<User> getEscalationChain(User user,
com.jivesoftware.community.user.relationships.HierarchicalUserRelationshipGraph graph)
user -
User getManager(User user,
com.jivesoftware.community.user.relationships.HierarchicalUserRelationshipGraph graph)
user -
List<User> getColleagues(User user,
com.jivesoftware.community.user.relationships.HierarchicalUserRelationshipGraph graph)
user - graph -
List<User> getDirectReports(User manager,
com.jivesoftware.community.user.relationships.HierarchicalUserRelationshipGraph graph)
manager - graph -
List<com.jivesoftware.community.user.relationships.UserRelationshipView> getFriends(User user)
user -
List<com.jivesoftware.community.user.relationships.UserRelationshipView> getFriends(User user,
com.jivesoftware.community.user.relationships.MeshUserRelationshipGraph graph)
user - graph -
List<com.jivesoftware.community.user.relationships.UserRelationshipView> getInverseFriends(User user,
com.jivesoftware.community.user.relationships.MeshUserRelationshipGraph graph)
user - graph -
boolean isFriend(User user1,
User user2,
com.jivesoftware.community.user.relationships.MeshUserRelationshipGraph graph)
user1 - user2 -
com.jivesoftware.community.user.relationships.UserRelationship getFriendRelationship(User user1,
User user2,
com.jivesoftware.community.user.relationships.MeshUserRelationshipGraph graph)
user1 - user2 - graph -
List<com.jivesoftware.community.user.relationships.UserRelationshipView> getRelationshipListUsers(com.jivesoftware.community.user.relationships.UserRelationshipList list)
list -
Iterable<com.jivesoftware.community.user.relationships.UserRelationshipView> getAllActiveRelationships(com.jivesoftware.community.user.relationships.UserRelationshipManagerImpl.UserRelationshipResultFilter filter)
filter - A filter for the results (by graph, username, etc).int getUserRelationshipCount()
int getUserRelationshipCount(com.jivesoftware.community.user.relationships.UserRelationshipManagerImpl.UserRelationshipResultFilter filter)
filter -
com.jivesoftware.community.user.relationships.UserRelationshipList createRelationshipList(String name,
String label,
User owner)
name - The name of the list.owner - The list owner.
void updateRelationshipList(com.jivesoftware.community.user.relationships.UserRelationshipList list)
list - The list to update.void deleteRelationshipList(com.jivesoftware.community.user.relationships.UserRelationshipList list)
list - The list to delete.com.jivesoftware.community.user.relationships.UserRelationshipList getRelationshipList(long listID)
listID - The ID of the list.
Collection<com.jivesoftware.community.user.relationships.UserRelationshipList> getRelationshipListsByOwner(User owner)
owner - The lists' owner.
Collection<com.jivesoftware.community.user.relationships.UserRelationshipList> getRelationshipListsByPerson(User person,
User owner)
owner - The lists' owner.
boolean canViewRelationshipLists(User user)
|
Clearspace Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||