Class WsSubject
java.lang.Object
edu.internet2.middleware.grouper.ws.coresoap.WsSubject
- All Implemented Interfaces:
Comparable<WsSubject>
subject bean for web services
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumresult code of a request -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprefix of attribute that refers to subject: subject. -
Constructor Summary
ConstructorsConstructorDescriptionconstructorWsSubject(Member member, String[] subjectAttributeNames, WsSubjectLookup subjectLookup, boolean includeSubjectDetails) construct with member to set internal fieldsWsSubject(PITMember pitMember, String[] subjectAttributeNames, WsSubjectLookup subjectLookup, boolean includeSubjectDetails) construct with member to set internal fieldsWsSubject(WsSubjectLookup wsSubjectLookup) this is a temporary constructor to just put the lookup info here in case there is an error retrieving the subject constructorWsSubject(Subject subject, String[] subjectAttributeNames, WsSubjectLookup wsSubjectLookup) constructor to convert jdbc subject to a ws subject -
Method Summary
Modifier and TypeMethodDescriptionvoidassignResultCode(WsSubject.WsSubjectResultCode wsSubjectResultCode) assign the code from the enumintstatic WsSubject[]convertMembers(Set<Member> memberSet, String[] attributeNames, boolean includeSubjectDetail) convert members to subject resultsString[]if attributes are being sent back per config in the grouper.properties, this is attribute0 value, this is extended subject datagetId()subject id, note if no subject found, and identifier was passed in, that will be placed hereidentifier used to lookup subjectgetName()T or F for successvoidsetAttributeValues(String[] attributesa) attribute data of subjects in group (in same order as attributeNames)voidsubject id, note if no subject found, and identifier was passed in, that will be placed herevoidsetIdentifierLookup(String identifierLookup1) return the identifier looked upvoidsetMemberId(String memberId1) voidvoidsetResultCode(String resultCode1) voidsetSourceId(String source1) voidsetSuccess(String success1) T or F for successtoString()make sure this is an explicit toString
-
Field Details
-
SUBJECT_ATTRIBUTE_PREFIX
prefix of attribute that refers to subject: subject.- See Also:
-
-
Constructor Details
-
WsSubject
public WsSubject()constructor -
WsSubject
this is a temporary constructor to just put the lookup info here in case there is an error retrieving the subject constructor- Parameters:
wsSubjectLookup- to be based on (assuming subject not found, just copy the fields
-
WsSubject
constructor to convert jdbc subject to a ws subject- Parameters:
subject- (can be null)subjectAttributeNames- (should be calculated based on if detail or not)wsSubjectLookup- can be null, else the lookup which got the subject
-
WsSubject
public WsSubject(Member member, String[] subjectAttributeNames, WsSubjectLookup subjectLookup, boolean includeSubjectDetails) construct with member to set internal fields- Parameters:
member-subjectAttributeNames- are the attributes the user is getting (either requested or in config) (should be calculated for is detail or not)subjectLookup-includeSubjectDetails-retrieveExtendedSubjectDataBoolean- true to retrieve subject info (more than just the id)
-
WsSubject
public WsSubject(PITMember pitMember, String[] subjectAttributeNames, WsSubjectLookup subjectLookup, boolean includeSubjectDetails) construct with member to set internal fields- Parameters:
pitMember-subjectAttributeNames- are the attributes the user is getting (either requested or in config) (should be calculated for is detail or not)subjectLookup-includeSubjectDetails-
-
-
Method Details
-
getIdentifierLookup
identifier used to lookup subject- Returns:
- the identifier
-
setIdentifierLookup
return the identifier looked up- Parameters:
identifierLookup1-
-
toString
make sure this is an explicit toString -
convertMembers
public static WsSubject[] convertMembers(Set<Member> memberSet, String[] attributeNames, boolean includeSubjectDetail) convert members to subject results- Parameters:
attributeNames- to get from subjectsmemberSet-includeSubjectDetail-- Returns:
- the subject results
-
getId
subject id, note if no subject found, and identifier was passed in, that will be placed here- Returns:
- the id
-
setId
subject id, note if no subject found, and identifier was passed in, that will be placed here- Parameters:
id1-
-
getName
- Returns:
- the name
-
setName
- Parameters:
name1- the name to set
-
getAttributeValues
if attributes are being sent back per config in the grouper.properties, this is attribute0 value, this is extended subject data- Returns:
- the attribute0
-
setAttributeValues
attribute data of subjects in group (in same order as attributeNames)- Parameters:
attributesa- the attributes to set
-
getSourceId
- Returns:
- the source
-
setSourceId
- Parameters:
source1- the source to set
-
getMemberId
- Returns:
- the memberId
-
setMemberId
- Parameters:
memberId1- the uuid to set
-
getResultCode
- Returns:
- the resultCode
-
setResultCode
- Parameters:
resultCode1- the resultCode to set
-
assignResultCode
assign the code from the enum- Parameters:
wsSubjectResultCode-
-
getSuccess
T or F for success- Returns:
- the success
-
setSuccess
T or F for success- Parameters:
success1- the success to set
-
compareTo
- Specified by:
compareToin interfaceComparable<WsSubject>- See Also:
-