Class ProvisionableStemSave
java.lang.Object
edu.internet2.middleware.grouper.app.provisioning.ProvisionableStemSave
Use this class to add/edit/delete provisioning attributes on stems
Sample call
ProvisionableStemSave provisionableStemSave = new ProvisionableStemSave(); GrouperProvisioningAttributeValue grouperProvisioningAttributeValue = provisionableStemSave.assignTargetName("ldapProvTest").assignMetadataString("md_testInput", "testValue").assignStem(stem).save(); System.out.println(provisionableStemSave.getSaveResultType()); // INSERT, DELETE, NO_CHANGE, or UPDATE
Sample call to delete provisioning attributes from a stem
ProvisionableStemSave provisionableStemSave = new ProvisionableStemSave(); provisionableStemSave.assignTargetName("ldapProvTest") .assignSaveMode(SaveMode.DELETE).assignStem(stem).save();
Sample call to update only single attribute
ProvisionableStemSave provisionableStemSave = new ProvisionableStemSave(); GrouperProvisioningAttributeValue grouperProvisioningAttributeValue = provisionableStemSave.assignTargetName("ldapProvTest") .assignPolicyGroupOnly(true) .assignReplaceAllSettings(false) .assignStem(stem).save();
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionassignMetadataBoolean
(String name, Boolean value) assign boolean type metadataassignMetadataInteger
(String name, Integer value) assign integer type metadataassignMetadataString
(String name, String value) assign string type metadataassignPolicyGroupOnly
(boolean policyGroupOnly) assign policy group only metadataassignProvision
(boolean provision) assign provision or notassignProvisionableRegex
(String provisionableRegex) assign provisionable regex.assignReplaceAllSettings
(boolean replaceAllSettings) replace all existing settings.assignRunAsRoot
(boolean runAsRoot) set this to true to run as a root sessionassignSaveMode
(SaveMode saveMode) assign save modeassignStem
(Stem stem) assign stem on which attributes need to be storedassignStemId
(String stemId) assign stem id on which attributes need to be storedassignStemName
(String stemName) assign stem name on which attributes need to be storedassignStemScope
(Stem.Scope stemScope) assign stem scope.assignStemScopeString
(String stemScope) assign stem scrope.assignTargetName
(String targetName) name of the provisioning targetget save result type after the save callsave()
save attributes in the database
-
Constructor Details
-
ProvisionableStemSave
public ProvisionableStemSave()
-
-
Method Details
-
assignProvision
assign provision or not- Parameters:
provision
-- Returns:
-
assignTargetName
name of the provisioning target- Parameters:
targetName
-- Returns:
-
assignStemScope
assign stem scope. SUB/ONE- Parameters:
stemScope
-- Returns:
-
assignStemScopeString
assign stem scrope. SUB/ONE- Parameters:
stemScope
-- 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:
-
assignStem
assign stem on which attributes need to be stored- Parameters:
stem
-- Returns:
-
assignStemId
assign stem id on which attributes need to be stored- Parameters:
stem
-- Returns:
-
assignStemName
assign stem name on which attributes need to be stored- Parameters:
stem
-- 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:
-
assignPolicyGroupOnly
assign policy group only metadata- Parameters:
policyGroupOnly
-- Returns:
-
assignProvisionableRegex
assign provisionable regex.- Parameters:
provisionableRegex
-- Returns:
-
save
save attributes in the database- Returns:
- a bean containing the current attribute values
-