Announcement Announcement Module
No announcement yet.
ConnectionRepository findConnectionsToUsers() : what is this used for ? Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • ConnectionRepository findConnectionsToUsers() : what is this used for ?

    Hi !

    I almost finished integrating spring social in my application.

    I had to create a custom ConnectionRepository for my needs and I figured out almost everything very easily except for one thing :

    public MultiValueMap<String, Connection<?>> findConnectionsToUsers(MultiValueMap<String, String> providerUsers)
    what is this method used for ? What are the actual use cases? How should I implement this?
    I did read the javadoc but couldnt really make any sense of it...

    it says :

    Find the connections the current user has to the given provider users. The providerUsers parameter accepts a map containing an entry for each provider the caller is interested in. The key for each entry is the providerId e.g. "facebook", and the value is a list of provider user ids to fetch connections to e.g. ("126500", "34521", "127243"). The returned map has the same structure and order, except the provider userId values have been replaced by Connection instances. If no connection exists between the current user and a given provider user, a null value is returned for that position.
    Does it mean that I should manage relationships (social graph connections) between a user and another ?

    also reading the source of JdbcConnectionRepository troubles me even more ...

    I'm not sure I get it ...

    This is quite important to me as it will determine how I should persist connection info inside my persistence layer.

    Thanks for your help.