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

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

public class WsMembershipLookup
extends java.lang.Object
implements GrouperWsToStringCompact

 Class to lookup a membership via web service.  Put in a uuid, or fill in the other fields
 
 developers make sure each setter calls this.clearMembership();
 

Author:
mchyzer

Nested Class Summary
static class WsMembershipLookup.MembershipFindResult
          result of attribute def name find
 
Constructor Summary
WsMembershipLookup()
           
WsMembershipLookup(java.lang.String uuid1)
           
 
Method Summary
 boolean blank()
          see if blank
static java.util.Set<java.lang.String> convertToMembershipIds(GrouperSession grouperSession, WsMembershipLookup[] wsMembershipLookups, java.lang.StringBuilder errorMessage, int[] lookupCount)
          convert membership lookups to membership ids
 java.lang.String getUuid()
          uuid of the membership to find
 boolean hasData()
          see if this membership lookup has data
 Membership retrieveMembership()
           Note: this is not a javabean property because we dont want it in the web service
 WsMembershipLookup.MembershipFindResult retrieveMembershipFindResult()
           Note: this is not a javabean property because we dont want it in the web service
 void retrieveMembershipIfNeeded(GrouperSession grouperSession)
          retrieve the membership for this lookup if not looked up yet.
 Membership retrieveMembershipIfNeeded(GrouperSession grouperSession, java.lang.String invalidQueryReason)
          retrieve the membership for this lookup if not looked up yet.
 void setUuid(java.lang.String uuid1)
          uuid of the membership 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

WsMembershipLookup

public WsMembershipLookup(java.lang.String uuid1)
Parameters:
uuid1 -

WsMembershipLookup

public WsMembershipLookup()
Method Detail

blank

public boolean blank()
see if blank

Returns:
true if blank

hasData

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

Returns:
true if it has data

retrieveMembership

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

Returns:
the membership

retrieveMembershipFindResult

public WsMembershipLookup.MembershipFindResult retrieveMembershipFindResult()
 
 Note: this is not a javabean property because we dont want it in the web service
 

Returns:
the membershipFindResult, this is never null

toString

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

Overrides:
toString in class java.lang.Object

retrieveMembershipIfNeeded

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

Parameters:
grouperSession -

retrieveMembershipIfNeeded

public Membership retrieveMembershipIfNeeded(GrouperSession grouperSession,
                                             java.lang.String invalidQueryReason)
                                      throws WsInvalidQueryException
retrieve the membership 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 membership
Throws:
WsInvalidQueryException - if there is a problem, and if the invalidQueryReason is set

getUuid

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

Returns:
the uuid

setUuid

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

Parameters:
uuid1 - the uuid to set

convertToMembershipIds

public static java.util.Set<java.lang.String> convertToMembershipIds(GrouperSession grouperSession,
                                                                     WsMembershipLookup[] wsMembershipLookups,
                                                                     java.lang.StringBuilder errorMessage,
                                                                     int[] lookupCount)
convert membership lookups to membership ids

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

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