Class ProvisionableStemSave

java.lang.Object
edu.internet2.middleware.grouper.app.provisioning.ProvisionableStemSave

public class ProvisionableStemSave extends Object

Use this class to add/edit/delete provisioning attributes on stems

Sample call

 ProvisionableStemSave provisionableStemSave = new ProvisionableStemSave();
 GrouperProvisioningAttributeValue grouperProvisioningAttributeValue = provisionableStemSave.assignTargetName("ldapProvTest").assignMetadataString("md_testInput", "testValue").assignStem(stem).save();
 System.out.println(provisionableStemSave.getSaveResultType()); // INSERT, DELETE, NO_CHANGE, or UPDATE
 

Sample call to delete provisioning attributes from a stem

 ProvisionableStemSave provisionableStemSave = new ProvisionableStemSave();
 provisionableStemSave.assignTargetName("ldapProvTest")
        .assignSaveMode(SaveMode.DELETE).assignStem(stem).save();
 

Sample call to update only single attribute

 ProvisionableStemSave provisionableStemSave = new ProvisionableStemSave();
 GrouperProvisioningAttributeValue grouperProvisioningAttributeValue = provisionableStemSave.assignTargetName("ldapProvTest")
        .assignPolicyGroupOnly(true)
        .assignReplaceAllSettings(false)
        .assignStem(stem).save();
 

  • Constructor Details

    • ProvisionableStemSave

      public ProvisionableStemSave()
  • Method Details

    • assignProvision

      public ProvisionableStemSave assignProvision(boolean provision)
      assign provision or not
      Parameters:
      provision -
      Returns:
    • assignTargetName

      public ProvisionableStemSave assignTargetName(String targetName)
      name of the provisioning target
      Parameters:
      targetName -
      Returns:
    • assignStemScope

      public ProvisionableStemSave assignStemScope(Stem.Scope stemScope)
      assign stem scope. SUB/ONE
      Parameters:
      stemScope -
      Returns:
    • assignStemScopeString

      public ProvisionableStemSave assignStemScopeString(String stemScope)
      assign stem scrope. SUB/ONE
      Parameters:
      stemScope -
      Returns:
    • getSaveResultType

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

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

      public ProvisionableStemSave assignReplaceAllSettings(boolean replaceAllSettings)
      replace all existing settings. defaults to true.
      Returns:
      this for chaining
    • assignSaveMode

      public ProvisionableStemSave assignSaveMode(SaveMode saveMode)
      assign save mode
      Parameters:
      saveMode -
      Returns:
    • assignStem

      public ProvisionableStemSave assignStem(Stem stem)
      assign stem on which attributes need to be stored
      Parameters:
      stem -
      Returns:
    • assignStemId

      public ProvisionableStemSave assignStemId(String stemId)
      assign stem id on which attributes need to be stored
      Parameters:
      stem -
      Returns:
    • assignStemName

      public ProvisionableStemSave assignStemName(String stemName)
      assign stem name on which attributes need to be stored
      Parameters:
      stem -
      Returns:
    • assignMetadataString

      public ProvisionableStemSave assignMetadataString(String name, String value)
      assign string type metadata
      Parameters:
      name -
      value -
      Returns:
    • assignMetadataBoolean

      public ProvisionableStemSave assignMetadataBoolean(String name, Boolean value)
      assign boolean type metadata
      Parameters:
      name -
      value -
      Returns:
    • assignMetadataInteger

      public ProvisionableStemSave assignMetadataInteger(String name, Integer value)
      assign integer type metadata
      Parameters:
      name -
      value -
      Returns:
    • assignPolicyGroupOnly

      public ProvisionableStemSave assignPolicyGroupOnly(boolean policyGroupOnly)
      assign policy group only metadata
      Parameters:
      policyGroupOnly -
      Returns:
    • assignProvisionableRegex

      public ProvisionableStemSave assignProvisionableRegex(String provisionableRegex)
      assign provisionable regex.
      Parameters:
      provisionableRegex -
      Returns:
    • save

      save attributes in the database
      Returns:
      a bean containing the current attribute values