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

java.lang.Object
  extended by edu.internet2.middleware.grouper.ws.coresoap.WsSubject
All Implemented Interfaces:
java.lang.Comparable<WsSubject>

public class WsSubject
extends java.lang.Object
implements java.lang.Comparable<WsSubject>

subject bean for web services

Author:
mchyzer

Nested Class Summary
static class WsSubject.WsSubjectResultCode
          result code of a request
 
Field Summary
static java.lang.String SUBJECT_ATTRIBUTE_PREFIX
          prefix of attribute that refers to subject: subject.
 
Constructor Summary
WsSubject()
          constructor
WsSubject(Member member, java.lang.String[] subjectAttributeNames, WsSubjectLookup subjectLookup, boolean includeSubjectDetails)
          construct with member to set internal fields
WsSubject(Subject subject, java.lang.String[] subjectAttributeNames, WsSubjectLookup wsSubjectLookup)
          constructor to convert jdbc subject to a ws subject
WsSubject(WsSubjectLookup wsSubjectLookup)
          this is a temporary constructor to just put the lookup info here in case there is an error retrieving the subject constructor
 
Method Summary
 void assignResultCode(WsSubject.WsSubjectResultCode wsSubjectResultCode)
          assign the code from the enum
 int compareTo(WsSubject o2)
           
static WsSubject[] convertMembers(java.util.Set<Member> memberSet, java.lang.String[] attributeNames, boolean includeSubjectDetail)
          convert members to subject results
 java.lang.String[] getAttributeValues()
          if attributes are being sent back per config in the grouper.properties, this is attribute0 value, this is extended subject data
 java.lang.String getId()
          subject id, note if no subject found, and identifier was passed in, that will be placed here
 java.lang.String getIdentifierLookup()
          identifier used to lookup subject
 java.lang.String getName()
           
 java.lang.String getResultCode()
           
 java.lang.String getSourceId()
           
 java.lang.String getSuccess()
          T or F for success
 void setAttributeValues(java.lang.String[] attributesa)
          attribute data of subjects in group (in same order as attributeNames)
 void setId(java.lang.String id1)
          subject id, note if no subject found, and identifier was passed in, that will be placed here
 void setIdentifierLookup(java.lang.String identifierLookup1)
          return the identifier looked up
 void setName(java.lang.String name1)
           
 void setResultCode(java.lang.String resultCode1)
           
 void setSourceId(java.lang.String source1)
           
 void setSuccess(java.lang.String success1)
          T or F for success
 java.lang.String toString()
          make sure this is an explicit toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SUBJECT_ATTRIBUTE_PREFIX

public static final java.lang.String SUBJECT_ATTRIBUTE_PREFIX
prefix of attribute that refers to subject: subject.

See Also:
Constant Field Values
Constructor Detail

WsSubject

public WsSubject()
constructor


WsSubject

public WsSubject(WsSubjectLookup wsSubjectLookup)
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

public WsSubject(Subject subject,
                 java.lang.String[] subjectAttributeNames,
                 WsSubjectLookup wsSubjectLookup)
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,
                 java.lang.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)
Method Detail

getIdentifierLookup

public java.lang.String getIdentifierLookup()
identifier used to lookup subject

Returns:
the identifier

setIdentifierLookup

public void setIdentifierLookup(java.lang.String identifierLookup1)
return the identifier looked up

Parameters:
identifierLookup1 -

toString

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

Overrides:
toString in class java.lang.Object

convertMembers

public static WsSubject[] convertMembers(java.util.Set<Member> memberSet,
                                         java.lang.String[] attributeNames,
                                         boolean includeSubjectDetail)
convert members to subject results

Parameters:
attributeNames - to get from subjects
memberSet -
includeSubjectDetail -
Returns:
the subject results

getId

public java.lang.String getId()
subject id, note if no subject found, and identifier was passed in, that will be placed here

Returns:
the id

setId

public void setId(java.lang.String id1)
subject id, note if no subject found, and identifier was passed in, that will be placed here

Parameters:
id1 -

getName

public java.lang.String getName()
Returns:
the name

setName

public void setName(java.lang.String name1)
Parameters:
name1 - the name to set

getAttributeValues

public java.lang.String[] 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

public void setAttributeValues(java.lang.String[] attributesa)
attribute data of subjects in group (in same order as attributeNames)

Parameters:
attributesa - the attributes to set

getSourceId

public java.lang.String getSourceId()
Returns:
the source

setSourceId

public void setSourceId(java.lang.String source1)
Parameters:
source1 - the source to set

getResultCode

public java.lang.String getResultCode()
Returns:
the resultCode

setResultCode

public void setResultCode(java.lang.String resultCode1)
Parameters:
resultCode1 - the resultCode to set

assignResultCode

public void assignResultCode(WsSubject.WsSubjectResultCode wsSubjectResultCode)
assign the code from the enum

Parameters:
wsSubjectResultCode -

getSuccess

public java.lang.String getSuccess()
T or F for success

Returns:
the success

setSuccess

public void setSuccess(java.lang.String success1)
T or F for success

Parameters:
success1 - the success to set

compareTo

public int compareTo(WsSubject o2)
Specified by:
compareTo in interface java.lang.Comparable<WsSubject>
See Also:
Comparable.compareTo(java.lang.Object)