Class AttestationStemSave
java.lang.Object
edu.internet2.middleware.grouper.app.attestation.AttestationStemSave
Use this class to add/edit/delete attestation on folders.
Sample call
AttestationStemSave attestationStemSave = new AttestationStemSave(); AttributeAssign attributeAssign = attestationStemSave .assignStem(stem) .addEmailAddress("test@example.com") .assignAttestationType(AttestationType.report) .assignDaysBeforeToRemind(5) .assignDaysUntilRecertify(10) .assignSendEmail(true) .save(); System.out.println(attestationStemSave.getSaveResultType()); // DELETE, INSERT, NO_CHANGE, or UPDATE
Sample call to remove attestation from a folder
new AttestationStemSave() .assignStem(stem) .assignSaveMode(SaveMode.DELETE) .save();
Sample call to update only one attribute
new AttestationStemSave() .assignStem(stem) .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) add 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 attestationassignGroupCanAttest
(Group theGroup) assign a groupassignGroupIdCanAttest
(String theGroupId) group id to add to, mutually exclusive with group name and groupassignGroupNameCanAttest
(String theGroupName) group name to add to, mutually exclusive with group id and groupassignMarkAsAttested
(boolean theMarkAsAttested) mark stem as attestedassignReplaceAllSettings
(boolean theReplaceAllSettings) replace all existing settings.assignReportConfigName
(String reportConfigName) assign report config nameassignReportMarkerAttributeAssignId
(String reportMarkerAttributeAssignId) assign report attribute assign idassignRunAsRoot
(boolean runAsRoot) set this to true to run as a root sessionassignSaveMode
(SaveMode theSaveMode) assign save modeassignSendEmail
(boolean theSendEmail) assign send emailassignStem
(Stem theStem) assign a stemassignStemId
(String theStemId) stem id to add to, mutually exclusive with stem name and stemassignStemName
(String theStemName) stem name to add to, mutually exclusive with stem id and stemassignStemScope
(Stem.Scope theStemScope) assign stem scope for propagation, Stem.Scope.ONE or Stem.Scope.SUBassignStemScope
(String theStemScope) assign stem scope for propagation, ONE or SUBassignUseThreadForPropagation
(boolean theUseThreadForPropagation) Deprecated.this is not usedget the save result type after save callboolean
if this is finishedstatic void
save()
create or update or delete attestation attributes on a stem
-
Constructor Details
-
AttestationStemSave
public AttestationStemSave()
-
-
Method Details
-
main
- Parameters:
args
-
-
assignReportMarkerAttributeAssignId
public AttestationStemSave assignReportMarkerAttributeAssignId(String reportMarkerAttributeAssignId) assign report attribute assign id- Parameters:
theGroup
-- Returns:
- this for chaining
-
assignReportConfigName
assign report config name- Parameters:
theGroup
-- Returns:
- this for chaining
-
assignGroupCanAttest
assign a group- Parameters:
theGroup
-- Returns:
- this for chaining
-
assignGroupIdCanAttest
group id to add to, mutually exclusive with group name and group- Parameters:
theGroupId
-- Returns:
- this for chaining
-
assignGroupNameCanAttest
group name to add to, mutually exclusive with group id and group- Parameters:
theGroupName
-- Returns:
- this for chaining
-
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
-
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
-
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
-
assignStemScope
assign stem scope for propagation, ONE or SUB- Returns:
- this for chaining
-
assignStemScope
assign stem scope for propagation, Stem.Scope.ONE or Stem.Scope.SUB- Returns:
- this for chaining
-
assignUseThreadForPropagation
@Deprecated public AttestationStemSave assignUseThreadForPropagation(boolean theUseThreadForPropagation) Deprecated.this is not usedassign use thread for propagation- Parameters:
theUseThreadForPropagation
-- Returns:
- this for chaining
-
assignReplaceAllSettings
replace all existing settings. defaults to true.- Returns:
- this for chaining
-
assignMarkAsAttested
mark stem as attested- Returns:
- this for chaining
-
assignAttestationType
add attestation type- Returns:
- this for chaining
-
assignSendEmail
assign send email- Parameters:
theSendEmail
-- Returns:
-
assignStem
assign a stem- Parameters:
theStem
-- Returns:
- this for chaining
-
assignStemId
stem id to add to, mutually exclusive with stem name and stem- Parameters:
theStemId
-- Returns:
- this for chaining
-
assignStemName
stem name to add to, mutually exclusive with stem id and stem- Parameters:
theStemName
-- Returns:
- this for chaining
-
assignSaveMode
assign save mode- Parameters:
theSaveMode
-- Returns:
- this for chaining
-
getSaveResultType
get the save result type after save call- Returns:
- save type
-
assignRunAsRoot
set this to true to run as a root session- Parameters:
runAsRoot
-- Returns:
-
save
create or update or delete attestation attributes on a stem
- Returns:
- the attribute assign
- Throws:
InsufficientPrivilegeException
GroupNotFoundException
-
isFinished
public boolean isFinished()if this is finished- Returns:
- if finished
-