public class AttachmentAPI extends AEntityAPI<Attachment>
Attachment
entities.entityClass
Constructor and Description |
---|
AttachmentAPI() |
Modifier and Type | Method and Description |
---|---|
boolean |
checkAttachmentsHash(UserContext uc,
String prozessId,
String sessionId,
int hash)
Method for checking if the hashkey is correct for the attachments of a
Vorgang . |
Boolean |
delete(UserContext uc,
Attachment attachment)
Method for deleting a
Attachment s. |
Boolean |
delete(UserContext uc,
Attachment[] attachments)
Method for deleting multiple
Attachment s. |
boolean |
deleteByUser(UserContext uc,
String username,
Attachment... attachments) |
List<Attachment> |
getAllBy(UserContext uc,
Vorgang vorgang,
EAttachmentSource source,
String uuid) |
Attachment |
getAttachment(UserContext uc,
String prozessId,
String sessionId,
int hash)
Method for resolving a hash key to an attachment name.
|
InputStream |
getAttachmentFileStream(UserContext uc,
String prozessID,
Number id)
Method for reading a attachment file.
|
InputStream |
getAttachmentFileStream(UserContext uc,
String prozessID,
String name)
Method for reading a attachment file.
|
List<Attachment> |
getAttachmentList(UserContext uc,
String prozessID)
Method for outputting all attachments of a process.
|
List<Attachment> |
getAttachmentListByType(UserContext uc,
String prozessID,
EAttachmentSource source)
Method for outputting all attachments by type of a process.
|
Attachment |
getByName(UserContext uc,
Vorgang vorgang,
String name) |
Attachment |
getByUUID(UserContext uc,
String atid) |
Attachment |
getByUUID(UserContext uc,
String atid,
Vorgang v) |
InputStream |
getZippedAttachments(UserContext uc,
String prozessID)
Method for reading of attachments as a
InputStream on a ZIP archive. |
create, create, deleteAllBy, deleteById, deleteById, getAll, getAllBy, getBy, getById, getById, resultTotalCount, update, update
getHandlerProvider
public Boolean delete(UserContext uc, Attachment[] attachments)
Attachment
s.delete
in class AEntityAPI<Attachment>
uc
- UserContext
the user context in which the action is to be performed.attachments
- Array of Attachment
s which should be deleted.true
if the deletion was successful.AEntityAPI.delete(UserContext, ITransferableEntity[])
public InputStream getAttachmentFileStream(UserContext uc, String prozessID, String name) throws FileNotFoundException
uc
- UserContext
the user context in which the action is to be performed.prozessID
- the process ID of Vorgang
for which the attachment should be loaded.name
- of the Attachment
, which should be loaded.InputStream
of the Attachment
FileNotFoundException
- if the file couldn't found.public InputStream getAttachmentFileStream(UserContext uc, String prozessID, Number id) throws FileNotFoundException
uc
- UserContext
the user context in which the action is to be performed.prozessID
- the process ID of Vorgang
for which the attachment should be loaded.id
- of the Attachment
s, which should be loaded.InputStream
of the Attachment
.FileNotFoundException
- if the file couldn't found.public List<Attachment> getAttachmentList(UserContext uc, String prozessID)
uc
- UserContext
the user context in which the action is to be performed.prozessID
- the process ID of Vorgang
for which the attachment should be loaded.List
with Attachment
s of a Vorgang
.public List<Attachment> getAttachmentListByType(UserContext uc, String prozessID, EAttachmentSource source)
uc
- UserContext
the user context in which the action is to be performed.prozessID
- the process ID of Vorgang
for which the attachment should be loaded.source
- EAttachmentSource
type of the attachment.List
with Attachment
s of a Vorgang
.public InputStream getZippedAttachments(UserContext uc, String prozessID) throws IOException
InputStream
on a ZIP archive.uc
- UserContext
the user context in which the action is to be performed.prozessID
- the process ID of Vorgang
for which the attachment should be loaded.InputStream
on all Attachment
s of the Vorgang
as a ZIPIOException
- if a error occurs while reading the file.public Boolean delete(UserContext uc, Attachment attachment)
Attachment
s.delete
in class AEntityAPI<Attachment>
uc
- UserContext
the user context in which the action is to be performed.attachment
- which should be deleted.true
if the deletion was successful.AEntityAPI.delete(UserContext, ITransferableEntity)
public boolean deleteByUser(UserContext uc, String username, Attachment... attachments)
public boolean checkAttachmentsHash(UserContext uc, String prozessId, String sessionId, int hash)
Vorgang
.uc
- UserContext
the user context in which the action is to be performed.prozessId
- the process ID of Vorgang
for which the attachment should be loaded.sessionId
- the current session ID of the user.hash
- to be tested against.true
if the hash values are identical.public Attachment getAttachment(UserContext uc, String prozessId, String sessionId, int hash)
uc
- UserContext
the user context in which the action is to be performed.prozessId
- the process ID of Vorgang
for which the attachment should be loaded.sessionId
- the current session ID of the user.hash
- value used to verify the the correct Attachment
is being delivered.Attachment
if Vorgang
exist and the Attachment
exist, otherwise null
public Attachment getByUUID(UserContext uc, String atid)
public Attachment getByUUID(UserContext uc, String atid, Vorgang v)
public Attachment getByName(UserContext uc, Vorgang vorgang, String name)
public List<Attachment> getAllBy(UserContext uc, Vorgang vorgang, EAttachmentSource source, String uuid)
Copyright © 2019 XIMA MEDIA GmbH. All rights reserved.