Class AttestationGroupSave

java.lang.Object
edu.internet2.middleware.grouper.app.attestation.AttestationGroupSave

public class AttestationGroupSave extends Object

Use this class to add/edit/delete attestation on groups.

Sample call

 AttestationGroupSave attestationGroupSave = new AttestationGroupSave();
 AttributeAssign attributeAssign = attestationGroupSave
   .assignGroup(group)
   .addEmailAddress("test@example.com")
   .assignAttestationType(AttestationType.report)
   .assignDaysBeforeToRemind(5)
   .assignDaysUntilRecertify(10)
   .assignSendEmail(true)
   .save();
 System.out.println(attestationGroupSave.getSaveResultType()); // DELETE, INSERT, NO_CHANGE, or UPDATE
 

Sample call to remove attestation from a group

 new AttestationGroupSave()
  .assignGroup(group)
  .assignSaveMode(SaveMode.DELETE)
  .save();
 

Sample call to update only one attribute

 new AttestationGroupSave()
  .assignGroup(group)
  .assignReplaceAllSettings(false)
  .assignSendEmail(true);
  .save();
 

  • Constructor Details

    • AttestationGroupSave

      public AttestationGroupSave()
  • Method Details

    • assignDaysBeforeToRemind

      public AttestationGroupSave assignDaysBeforeToRemind(int theDaysBeforeToRemind)
      days before attestation to remind
      Returns:
      this for chaining
    • assignDaysUntilRecertify

      public AttestationGroupSave assignDaysUntilRecertify(int theDaysUntilRecertify)
      days until recertify
      Returns:
      this for chaining
    • assignEmailAddresses

      public AttestationGroupSave assignEmailAddresses(String theEmailAddresses)
      assign email addresses (separated by semicolon)
      Returns:
      this for chaining
    • assignEmailGroupId

      public AttestationGroupSave assignEmailGroupId(String theGroupId)
      assign group to email for group attestation
      Returns:
      this for chaining
    • assignEmailGroupName

      public AttestationGroupSave assignEmailGroupName(String theGroupName)
      assign group to email for group attestation
      Returns:
      this for chaining
    • assignEmailGroup

      public AttestationGroupSave assignEmailGroup(Group theGroup)
      assign group to email for group attestation
      Returns:
      this for chaining
    • addEmailAddress

      public AttestationGroupSave addEmailAddress(String theEmailAddress)
      add email address
      Returns:
      this for chaining
    • addEmailAddress

      public AttestationGroupSave addEmailAddress(Subject subject)
      add email address of the given subject
      Returns:
      this for chaining
    • addEmailAddresses

      public AttestationGroupSave addEmailAddresses(Group group)
      add email addresses from members of the given group
      Returns:
      this for chaining
    • assignEmailAddresses

      public AttestationGroupSave assignEmailAddresses(Set<String> theEmailAddresses)
      assign email addresses
      Returns:
      this for chaining
    • assignReplaceAllSettings

      public AttestationGroupSave assignReplaceAllSettings(boolean theReplaceAllSettings)
      replace all existing settings. defaults to true.
      Returns:
      this for chaining
    • assignMarkAsAttested

      public AttestationGroupSave assignMarkAsAttested(boolean theMarkAsAttested)
      Returns:
      this for chaining
    • assignAttestationType

      public AttestationGroupSave assignAttestationType(AttestationType theAttestationType)
      assign attestation type
      Returns:
      this for chaining
    • assignSendEmail

      public AttestationGroupSave assignSendEmail(boolean theSendEmail)
      Parameters:
      theSendEmail -
      Returns:
    • assignRunAsRoot

      public AttestationGroupSave assignRunAsRoot(boolean runAsRoot)
      set this to true to run as a root session
      Parameters:
      runAsRoot -
      Returns:
    • assignGroup

      public AttestationGroupSave assignGroup(Group theGroup)
      assign a group
      Parameters:
      theGroup -
      Returns:
      this for chaining
    • assignGroupId

      public AttestationGroupSave assignGroupId(String theGroupId)
      group id to add to, mutually exclusive with group name and group
      Parameters:
      theGroupId -
      Returns:
      this for chaining
    • assignGroupName

      public AttestationGroupSave assignGroupName(String theGroupName)
      group name to add to, mutually exclusive with group id and group
      Parameters:
      theGroupName -
      Returns:
      this for chaining
    • assignSaveMode

      public AttestationGroupSave assignSaveMode(SaveMode theSaveMode)
      assign save mode
      Parameters:
      theSaveMode -
      Returns:
      this for chaining
    • getSaveResultType

      public SaveResultType getSaveResultType()
      get the save result type after the save call
      Returns:
      save type
    • save

       create or update or delete attestation attributes from a group
       
      Returns:
      attribute assign
      Throws:
      InsufficientPrivilegeException
      GroupNotFoundException