Class AttributeAssignToGroupSave
java.lang.Object
edu.internet2.middleware.grouper.attr.assign.AttributeAssignToGroupSave
Use this class to add/edit/delete attribute def names on groups.
Sample call
AttributeAssignToGroupSave attributeAssignToGroupSave = new AttributeAssignToGroupSave().assignAttributeDefName(attributeDefName).assignGroup(group); AttributeAssign attributeAssign = attributeAssignToGroupSave.save(); System.out.println(attributeAssignToGroupSave.getSaveResultType()); // DELETE, INSERT, NO_CHANGE, or UPDATE
Sample call to remove attribute def name from a group
new AttributeAssignToGroupSave().assignAttributeDefName(attributeDefName).assignGroup(group).assignSaveMode(SaveMode.DELETE).save(); new AttributeAssignToGroupSave().assignNameOfAttributeDefName("a:b:c").assignGroupName("a:b:c").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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionassignAttributeDefName
(AttributeDefName theAttributeDefName) attribute def name to add/update/delete from groupassignGroup
(Group theGroup) assign a groupassignGroupId
(String theGroupId) group id to add to, mutually exclusive with group name and groupassignGroupName
(String theGroupName) group name to add to, mutually exclusive with group id and groupassignNameOfAttributeDefName
(String theNameOfAttributeDefName) attribute def name to add/update/delete from groupassignSaveMode
(SaveMode theSaveMode) assign save modeget the save result type after the save callsave()
add or edit or delete an attribute def name from group
-
Constructor Details
-
AttributeAssignToGroupSave
public AttributeAssignToGroupSave()
-
-
Method Details
-
assignAttributeDefName
attribute def name to add/update/delete from group- Parameters:
theAttributeDefName
-- Returns:
- this for chaining
-
assignNameOfAttributeDefName
attribute def name to add/update/delete from group- Parameters:
theNameOfAttributeDefName
-- Returns:
-
assignGroup
assign a group- Parameters:
theGroup
-- Returns:
- this for chaining
-
assignGroupId
group id to add to, mutually exclusive with group name and group- Parameters:
theGroupId
-- Returns:
- this for chaining
-
assignGroupName
group name to add to, mutually exclusive with group id and group- Parameters:
theGroupName
-- Returns:
- this for chaining
-
assignSaveMode
assign save mode- Parameters:
theSaveMode
-- Returns:
- this for chaining
-
getSaveResultType
get the save result type after the save call- Returns:
- save type
-
save
add or edit or delete an attribute def name from group
- Returns:
- the attribute assign that was updated or created or deleted
- Throws:
InsufficientPrivilegeException
GroupNotFoundException
-