Class AttestationStemSave

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

public class AttestationStemSave extends Object

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

Sample call

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

Sample call to remove attestation from a folder

 new AttestationStemSave()
  .assignStem(stem)
  .assignSaveMode(SaveMode.DELETE)
  .save();
 

Sample call to update only one attribute

 new AttestationStemSave()
  .assignStem(stem)
  .assignReplaceAllSettings(false)
  .assignSendEmail(true);
  .save();
 

  • Constructor Details

    • AttestationStemSave

      public AttestationStemSave()
  • Method Details

    • main

      public static void main(String[] args)
      Parameters:
      args -
    • assignReportMarkerAttributeAssignId

      public AttestationStemSave assignReportMarkerAttributeAssignId(String reportMarkerAttributeAssignId)
      assign report attribute assign id
      Parameters:
      theGroup -
      Returns:
      this for chaining
    • assignReportConfigName

      public AttestationStemSave assignReportConfigName(String reportConfigName)
      assign report config name
      Parameters:
      theGroup -
      Returns:
      this for chaining
    • assignGroupCanAttest

      public AttestationStemSave assignGroupCanAttest(Group theGroup)
      assign a group
      Parameters:
      theGroup -
      Returns:
      this for chaining
    • assignGroupIdCanAttest

      public AttestationStemSave assignGroupIdCanAttest(String theGroupId)
      group id to add to, mutually exclusive with group name and group
      Parameters:
      theGroupId -
      Returns:
      this for chaining
    • assignGroupNameCanAttest

      public AttestationStemSave assignGroupNameCanAttest(String theGroupName)
      group name to add to, mutually exclusive with group id and group
      Parameters:
      theGroupName -
      Returns:
      this for chaining
    • assignDaysBeforeToRemind

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

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

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

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

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

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

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

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

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

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

      public AttestationStemSave assignStemScope(String theStemScope)
      assign stem scope for propagation, ONE or SUB
      Returns:
      this for chaining
    • assignStemScope

      public AttestationStemSave assignStemScope(Stem.Scope theStemScope)
      assign stem scope for propagation, Stem.Scope.ONE or Stem.Scope.SUB
      Returns:
      this for chaining
    • assignUseThreadForPropagation

      @Deprecated public AttestationStemSave assignUseThreadForPropagation(boolean theUseThreadForPropagation)
      Deprecated.
      this is not used
      assign use thread for propagation
      Parameters:
      theUseThreadForPropagation -
      Returns:
      this for chaining
    • assignReplaceAllSettings

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

      public AttestationStemSave assignMarkAsAttested(boolean theMarkAsAttested)
      mark stem as attested
      Returns:
      this for chaining
    • assignAttestationType

      public AttestationStemSave assignAttestationType(AttestationType theAttestationType)
      add attestation type
      Returns:
      this for chaining
    • assignSendEmail

      public AttestationStemSave assignSendEmail(boolean theSendEmail)
      assign send email
      Parameters:
      theSendEmail -
      Returns:
    • assignStem

      public AttestationStemSave assignStem(Stem theStem)
      assign a stem
      Parameters:
      theStem -
      Returns:
      this for chaining
    • assignStemId

      public AttestationStemSave assignStemId(String theStemId)
      stem id to add to, mutually exclusive with stem name and stem
      Parameters:
      theStemId -
      Returns:
      this for chaining
    • assignStemName

      public AttestationStemSave assignStemName(String theStemName)
      stem name to add to, mutually exclusive with stem id and stem
      Parameters:
      theStemName -
      Returns:
      this for chaining
    • assignSaveMode

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

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

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

       create or update or delete attestation attributes on a stem
       
      Returns:
      the attribute assign
      Throws:
      InsufficientPrivilegeException
      GroupNotFoundException
    • isFinished

      public boolean isFinished()
      if this is finished
      Returns:
      if finished