@Test public void testExecuteNoGroups() { final Set<Long> groupIds = new HashSet<Long>(); context.checking(new Expectations() { { oneOf(getGroupIdsMapper).execute(personId); will(returnValue(groupIds)); } }); String query = sut.execute(personId); assertEquals("isPublic:t", query); context.assertIsSatisfied(); }
public String execute(final Long inUserPersonId) { log.info("Building the cached security-scoped activity search string for user with person id: " + inUserPersonId); Set<Long> groupIds = getGroupIdsMapper.execute(inUserPersonId); StringBuilder sb = new StringBuilder(); sb.append("isPublic:t"); if (groupIds.size() > 0) { sb.append(" recipient:("); for (Long groupId : groupIds) { sb.append(" g" + groupId); } sb.append(")"); } String result = sb.toString(); log.info("User's cached security-scoped activity search string for user: " + inUserPersonId + " = " + result); return result; }
BuildActivityStreamSearchStringForUser extends BaseArgDomainMapper<Long, String> { public String execute(final Long inUserPersonId) { log.info("Building the cached security-scoped activity search string for user with person id: " + inUserPersonId); Set<Long> groupIds = getGroupIdsMapper.execute(inUserPersonId); StringBuilder sb = new StringBuilder(); sb.append("isPublic:t"); if (groupIds.size() > 0) { sb.append(" recipient:("); for (Long groupId : groupIds) { sb.append(" g" + groupId); } sb.append(")"); } String result = sb.toString(); log.info("User's cached security-scoped activity search string for user: " + inUserPersonId + " = " + result); return result; } }
BuildActivityStreamSearchStringForUser extends BaseArgDomainMapper<Long, String> { public String execute(final Long inUserPersonId) { log.info("Building the cached security-scoped activity search string for user with person id: " + inUserPersonId); Set<Long> groupIds = getGroupIdsMapper.execute(inUserPersonId); StringBuilder sb = new StringBuilder(); sb.append("isPublic:t"); if (groupIds.size() > 0) { sb.append(" recipient:("); for (Long groupId : groupIds) { sb.append(" g" + groupId); } sb.append(")"); } String result = sb.toString(); log.info("User's cached security-scoped activity search string for user: " + inUserPersonId + " = " + result); return result; } BuildActivityStreamSearchStringForUser(
            final GetPrivateCoordinatedAndFollowedGroupIdsForUser inGetGroupIdsMapper); }
BuildActivityStreamSearchStringForUser extends BaseArgDomainMapper<Long, String> { public String execute(final Long inUserPersonId) { log.info("Building the cached security-scoped activity search string for user with person id: " + inUserPersonId); Set<Long> groupIds = getGroupIdsMapper.execute(inUserPersonId); StringBuilder sb = new StringBuilder(); sb.append("isPublic:t"); if (groupIds.size() > 0) { sb.append(" recipient:("); for (Long groupId : groupIds) { sb.append(" g" + groupId); } sb.append(")"); } String result = sb.toString(); log.info("User's cached security-scoped activity search string for user: " + inUserPersonId + " = " + result); return result; } BuildActivityStreamSearchStringForUser(
            final GetPrivateCoordinatedAndFollowedGroupIdsForUser inGetGroupIdsMapper); String execute(final Long inUserPersonId); }
BuildActivityStreamSearchStringForUser extends BaseArgDomainMapper<Long, String> { public String execute(final Long inUserPersonId) { log.info("Building the cached security-scoped activity search string for user with person id: " + inUserPersonId); Set<Long> groupIds = getGroupIdsMapper.execute(inUserPersonId); StringBuilder sb = new StringBuilder(); sb.append("isPublic:t"); if (groupIds.size() > 0) { sb.append(" recipient:("); for (Long groupId : groupIds) { sb.append(" g" + groupId); } sb.append(")"); } String result = sb.toString(); log.info("User's cached security-scoped activity search string for user: " + inUserPersonId + " = " + result); return result; } BuildActivityStreamSearchStringForUser(
            final GetPrivateCoordinatedAndFollowedGroupIdsForUser inGetGroupIdsMapper); String execute(final Long inUserPersonId);  }