mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ALF-8805 (RINF 40) - PersonService getPeople
- return PagingResults<PersonInfo> (follow CQ results pattern) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@28627 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -24,6 +24,7 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.alfresco.query.PagingRequest;
|
||||
import org.alfresco.query.PagingResults;
|
||||
import org.alfresco.service.Auditable;
|
||||
import org.alfresco.service.NotAuditable;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
@@ -219,6 +220,48 @@ public interface PersonService
|
||||
@Auditable
|
||||
public Set<NodeRef> getAllPeople();
|
||||
|
||||
/**
|
||||
* Data pojo to carry common person information
|
||||
*
|
||||
* @author janv
|
||||
* @since 4.0
|
||||
*/
|
||||
public class PersonInfo
|
||||
{
|
||||
private final NodeRef nodeRef;
|
||||
private final String userName;
|
||||
private final String firstName;
|
||||
private final String lastName;
|
||||
|
||||
public PersonInfo(NodeRef nodeRef, String userName, String firstName, String lastName)
|
||||
{
|
||||
this.nodeRef = nodeRef;
|
||||
this.userName = userName;
|
||||
this.firstName = firstName;
|
||||
this.lastName = lastName;
|
||||
}
|
||||
|
||||
public NodeRef getNodeRef()
|
||||
{
|
||||
return nodeRef;
|
||||
}
|
||||
|
||||
public String getUserName()
|
||||
{
|
||||
return userName;
|
||||
}
|
||||
|
||||
public String getFirstName()
|
||||
{
|
||||
return firstName;
|
||||
}
|
||||
|
||||
public String getLastName()
|
||||
{
|
||||
return lastName;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get paged list of people optionally filtered and/or sorted
|
||||
|
||||
@@ -226,10 +269,12 @@ public interface PersonService
|
||||
* @param filterIgnoreCase true to ignore case when filtering, false to be case-sensitive when filtering
|
||||
* @param sortProps sort property, eg. cm:username ascending
|
||||
* @param pagingRequest skip, max + optional query execution id
|
||||
*
|
||||
* @author janv
|
||||
* @since 4.0
|
||||
*/
|
||||
@Auditable(parameters = {"stringPropFilters", "filterIgnoreCase", "sortProps", "pagingRequest"})
|
||||
public PagingPersonResults getPeople(List<Pair<QName,String>> stringPropFilters, boolean filterIgnoreCase, List<Pair<QName, Boolean>> sortProps, PagingRequest pagingRequest);
|
||||
public PagingResults<PersonInfo> getPeople(List<Pair<QName,String>> stringPropFilters, boolean filterIgnoreCase, List<Pair<QName, Boolean>> sortProps, PagingRequest pagingRequest);
|
||||
|
||||
/**
|
||||
* Get people filtered by the given property name/value pair
|
||||
|
Reference in New Issue
Block a user