Class AttributeAssignValueSave
java.lang.Object
edu.internet2.middleware.grouper.attr.value.AttributeAssignValueSave
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionassignAttributeAssign
(AttributeAssign attributeAssign) attribute assign to add/assign values toassignAttributeAssignId
(String attributeAssignId) attribute assign to add/assign values toassignAttributeAssignValueOperation
(AttributeAssignValueOperation attributeAssignValueOperation) attribute assign value operation - replace is not validassignRunAsRoot
(boolean runAsRoot) set this to true to run as a root sessionassignValue
(Object value) value to add/assign to the attribute assignsave type after the savesave()
add/edit/delete attribute assign value
-
Constructor Details
-
AttributeAssignValueSave
public AttributeAssignValueSave()
-
-
Method Details
-
getSaveResultType
save type after the save- Returns:
-
assignAttributeAssign
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
attribute assign to add/assign values to- Parameters:
attributeAssign
-- Returns:
-
assignRunAsRoot
set this to true to run as a root session- Parameters:
runAsRoot
-- Returns:
-
assignValue
value to add/assign to the attribute assign- Parameters:
attributeAssign
-- Returns:
-
save
add/edit/delete attribute assign value- Returns:
-