public class WsSubjectLookup extends java.lang.Object implements 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();
Modifier and Type | Class and Description |
---|---|
static class |
WsSubjectLookup.MemberFindResult
result of a subject find
|
static class |
WsSubjectLookup.SubjectFindResult
result of a subject find
|
Constructor and Description |
---|
WsSubjectLookup() |
WsSubjectLookup(java.lang.String subjectId1,
java.lang.String subjectSource1,
java.lang.String subjectIdentifier1) |
Modifier and Type | Method and Description |
---|---|
boolean |
blank()
see if there is a blank query (if there is not id or identifier
|
static java.util.Set<java.lang.String> |
convertToMemberIds(GrouperSession grouperSession,
WsSubjectLookup[] wsSubjectLookups,
java.lang.StringBuilder errorMessage)
convert subject lookups to member ids (create if not exist)
|
static java.util.Set<java.lang.String> |
convertToMemberIds(GrouperSession grouperSession,
WsSubjectLookup[] wsSubjectLookups,
java.lang.StringBuilder errorMessage,
int[] lookupCount)
convert subject lookups to member ids (create if not exist)
|
static WsSubjectLookup |
createIfNeeded(java.lang.String subjectId,
java.lang.String sourceId,
java.lang.String subjectIdentifier)
create if any not null, otherwise null
|
java.lang.String |
getSubjectId()
id of the subject
|
java.lang.String |
getSubjectIdentifier()
any identifier of the subject
|
java.lang.String |
getSubjectSourceId()
optional: source of subject in the subject api source list
|
boolean |
hasData()
see if this group lookup has data
|
static void |
main(java.lang.String[] args) |
Member |
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
|
Member |
retrieveMember(java.lang.String invalidInputReason)
Note: this is not a javabean property because we dont want it in the web service
|
WsSubjectLookup.MemberFindResult |
retrieveMemberFindResult()
Note: this is not a javabean property because we dont want it in the web service
|
Subject |
retrieveSubject()
Note: this is not a javabean property because we dont want it in the web service
|
Subject |
retrieveSubject(boolean addExternalSubjectIfNotFound)
Note: this is not a javabean property because we dont want it in the web service
|
Subject |
retrieveSubject(java.lang.String invalidInputReason)
Note: this is not a javabean property because we dont want it in the web service
|
WsSubjectLookup.SubjectFindResult |
retrieveSubjectFindResult()
Note: this is not a javabean property because we dont want it in the web service
|
void |
setSubjectId(java.lang.String subjectId1)
id of the subject
|
void |
setSubjectIdentifier(java.lang.String subjectIdentifier1)
any identifier of the subject
|
void |
setSubjectSourceId(java.lang.String subjectSource1)
optional: source of subject in the subject api source list
|
java.lang.String |
toString() |
java.lang.String |
toStringCompact()
make sure this is an explicit toString
|
public WsSubjectLookup(java.lang.String subjectId1, java.lang.String subjectSource1, java.lang.String subjectIdentifier1)
subjectId1
- subjectSource1
- subjectIdentifier1
- public WsSubjectLookup()
public static WsSubjectLookup createIfNeeded(java.lang.String subjectId, java.lang.String sourceId, java.lang.String subjectIdentifier)
subjectId
- sourceId
- subjectIdentifier
- public java.lang.String toString()
toString
in class java.lang.Object
public static void main(java.lang.String[] args)
args
- public boolean blank()
public boolean hasData()
public java.lang.String getSubjectSourceId()
public void setSubjectSourceId(java.lang.String subjectSource1)
subjectSource1
- the subjectSource to setpublic Subject retrieveSubject()
Note: this is not a javabean property because we dont want it in the web service
public Subject retrieveSubject(boolean addExternalSubjectIfNotFound)
Note: this is not a javabean property because we dont want it in the web service
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 allowedpublic Member 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
public Member retrieveMember(java.lang.String invalidInputReason)
Note: this is not a javabean property because we dont want it in the web service
invalidInputReason
- label to be put in WsInvalidQueryExceptionWsInvalidQueryException
public Subject retrieveSubject(java.lang.String invalidInputReason)
Note: this is not a javabean property because we dont want it in the web service
invalidInputReason
- label to be put in WsInvalidQueryExceptionWsInvalidQueryException
public WsSubjectLookup.SubjectFindResult retrieveSubjectFindResult()
Note: this is not a javabean property because we dont want it in the web service
public WsSubjectLookup.MemberFindResult retrieveMemberFindResult()
Note: this is not a javabean property because we dont want it in the web service
public java.lang.String getSubjectId()
public void setSubjectId(java.lang.String subjectId1)
subjectId1
- the subjectId to setpublic java.lang.String getSubjectIdentifier()
public void setSubjectIdentifier(java.lang.String subjectIdentifier1)
subjectIdentifier1
- the subjectIdentifier to setpublic static java.util.Set<java.lang.String> convertToMemberIds(GrouperSession grouperSession, WsSubjectLookup[] wsSubjectLookups, java.lang.StringBuilder errorMessage)
grouperSession
- wsSubjectLookups
- errorMessage
- public static java.util.Set<java.lang.String> convertToMemberIds(GrouperSession grouperSession, WsSubjectLookup[] wsSubjectLookups, java.lang.StringBuilder errorMessage, int[] lookupCount)
grouperSession
- wsSubjectLookups
- errorMessage
- lookupCount
- is an array of size one int where 1 will be added if there are records, and no change if notpublic java.lang.String toStringCompact()
toStringCompact
in interface GrouperWsToStringCompact