|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.kuali.rice.krad.service.impl.AttachmentServiceImpl
@Transactional public class AttachmentServiceImpl
Attachment service implementation
| Constructor Summary | |
|---|---|
AttachmentServiceImpl()
|
|
| Method Summary | |
|---|---|
Attachment |
createAttachment(PersistableBusinessObject parent,
String uploadedFileName,
String mimeType,
int fileSize,
InputStream fileContents,
String attachmentTypeCode)
Stores the given fileContents and returns referring Attachment object which 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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AttachmentServiceImpl()
| Method Detail |
|---|
public Attachment getAttachmentByNoteId(Long noteId)
getAttachmentByNoteId in interface AttachmentServiceAttachmentService.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 AttachmentServiceparent - - the document to which the attachment belongsuploadedFileName - - the name of the uploaded filemimeType - - the uploaded file's mime typefileSize - - the size of the uploaded file in bytesfileContents - - an input stream used to read the file's contentsattachmentTypeCode - -the attachment type code
IOExceptionAttachmentService.createAttachment(org.kuali.rice.krad.bo.PersistableBusinessObject,
String, String, int, java.io.InputStream, String)public void moveAttachmentWherePending(Note note)
AttachmentService
moveAttachmentWherePending in interface AttachmentServicenote - 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 AttachmentServiceattachment - - the attachment whose contents are to be deleted
public InputStream retrieveAttachmentContents(Attachment attachment)
throws IOException
retrieveAttachmentContents in interface AttachmentServiceattachment - - the attachment whose contents are to be retrieved
IOExceptionAttachmentService.retrieveAttachmentContents(org.kuali.rice.krad.bo.Attachment)public void deletePendingAttachmentsModifiedBefore(long modificationTime)
AttachmentService
deletePendingAttachmentsModifiedBefore in interface AttachmentServicemodificationTime - 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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||