@ApplicationScoped public class StorageServiceImpl extends Object implements StorageService
| Constructor and Description |
|---|
StorageServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
Path |
calcFilePath(Path basePath,
Object obj) |
boolean |
checkDigest(InputStream is,
String digest,
MessageDigest md) |
void |
deleteFileAndParentDirectories(Path path) |
org.dcm4che3.net.Device |
getDevice() |
long |
getFreeSpaceOf(Path path) |
org.dcm4chee.storage.conf.Filesystem |
getRWFilesystem(String groupID,
long filesize) |
long |
getTotalSpaceOf(Path path) |
void |
init() |
boolean |
isRunning() |
StorageResult |
move(Path source,
String groupID,
Object pathDescriptor) |
void |
reload() |
void |
start() |
void |
stop() |
StorageResult |
store(InputStream is,
String groupID,
Object pathDescriptor,
MessageDigest md)
Store given InputStream to a writable filesystem of foiesystem group given by groupID
|
org.dcm4chee.storage.conf.Filesystem |
switchRWFilesystem(String groupID) |
Path |
toPath(org.dcm4chee.storage.entity.BaseFileRef f) |
@PostConstruct public void init()
public void start()
throws Exception
start in interface org.dcm4che3.net.DeviceServiceInterfaceExceptionpublic void stop()
stop in interface org.dcm4che3.net.DeviceServiceInterfacepublic void reload()
throws Exception
reload in interface StorageServiceExceptionpublic org.dcm4che3.net.Device getDevice()
getDevice in interface org.dcm4che3.net.DeviceServiceInterfacepublic boolean isRunning()
isRunning in interface org.dcm4che3.net.DeviceServiceInterfacepublic org.dcm4chee.storage.conf.Filesystem getRWFilesystem(String groupID, long filesize) throws org.dcm4che3.conf.api.ConfigurationException
getRWFilesystem in interface StorageServiceorg.dcm4che3.conf.api.ConfigurationExceptionpublic long getFreeSpaceOf(Path path)
getFreeSpaceOf in interface StorageServicepublic long getTotalSpaceOf(Path path)
public Path calcFilePath(Path basePath, Object obj) throws IOException
IOExceptionpublic StorageResult store(InputStream is, String groupID, Object pathDescriptor, MessageDigest md) throws org.dcm4che3.conf.api.ConfigurationException, IOException, NoSuchAlgorithmException
StorageServicestore in interface StorageServiceis - Inputstream to storegroupID - Filesystem group ID used to get writable filesystempathDescriptor - Object to build file path via injected Format object. (e.g. TimeAndUidPathFormat)org.dcm4che3.conf.api.ConfigurationExceptionIOExceptionNoSuchAlgorithmExceptionpublic StorageResult move(Path source, String groupID, Object pathDescriptor) throws org.dcm4che3.conf.api.ConfigurationException, IOException, NoSuchAlgorithmException
move in interface StorageServiceorg.dcm4che3.conf.api.ConfigurationExceptionIOExceptionNoSuchAlgorithmExceptionpublic boolean checkDigest(InputStream is, String digest, MessageDigest md)
checkDigest in interface StorageServicepublic void deleteFileAndParentDirectories(Path path)
deleteFileAndParentDirectories in interface StorageServicepublic org.dcm4chee.storage.conf.Filesystem switchRWFilesystem(String groupID) throws org.dcm4che3.conf.api.ConfigurationException
switchRWFilesystem in interface StorageServiceorg.dcm4che3.conf.api.ConfigurationExceptionpublic Path toPath(org.dcm4chee.storage.entity.BaseFileRef f)
toPath in interface StorageServiceCopyright © 2014. All Rights Reserved.