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(
|
List<Node> userNodes = Repository.getUsers(
|
||||||
FacesContext.getCurrentInstance(),
|
FacesContext.getCurrentInstance(),
|
||||||
this.getNodeService(),
|
this.getNodeService(),
|
||||||
this.getSearchService());
|
this.getPersonService());
|
||||||
this.users = new ArrayList<SelectItem>();
|
this.users = new ArrayList<SelectItem>();
|
||||||
for (Node user : userNodes)
|
for (Node user : userNodes)
|
||||||
{
|
{
|
||||||
|
@@ -676,6 +676,22 @@ public final class Repository
|
|||||||
return charset.name();
|
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
|
* Query a list of Person type nodes from the repo
|
||||||
* It is currently assumed that all Person nodes exist below the Repository root node
|
* 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
|
* @param searchService used to perform the search
|
||||||
* @return List of Person node objects
|
* @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;
|
List<Node> personNodes = null;
|
||||||
|
|
||||||
@@ -695,7 +711,6 @@ public final class Repository
|
|||||||
tx = Repository.getUserTransaction(context, true);
|
tx = Repository.getUserTransaction(context, true);
|
||||||
tx.begin();
|
tx.begin();
|
||||||
|
|
||||||
PersonService personService = (PersonService)FacesContextUtils.getRequiredWebApplicationContext(context).getBean("personService");
|
|
||||||
NodeRef peopleRef = personService.getPeopleContainer();
|
NodeRef peopleRef = personService.getPeopleContainer();
|
||||||
|
|
||||||
// TODO: better to perform an XPath search or a get for a specific child type here?
|
// 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);
|
properties.getUsersRichList().setValue(null);
|
||||||
|
|
||||||
this.users = Repository.getUsers(FacesContext.getCurrentInstance(),
|
this.users = Repository.getUsers(FacesContext.getCurrentInstance(),
|
||||||
properties.getNodeService(), properties.getSearchService());
|
properties.getNodeService(), properties.getPersonService());
|
||||||
|
|
||||||
for (Node node : this.users)
|
for (Node node : this.users)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user