@PermitAll public class BinaryDataServiceBean extends com.whitestein.lsps.common.SecureAndLoggingService implements BinaryDataServiceLocal, BinaryDataServiceRemote
LOADED_IN_DOCUMENT, LOADED_IN_TODO
Constructor and Description |
---|
BinaryDataServiceBean() |
BinaryDataServiceBean(javax.persistence.EntityManager entityManager,
BinaryDataDao dao)
Creates new instance.
|
Modifier and Type | Method and Description |
---|---|
long |
addBinaryEntry(String fileName,
String description,
ByteData data)
Add a binary entry and returns the entry id.
|
long |
addBinaryEntry(String fileName,
String description,
String mime,
Blob data)
Add a binary entry and returns the entry id.
|
long |
addBinaryEntryWithMetadata(String fileName,
String description,
ByteData data,
List<BinaryDataMetadata> metadata)
Add a binary entry and returns the entry id.
|
void |
addMetadata(List<Long> binaryDataIds,
String name,
String value)
Adds binary data metadata.
|
Blob |
createBlob(byte[] data) |
void |
deleteBinaryDataLoadedByDocument(long savedDocumentId)
Deletes binary data that are loaded in a document.
|
void |
deleteBinaryDataLoadedByTodo(long todoId)
Deletes binary data that are loaded in a todo.
|
void |
deleteBinaryEntry(long entryId)
Delete a binary entry.
|
void |
deleteForIds(List<Long> ids)
Deletes binary data with ids.
|
BinaryEntry |
getBinaryEntry(long entryId)
Returns the binary data entry for the given entry id.
|
public BinaryDataServiceBean()
public BinaryDataServiceBean(javax.persistence.EntityManager entityManager, BinaryDataDao dao)
entityManager
- dao
- NullPointerException
- if dao
is null@RightsAllowed(value="Binary:Add") public long addBinaryEntry(String fileName, String description, ByteData data)
BinaryDataService
addBinaryEntry
in interface BinaryDataService
@RightsAllowed(value="Binary:Add") public long addBinaryEntry(String fileName, String description, String mime, Blob data)
BinaryDataServiceLocal
addBinaryEntry
in interface BinaryDataServiceLocal
@RightsAllowed(value="Binary:Add") public Blob createBlob(byte[] data)
createBlob
in interface BinaryDataServiceLocal
data
- if not null, data will be written to the blob@RightsAllowed(value="Binary:Add") public long addBinaryEntryWithMetadata(String fileName, String description, ByteData data, List<BinaryDataMetadata> metadata)
BinaryDataService
addBinaryEntryWithMetadata
in interface BinaryDataService
@RightsAllowed(value="Binary:Read") public BinaryEntry getBinaryEntry(long entryId)
BinaryDataService
getBinaryEntry
in interface BinaryDataService
entryId
- the entry id@RightsAllowed(value="Binary:Delete") public void deleteBinaryEntry(long entryId) throws BinaryEntryNotFoundException
BinaryDataService
deleteBinaryEntry
in interface BinaryDataService
entryId
- the entry idBinaryEntryNotFoundException
public void deleteForIds(List<Long> ids)
BinaryDataServiceLocal
deleteForIds
in interface BinaryDataServiceLocal
public void deleteBinaryDataLoadedByDocument(long savedDocumentId)
BinaryDataServiceLocal
deleteBinaryDataLoadedByDocument
in interface BinaryDataServiceLocal
public void deleteBinaryDataLoadedByTodo(long todoId)
BinaryDataServiceLocal
deleteBinaryDataLoadedByTodo
in interface BinaryDataServiceLocal
public void addMetadata(List<Long> binaryDataIds, String name, String value)
BinaryDataServiceLocal
addMetadata
in interface BinaryDataServiceLocal
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.