Examples of GcFindGroups


Examples of edu.internet2.middleware.grouperClient.api.GcFindGroups

        try {
           
            // TODO: searches need to be performed against the group display
            // name rather than the group key
           
            GcFindGroups groupSearch = new GcFindGroups();
            WsQueryFilter filter = new WsQueryFilter();
            //is this an exact search or fuzzy
            if(method == IGroupConstants.IS){
              filter.setQueryFilterType("FIND_BY_GROUP_NAME_EXACT");
            }else{
              filter.setQueryFilterType("FIND_BY_GROUP_NAME_APPROXIMATE");
            }
            filter.setGroupName(query);
            groupSearch.assignQueryFilter(filter);
            WsFindGroupsResults results = groupSearch.execute();
           
            if (results != null && results.getGroupResults() != null) {
                for (WsGroup g : results.getGroupResults()) {
                  if (validKey(g.getName())) {
                    if (LOGGER.isTraceEnabled()) {
View Full Code Here

Examples of edu.internet2.middleware.grouperClient.api.GcFindGroups

    protected WsGroup findGroupFromKey(String key) {
      WsGroup wsGroup = null;

    if (key != null) {

      GcFindGroups gcFindGroups = new GcFindGroups();
      gcFindGroups.addGroupName(key);
      WsFindGroupsResults results = gcFindGroups.execute();

      // if no results were returned, return null
      if (results != null && results.getGroupResults() != null
          && results.getGroupResults().length > 0) {
View Full Code Here

Examples of edu.internet2.middleware.grouperClient.api.GcFindGroups

  public String getName(){
    return wsStem.getName();
  }

  public ArrayList<Group> getGroups() {
    GcFindGroups gcf = new GcFindGroups();
    WsQueryFilter wsqf = new WsQueryFilter();
    wsqf.setStemName(wsStem.getName());
    wsqf.setQueryFilterType("FIND_BY_STEM_NAME");
    gcf.assignQueryFilter(wsqf);

    ArrayList<Group> groupResults = new ArrayList();

    WsGroup[] callResults = gcf.execute().getGroupResults();

    for(WsGroup aGroup : callResults){
      groupResults.add(new Group(aGroup, this));
    }
View Full Code Here

Examples of edu.internet2.middleware.grouperClient.api.GcFindGroups

   * Get a bunch of groups by type
   * @param type group type to query by
   * @return ArrayList of groups.  List will be empty if no results
   */
  public ArrayList<Group> getGroupsByType(String type){
    GcFindGroups groupFinder = new GcFindGroups();
   
    WsQueryFilter filter = new WsQueryFilter();
    filter.setQueryFilterType("FIND_BY_TYPE");
    filter.setGroupTypeName(type);
   
    groupFinder.assignQueryFilter(filter);
   
    WsFindGroupsResults queryResults = groupFinder.execute();
   
    ArrayList<Group> results = new ArrayList();
   
    for(WsGroup resGrp : queryResults.getGroupResults()){
      results.add(new Group(resGrp,null));
View Full Code Here

Examples of edu.internet2.middleware.grouperClient.api.GcFindGroups

   
    return results;
  }

  public Group findGroup(String groupID){
    GcFindGroups groupFinder = new GcFindGroups();

    groupFinder.addGroupName(groupID);
    WsFindGroupsResults res = groupFinder.execute();
   
    if(!"T".equals(res.getResultMetadata().getSuccess())){
      throw new RuntimeException("Error finding group: "+groupID+", "+res.getResultMetadata().getResultMessage());
    }
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.