@Transactional public class AttachmentServiceImpl extends Object implements AttachmentService
Constructor and Description |
---|
AttachmentServiceImpl() |
Modifier and Type | Method and Description |
---|---|
Attachment |
createAttachment(PersistableBusinessObject parent,
String uploadedFileName,
String mimeType,
int fileSize,
InputStream fileContents,
String attachmentTypeCode)
Stores the given fileContents and returns referring Attachment object whieh acts as a momento to the archived object.
|
void |
deleteAttachmentContents(Attachment attachment)
Deletes a given DocumentAttachment contents from the corresponding Attachment object
|
void |
deletePendingAttachmentsModifiedBefore(long modificationTime)
Deletes pending attachments that were last modified before the given time.
|
Attachment |
getAttachmentByNoteId(Long noteId)
Retrieves an Attachment by note identifier.
|
AttachmentDao |
getAttachmentDao()
Retrieves a data access object
|
ConfigurationService |
getKualiConfigurationService()
Gets the configService attribute.
|
void |
moveAttachmentWherePending(Note note)
Moves attachments on notes from the pending directory to the real one
|
InputStream |
retrieveAttachmentContents(Attachment attachment)
/* (non-Javadoc)
|
void |
setAttachmentDao(AttachmentDao d)
Sets the data access object
|
void |
setKualiConfigurationService(ConfigurationService configService)
Sets the configService attribute value.
|
public AttachmentServiceImpl()
public Attachment getAttachmentByNoteId(Long noteId)
getAttachmentByNoteId
in interface AttachmentService
AttachmentService.getAttachmentByNoteId(java.lang.Long)
public Attachment createAttachment(PersistableBusinessObject parent, String uploadedFileName, String mimeType, int fileSize, InputStream fileContents, String attachmentTypeCode) throws IOException
AttachmentService
createAttachment
in interface AttachmentService
IOException
org.kuali.rice.krad.service.DocumentAttachmentService#createAttachment(java.lang.String, java.lang.String, int,
java.io.InputStream, Document)
public void moveAttachmentWherePending(Note note)
AttachmentService
moveAttachmentWherePending
in interface AttachmentService
note
- the Note from which to move attachments. If this Note does not
have an attachment then this method does nothing.public void deleteAttachmentContents(Attachment attachment)
AttachmentService
deleteAttachmentContents
in interface AttachmentService
public InputStream retrieveAttachmentContents(Attachment attachment) throws IOException
retrieveAttachmentContents
in interface AttachmentService
IOException
org.kuali.rice.krad.service.DocumentAttachmentService#retrieveAttachmentContents(org.kuali.rice.krad.document.DocumentAttachment)
public void deletePendingAttachmentsModifiedBefore(long modificationTime)
AttachmentService
deletePendingAttachmentsModifiedBefore
in interface AttachmentService
modificationTime
- the number of milliseconds since "the epoch" (i.e.January 1, 1970, 00:00:00 GMT). java.util.Date and java.util.Calendar's
methods return time in this format. If a pending attachment was modified before this time, then it will be deleted (unless an error occurs)AttachmentService.deletePendingAttachmentsModifiedBefore(long)
public void setAttachmentDao(AttachmentDao d)
d
- public AttachmentDao getAttachmentDao()
public ConfigurationService getKualiConfigurationService()
public void setKualiConfigurationService(ConfigurationService configService)
configService
- The configService to set.Copyright © 2005-2015 The Kuali Foundation. All Rights Reserved.