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

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

public class WsSubject
extends Object
implements Comparable<WsSubject>

subject bean for web services

Author:
mchyzer

Nested Class Summary
static class WsSubject.WsSubjectResultCode
          result code of a request
 
Field Summary
static String SUBJECT_ATTRIBUTE_PREFIX
          prefix of attribute that refers to subject: subject.
 
Constructor Summary
WsSubject()
          constructor
WsSubject(Member member, String[] subjectAttributeNames, WsSubjectLookup subjectLookup, boolean includeSubjectDetails)
          construct with member to set internal fields
WsSubject(Subject subject, 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(Set<Member> memberSet, String[] attributeNames, boolean includeSubjectDetail)
          convert members to subject results
 String[] getAttributeValues()
          if attributes are being sent back per config in the grouper.properties, this is attribute0 value, this is extended subject data
 String getId()
          subject id, note if no subject found, and identifier was passed in, that will be placed here
 String getIdentifierLookup()
          identifier used to lookup subject
 String getName()
           
 String getResultCode()
           
 String getSourceId()
           
 String getSuccess()
          T or F for success
 void setAttributeValues(String[] attributesa)
          attribute data of subjects in group (in same order as attributeNames)
 void setId(String id1)
          subject id, note if no subject found, and identifier was passed in, that will be placed here
 void setIdentifierLookup(String identifierLookup1)
          return the identifier looked up
 void setName(String name1)
           
 void setResultCode(String resultCode1)
           
 void setSourceId(String source1)
           
 void setSuccess(String success1)
          T or F for success
 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 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,
                 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,
                 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 String getIdentifierLookup()
identifier used to lookup subject

Returns:
the identifier

setIdentifierLookup

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

Parameters:
identifierLookup1 -

toString

public String toString()
make sure this is an explicit toString

Overrides:
toString in class Object

convertMembers

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

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

getId

public 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(String id1)
subject id, note if no subject found, and identifier was passed in, that will be placed here

Parameters:
id1 -

getName

public String getName()
Returns:
the name

setName

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

getAttributeValues

public 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(String[] attributesa)
attribute data of subjects in group (in same order as attributeNames)

Parameters:
attributesa - the attributes to set

getSourceId

public String getSourceId()
Returns:
the source

setSourceId

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

getResultCode

public String getResultCode()
Returns:
the resultCode

setResultCode

public void setResultCode(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 String getSuccess()
T or F for success

Returns:
the success

setSuccess

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

Parameters:
success1 - the success to set

compareTo

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