Class GdgTypeStemSave

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

public class GdgTypeStemSave extends Object

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

Sample call

 GdgTypeStemSave gdgTypeStemSave = new GdgTypeStemSave();
 GrouperObjectTypesAttributeValue grouperObjectTypesAttributeValue = gdgTypeStemSave
        .assignStem(stem)
        .assignType("ref")
        .assignDataOwner("do")
        .assignMemberDescription("md")
        .save();
 System.out.println(gdgTypeStemSave.getSaveResultType()); // INSERT, DELETE, NO_CHANGE, or UPDATE
 

Sample call to delete an object type from a stem

 GdgTypeStemSave gdgTypeStemSave = new GdgTypeStemSave();
 gdgTypeStemSave
        .assignStem(stem)
        .assignType("ref")
        .assignSaveMode(SaveMode.DELETE)
        .save();
 

Sample call to update only single attribute

 GdgTypeStemSave gdgTypeStemSave = new GdgTypeStemSave();
 gdgTypeStemSave
        .assignStem(stem)
        .assignType("ref")
        .assignReplaceAllSettings(false)
        .assignDataOwner("do1")
        .save();
 

  • Constructor Details

    • GdgTypeStemSave

      public GdgTypeStemSave()
  • Method Details

    • assignStem

      public GdgTypeStemSave assignStem(Stem stem)
      stem on which object types attributes need to be saved
      Parameters:
      stem -
      Returns:
    • assignStemId

      public GdgTypeStemSave assignStemId(String stemId)
      stem id on which object types attributes need to be saved
      Parameters:
      stemId -
      Returns:
    • assignStemName

      public GdgTypeStemSave assignStemName(String stemName)
      stem name on which object types attributes need to be saved
      Parameters:
      stemName -
      Returns:
    • assignType

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

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

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

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

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

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

      public GdgTypeStemSave 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 stem
      Returns:
      bean containing the current attribute values - can be null