|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 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. |
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 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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |