Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

Calling DirectoryManager.findPrincipals() returns max of 10 results

Avatar

Level 1

I've got a basic service written in Java that leverages the LiveCycle API, and I'm calling com.adobe.idp.um.api.DirectoryManager.findPrincipals() to load a set of users from the system. However, this always seems to return a maximum of 10 results. Is there an optional parameter to override the maximum?

An excerpt of the implementation is below:

@Service("...")

public class MyServiceImpl implements MyService

{

   @Resource( name="applicationDomain" )

   private String applicationDomain;


   @Autowired

   private DirectoryManager directoryManager;


   @Override

   pubilc List<User> getUsers(  )

   {

      PrincipalSearchFilter psf = new PrincipalSearchFilter(  );

      psf.setPrincipalType( Principal.PRINCIPALTYPE_USER );

      psf.setRetrieveOnlyActive(  );

      psf.setSpecificDomainName( applicationDomain );


      List<User> results;


      results = directoryManager.findPrincipals( psf );


      return results;

   }

}

1 Reply

Avatar

Level 4

Hi Tim,

You would need to set the resultsMax size on the filter. Each such filter extends a GenericSearchFilter which has this attribute defined