org.kuali.kfs.sys.batch
Class PurgePendingAttachmentsStep
java.lang.Object
org.kuali.kfs.sys.batch.AbstractStep
org.kuali.kfs.sys.batch.PurgePendingAttachmentsStep
- All Implemented Interfaces:
- Step, org.springframework.beans.factory.BeanNameAware
public class PurgePendingAttachmentsStep
- extends AbstractStep
This class is the batch step used to delete pending attachments that have not yet been associated with a document. When
attachments are attached to docs in an "initiated" state, the attachment is not considered to be linked with the doc in the
persistence layer, and so it becomes a "pending" attachment (i.e. pending persistence). When docs are saved (or submitted, etc.),
pending attachments become permanently persisted to the document and are no longer pending. Pending attachments may have become
orphaned from the document (because the doc has not been saved), and so these orphaned attachments must be deleted. This job uses
the file's last modified time to determine which pending attachments should be deleted. If the modified time is older than the
SYSTEM parameter "pendingAssignmentMaxAge", then it will be deleted.
- See Also:
AttachmentServiceImpl
,
KFSConstants.SystemGroupParameterNames#PURGE_PENDING_ATTACHMENTS_STEP_MAX_AGE
Method Summary |
boolean |
execute(String jobName,
Date jobRunDate)
Deletes all pending attachments that are older than a configured time (see class description) |
org.kuali.rice.kns.service.AttachmentService |
getAttachmentService()
Gets the attachmentService attribute. |
void |
setAttachmentService(org.kuali.rice.kns.service.AttachmentService attachmentService)
Sets the attachmentService attribute value. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PurgePendingAttachmentsStep
public PurgePendingAttachmentsStep()
execute
public boolean execute(String jobName,
Date jobRunDate)
- Deletes all pending attachments that are older than a configured time (see class description)
- Parameters:
jobName
- the name of the job running the stepjobRunDate
- the time/date the job is executed
- Returns:
- true if successful and continue the job, false if successful and stop the job
- See Also:
Step.execute(String, Date)
getAttachmentService
public org.kuali.rice.kns.service.AttachmentService getAttachmentService()
- Gets the attachmentService attribute.
- Returns:
- Returns the attachmentService.
setAttachmentService
public void setAttachmentService(org.kuali.rice.kns.service.AttachmentService attachmentService)
- Sets the attachmentService attribute value.
- Parameters:
attachmentService
- The attachmentService to set.
Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.