Class AttestationGroupSave
java.lang.Object
edu.internet2.middleware.grouper.app.attestation.AttestationGroupSave
Use this class to add/edit/delete attestation on groups.
Sample call
AttestationGroupSave attestationGroupSave = new AttestationGroupSave(); AttributeAssign attributeAssign = attestationGroupSave .assignGroup(group) .addEmailAddress("test@example.com") .assignAttestationType(AttestationType.report) .assignDaysBeforeToRemind(5) .assignDaysUntilRecertify(10) .assignSendEmail(true) .save(); System.out.println(attestationGroupSave.getSaveResultType()); // DELETE, INSERT, NO_CHANGE, or UPDATE
Sample call to remove attestation from a group
new AttestationGroupSave() .assignGroup(group) .assignSaveMode(SaveMode.DELETE) .save();
Sample call to update only one attribute
new AttestationGroupSave() .assignGroup(group) .assignReplaceAllSettings(false) .assignSendEmail(true); .save();
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddEmailAddress
(Subject subject) add email address of the given subjectaddEmailAddress
(String theEmailAddress) add email addressaddEmailAddresses
(Group group) add email addresses from members of the given groupassignAttestationType
(AttestationType theAttestationType) assign attestation typeassignDaysBeforeToRemind
(int theDaysBeforeToRemind) days before attestation to remindassignDaysUntilRecertify
(int theDaysUntilRecertify) days until recertifyassignEmailAddresses
(String theEmailAddresses) assign email addresses (separated by semicolon)assignEmailAddresses
(Set<String> theEmailAddresses) assign email addressesassignEmailGroup
(Group theGroup) assign group to email for group attestationassignEmailGroupId
(String theGroupId) assign group to email for group attestationassignEmailGroupName
(String theGroupName) assign group to email for group attestationassignGroup
(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 groupassignMarkAsAttested
(boolean theMarkAsAttested) assignReplaceAllSettings
(boolean theReplaceAllSettings) replace all existing settings.assignRunAsRoot
(boolean runAsRoot) set this to true to run as a root sessionassignSaveMode
(SaveMode theSaveMode) assign save modeassignSendEmail
(boolean theSendEmail) get the save result type after the save callsave()
create or update or delete attestation attributes from a group
-
Constructor Details
-
AttestationGroupSave
public AttestationGroupSave()
-
-
Method Details
-
assignDaysBeforeToRemind
days before attestation to remind- Returns:
- this for chaining
-
assignDaysUntilRecertify
days until recertify- Returns:
- this for chaining
-
assignEmailAddresses
assign email addresses (separated by semicolon)- Returns:
- this for chaining
-
assignEmailGroupId
assign group to email for group attestation- Returns:
- this for chaining
-
assignEmailGroupName
assign group to email for group attestation- Returns:
- this for chaining
-
assignEmailGroup
assign group to email for group attestation- Returns:
- this for chaining
-
addEmailAddress
add email address- Returns:
- this for chaining
-
addEmailAddress
add email address of the given subject- Returns:
- this for chaining
-
addEmailAddresses
add email addresses from members of the given group- Returns:
- this for chaining
-
assignEmailAddresses
assign email addresses- Returns:
- this for chaining
-
assignReplaceAllSettings
replace all existing settings. defaults to true.- Returns:
- this for chaining
-
assignMarkAsAttested
- Returns:
- this for chaining
-
assignAttestationType
assign attestation type- Returns:
- this for chaining
-
assignSendEmail
- Parameters:
theSendEmail
-- Returns:
-
assignRunAsRoot
set this to true to run as a root session- Parameters:
runAsRoot
-- 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
create or update or delete attestation attributes from a group
- Returns:
- attribute assign
- Throws:
InsufficientPrivilegeException
GroupNotFoundException
-