How to create a curation task that checks which EPersons are only in the anonymous group in dspace?

Viewed 58

I need to implement a curation task that checks the group of every eperson. I understand that every eperson is a dspace object so they have an ID, given an ID I can check that eperson's group. My question is then, how to iterate over the Epersons.

2 Answers

Your question's title refers to the anonymous group - every user is in the anonymous group, so I'm not quite sure why you would want a curation task for this. Furthermore, curation tasks are generally designed to run over DSpace content objects (communities/collections/items) not users.

If you do really want a curation task, your method depends on your DSpace version. In DSpace 5, use Eperson.findAll. In DSpace 6, use EPersonService.findAll. In current master, you should use the paginated version of the findAll method in the EPersonService class.

First, to make it clear: the curation system only operates on the content hierarchy. It has no code to enumerate EPersons or Groups.

The answer above gives the best starting point for enumerating EPersons. findAll will return a List of EPerson. There is nothing in place to fit this into the web UIs. The easiest approach will be to make a console application that you run while logged in on the server.

The Anonymous group has no members; membership is implicit for all existing EPerson. Being a registered user is implicit in the fact that an EPerson exists. We may be able to give more help if you will more fully describe the problem that you are trying to solve.

Related