edu.internet2.middleware.grouper.ws.soap
Class WsGroupLookup

java.lang.Object
  extended by edu.internet2.middleware.grouper.ws.soap.WsGroupLookup

public class WsGroupLookup
extends Object

 Class to lookup a group via web service
 
 developers make sure each setter calls this.clearGroup();
 

Author:
mchyzer

Nested Class Summary
static class WsGroupLookup.GroupFindResult
          result of group find
 
Constructor Summary
WsGroupLookup()
           
WsGroupLookup(String groupName1, String uuid1)
           
WsGroupLookup(WsGroup wsGroup)
           
 
Method Summary
 boolean blank()
          see if blank
static Set<String> convertToGroupIds(GrouperSession grouperSession, WsGroupLookup[] wsGroupLookups, StringBuilder errorMessage, TypeOfGroup typeOfGroup)
          convert group lookups to group ids
static Set<String> convertToGroupIds(GrouperSession grouperSession, WsGroupLookup[] wsGroupLookups, StringBuilder errorMessage, TypeOfGroup typeOfGroup, int[] lookupCount)
          convert group lookups to group ids
 String getGroupName()
          name of the group to find (includes stems, e.g.
 String getUuid()
          uuid of the group to find
 boolean hasData()
          see if this group lookup has data
 Group retrieveGroup()
           Note: this is not a javabean property because we dont want it in the web service
 WsGroupLookup.GroupFindResult retrieveGroupFindResult()
           Note: this is not a javabean property because we dont want it in the web service
 void retrieveGroupIfNeeded(GrouperSession grouperSession)
          retrieve the group for this lookup if not looked up yet.
 Group retrieveGroupIfNeeded(GrouperSession grouperSession, String invalidQueryReason)
          retrieve the group for this lookup if not looked up yet.
 void setGroupName(String theName)
          name of the group to find (includes stems, e.g.
 void setUuid(String uuid1)
          uuid of the group to find
 String toString()
          make sure this is an explicit toString
 String toStringCompact()
          make sure this is an explicit toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WsGroupLookup

public WsGroupLookup(WsGroup wsGroup)
Parameters:
wsGroup -

WsGroupLookup

public WsGroupLookup()

WsGroupLookup

public WsGroupLookup(String groupName1,
                     String uuid1)
Parameters:
groupName1 -
uuid1 -
Method Detail

convertToGroupIds

public static Set<String> convertToGroupIds(GrouperSession grouperSession,
                                            WsGroupLookup[] wsGroupLookups,
                                            StringBuilder errorMessage,
                                            TypeOfGroup typeOfGroup)
convert group lookups to group ids

Parameters:
grouperSession -
wsGroupLookups -
errorMessage -
typeOfGroup -
lookupCount - is an array of size one int where 1 will be added if there are records, and no change if not
Returns:
the group ids

convertToGroupIds

public static Set<String> convertToGroupIds(GrouperSession grouperSession,
                                            WsGroupLookup[] wsGroupLookups,
                                            StringBuilder errorMessage,
                                            TypeOfGroup typeOfGroup,
                                            int[] lookupCount)
convert group lookups to group ids

Parameters:
grouperSession -
wsGroupLookups -
errorMessage -
typeOfGroup -
lookupCount - is an array of size one int where 1 will be added if there are records, and no change if not
Returns:
the group ids

blank

public boolean blank()
see if blank

Returns:
true if blank

hasData

public boolean hasData()
see if this group lookup has data

Returns:
true if it has data

retrieveGroup

public Group retrieveGroup()
 
 Note: this is not a javabean property because we dont want it in the web service
 

Returns:
the group

retrieveGroupFindResult

public WsGroupLookup.GroupFindResult retrieveGroupFindResult()
 
 Note: this is not a javabean property because we dont want it in the web service
 

Returns:
the groupFindResult, this is never null

toString

public String toString()
make sure this is an explicit toString

Overrides:
toString in class Object

toStringCompact

public String toStringCompact()
make sure this is an explicit toString

Returns:
return a compact to string

retrieveGroupIfNeeded

public void retrieveGroupIfNeeded(GrouperSession grouperSession)
retrieve the group for this lookup if not looked up yet. pass in a grouper session

Parameters:
grouperSession -

retrieveGroupIfNeeded

public Group retrieveGroupIfNeeded(GrouperSession grouperSession,
                                   String invalidQueryReason)
                            throws WsInvalidQueryException
retrieve the group for this lookup if not looked up yet. pass in a grouper session

Parameters:
grouperSession -
invalidQueryReason - is the text to go in the WsInvalidQueryException
Returns:
the group
Throws:
WsInvalidQueryException - if there is a problem, and if the invalidQueryReason is set

getUuid

public String getUuid()
uuid of the group to find

Returns:
the uuid

setUuid

public void setUuid(String uuid1)
uuid of the group to find

Parameters:
uuid1 - the uuid to set

getGroupName

public String getGroupName()
name of the group to find (includes stems, e.g. stem1:stem2:groupName

Returns:
the theName

setGroupName

public void setGroupName(String theName)
name of the group to find (includes stems, e.g. stem1:stem2:groupName

Parameters:
theName - the theName to set