Package org.picketlink.idm.api

Examples of org.picketlink.idm.api.IdentitySearchCriteria


    public Membership[] load(int index, int length) throws Exception {
        if (log.isTraceEnabled()) {
            Tools.logMethodIn(log, LogLevel.TRACE, "load", new Object[] { "index", index, "length", length });
        }

        IdentitySearchCriteria crit = new IdentitySearchCriteriaImpl().page(index, length);
        crit.sort(SortOrder.ASCENDING);

        List<Role> roles = null;

        if (group != null) {
            roles = new LinkedList<Role>(getIDMService().getIdentitySession().getRoleManager().findRoles(group, null, crit));
View Full Code Here


        if (fullResults != null) {
            // If we already have fullResults (all pages) we can simply sublist them
            roles = fullResults.subList(index, index + length);
        } else {
            // Decide if use paginated query or skip pagination and obtain full results
            IdentitySearchCriteria crit = usePaginatedQuery ? new IdentitySearchCriteriaImpl().page(index, length) : new IdentitySearchCriteriaImpl().page(0, size);

            crit.sort(SortOrder.ASCENDING);

            if (group != null) {
                roles = new LinkedList<Role>(getIDMService().getIdentitySession().getRoleManager().findRoles(group, null, crit));
            } else if (user != null) {
                roles = new LinkedList<Role>(getIDMService().getIdentitySession().getRoleManager().findRoles(user, null, crit));
View Full Code Here

        if (fullResults != null) {
            // If we already have fullResults (all pages) we can simply sublist them
            roles = fullResults.subList(index, index + length);
        } else {
            // Decide if use paginated query or skip pagination and obtain full results
            IdentitySearchCriteria crit = usePaginatedQuery ? new IdentitySearchCriteriaImpl().page(index, length) : new IdentitySearchCriteriaImpl().page(0, size);

            crit.sort(SortOrder.ASCENDING);

            if (group != null) {
                roles = new LinkedList<Role>(getIDMService().getIdentitySession().getRoleManager().findRoles(group, null, crit));
            } else if (user != null) {
                roles = new LinkedList<Role>(getIDMService().getIdentitySession().getRoleManager().findRoles(user, null, crit));
View Full Code Here

  
   @Inject public void loadUsers() throws IdentityException
   {
      users = new ArrayList<UserDTO>();
     
      IdentitySearchCriteria criteria = new IdentitySearchCriteriaImpl();

      Collection<User> results = identitySession.getPersistenceManager().findUser(criteria)
      for (User user : results)
      {
         UserDTO dto = new UserDTO();
View Full Code Here

    @Inject
    public void loadUsers() throws IdentityException {
        users = new ArrayList<UserDTO>();

        IdentitySearchCriteria criteria = new IdentitySearchCriteriaImpl();

        Collection<User> results = identitySession.getPersistenceManager().findUser(criteria);
        for (User user : results) {
            UserDTO dto = new UserDTO();
            dto.setUsername(user.getId());
View Full Code Here

TOP

Related Classes of org.picketlink.idm.api.IdentitySearchCriteria

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.