org.wso2.carbon.registry.social.api.people
Interface PersonManager


public interface PersonManager

This interface handles retrieval and storage of Person details

Implement this interface to according to the persistence storage of social data


Method Summary
 Person[] getPeople(String[] userIds, String groupId, FilterOptions filterOptions, String[] fields)
          Returns an array of persons that correspond to the passed in useIds
 Person getPerson(String userId)
          Fetches the person details for the given userId
 Person getPerson(String userId, String[] fields)
          Returns a person that corresponds to the passed in userIds
 boolean removePerson(String userId)
          Removes the person from the storage
 boolean savePerson(String userId, Person user)
          Persists the details of the person
 boolean updatePerson(String userId, Person user)
          Updates/Modify person details
 

Method Detail

savePerson

boolean savePerson(String userId,
                   Person user)
                   throws SocialDataException
Persists the details of the person

Parameters:
userId - The userId of the person whose details to be stored
user - The person details to be stored
Returns:
Throws:
SocialDataException

updatePerson

boolean updatePerson(String userId,
                     Person user)
                     throws SocialDataException
Updates/Modify person details

Parameters:
userId - The userId of the person whose details to be modified
user - The person details to be modified
Returns:
Throws:
SocialDataException

removePerson

boolean removePerson(String userId)
                     throws SocialDataException
Removes the person from the storage

Parameters:
userId - The userId of the person to be deleted
Returns:
Throws:
SocialDataException

getPerson

Person getPerson(String userId)
                 throws SocialDataException
Fetches the person details for the given userId

Parameters:
userId -
Returns:
A Person object for the given userId
Throws:
SocialDataException

getPeople

Person[] getPeople(String[] userIds,
                   String groupId,
                   FilterOptions filterOptions,
                   String[] fields)
                   throws SocialDataException
Returns an array of persons that correspond to the passed in useIds

Parameters:
userIds - Array of userIds
groupId - The group
filterOptions - How to filter, sort and paginate the collection being fetched
fields - The profile details to fetch. Empty set implies all
Returns:
An array of Person objects correspond tot the passed in userIds
Throws:
SocialDataException

getPerson

Person getPerson(String userId,
                 String[] fields)
                 throws SocialDataException
Returns a person that corresponds to the passed in userIds

Parameters:
userId - The userId of the persons whose details to be fetched
fields - The fields to be fetched
Returns:
A Person object for passes in details
Throws:
SocialDataException


Copyright © 2012 WSO2 Inc. All Rights Reserved.