@Component public class AttachmentService extends java.lang.Object implements IAttachmentService
| Constructor and Description |
|---|
AttachmentService() |
| Modifier and Type | Method and Description |
|---|---|
void |
delete(Attachment attachment) |
void |
delete(long attachmentId) |
java.util.List<Attachment> |
find(java.lang.String creator) |
java.util.List<Attachment> |
find(java.lang.String creator,
java.lang.String filename) |
java.util.List<Attachment> |
findAll(int offset,
int maxresults) |
Attachment |
get(long attachmentId) |
Attachment |
get(java.lang.String guid) |
IAttachmentDao |
getAttachmentDao() |
IDocumentPersistenceStrategy |
getDocumentPersistenceStrategy() |
boolean |
isPersistenceIntoDatabaseRequired()
Boolean indicating whether or not attachment data is stored into the database.
|
Attachment |
save(Attachment attachment,
java.lang.String username,
javax.servlet.http.HttpServletRequest request)
Saves the metadata about the attachment to the database and persists the attachment to the
configured documentPersistenceStrategy store.
|
void |
setAttachmentDao(IAttachmentDao attachmentDao) |
void |
setDocumentPersistenceStrategy(IDocumentPersistenceStrategy documentPersistenceStrategy) |
protected void |
updateTimestamps(Attachment attachment,
java.lang.String user) |
public Attachment get(long attachmentId)
get in interface IAttachmentServicepublic Attachment get(java.lang.String guid)
get in interface IAttachmentServicepublic java.util.List<Attachment> find(java.lang.String creator)
find in interface IAttachmentServicepublic java.util.List<Attachment> find(java.lang.String creator, java.lang.String filename)
find in interface IAttachmentServicepublic java.util.List<Attachment> findAll(int offset, int maxresults)
findAll in interface IAttachmentServicepublic Attachment save(Attachment attachment, java.lang.String username, javax.servlet.http.HttpServletRequest request)
IAttachmentServicesave in interface IAttachmentServiceattachment - Attachment to persistusername - username of the user uploading the documentrequest - HttpServlet request. Will be null with a data import operationpublic void delete(Attachment attachment)
delete in interface IAttachmentServicepublic void delete(long attachmentId)
delete in interface IAttachmentServiceprotected void updateTimestamps(Attachment attachment, java.lang.String user)
public IAttachmentDao getAttachmentDao()
public void setAttachmentDao(IAttachmentDao attachmentDao)
public IDocumentPersistenceStrategy getDocumentPersistenceStrategy()
public void setDocumentPersistenceStrategy(IDocumentPersistenceStrategy documentPersistenceStrategy)
public boolean isPersistenceIntoDatabaseRequired()
IAttachmentServiceisPersistenceIntoDatabaseRequired in interface IAttachmentServiceCopyright © 2019 Jasig. All Rights Reserved.