You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rave.apache.org by mf...@apache.org on 2012/06/11 22:44:59 UTC
svn commit: r1349000 - in /rave/branches/model_interfaces:
rave-components/rave-core/src/main/java/org/apache/rave/portal/repository/
rave-components/rave-jpa/src/main/java/org/apache/rave/portal/repository/impl/
rave-providers/rave-opensocial-provider...
Author: mfranklin
Date: Mon Jun 11 20:44:58 2012
New Revision: 1349000
URL: http://svn.apache.org/viewvc?rev=1349000&view=rev
Log:
Moved core people repository to rave-core RAVE-665
Added:
rave/branches/model_interfaces/rave-components/rave-core/src/main/java/org/apache/rave/portal/repository/PersonRepository.java
- copied, changed from r1348990, rave/branches/model_interfaces/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/main/java/org/apache/rave/opensocial/repository/PersonRepository.java
rave/branches/model_interfaces/rave-components/rave-jpa/src/main/java/org/apache/rave/portal/repository/impl/JpaPersonRepository.java
- copied, changed from r1348990, rave/branches/model_interfaces/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/main/java/org/apache/rave/opensocial/repository/impl/JpaPersonRepository.java
rave/branches/model_interfaces/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/main/java/org/apache/rave/opensocial/repository/OpenSocialPersonRepository.java
- copied, changed from r1348990, rave/branches/model_interfaces/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/main/java/org/apache/rave/opensocial/repository/PersonRepository.java
rave/branches/model_interfaces/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/main/java/org/apache/rave/opensocial/repository/impl/JpaOpenSocialPersonRepository.java
- copied, changed from r1348990, rave/branches/model_interfaces/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/main/java/org/apache/rave/opensocial/repository/impl/JpaPersonRepository.java
Removed:
rave/branches/model_interfaces/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/main/java/org/apache/rave/opensocial/repository/PersonRepository.java
rave/branches/model_interfaces/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/main/java/org/apache/rave/opensocial/repository/impl/JpaPersonRepository.java
Modified:
rave/branches/model_interfaces/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/main/java/org/apache/rave/opensocial/service/impl/DefaultPersonService.java
rave/branches/model_interfaces/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/test/java/org/apache/rave/opensocial/repository/JpaPersonRepositoryTest.java
rave/branches/model_interfaces/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/test/java/org/apache/rave/opensocial/service/PersonServiceTest.java
Copied: rave/branches/model_interfaces/rave-components/rave-core/src/main/java/org/apache/rave/portal/repository/PersonRepository.java (from r1348990, rave/branches/model_interfaces/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/main/java/org/apache/rave/opensocial/repository/PersonRepository.java)
URL: http://svn.apache.org/viewvc/rave/branches/model_interfaces/rave-components/rave-core/src/main/java/org/apache/rave/portal/repository/PersonRepository.java?p2=rave/branches/model_interfaces/rave-components/rave-core/src/main/java/org/apache/rave/portal/repository/PersonRepository.java&p1=rave/branches/model_interfaces/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/main/java/org/apache/rave/opensocial/repository/PersonRepository.java&r1=1348990&r2=1349000&rev=1349000&view=diff
==============================================================================
--- rave/branches/model_interfaces/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/main/java/org/apache/rave/opensocial/repository/PersonRepository.java (original)
+++ rave/branches/model_interfaces/rave-components/rave-core/src/main/java/org/apache/rave/portal/repository/PersonRepository.java Mon Jun 11 20:44:58 2012
@@ -17,12 +17,10 @@
* under the License.
*/
-package org.apache.rave.opensocial.repository;
+package org.apache.rave.portal.repository;
-import org.apache.rave.portal.model.Person;
import org.apache.rave.persistence.Repository;
-import org.apache.shindig.protocol.model.FilterOperation;
-import org.apache.shindig.social.opensocial.spi.CollectionOptions;
+import org.apache.rave.portal.model.Person;
import java.util.List;
@@ -53,17 +51,6 @@ public interface PersonRepository extend
List<Person> findAllConnectedPeople(String username, String appId);
/**
- * Gets all people connected to the given user including friends, fellow group members, etc, filtered by the specified field
- *
- * @param username the username of the person to query for
- * @param field the field to filter on
- * @param operation the type of filter to apply
- * @param value the value of the specified filter
- * @return a filtered list of connected individuals
- */
- List<Person> findAllConnectedPeople(String username, String field, FilterOperation operation, String value);
-
- /**
* Finds a list of all people connected to the given person who are friends with the second user
* @param username the user to find connected individuals for
* @param friendUsername the username of the person to filter connections by
@@ -88,17 +75,6 @@ public interface PersonRepository extend
List<Person> findFriends(String username, String appId);
/**
- * Finds the list of friends for the given person, filtered by the specified field
- *
- * @param username the username of the user to find friends for
- * @param field the field to filter on
- * @param operation the type of filter to apply
- * @param value the value of the specified filter
- * @return a filtered list of friends
- */
- List<Person> findFriends(String username, String field, FilterOperation operation, String value);
-
- /**
* Finds the list of friends for the user who are also friends of the given person
*
* @param username the username of the user to find friends for
@@ -124,17 +100,6 @@ public interface PersonRepository extend
List<Person> findByGroup(String groupId, String appId);
/**
- * Finds a subset of people in the specified group filtered by the specified field
- *
- * @param groupId the Id of the group to query
- * @param field the field to filter on
- * @param operation the type of filter to apply
- * @param value the value of the specified filter
- * @return a filtered list of group members
- */
- List<Person> findByGroup(String groupId, String field, FilterOperation operation, String value);
-
- /**
* Finds a subset of people in teh specified group who have the given friend
*
* @param groupId the Id of the group to query
Copied: rave/branches/model_interfaces/rave-components/rave-jpa/src/main/java/org/apache/rave/portal/repository/impl/JpaPersonRepository.java (from r1348990, rave/branches/model_interfaces/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/main/java/org/apache/rave/opensocial/repository/impl/JpaPersonRepository.java)
URL: http://svn.apache.org/viewvc/rave/branches/model_interfaces/rave-components/rave-jpa/src/main/java/org/apache/rave/portal/repository/impl/JpaPersonRepository.java?p2=rave/branches/model_interfaces/rave-components/rave-jpa/src/main/java/org/apache/rave/portal/repository/impl/JpaPersonRepository.java&p1=rave/branches/model_interfaces/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/main/java/org/apache/rave/opensocial/repository/impl/JpaPersonRepository.java&r1=1348990&r2=1349000&rev=1349000&view=diff
==============================================================================
--- rave/branches/model_interfaces/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/main/java/org/apache/rave/opensocial/repository/impl/JpaPersonRepository.java (original)
+++ rave/branches/model_interfaces/rave-components/rave-jpa/src/main/java/org/apache/rave/portal/repository/impl/JpaPersonRepository.java Mon Jun 11 20:44:58 2012
@@ -17,16 +17,15 @@
* under the License.
*/
-package org.apache.rave.opensocial.repository.impl;
+package org.apache.rave.portal.repository.impl;
import org.apache.rave.exception.NotSupportedException;
import org.apache.rave.portal.model.JpaGroup;
import org.apache.rave.portal.model.JpaPerson;
import org.apache.rave.portal.model.Person;
-import org.apache.rave.opensocial.repository.PersonRepository;
import org.apache.rave.portal.model.conversion.JpaPersonConverter;
+import org.apache.rave.portal.repository.PersonRepository;
import org.apache.rave.util.CollectionUtils;
-import org.apache.shindig.protocol.model.FilterOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
@@ -43,7 +42,7 @@ import static org.apache.rave.persistenc
*
*/
@Repository
-public class JpaPersonRepository implements PersonRepository{
+public class JpaPersonRepository implements PersonRepository {
@PersistenceContext
private EntityManager manager;
@@ -74,11 +73,6 @@ public class JpaPersonRepository impleme
}
@Override
- public List<Person> findAllConnectedPeople(String username, String field, FilterOperation operation, String value) {
- throw new NotSupportedException();
- }
-
- @Override
public List<Person> findAllConnectedPeopleWithFriend(String username, String friendUsername) {
throw new NotSupportedException();
}
@@ -96,11 +90,6 @@ public class JpaPersonRepository impleme
}
@Override
- public List<Person> findFriends(String username, String field, FilterOperation operation, String value) {
- throw new NotSupportedException();
- }
-
- @Override
public List<Person> findFriendsWithFriend(String username, String friendUsername) {
throw new NotSupportedException();
}
@@ -119,11 +108,6 @@ public class JpaPersonRepository impleme
}
@Override
- public List<Person> findByGroup(String groupId, String field, FilterOperation operation, String value) {
- throw new NotSupportedException();
- }
-
- @Override
public List<Person> findByGroupWithFriend(String groupId, String friendUsername) {
throw new NotSupportedException();
}
Copied: rave/branches/model_interfaces/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/main/java/org/apache/rave/opensocial/repository/OpenSocialPersonRepository.java (from r1348990, rave/branches/model_interfaces/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/main/java/org/apache/rave/opensocial/repository/PersonRepository.java)
URL: http://svn.apache.org/viewvc/rave/branches/model_interfaces/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/main/java/org/apache/rave/opensocial/repository/OpenSocialPersonRepository.java?p2=rave/branches/model_interfaces/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/main/java/org/apache/rave/opensocial/repository/OpenSocialPersonRepository.java&p1=rave/branches/model_interfaces/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/main/java/org/apache/rave/opensocial/repository/PersonRepository.java&r1=1348990&r2=1349000&rev=1349000&view=diff
==============================================================================
--- rave/branches/model_interfaces/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/main/java/org/apache/rave/opensocial/repository/PersonRepository.java (original)
+++ rave/branches/model_interfaces/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/main/java/org/apache/rave/opensocial/repository/OpenSocialPersonRepository.java Mon Jun 11 20:44:58 2012
@@ -20,38 +20,13 @@
package org.apache.rave.opensocial.repository;
import org.apache.rave.portal.model.Person;
-import org.apache.rave.persistence.Repository;
+import org.apache.rave.portal.repository.PersonRepository;
import org.apache.shindig.protocol.model.FilterOperation;
-import org.apache.shindig.social.opensocial.spi.CollectionOptions;
import java.util.List;
-public interface PersonRepository extends Repository<Person> {
- /**
- * Gets a user by their username
- *
- *
- * @param username string representing the username
- * @return valid Person if found, null otherwise
- */
- Person findByUsername(String username);
-
- /**
- * Gets all people connected to the given user including friends, fellow group members, etc
- * @param username the user to find connected individuals for
- * @return valid List of people connected to the person
- */
- List<Person> findAllConnectedPeople(String username);
-
- /**
- * Gets all people connected to the given user including friends, fellow group members, etc who have the specified application
- * @param username the user to find connected individuals for
- * @param appId the ID of the application
- * @return a list of connected people who have the specified application installed
- */
- List<Person> findAllConnectedPeople(String username, String appId);
-
+public interface OpenSocialPersonRepository extends PersonRepository {
/**
* Gets all people connected to the given user including friends, fellow group members, etc, filtered by the specified field
*
@@ -64,30 +39,6 @@ public interface PersonRepository extend
List<Person> findAllConnectedPeople(String username, String field, FilterOperation operation, String value);
/**
- * Finds a list of all people connected to the given person who are friends with the second user
- * @param username the user to find connected individuals for
- * @param friendUsername the username of the person to filter connections by
- * @return a list of people who are connected to the first user and friends with the second
- */
- List<Person> findAllConnectedPeopleWithFriend(String username, String friendUsername);
-
- /**
- * Finds the list of friends for a given person
- * @param username the username of the user to find friends for
- * @return a valid List of people that are explicit friends of the person
- */
- List<Person> findFriends(String username);
-
- /**
- * Finds a list of friends for the given person who have the given app installed on some page
- *
- * @param username the username of the user to find friends for
- * @param appId the ID of the application
- * @return a list of friends with the application
- */
- List<Person> findFriends(String username, String appId);
-
- /**
* Finds the list of friends for the given person, filtered by the specified field
*
* @param username the username of the user to find friends for
@@ -99,31 +50,6 @@ public interface PersonRepository extend
List<Person> findFriends(String username, String field, FilterOperation operation, String value);
/**
- * Finds the list of friends for the user who are also friends of the given person
- *
- * @param username the username of the user to find friends for
- * @param friendUsername the username of the person to filter connections by
- * @return a list of people who are friends of both individuals
- */
- List<Person> findFriendsWithFriend(String username, String friendUsername);
-
- /**
- * Finds a List of people based on their group membership
- *
- * @param groupId the Id of the group to query
- * @return a valid List of people in the group
- */
- List<Person> findByGroup(String groupId);
-
- /**
- * Finds a List of people based on their group membership who have the specified app
- * @param groupId the Id of the group to query
- * @param appId the ID of the application
- * @return a list of people in the group with the application
- */
- List<Person> findByGroup(String groupId, String appId);
-
- /**
* Finds a subset of people in the specified group filtered by the specified field
*
* @param groupId the Id of the group to query
@@ -133,14 +59,5 @@ public interface PersonRepository extend
* @return a filtered list of group members
*/
List<Person> findByGroup(String groupId, String field, FilterOperation operation, String value);
-
- /**
- * Finds a subset of people in teh specified group who have the given friend
- *
- * @param groupId the Id of the group to query
- * @param friendUsername the username of the friend to filter the group by
- * @return a list of people in the group who have the specified friend
- */
- List<Person> findByGroupWithFriend(String groupId, String friendUsername);
}
Copied: rave/branches/model_interfaces/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/main/java/org/apache/rave/opensocial/repository/impl/JpaOpenSocialPersonRepository.java (from r1348990, rave/branches/model_interfaces/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/main/java/org/apache/rave/opensocial/repository/impl/JpaPersonRepository.java)
URL: http://svn.apache.org/viewvc/rave/branches/model_interfaces/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/main/java/org/apache/rave/opensocial/repository/impl/JpaOpenSocialPersonRepository.java?p2=rave/branches/model_interfaces/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/main/java/org/apache/rave/opensocial/repository/impl/JpaOpenSocialPersonRepository.java&p1=rave/branches/model_interfaces/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/main/java/org/apache/rave/opensocial/repository/impl/JpaPersonRepository.java&r1=1348990&r2=1349000&rev=1349000&view=diff
==============================================================================
--- rave/branches/model_interfaces/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/main/java/org/apache/rave/opensocial/repository/impl/JpaPersonRepository.java (original)
+++ rave/branches/model_interfaces/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/main/java/org/apache/rave/opensocial/repository/impl/JpaOpenSocialPersonRepository.java Mon Jun 11 20:44:58 2012
@@ -20,58 +20,19 @@
package org.apache.rave.opensocial.repository.impl;
import org.apache.rave.exception.NotSupportedException;
-import org.apache.rave.portal.model.JpaGroup;
-import org.apache.rave.portal.model.JpaPerson;
+import org.apache.rave.opensocial.repository.OpenSocialPersonRepository;
import org.apache.rave.portal.model.Person;
-import org.apache.rave.opensocial.repository.PersonRepository;
-import org.apache.rave.portal.model.conversion.JpaPersonConverter;
-import org.apache.rave.util.CollectionUtils;
+import org.apache.rave.portal.repository.impl.JpaPersonRepository;
import org.apache.shindig.protocol.model.FilterOperation;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
-import javax.persistence.EntityManager;
-import javax.persistence.PersistenceContext;
-import javax.persistence.TypedQuery;
-import java.util.ArrayList;
import java.util.List;
-import static org.apache.rave.persistence.jpa.util.JpaUtil.getSingleResult;
-import static org.apache.rave.persistence.jpa.util.JpaUtil.saveOrUpdate;
-
/**
*
*/
@Repository
-public class JpaPersonRepository implements PersonRepository{
-
- @PersistenceContext
- private EntityManager manager;
-
- @Autowired
- private JpaPersonConverter personConverter;
-
- @Override
- public Person findByUsername(String username) {
- TypedQuery<JpaPerson> query = manager.createNamedQuery(JpaPerson.FIND_BY_USERNAME, JpaPerson.class);
- query.setParameter(JpaPerson.USERNAME_PARAM, username);
- return getSingleResult(query.getResultList());
- }
-
- @Override
- public List<Person> findAllConnectedPeople(String username) {
- List<Person> connections = new ArrayList<Person>();
- connections.addAll(findFriends(username));
- TypedQuery<JpaPerson> members = manager.createNamedQuery(JpaPerson.FIND_BY_GROUP_MEMBERSHIP, JpaPerson.class);
- members.setParameter(JpaPerson.USERNAME_PARAM, username);
- CollectionUtils.addUniqueValues(CollectionUtils.<Person>toBaseTypedList(members.getResultList()), connections);
- return connections;
- }
-
- @Override
- public List<Person> findAllConnectedPeople(String username, String appId) {
- throw new NotSupportedException();
- }
+public class JpaOpenSocialPersonRepository extends JpaPersonRepository implements OpenSocialPersonRepository {
@Override
public List<Person> findAllConnectedPeople(String username, String field, FilterOperation operation, String value) {
@@ -79,73 +40,12 @@ public class JpaPersonRepository impleme
}
@Override
- public List<Person> findAllConnectedPeopleWithFriend(String username, String friendUsername) {
- throw new NotSupportedException();
- }
-
- @Override
- public List<Person> findFriends(String username) {
- TypedQuery<JpaPerson> friends = manager.createNamedQuery(JpaPerson.FIND_FRIENDS_BY_USERNAME, JpaPerson.class);
- friends.setParameter(JpaPerson.USERNAME_PARAM, username);
- return CollectionUtils.<Person>toBaseTypedList(friends.getResultList());
- }
-
- @Override
- public List<Person> findFriends(String username, String appId) {
- throw new NotSupportedException();
- }
-
- @Override
public List<Person> findFriends(String username, String field, FilterOperation operation, String value) {
throw new NotSupportedException();
}
@Override
- public List<Person> findFriendsWithFriend(String username, String friendUsername) {
- throw new NotSupportedException();
- }
-
- @Override
- public List<Person> findByGroup(String groupId) {
- TypedQuery<JpaGroup> query = manager.createNamedQuery(JpaGroup.FIND_BY_TITLE, JpaGroup.class);
- query.setParameter(JpaGroup.GROUP_ID_PARAM, groupId);
- JpaGroup result = getSingleResult(query.getResultList());
- return result == null ? new ArrayList<Person>() : CollectionUtils.<Person>toBaseTypedList(result.getMembers());
- }
-
- @Override
- public List<Person> findByGroup(String groupId, String appId) {
- throw new NotSupportedException();
- }
-
- @Override
public List<Person> findByGroup(String groupId, String field, FilterOperation operation, String value) {
throw new NotSupportedException();
}
-
- @Override
- public List<Person> findByGroupWithFriend(String groupId, String friendUsername) {
- throw new NotSupportedException();
- }
-
- @Override
- public Class<? extends Person> getType() {
- return JpaPerson.class;
- }
-
- @Override
- public Person get(long id) {
- return manager.find(JpaPerson.class, id);
- }
-
- @Override
- public Person save(Person item) {
- JpaPerson person = personConverter.convert(item);
- return saveOrUpdate(person.getEntityId(), manager, person);
- }
-
- @Override
- public void delete(Person item) {
- manager.remove(item instanceof JpaPerson ? item : findByUsername(item.getUsername()));
- }
}
Modified: rave/branches/model_interfaces/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/main/java/org/apache/rave/opensocial/service/impl/DefaultPersonService.java
URL: http://svn.apache.org/viewvc/rave/branches/model_interfaces/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/main/java/org/apache/rave/opensocial/service/impl/DefaultPersonService.java?rev=1349000&r1=1348999&r2=1349000&view=diff
==============================================================================
--- rave/branches/model_interfaces/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/main/java/org/apache/rave/opensocial/service/impl/DefaultPersonService.java (original)
+++ rave/branches/model_interfaces/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/main/java/org/apache/rave/opensocial/service/impl/DefaultPersonService.java Mon Jun 11 20:44:58 2012
@@ -20,7 +20,7 @@
package org.apache.rave.opensocial.service.impl;
import com.google.common.collect.Lists;
-import org.apache.rave.opensocial.repository.PersonRepository;
+import org.apache.rave.opensocial.repository.OpenSocialPersonRepository;
import org.apache.rave.opensocial.service.SimplePersonService;
import org.apache.rave.util.CollectionUtils;
import org.apache.shindig.auth.SecurityToken;
@@ -47,10 +47,10 @@ import java.util.concurrent.Future;
@Service
public class DefaultPersonService implements PersonService, SimplePersonService {
- private final PersonRepository repository;
+ private final OpenSocialPersonRepository repository;
@Autowired
- public DefaultPersonService(PersonRepository repository) {
+ public DefaultPersonService(OpenSocialPersonRepository repository) {
this.repository = repository;
}
Modified: rave/branches/model_interfaces/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/test/java/org/apache/rave/opensocial/repository/JpaPersonRepositoryTest.java
URL: http://svn.apache.org/viewvc/rave/branches/model_interfaces/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/test/java/org/apache/rave/opensocial/repository/JpaPersonRepositoryTest.java?rev=1349000&r1=1348999&r2=1349000&view=diff
==============================================================================
--- rave/branches/model_interfaces/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/test/java/org/apache/rave/opensocial/repository/JpaPersonRepositoryTest.java (original)
+++ rave/branches/model_interfaces/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/test/java/org/apache/rave/opensocial/repository/JpaPersonRepositoryTest.java Mon Jun 11 20:44:58 2012
@@ -54,7 +54,7 @@ public class JpaPersonRepositoryTest {
private EntityManager manager;
@Autowired
- private PersonRepository repository;
+ private OpenSocialPersonRepository repository;
@Test
public void findByUsername_valid() {
Modified: rave/branches/model_interfaces/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/test/java/org/apache/rave/opensocial/service/PersonServiceTest.java
URL: http://svn.apache.org/viewvc/rave/branches/model_interfaces/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/test/java/org/apache/rave/opensocial/service/PersonServiceTest.java?rev=1349000&r1=1348999&r2=1349000&view=diff
==============================================================================
--- rave/branches/model_interfaces/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/test/java/org/apache/rave/opensocial/service/PersonServiceTest.java (original)
+++ rave/branches/model_interfaces/rave-providers/rave-opensocial-provider/rave-opensocial-core/src/test/java/org/apache/rave/opensocial/service/PersonServiceTest.java Mon Jun 11 20:44:58 2012
@@ -20,7 +20,7 @@
package org.apache.rave.opensocial.service;
import com.google.common.collect.Lists;
-import org.apache.rave.opensocial.repository.PersonRepository;
+import org.apache.rave.opensocial.repository.OpenSocialPersonRepository;
import org.apache.rave.opensocial.service.impl.DefaultPersonService;
import org.apache.rave.opensocial.service.impl.FieldRestrictingPerson;
import org.apache.rave.portal.model.impl.PersonImpl;
@@ -57,13 +57,13 @@ public class PersonServiceTest {
private static final String ID_1 = "1234";
private static final String GROUP_ID = "BOO";
private PersonService service;
- private PersonRepository repository;
+ private OpenSocialPersonRepository repository;
private SecurityToken token;
@Before
public void setup() {
token = createNiceMock(SecurityToken.class);
- repository = createNiceMock(PersonRepository.class);
+ repository = createNiceMock(OpenSocialPersonRepository.class);
service = new DefaultPersonService(repository);
}