Package org.compiere.model
Interface IAttachmentStore
- All Known Implementing Classes:
AttachmentDBLOB,AttachmentDBSystem,AttachmentFileSystem
public interface IAttachmentStore
Store provider interface for storage of attachment content
-
Method Summary
Modifier and TypeMethodDescriptionbooleandelete(MAttachment attach, MStorageProvider prov) Delete stored attachment contentbooleandeleteEntry(MAttachment mAttachment, MStorageProvider provider, int index) Delete attachment content by indexdefault StringgetPresignedURL(MAttachment attachment, MStorageProvider prov, int entryIndex, long expiresInSeconds) Generate a backend-native presigned URL for direct download of a single attachment entry.booleanloadLOBData(MAttachment attach, MStorageProvider prov) Load binary attachment contentbooleansave(MAttachment attach, MStorageProvider prov) Save attachment contentdefault booleansave(MAttachment attach, MStorageProvider prov, boolean beforeSave) Save attachment content
-
Method Details
-
loadLOBData
Load binary attachment content- Parameters:
attach-prov-- Returns:
- true if successfully loaded
-
save
Save attachment content- Parameters:
attach-prov-- Returns:
- true if successfully save
-
save
Save attachment content- Parameters:
attach-prov-beforeSave- true if call from beforeSave of attachment record, false if call from afterSave- Returns:
- true if success, false otherwise
-
delete
Delete stored attachment content- Parameters:
attach-prov-- Returns:
- true if successfully deleted
-
deleteEntry
Delete attachment content by index- Parameters:
mAttachment-provider-index- index of content to delete (for e.g zip entry #2 of a zip file)- Returns:
- true if successfully deleted
-
getPresignedURL
default String getPresignedURL(MAttachment attachment, MStorageProvider prov, int entryIndex, long expiresInSeconds) Generate a backend-native presigned URL for direct download of a single attachment entry. Return null if this backend does not support native URL signing.- Parameters:
attachment-prov-entryIndex- zero-based index of the attachment entryexpiresInSeconds- lifetime of the URL- Returns:
- presigned URL string, or null if not supported
-