Class AttributeAssignToAssignmentSave

java.lang.Object
edu.internet2.middleware.grouper.attr.assign.AttributeAssignToAssignmentSave

public class AttributeAssignToAssignmentSave extends Object

Use this class to add/edit/delete attribute def names on attribute assigns.

Sample call

 AttributeAssignToAssignmentSave attributeAssignToAssignmentSave = new AttributeAssignToAssignmentSave();
 AttributeAssignResult attributeAssignResult = attributeAssignToAssignmentSave.assignAttributeAssign(attributeAssign).assignAttributeDefName(attributeDefName).save();
 System.out.println(attributeAssignToAssignmentSave.getSaveResultType()); // DELETE, INSERT, NO_CHANGE, or UPDATE
 

Sample call to remove attribute def name from an attribute assign

 AttributeAssignToAssignmentSave attributeAssignToAssignmentSave = new AttributeAssignToAssignmentSave().assignAttributeAssign(attributeAssign)
     .assignAttributeDefName(attributeDefName)
     .assignAttributeAssignOperation(AttributeAssignOperation.remove_attr)
     .save();
 
 

Sample call to assign attribute and metadata with values

  AttributeAssign attributeAssign = new AttributeAssignToGroupSave().
    assignNameOfAttributeDefName("etc:attribute:abacJexlScript:grouperJexlScriptMarker").
    assignGroupName("test:isc:astt:chris:testJexl2").save();
  
  attributeAssign.getAttributeValueDelegate().assignValueString(
    "etc:attribute:abacJexlScript:grouperJexlScriptJexlScript", 
    "${entity.memberOf('test:testGroup') && !entity.memberOf('test:testGroup1')}");
 

  • Constructor Details

    • AttributeAssignToAssignmentSave

      public AttributeAssignToAssignmentSave()
  • Method Details

    • getSaveResultType

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

      public AttributeAssignToAssignmentSave assignAttributeDefName(AttributeDefName attributeDefName)
      attributeDefName to assign/add to the attributeAssign
      Parameters:
      attributeDefName -
      Returns:
    • assignAttributeDefNameId

      public AttributeAssignToAssignmentSave assignAttributeDefNameId(String attributeDefNameId)
      attributeDefName to assign/add to the attributeAssign
      Parameters:
      attributeDefNameId -
      Returns:
    • assignAttributeDefNameName

      public AttributeAssignToAssignmentSave assignAttributeDefNameName(String attributeDefNameName)
      attributeDefName to assign/add to the attributeAssign
      Parameters:
      attributeDefNameName -
      Returns:
    • assignAttributeAssign

      public AttributeAssignToAssignmentSave assignAttributeAssign(AttributeAssign attributeAssign)
      attribute assign to which attribute def name is to be added/assigned
      Parameters:
      attributeAssign -
      Returns:
    • assignAttributeAssignId

      public AttributeAssignToAssignmentSave assignAttributeAssignId(String attributeAssignId)
      attribute assign to which attribute def name is to be added/assigned
      Parameters:
      attributeAssignId -
      Returns:
    • assignRunAsRoot

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

      public AttributeAssignToAssignmentSave assignAttributeAssignOperation(AttributeAssignOperation attributeAssignOperation)
      attribute assign operation
      Parameters:
      attributeAssignOperation -
      Returns:
    • save

      public AttributeAssignResult save()
      save attribute def name to attribute assign
      Returns: