Package de.xima.fc.api.entity
Class AttachmentAPI
API class for manipulation of
Attachment entities.- Author:
- XIMA MEDIA GmbH
-
Field Summary
Fields inherited from class de.xima.fc.api.entity.AEntityAPI
entityClass -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckAttachmentsHash(UserContext uc, String prozessId, String sessionId, int hash) Method for checking if the hashkey is correct for the attachments of aVorgang.createByUser(UserContext uc, String username, Attachment attachment) booleandeleteByUser(UserContext uc, String username, boolean force, Attachment... attachments) booleandeleteByUser(UserContext uc, String username, Attachment... attachments) getAllBy(UserContext uc, Vorgang vorgang, EAttachmentSource source, String uuid) getAttachment(UserContext uc, String prozessId, String sessionId, int hash) Method for resolving a hash key to an attachment name.getAttachmentFileStream(UserContext uc, String prozessID, Number id) Method for reading a attachment file.getAttachmentFileStream(UserContext uc, String prozessID, String name) Method for reading a attachment file.getAttachmentList(UserContext uc, String prozessID) Method for outputting all attachments of a process.getAttachmentListByType(UserContext uc, String prozessID, EAttachmentSource source) Method for outputting all attachments by type of a process.getByName(UserContext uc, Vorgang vorgang, String name) getByUUID(UserContext uc, String atid) getByUUID(UserContext uc, String atid, Vorgang v) getZippedAttachments(UserContext uc, String prozessID) Method for reading of attachments as aInputStreamon a ZIP archive.mergeAllByUser(UserContext uc, String username, List<AttachmentPersistData> attachmentData) updateByUser(UserContext uc, String username, String oldFileName, Attachment attachment) Methods inherited from class de.xima.fc.api.entity.AEntityAPI
create, create, delete, delete, deleteAllBy, deleteById, deleteById, getAll, getAllBy, getAttributes, getAttributes, getBy, getById, getById, getEntityRefs, getSingleAttributes, getSingleAttributes, resultTotalCount, resultTotalCount, update, updateMethods inherited from class de.xima.fc.api.ASubAPI
getHandlerProvider
-
Constructor Details
-
AttachmentAPI
public AttachmentAPI()
-
-
Method Details
-
getAttachmentFileStream
public InputStream getAttachmentFileStream(UserContext uc, String prozessID, String name) throws FileNotFoundException Method for reading a attachment file.- Parameters:
uc-UserContextthe user context in which the action is to be performed.prozessID- the process ID ofVorgangfor which the attachment should be loaded.name- of theAttachment, which should be loaded.- Returns:
InputStreamof theAttachment- Throws:
FileNotFoundException- if the file couldn't found.- Since:
- 2.4.3
-
getAttachmentFileStream
public InputStream getAttachmentFileStream(UserContext uc, String prozessID, Number id) throws FileNotFoundException Method for reading a attachment file.- Parameters:
uc-UserContextthe user context in which the action is to be performed.prozessID- the process ID ofVorgangfor which the attachment should be loaded.id- of theAttachments, which should be loaded.- Returns:
InputStreamof theAttachment.- Throws:
FileNotFoundException- if the file couldn't found.- Since:
- 2.4.3
-
getAttachmentList
Method for outputting all attachments of a process.- Parameters:
uc-UserContextthe user context in which the action is to be performed.prozessID- the process ID ofVorgangfor which the attachment should be loaded.- Returns:
ListwithAttachments of aVorgang.- Since:
- 2.4.3
-
getAttachmentListByType
public List<Attachment> getAttachmentListByType(UserContext uc, String prozessID, EAttachmentSource source) Method for outputting all attachments by type of a process.- Parameters:
uc-UserContextthe user context in which the action is to be performed.prozessID- the process ID ofVorgangfor which the attachment should be loaded.source-EAttachmentSourcetype of the attachment.- Returns:
ListwithAttachments of aVorgang.- Since:
- 3.1.7
-
getZippedAttachments
Method for reading of attachments as aInputStreamon a ZIP archive.- Parameters:
uc-UserContextthe user context in which the action is to be performed.prozessID- the process ID ofVorgangfor which the attachment should be loaded.- Returns:
InputStreamon allAttachments of theVorgangas a ZIP- Throws:
IOException- if a error occurs while reading the file.- Since:
- 2.4.3
-
deleteByUser
-
deleteByUser
public boolean deleteByUser(UserContext uc, String username, boolean force, Attachment... attachments) -
checkAttachmentsHash
Method for checking if the hashkey is correct for the attachments of aVorgang.- Parameters:
uc-UserContextthe user context in which the action is to be performed.prozessId- the process ID ofVorgangfor which the attachment should be loaded.sessionId- the current session ID of the user.hash- to be tested against.- Returns:
trueif the hash values are identical.- Since:
- 2.4.3
-
getAttachment
Method for resolving a hash key to an attachment name.- Parameters:
uc-UserContextthe user context in which the action is to be performed.prozessId- the process ID ofVorgangfor which the attachment should be loaded.sessionId- the current session ID of the user.hash- value used to verify the the correctAttachmentis being delivered.- Returns:
AttachmentifVorgangexist and theAttachmentexist, otherwisenull- Since:
- 2.4.3
-
createByUser
-
mergeAllByUser
public List<Attachment> mergeAllByUser(UserContext uc, String username, List<AttachmentPersistData> attachmentData) -
updateByUser
public Attachment updateByUser(UserContext uc, String username, String oldFileName, Attachment attachment) -
getByUUID
-
getByUUID
-
getByName
-
getAllBy
public List<Attachment> getAllBy(UserContext uc, Vorgang vorgang, EAttachmentSource source, String uuid)
-