mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
De-lucene work - mark the old getUsers method for the explorer Repository helper as deprecated, and add a new one that doesn't need the search service
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@28346 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -447,7 +447,7 @@ public abstract class BaseActionWizard extends BaseWizardBean
|
||||
List<Node> userNodes = Repository.getUsers(
|
||||
FacesContext.getCurrentInstance(),
|
||||
this.getNodeService(),
|
||||
this.getSearchService());
|
||||
this.getPersonService());
|
||||
this.users = new ArrayList<SelectItem>();
|
||||
for (Node user : userNodes)
|
||||
{
|
||||
|
@@ -676,6 +676,22 @@ public final class Repository
|
||||
return charset.name();
|
||||
}
|
||||
|
||||
/**
|
||||
* Query a list of Person type nodes from the repo
|
||||
* It is currently assumed that all Person nodes exist below the Repository root node
|
||||
*
|
||||
* @param context Faces Context
|
||||
* @param nodeService The node service
|
||||
* @param searchService The search service, which is ignored
|
||||
* @return List of Person node objects
|
||||
* @deprecated Use {@link #getUsers(FacesContext, NodeService, PersonService)} instead
|
||||
*/
|
||||
public static List<Node> getUsers(FacesContext context, NodeService nodeService, SearchService searchService)
|
||||
{
|
||||
PersonService personService = (PersonService)FacesContextUtils.getRequiredWebApplicationContext(context).getBean("personService");
|
||||
return getUsers(context, nodeService, personService);
|
||||
}
|
||||
|
||||
/**
|
||||
* Query a list of Person type nodes from the repo
|
||||
* It is currently assumed that all Person nodes exist below the Repository root node
|
||||
@@ -685,7 +701,7 @@ public final class Repository
|
||||
* @param searchService used to perform the search
|
||||
* @return List of Person node objects
|
||||
*/
|
||||
public static List<Node> getUsers(FacesContext context, NodeService nodeService, SearchService searchService)
|
||||
public static List<Node> getUsers(FacesContext context, NodeService nodeService, PersonService personService)
|
||||
{
|
||||
List<Node> personNodes = null;
|
||||
|
||||
@@ -695,7 +711,6 @@ public final class Repository
|
||||
tx = Repository.getUserTransaction(context, true);
|
||||
tx.begin();
|
||||
|
||||
PersonService personService = (PersonService)FacesContextUtils.getRequiredWebApplicationContext(context).getBean("personService");
|
||||
NodeRef peopleRef = personService.getPeopleContainer();
|
||||
|
||||
// TODO: better to perform an XPath search or a get for a specific child type here?
|
||||
|
@@ -403,7 +403,7 @@ public class UsersDialog extends BaseDialogBean implements IContextListener, Cha
|
||||
properties.getUsersRichList().setValue(null);
|
||||
|
||||
this.users = Repository.getUsers(FacesContext.getCurrentInstance(),
|
||||
properties.getNodeService(), properties.getSearchService());
|
||||
properties.getNodeService(), properties.getPersonService());
|
||||
|
||||
for (Node node : this.users)
|
||||
{
|
||||
|
Reference in New Issue
Block a user