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