Class WsSubjectLookup
java.lang.Object
edu.internet2.middleware.grouper.ws.coresoap.WsSubjectLookup
- All Implemented Interfaces:
GrouperWsToStringCompact
template to lookup a subject. note if subjectId and subjectIdentifier are filled in with the same value, it will find by subject id or identifier. to lookup a group as a subject, use the group uuid (e.g. fa2dd790-d3f9-4cf4-ac41-bb82e63bff66) in the subject id of the subject lookup. Optionally you can use g:gsa as the source id. developers make sure each setter calls this.clearSubject();
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
result of a subject findstatic enum
result of a subject find -
Constructor Summary
ConstructorDescriptionWsSubjectLookup
(String subjectId1, String subjectSource1, String subjectIdentifier1) -
Method Summary
Modifier and TypeMethodDescriptionboolean
blank()
see if there is a blank query (if there is not id or identifierconvertToMemberIds
(GrouperSession grouperSession, WsSubjectLookup[] wsSubjectLookups, StringBuilder errorMessage) convert subject lookups to member ids (create if not exist)convertToMemberIds
(GrouperSession grouperSession, WsSubjectLookup[] wsSubjectLookups, StringBuilder errorMessage, int[] lookupCount) convert subject lookups to member ids (create if not exist)static WsSubjectLookup
createIfNeeded
(String subjectId, String sourceId, String subjectIdentifier) create if any not null, otherwise nullid of the subjectany identifier of the subjectoptional: source of subject in the subject api source listboolean
hasData()
see if this group lookup has datastatic void
Retrieve the member object for this subject, do not create if not there Note: this is not a javabean property because we dont want it in the web serviceretrieveMember
(String invalidInputReason) Note: this is not a javabean property because we dont want it in the web serviceNote: this is not a javabean property because we dont want it in the web serviceNote: this is not a javabean property because we dont want it in the web serviceretrieveSubject
(boolean addExternalSubjectIfNotFound) Note: this is not a javabean property because we dont want it in the web serviceretrieveSubject
(String invalidInputReason) Note: this is not a javabean property because we dont want it in the web serviceNote: this is not a javabean property because we dont want it in the web servicevoid
setSubjectId
(String subjectId1) id of the subjectvoid
setSubjectIdentifier
(String subjectIdentifier1) any identifier of the subjectvoid
setSubjectSourceId
(String subjectSource1) optional: source of subject in the subject api source listtoString()
make sure this is an explicit toString
-
Constructor Details
-
WsSubjectLookup
- Parameters:
subjectId1
-subjectSource1
-subjectIdentifier1
-
-
WsSubjectLookup
public WsSubjectLookup()
-
-
Method Details
-
createIfNeeded
public static WsSubjectLookup createIfNeeded(String subjectId, String sourceId, String subjectIdentifier) create if any not null, otherwise null- Parameters:
subjectId
-sourceId
-subjectIdentifier
-- Returns:
- the subject lookup
-
toString
-
main
- Parameters:
args
-
-
blank
public boolean blank()see if there is a blank query (if there is not id or identifier- Returns:
- true or false
-
hasData
public boolean hasData()see if this group lookup has data- Returns:
- true if it has data
-
getSubjectSourceId
optional: source of subject in the subject api source list- Returns:
- the subjectSource
-
setSubjectSourceId
optional: source of subject in the subject api source list- Parameters:
subjectSource1
- the subjectSource to set
-
retrieveSubject
Note: this is not a javabean property because we dont want it in the web service
- Returns:
- the subject
-
retrieveSubject
Note: this is not a javabean property because we dont want it in the web service
- Parameters:
addExternalSubjectIfNotFound
- if this is a search by id or identifier, with no source, or the external source, and the subject is not found, then add an external subject (if the user is allowed- Returns:
- the subject
-
retrieveMember
Retrieve the member object for this subject, do not create if not there Note: this is not a javabean property because we dont want it in the web service
- Returns:
- the member
-
retrieveMember
Note: this is not a javabean property because we dont want it in the web service
- Parameters:
invalidInputReason
- label to be put in WsInvalidQueryException- Returns:
- the subject
- Throws:
WsInvalidQueryException
-
retrieveSubject
Note: this is not a javabean property because we dont want it in the web service
- Parameters:
invalidInputReason
- label to be put in WsInvalidQueryException- Returns:
- the subject
- Throws:
WsInvalidQueryException
-
retrieveSubjectFindResult
Note: this is not a javabean property because we dont want it in the web service
- Returns:
- the subjectFindResult, this is never null
-
retrieveMemberFindResult
Note: this is not a javabean property because we dont want it in the web service
- Returns:
- the memberFindResult, this is never null
-
getSubjectId
id of the subject- Returns:
- the subjectId
-
setSubjectId
id of the subject- Parameters:
subjectId1
- the subjectId to set
-
getSubjectIdentifier
any identifier of the subject- Returns:
- the subjectIdentifier
-
setSubjectIdentifier
any identifier of the subject- Parameters:
subjectIdentifier1
- the subjectIdentifier to set
-
convertToMemberIds
public static Set<String> convertToMemberIds(GrouperSession grouperSession, WsSubjectLookup[] wsSubjectLookups, StringBuilder errorMessage) convert subject lookups to member ids (create if not exist)- Parameters:
grouperSession
-wsSubjectLookups
-errorMessage
-- Returns:
- the group ids
-
convertToMemberIds
public static Set<String> convertToMemberIds(GrouperSession grouperSession, WsSubjectLookup[] wsSubjectLookups, StringBuilder errorMessage, int[] lookupCount) convert subject lookups to member ids (create if not exist)- Parameters:
grouperSession
-wsSubjectLookups
-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 group ids
-
toStringCompact
make sure this is an explicit toString- Specified by:
toStringCompact
in interfaceGrouperWsToStringCompact
- Returns:
- return a compact to string
-