Class ProvisionableGroupSave
java.lang.Object
edu.internet2.middleware.grouper.app.provisioning.ProvisionableGroupSave
Use this class to add/edit/delete provisioning attributes on groups
Sample call
ProvisionableGroupSave provisionableGroupSave = new ProvisionableGroupSave(); GrouperProvisioningAttributeValue grouperProvisioningAttributeValue = provisionableGroupSave.assignTargetName("ldapProvTest").assignMetadataString("md_testInput", "testValue").assignGroup(group).save(); System.out.println(provisionableGroupSave.getSaveResultType()); // INSERT, DELETE, NO_CHANGE, or UPDATE
Sample call to delete provisioning attributes from a group
ProvisionableGroupSave provisionableGroupSave = new ProvisionableGroupSave(); provisionableGroupSave.assignTargetName("ldapProvTest") .assignSaveMode(SaveMode.DELETE).assignGroupName(group.getName()).save();
Sample call to update only single attribute
ProvisionableGroupSave provisionableGroupSave = new ProvisionableGroupSave(); provisionableGroupSave.assignTargetName("ldapProvTest") .assignProvision(true) .assignReplaceAllSettings(false) .assignGroup(group).save();
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionassignGroup
(Group group) assign group on which attributes need to be storedassignGroupId
(String groupId) assign group id on which attributes need to be storedassignGroupName
(String groupName) assign group name on which attributes need to be storedassignMetadataBoolean
(String name, Boolean value) assign boolean type metadataassignMetadataInteger
(String name, Integer value) assign integer type metadataassignMetadataString
(String name, String value) assign string type metadataassignProvision
(boolean provision) assign provisionassignReplaceAllSettings
(boolean replaceAllSettings) replace all existing settings.assignRunAsRoot
(boolean runAsRoot) set this to true to run as a root sessionassignSaveMode
(SaveMode saveMode) assign save modeassignTargetName
(String targetName) assign provisioning target nameget save result type after the save callsave()
save attributes in the database
-
Constructor Details
-
ProvisionableGroupSave
public ProvisionableGroupSave()
-
-
Method Details
-
assignProvision
assign provision- Parameters:
provision
-- Returns:
-
assignTargetName
assign provisioning target name- Parameters:
targetName
-- Returns:
-
getSaveResultType
get save result type after the save call- Returns:
-
assignRunAsRoot
set this to true to run as a root session- Parameters:
runAsRoot
-- Returns:
-
assignReplaceAllSettings
replace all existing settings. defaults to true.- Returns:
- this for chaining
-
assignSaveMode
assign save mode- Parameters:
saveMode
-- Returns:
-
assignGroup
assign group on which attributes need to be stored- Parameters:
group
-- Returns:
-
assignGroupId
assign group id on which attributes need to be stored- Parameters:
groupId
-- Returns:
-
assignGroupName
assign group name on which attributes need to be stored- Parameters:
groupName
-- Returns:
-
assignMetadataString
assign string type metadata- Parameters:
name
-value
-- Returns:
-
assignMetadataBoolean
assign boolean type metadata- Parameters:
name
-value
-- Returns:
-
assignMetadataInteger
assign integer type metadata- Parameters:
name
-value
-- Returns:
-
save
save attributes in the database- Returns:
- a bean containing the current attribute values
-