Class AttributeAssignValueSave

java.lang.Object
edu.internet2.middleware.grouper.attr.value.AttributeAssignValueSave

public class AttributeAssignValueSave extends Object

Use this class to add/edit/delete values from attribute assigns

Sample call

 AttributeAssignValueSave attributeAssignValueSave = new AttributeAssignValueSave();
 AttributeAssignValueResult attributeAssignValueResult = attributeAssignValueSave.assignAttributeAssign(attributeAssign)
     .assignValue("hello").save();
 System.out.println(attributeAssignValueSave.getSaveResultType()); // DELETE, INSERT, NO_CHANGE, or UPDATE
 

Sample call to remove value from an attribute assign

 AttributeAssignValueSave attributeAssignValueSave = new AttributeAssignValueSave();
 AttributeAssignValueResult attributeAssignValueResult = attributeAssignValueSave.assignAttributeAssign(attributeAssign)
    .assignAttributeAssignValueOperation(AttributeAssignValueOperation.remove_value)
    .assignValue("hello").save();
 
 

Sample call to add attribute and value to stem

 AttributeValueResult attributeValueResult=sympaFolder.getAttributeValueDelegate().assignValue("etc:attribute:comanagetemplate:ownerfolderid", "someValue"); 
 gsh_builtin_gshTemplateOutput.addOutputLine("Attribute ownerfolderid assigned: " + attributeValueResult.getAttributeAssignValueResult().isChanged());
 

  • Constructor Details

    • AttributeAssignValueSave

      public AttributeAssignValueSave()
  • Method Details

    • getSaveResultType

      public SaveResultType getSaveResultType()
      save type after the save
      Returns:
    • assignAttributeAssign

      public AttributeAssignValueSave assignAttributeAssign(AttributeAssign attributeAssign)
      attribute assign to add/assign values to
      Parameters:
      attributeAssign -
      Returns:
    • assignAttributeAssignValueOperation

      public AttributeAssignValueSave assignAttributeAssignValueOperation(AttributeAssignValueOperation attributeAssignValueOperation)
      attribute assign value operation - replace is not valid
      Parameters:
      attributeAssignValueOperation -
      Returns:
    • assignAttributeAssignId

      public AttributeAssignValueSave assignAttributeAssignId(String attributeAssignId)
      attribute assign to add/assign values to
      Parameters:
      attributeAssign -
      Returns:
    • assignRunAsRoot

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

      public AttributeAssignValueSave assignValue(Object value)
      value to add/assign to the attribute assign
      Parameters:
      attributeAssign -
      Returns:
    • save

      add/edit/delete attribute assign value
      Returns: