Examples of UserSearchCriteria


Examples of aim.dao.security.UserSearchCriteria

        pageAgents.clear();

        pageCount = 0;
        currentPage = 0;

        UserSearchCriteria criteria = UserSearchCriteria.createCriteria();
        if (!agentFirstName.isEmpty()) {
            criteria.setFirstName(agentFirstName);
        }
        if (!agentLastName.isEmpty()) {
            criteria.setLastName(agentLastName);
        }
        if (!agentParentName.isEmpty()) {
            criteria.setParentName(agentParentName);
        }
        if (!officeName.isEmpty()) {
            criteria.setOffice(officeName);
        }

        agents = agentService.findAgentByFLPandOffice(criteria);

        if (!agents.isEmpty()) {
View Full Code Here

Examples of com.google.api.ads.dfa.axis.v1_19.UserSearchCriteria

      DfaServices dfaServices, DfaSession session, String searchString) throws Exception {
    // Request the user service.
    UserRemote userService = dfaServices.get(session, UserRemote.class);

    // Get users that match the search criteria.
    UserSearchCriteria userSearchCriteria = new UserSearchCriteria();
    userSearchCriteria.setSearchString(searchString);
    userSearchCriteria.setPageSize(10);
    UserRecordSet userRecordSet = userService.getUsersByCriteria(userSearchCriteria);

    // Display user names, IDs, network IDs, subnetwork IDs, and group IDs.
    if (userRecordSet.getRecords().length > 0) {
      for (User user: userRecordSet.getRecords()) {
View Full Code Here

Examples of com.google.api.ads.dfa.axis.v1_20.UserSearchCriteria

      DfaServices dfaServices, DfaSession session, String searchString) throws Exception {
    // Request the user service.
    UserRemote userService = dfaServices.get(session, UserRemote.class);

    // Get users that match the search criteria.
    UserSearchCriteria userSearchCriteria = new UserSearchCriteria();
    userSearchCriteria.setSearchString(searchString);
    userSearchCriteria.setPageSize(10);
    UserRecordSet userRecordSet = userService.getUsersByCriteria(userSearchCriteria);

    // Display user names, IDs, network IDs, subnetwork IDs, and group IDs.
    if (userRecordSet.getRecords().length > 0) {
      for (User user: userRecordSet.getRecords()) {
View Full Code Here

Examples of org.sonatype.security.usermanagement.UserSearchCriteria

    Set<User> users = null;
    if ("all".equalsIgnoreCase(source)) {
      users = this.getSecuritySystem().listUsers();
    }
    else {
      users = this.getSecuritySystem().searchUsers(new UserSearchCriteria(null, null, source));
    }

    result.setData(this.securityToRestModel(users));

    return result;
View Full Code Here

Examples of org.sonatype.security.usermanagement.UserSearchCriteria

  @GET
  public PlexusUserListResourceResponse get(Context context, Request request, Response response, Variant variant)
      throws ResourceException
  {

    UserSearchCriteria criteria = new UserSearchCriteria();
    criteria.setUserId(this.getSearchArg(request));
    criteria.setSource(this.getUserSource(request));

    return this.search(criteria);
  }
View Full Code Here

Examples of org.sonatype.security.usermanagement.UserSearchCriteria

  public UserListResourceResponse get(Context context, Request request, Response response, Variant variant)
      throws ResourceException
  {
    UserListResourceResponse result = new UserListResourceResponse();

    for (User user : getSecuritySystem().searchUsers(new UserSearchCriteria(null, null, DEFAULT_SOURCE))) {
      UserResource res = securityToRestModel(user, request, true);

      if (res != null) {
        result.addData(res);
      }
View Full Code Here

Examples of org.sonatype.security.usermanagement.UserSearchCriteria

      throws ResourceException
  {
    PlexusUserSearchCriteriaResource criteriaResource =
        ((PlexusUserSearchCriteriaResourceRequest) payload).getData();

    UserSearchCriteria criteria = this.toPlexusSearchCriteria(criteriaResource);
    criteria.setSource(this.getUserSource(request));

    return this.search(criteria);
  }
View Full Code Here

Examples of org.sonatype.security.usermanagement.UserSearchCriteria

    return this.search(criteria);
  }

  private UserSearchCriteria toPlexusSearchCriteria(PlexusUserSearchCriteriaResource criteriaResource) {
    UserSearchCriteria criteria = new UserSearchCriteria();
    criteria.setUserId(criteriaResource.getUserId());

    // NOTE: in the future we could expand the REST resource to send back a list of roles, (or a single role)
    // to get a list of all users of Role 'XYZ'
    if (criteriaResource.isEffectiveUsers()) {
      Set<String> roleIds = new HashSet<String>();

      Set<Role> roles = null;
      try {
        roles = this.getSecuritySystem().listRoles("default");
      }
      catch (NoSuchAuthorizationManagerException e) {
        this.getLogger().error("Cannot find default UserManager,  effective user search may not work properly.",
            e);
        roles = this.getSecuritySystem().listRoles();
      }

      for (Role role : roles) {
        roleIds.add(role.getRoleId());
      }

      criteria.setOneOfRoleIds(roleIds);
    }

    return criteria;
  }
View Full Code Here

Examples of org.sonatype.security.usermanagement.UserSearchCriteria

  @Override
  @GET
  public PlexusUserListResourceResponse get(Context context, Request request, Response response, Variant variant)
      throws ResourceException
  {
    UserSearchCriteria criteria = new UserSearchCriteria();

    // match all userIds
    criteria.setUserId("");
    criteria.setSource(this.getUserSource(request));

    return this.search(criteria);
  }
View Full Code Here

Examples of org.sonatype.security.usermanagement.UserSearchCriteria

  @Test
  public void testSearch()
      throws Exception
  {
    UserManager userLocator = this.getUserManager();
    Set<User> users = userLocator.searchUsers(new UserSearchCriteria("j"));

    assertNotNull(this.getById(users, "jvanzyl"));
    assertNotNull(this.getById(users, "jdcasey"));
    Assert.assertEquals("Users: " + users, 2, users.size());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.