@GET
	@Produces(MediaType.APPLICATION_JSON + ";charset=UTF-8")
	public List<SocialCommunity<?>> getCommunities(
			@QueryParam("query") String query,
			@QueryParam("communitiesTypes") CommunityType[] communitiesTypes,
			@QueryParam("page") Integer page) {

		EnumSet<CommunityType> communitiesTypesSet = EnumSet
				.noneOf(CommunityType.class);
		communitiesTypesSet.addAll(Arrays.asList(communitiesTypes));

		/*
		 * Integer countforEachType = null; Integer offsetForEachType = null; if
		 * (!communitiesTypesSet.isEmpty() && count != null) {
		 * Preconditions.checkArgument(communitiesTypesSet.size() <= count,
		 * "Count can not be less than communityType quantity");
		 * countforEachType = count / communitiesTypesSet.size(); if (offset !=
		 * null) { Preconditions.checkArgument(communitiesTypesSet.size() <
		 * count, "Count can not be less than communityType quantity");
		 * offsetForEachType = offset / communitiesTypesSet.size(); }
		 * 
		 * }
		 */

		List<SocialCommunity<?>> list = new ArrayList<SocialCommunity<?>>();

		for (CommunityType communityType : communitiesTypesSet) {
			list.addAll(socialManagerConfiguration.getSocialManager(
					communityType).getCommunities(query, page));
		}
		return list;
	}