Class GdgTypeGroupSave

java.lang.Object
edu.internet2.middleware.grouper.app.grouperTypes.GdgTypeGroupSave

public class GdgTypeGroupSave extends Object

Use this class to add/edit/delete object types on groups

Sample call

 GdgTypeGroupSave gdgTypeGroupSave = new GdgTypeGroupSave();
 GrouperObjectTypesAttributeValue grouperObjectTypesAttributeValue = gdgTypeGroupSave
        .assignGroup(group)
        .assignType("ref")
        .assignDataOwner("do")
        .assignMemberDescription("md")
        .save();
 System.out.println(gdgTypeGroupSave.getSaveResultType()); // INSERT, DELETE, NO_CHANGE, or UPDATE
 

Sample call to delete an object type from a group

 GdgTypeGroupSave gdgTypeGroupSave = new GdgTypeGroupSave();
 gdgTypeGroupSave
        .assignGroup(group)
        .assignType("ref")
        .assignSaveMode(SaveMode.DELETE)
        .save();
 

Sample call to update only single attribute

 GdgTypeGroupSave gdgTypeGroupSave = new GdgTypeGroupSave();
 gdgTypeGroupSave
        .assignGroup(group)
        .assignType("ref")
        .assignReplaceAllSettings(false)
        .assignDataOwner("do1")
        .save();
 

  • Constructor Details

    • GdgTypeGroupSave

      public GdgTypeGroupSave()
  • Method Details

    • assignGroup

      public GdgTypeGroupSave assignGroup(Group group)
      group on which object types attributes need to be saved
      Parameters:
      group -
      Returns:
    • assignGroupId

      public GdgTypeGroupSave assignGroupId(String groupId)
      group id on which object types attributes need to be saved
      Parameters:
      groupId -
      Returns:
    • assignGroupName

      public GdgTypeGroupSave assignGroupName(String groupName)
      group name on which object types attributes need to be saved
      Parameters:
      groupName -
      Returns:
    • assignType

      public GdgTypeGroupSave assignType(String type)
      type e.g. ref, basis, app
      Parameters:
      type -
      Returns:
    • assignDataOwner

      public GdgTypeGroupSave assignDataOwner(String dataOwner)
      data owner to assign
      Parameters:
      dataOwner -
      Returns:
    • assignMemberDescription

      public GdgTypeGroupSave assignMemberDescription(String memberDescription)
      member description to assign
      Parameters:
      memberDescription -
      Returns:
    • assignServiceName

      public GdgTypeGroupSave assignServiceName(String serviceName)
      service name to assign
      Parameters:
      serviceName -
      Returns:
    • assignRunAsRoot

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

      public GdgTypeGroupSave assignReplaceAllSettings(boolean replaceAllSettings)
      replace all existing settings. defaults to true.
      Parameters:
      replaceAllSettings -
      Returns:
    • assignSaveMode

      public GdgTypeGroupSave assignSaveMode(SaveMode saveMode)
      assign save mode
      Parameters:
      saveMode -
      Returns:
    • getSaveResultType

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

      add/edit/delete object type attributes from a group
      Returns:
      bean containing the current attribute values - can be null