edu.internet2.middleware.grouper.externalSubjects
Class ExternalSubjectSave

java.lang.Object
  extended by edu.internet2.middleware.grouper.externalSubjects.ExternalSubjectSave

public class ExternalSubjectSave
extends Object

Use this class to insert or update a external subject


Constructor Summary
ExternalSubjectSave(GrouperSession theGrouperSession)
          create a new external subject save
 
Method Summary
 ExternalSubjectSave addAttribute(String name, String value)
          add an attribute assignment
 ExternalSubjectSave assignAttributes(Map<String,String> theAttributes)
          assign attributes
 ExternalSubjectSave assignEmail(String theEmail)
           
 ExternalSubjectSave assignEnabled(boolean theEnabled)
           
 ExternalSubjectSave assignIdentifier(String theIdentifier)
           
 ExternalSubjectSave assignIdentifierToEdit(String theIdentifierToEdit)
          identifier to edit
 ExternalSubjectSave assignInstitution(String theInstitution)
           
 ExternalSubjectSave assignName(String name1)
          name
 ExternalSubjectSave assignSaveMode(SaveMode theSaveMode)
          assign save mode
 ExternalSubjectSave assignUuid(String theUuid)
          uuid
 ExternalSubjectSave assignVettedEmailAddresses(String theVettedEmailAddresses)
           
 SaveResultType getSaveResultType()
          get the save type
 ExternalSubject save()
           create or update a external subject.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExternalSubjectSave

public ExternalSubjectSave(GrouperSession theGrouperSession)
create a new external subject save

Parameters:
theGrouperSession -
Method Detail

assignAttributes

public ExternalSubjectSave assignAttributes(Map<String,String> theAttributes)
assign attributes

Parameters:
theAttributes -
Returns:
this for chaining

addAttribute

public ExternalSubjectSave addAttribute(String name,
                                        String value)
add an attribute assignment

Parameters:
name -
value -
Returns:
this for chaining

assignIdentifierToEdit

public ExternalSubjectSave assignIdentifierToEdit(String theIdentifierToEdit)
identifier to edit

Parameters:
theIdentifierToEdit -
Returns:
the identifier to edit

assignUuid

public ExternalSubjectSave assignUuid(String theUuid)
uuid

Parameters:
theUuid -
Returns:
uuid

assignIdentifier

public ExternalSubjectSave assignIdentifier(String theIdentifier)
Parameters:
theIdentifier -
Returns:
this for chaining

assignInstitution

public ExternalSubjectSave assignInstitution(String theInstitution)
Parameters:
theInstitution -
Returns:
this for chaining

assignEnabled

public ExternalSubjectSave assignEnabled(boolean theEnabled)
Parameters:
theEnabled -
Returns:
this for chaining

assignEmail

public ExternalSubjectSave assignEmail(String theEmail)
Parameters:
theEmail -
Returns:
this for chaining

assignName

public ExternalSubjectSave assignName(String name1)
name

Parameters:
name1 -
Returns:
name

assignSaveMode

public ExternalSubjectSave assignSaveMode(SaveMode theSaveMode)
assign save mode

Parameters:
theSaveMode -
Returns:
this for chaining

assignVettedEmailAddresses

public ExternalSubjectSave assignVettedEmailAddresses(String theVettedEmailAddresses)
Parameters:
theVettedEmailAddresses -
Returns:
this for chaining

getSaveResultType

public SaveResultType getSaveResultType()
get the save type

Returns:
save type

save

public ExternalSubject save()
 create or update a external subject.
 
 Steps:
 
 1. Find the external subject by identifierToEdit
 2. Internally set all the fields of the stem (no need to reset if already the same)
 3. Store the external subject (insert or update) if needed
 4. Return the external subject object
 
 This runs in a tx so that if part of it fails the whole thing fails, and potentially the outer
 transaction too
 

Returns:
the external subject
Throws:
InsufficientPrivilegeException