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:
Nick Burch
2011-06-10 20:36:29 +00:00
parent e2d455ebb3
commit 457c4dfb8c
3 changed files with 19 additions and 4 deletions

View File

@@ -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)
{

View File

@@ -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?

View File

@@ -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)
{