Interface IAttachmentHandler
-
- All Superinterfaces:
IAPIHandler
,IGenericHandler
,Serializable
- All Known Implementing Classes:
AttachmentHandler
public interface IAttachmentHandler extends IGenericHandler
- Author:
- XIMA MEDIA GmbH
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Attachment
createByUser(UserContext uc, String username, Attachment attachment)
boolean
deleteByUser(UserContext uc, String username, boolean force, Attachment... attachments)
List<Attachment>
getAllBy(UserContext uc, Vorgang vorgang, EAttachmentSource source, String uuid)
byte[]
getAllZipped(UserContext uc, String prozessID)
Attachment
getByName(UserContext uc, Vorgang vorgang, String name)
PagedResult<Attachment>
getByRecordAndUser(UserContext uc, UUID formRecordUuid, IUser user, int page, int pageSize)
Finds the attachments of the form record given by its UUID if the given user can access the form record.Attachment
getByUUID(UserContext uc, String uuid)
Attachment
getByUUID(UserContext uc, String uuid, Vorgang v)
Attachment
getByUuidAndUser(UserContext uc, UUID attachmentUuid, IUser user)
Finds the attachment for the given UUID if the user can access the attachment.List<Attachment>
mergeAllByUser(UserContext uc, String username, List<AttachmentPersistData> attachmentData)
Creates or updates a list of attachments.Attachment
updateByUser(UserContext uc, String username, String oldFileName, Attachment attachment)
-
Methods inherited from interface de.xima.fc.com.interfaces.IAPIHandler
getName
-
Methods inherited from interface de.xima.fc.handler.interfaces.entity.IGenericHandler
create, create, delete, delete, deleteBy, deleteById, deleteById, getAll, getAllBy, getAttributes, getAttributes, getBy, getById, getById, getById, getEntityRefs, getSingleAttributes, getSingleAttributes, resultTotalCount, update, update
-
-
-
-
Method Detail
-
deleteByUser
boolean deleteByUser(UserContext uc, String username, boolean force, Attachment... attachments)
-
getAllZipped
byte[] getAllZipped(UserContext uc, String prozessID) throws IOException
- Throws:
IOException
-
getByUUID
Attachment getByUUID(UserContext uc, String uuid)
-
getByUUID
Attachment getByUUID(UserContext uc, String uuid, Vorgang v)
-
getAllBy
List<Attachment> getAllBy(UserContext uc, Vorgang vorgang, EAttachmentSource source, String uuid)
-
getByName
Attachment getByName(UserContext uc, Vorgang vorgang, String name)
-
createByUser
Attachment createByUser(UserContext uc, String username, Attachment attachment)
-
updateByUser
Attachment updateByUser(UserContext uc, String username, String oldFileName, Attachment attachment)
-
mergeAllByUser
List<Attachment> mergeAllByUser(UserContext uc, String username, List<AttachmentPersistData> attachmentData)
Creates or updates a list of attachments. This behaves as ifcreateByUser(UserContext, String, Attachment)
orupdateByUser(UserContext, String, String, Attachment)
had been called on each attachment. This method allows the attachments to be created / updated in a batch, so they do not have to be send individually over the network.- Parameters:
uc
- User context of the user who initiated the action.username
- Name of the user.attachmentData
- List of attachments to create or update.- Returns:
- The created or updated attachments.
-
getByRecordAndUser
PagedResult<Attachment> getByRecordAndUser(UserContext uc, UUID formRecordUuid, IUser user, int page, int pageSize)
Finds the attachments of the form record given by its UUID if the given user can access the form record.- Parameters:
uc
- user context for accessing the database.formRecordUuid
- the UUID of the form recorduser
- to get the attachments for.page
- to get. If a page less than or equal tozero
is given, paging is disabled and all entities are returned in one page.pageSize
- size of the page to get. If a page size less thanzero
is given, paging is disabled and all entities are returned in one page.- Returns:
- a list of form record attachment of the form record the user has access to ordered by their upload date
(desc).
null
if the form record given by the UUID could not be found. - Since:
- 8.2.0
-
getByUuidAndUser
Attachment getByUuidAndUser(UserContext uc, UUID attachmentUuid, IUser user)
Finds the attachment for the given UUID if the user can access the attachment. User can access an attachment if they canaccess the form record
of the attachment.- Parameters:
uc
- user context for database transactions.attachmentUuid
- UUID of the request attachment.user
- to get the attachment for.- Returns:
- the form record attachment if the user can access it and
null
otherwise. - Since:
- 8.2.0
-
-