Class ProvisionableGroupSave

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

public class ProvisionableGroupSave extends Object

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

Sample call

 ProvisionableGroupSave provisionableGroupSave = new ProvisionableGroupSave();
 GrouperProvisioningAttributeValue grouperProvisioningAttributeValue = provisionableGroupSave.assignTargetName("ldapProvTest").assignMetadataString("md_testInput", "testValue").assignGroup(group).save();
 System.out.println(provisionableGroupSave.getSaveResultType()); // INSERT, DELETE, NO_CHANGE, or UPDATE
 

Sample call to delete provisioning attributes from a group

 ProvisionableGroupSave provisionableGroupSave = new ProvisionableGroupSave();
 provisionableGroupSave.assignTargetName("ldapProvTest")
        .assignSaveMode(SaveMode.DELETE).assignGroupName(group.getName()).save();
 

Sample call to update only single attribute

 ProvisionableGroupSave provisionableGroupSave = new ProvisionableGroupSave();
 provisionableGroupSave.assignTargetName("ldapProvTest")
        .assignProvision(true)
        .assignReplaceAllSettings(false)
        .assignGroup(group).save();
 

  • Constructor Details

    • ProvisionableGroupSave

      public ProvisionableGroupSave()
  • Method Details

    • assignProvision

      public ProvisionableGroupSave assignProvision(boolean provision)
      assign provision
      Parameters:
      provision -
      Returns:
    • assignTargetName

      public ProvisionableGroupSave assignTargetName(String targetName)
      assign provisioning target name
      Parameters:
      targetName -
      Returns:
    • getSaveResultType

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

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

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

      public ProvisionableGroupSave assignSaveMode(SaveMode saveMode)
      assign save mode
      Parameters:
      saveMode -
      Returns:
    • assignGroup

      public ProvisionableGroupSave assignGroup(Group group)
      assign group on which attributes need to be stored
      Parameters:
      group -
      Returns:
    • assignGroupId

      public ProvisionableGroupSave assignGroupId(String groupId)
      assign group id on which attributes need to be stored
      Parameters:
      groupId -
      Returns:
    • assignGroupName

      public ProvisionableGroupSave assignGroupName(String groupName)
      assign group name on which attributes need to be stored
      Parameters:
      groupName -
      Returns:
    • assignMetadataString

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

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

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

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