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

java.lang.Object
  extended by edu.internet2.middleware.grouper.ws.coresoap.WsGroupLookup
All Implemented Interfaces:
GrouperWsToStringCompact

public class WsGroupLookup
extends java.lang.Object
implements GrouperWsToStringCompact

 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(java.lang.String groupName1, java.lang.String uuid1)
           
WsGroupLookup(java.lang.String groupName1, java.lang.String uuid1, java.lang.String idIndex1)
           
WsGroupLookup(WsGroup wsGroup)
           
 
Method Summary
 boolean blank()
          see if blank
static java.util.Set<java.lang.String> convertToGroupIds(GrouperSession grouperSession, WsGroupLookup[] wsGroupLookups, java.lang.StringBuilder errorMessage, TypeOfGroup typeOfGroup, boolean usePIT, java.sql.Timestamp pointInTimeFrom, java.sql.Timestamp pointInTimeTo)
          convert group lookups to group ids
static java.util.Set<java.lang.String> convertToGroupIds(GrouperSession grouperSession, WsGroupLookup[] wsGroupLookups, java.lang.StringBuilder errorMessage, TypeOfGroup typeOfGroup, boolean usePIT, java.sql.Timestamp pointInTimeFrom, java.sql.Timestamp pointInTimeTo, int[] lookupCount)
          convert group lookups to group ids
 java.lang.String getGroupName()
          name of the group to find (includes stems, e.g.
 java.lang.String getIdIndex()
          integer ID for object
 java.lang.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, java.lang.String invalidQueryReason)
          retrieve the group for this lookup if not looked up yet.
 java.util.Set<PITGroup> retrievePITGroups()
           Note: this is not a javabean property because we dont want it in the web service
 java.util.Set<PITGroup> retrievePITGroupsIfNeeded(java.lang.String invalidQueryReason, java.sql.Timestamp pointInTimeFrom, java.sql.Timestamp pointInTimeTo)
          retrieve the pit groups for this lookup if not looked up yet.
 void setGroupName(java.lang.String theName)
          name of the group to find (includes stems, e.g.
 void setIdIndex(java.lang.String idIndex1)
          integer ID for object
 void setUuid(java.lang.String uuid1)
          uuid of the group to find
 java.lang.String toString()
          make sure this is an explicit toString
 java.lang.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(java.lang.String groupName1,
                     java.lang.String uuid1)
Parameters:
groupName1 -
uuid1 -

WsGroupLookup

public WsGroupLookup(java.lang.String groupName1,
                     java.lang.String uuid1,
                     java.lang.String idIndex1)
Parameters:
groupName1 -
uuid1 -
idIndex1 -
Method Detail

getIdIndex

public java.lang.String getIdIndex()
integer ID for object

Returns:
the id

setIdIndex

public void setIdIndex(java.lang.String idIndex1)
integer ID for object

Parameters:
idIndex1 -

convertToGroupIds

public static java.util.Set<java.lang.String> convertToGroupIds(GrouperSession grouperSession,
                                                                WsGroupLookup[] wsGroupLookups,
                                                                java.lang.StringBuilder errorMessage,
                                                                TypeOfGroup typeOfGroup,
                                                                boolean usePIT,
                                                                java.sql.Timestamp pointInTimeFrom,
                                                                java.sql.Timestamp pointInTimeTo)
convert group lookups to group ids

Parameters:
grouperSession -
wsGroupLookups -
errorMessage -
typeOfGroup -
usePIT -
pointInTimeFrom -
pointInTimeTo -
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 java.util.Set<java.lang.String> convertToGroupIds(GrouperSession grouperSession,
                                                                WsGroupLookup[] wsGroupLookups,
                                                                java.lang.StringBuilder errorMessage,
                                                                TypeOfGroup typeOfGroup,
                                                                boolean usePIT,
                                                                java.sql.Timestamp pointInTimeFrom,
                                                                java.sql.Timestamp pointInTimeTo,
                                                                int[] lookupCount)
convert group lookups to group ids

Parameters:
grouperSession -
wsGroupLookups -
errorMessage -
typeOfGroup -
usePIT -
pointInTimeFrom -
pointInTimeTo -
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

retrievePITGroups

public java.util.Set<PITGroup> retrievePITGroups()
 
 Note: this is not a javabean property because we dont want it in the web service
 

Returns:
the pit groups

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 java.lang.String toString()
make sure this is an explicit toString

Overrides:
toString in class java.lang.Object

toStringCompact

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

Specified by:
toStringCompact in interface GrouperWsToStringCompact
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,
                                   java.lang.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

retrievePITGroupsIfNeeded

public java.util.Set<PITGroup> retrievePITGroupsIfNeeded(java.lang.String invalidQueryReason,
                                                         java.sql.Timestamp pointInTimeFrom,
                                                         java.sql.Timestamp pointInTimeTo)
                                                  throws WsInvalidQueryException
retrieve the pit groups for this lookup if not looked up yet.

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

getUuid

public java.lang.String getUuid()
uuid of the group to find

Returns:
the uuid

setUuid

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

Parameters:
uuid1 - the uuid to set

getGroupName

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

Returns:
the theName

setGroupName

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

Parameters:
theName - the theName to set