<commit_before>/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements. See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership. The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License. You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied. See the License for the
 * specific language governing permissions and limitations under the License.
 */
package org.apache.shindig.social.opensocial;

import org.apache.shindig.common.SecurityToken;
import org.apache.shindig.social.ResponseItem;
import org.apache.shindig.social.opensocial.model.ApiCollection;
import org.apache.shindig.social.opensocial.model.IdSpec;
import org.apache.shindig.social.opensocial.model.Person;

import org.json.JSONException;

import java.util.List;
import java.util.Set;

public interface PeopleService {
  /**
   * Returns a list of people ids that the other handlers (currently data
   * and activities) can use to fetch their own objects
   *
   * @param idSpec The idSpec to translate into ids
   * @param token The gadget token
   * @return a list of person ids
   * @throws JSONException If the idSpec is malformed
   */
  public List<String> getIds(IdSpec idSpec, SecurityToken token)
      throws JSONException;

  public enum SortOrder {
    topFriends, name
  }

  public enum FilterType {
    all, hasApp, topFriends
  }

  /**
   * Returns a list of people that correspond to the passed in person ids.
   * @param ids The ids of the people to fetch.
   * @param sortOrder How to sort the people
   * @param filter How the people should be filtered.
   * @param first The index of the first person to fetch.
   * @param max The max number of people to fetch.
   * @param profileDetails The profile details to fetch
   * @param token The gadget token
   * @return a list of people.
   */
  public ResponseItem<ApiCollection<Person>> getPeople(List<String> ids,
      SortOrder sortOrder, FilterType filter, int first, int max,
      Set<String> profileDetails, SecurityToken token);

  /**
   * Returns a person that corresponds to the passed in person id.
   *
   * @param id The id of the person to fetch.
   * @param token The gadget token
   * @return a list of people.
   */
  public ResponseItem<Person> getPerson(String id, SecurityToken token);
}<commit_msg>Interfaces do not need public declarations<commit_after>/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements. See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership. The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License. You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied. See the License for the
 * specific language governing permissions and limitations under the License.
 */
package org.apache.shindig.social.opensocial;

import org.apache.shindig.common.SecurityToken;
import org.apache.shindig.social.ResponseItem;
import org.apache.shindig.social.opensocial.model.ApiCollection;
import org.apache.shindig.social.opensocial.model.IdSpec;
import org.apache.shindig.social.opensocial.model.Person;

import org.json.JSONException;

import java.util.List;
import java.util.Set;

public interface PeopleService {
  /**
   * Returns a list of people ids that the other handlers (currently data
   * and activities) can use to fetch their own objects
   *
   * @param idSpec The idSpec to translate into ids
   * @param token The gadget token
   * @return a list of person ids
   * @throws JSONException If the idSpec is malformed
   */
  List<String> getIds(IdSpec idSpec, SecurityToken token)
      throws JSONException;

  public enum SortOrder {
    topFriends, name
  }

  public enum FilterType {
    all, hasApp, topFriends
  }

  /**
   * Returns a list of people that correspond to the passed in person ids.
   * @param ids The ids of the people to fetch.
   * @param sortOrder How to sort the people
   * @param filter How the people should be filtered.
   * @param first The index of the first person to fetch.
   * @param max The max number of people to fetch.
   * @param profileDetails The profile details to fetch
   * @param token The gadget token
   * @return a list of people.
   */
  ResponseItem<ApiCollection<Person>> getPeople(List<String> ids,
      SortOrder sortOrder, FilterType filter, int first, int max,
      Set<String> profileDetails, SecurityToken token);

  /**
   * Returns a person that corresponds to the passed in person id.
   *
   * @param id The id of the person to fetch.
   * @param token The gadget token
   * @return a list of people.
   */
  ResponseItem<Person> getPerson(String id, SecurityToken token);
}
{'fraction_non_alphanumeric': 0.0714809384164223, 'fraction_numerical': 0.001466275659824047, 'mean_word_length': 3.644255319148936, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5835653', 'n_tokens_mistral': 1471, 'n_tokens_neox': 1454, 'n_words': 652}