String name = req.getParameter("searchname");
String count = req.getParameter("count");
String startString = req.getParameter("start");
String type = req.getParameter("type");
IPersonManager personManager = ServerManager.getServerManager().getPersonManager();
if("photo".equals(type)){
responseString = personManager.getPhotoRepositoryPath();
}else{
int resultNumber = Integer.parseInt(count);
int start = Integer.parseInt(startString);
IPerson[] persons;
if(usernameTypeaheadEnabled){
persons = personManager.getPersons(name, resultNumber, start);
}else{
persons = new IPerson[0];
}
responseString = arrayToJson(persons);
}