Class AttributeAssignToStemSave

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

public class AttributeAssignToStemSave extends Object

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

Sample call

 import edu.internet2.middleware.grouper.attr.assign.*;
 AttributeAssignToStemSave attributeAssignToStemSave = new AttributeAssignToStemSave().assignAttributeDefName(attributeDefName).assignStem(stem);
 AttributeAssign attributeAssign = attributeAssignToStemSave.save();
 System.out.println(attributeAssignToStemSave.getSaveResultType()); // DELETE, INSERT, NO_CHANGE, or UPDATE
 

Sample call to remove attribute def name from a folder

 import edu.internet2.middleware.grouper.attr.assign.*;
 new AttributeAssignToStemSave().assignAttributeDefName(attributeDefName).assignStem(stem).assignSaveMode(SaveMode.DELETE).save();
 

Sample call to assign attribute and metadata with values. Note, this example doesnt make sense since this attribute is assignable to groups, but this is how to do it.

  import edu.internet2.middleware.grouper.attr.assign.*;
  AttributeAssign attributeAssign = new AttributeAssignToStemSave().
    assignNameOfAttributeDefName("etc:attribute:abacJexlScript:grouperJexlScriptMarker").
    assignStemName("test:isc:astt:chris:testJexl2").save();
  
  attributeAssign.getAttributeValueDelegate().assignValueString(
    "etc:attribute:abacJexlScript:grouperJexlScriptJexlScript", 
    "${entity.memberOf('test:testGroup') && !entity.memberOf('test:testGroup1')}");
 

  • Constructor Details

    • AttributeAssignToStemSave

      public AttributeAssignToStemSave()
  • Method Details