Package de.dlr.proseo.storagemgr.rest
Klasse ProductControllerImpl
java.lang.Object
de.dlr.proseo.storagemgr.rest.ProductControllerImpl
- Alle implementierten Schnittstellen:
ProductController
Spring MVC controller for the prosEO Storage Manager; implements the services
required to manage any object storage, e. g. a storage based on the AWS S3
API
- Autor:
- Dr. Thomas Bassler, Denys Chaykovskiy, Hubert Asamer
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungorg.springframework.http.ResponseEntity
<RestProductFS> createRestProductFS
(@Valid RestProductFS restProductFS) Copy a file from "ingest" file system to storage manager controlled prosEO cache.org.springframework.http.ResponseEntity
<RestProductFS> deleteProductByPathInfo
(String pathInfo) Delete object(s)org.springframework.http.ResponseEntity
<?> Retrieve the byte stream for download of a file object in repository.getProductFiles
(String storageType, String prefix) List the file/object contents of a repository.
-
Konstruktordetails
-
ProductControllerImpl
public ProductControllerImpl()
-
-
Methodendetails
-
createRestProductFS
public org.springframework.http.ResponseEntity<RestProductFS> createRestProductFS(@Valid @Valid RestProductFS restProductFS) Copy a file from "ingest" file system to storage manager controlled prosEO cache. Source and target are defined in the restProductFS structure- Angegeben von:
createRestProductFS
in SchnittstelleProductController
- Parameter:
restProductFS
- the ingest file information- Gibt zurück:
- a response entity containing HTTP status CREATED and the ingest file information updated with the file paths after ingestion on success, or HTTP status INTERNAL_SERVER_ERROR and an error message
-
getProductFiles
public org.springframework.http.ResponseEntity<List<String>> getProductFiles(String storageType, String prefix) List the file/object contents of a repository.- Angegeben von:
getProductFiles
in SchnittstelleProductController
- Parameter:
storageType
- S2, POSIX or nullprefix
- Path information- Gibt zurück:
- a response entity containing HTTP status OK or PARTIAL_CONTENT and list of file (object) paths on success, or HTTP status INTERNAL_SERVER_ERROR and an error message
-
getObject
public org.springframework.http.ResponseEntity<?> getObject(String pathInfo, String token, Long fromByte, Long toByte) Retrieve the byte stream for download of a file object in repository.- Angegeben von:
getObject
in SchnittstelleProductController
- Parameter:
pathInfo
- the file path as S3/ALLUXIO/POSIX string for downloadtoken
- a JSON Web Token authenticating the download (obtained from Ingestor)fromByte
- The first byte of the data stream to download (default is file start, i.e. byte 0)toByte
- The last byte of the data stream to download (default is file end, i.e. file size - 1)- Gibt zurück:
- a response entity containing HTTP status OK or PARTIAL_CONTENT and the byte stream on success, or HTTP status NOT_FOUND and an error message, or HTTP status INTERNAL_SERVER_ERROR and an error message
-
deleteProductByPathInfo
public org.springframework.http.ResponseEntity<RestProductFS> deleteProductByPathInfo(String pathInfo) Delete object(s)- Angegeben von:
deleteProductByPathInfo
in SchnittstelleProductController
- Parameter:
pathInfo
- path to the object or directory- Gibt zurück:
- a response entity containing HTTP status OK and the full metadata of the deleted object, or HTTP status NOT_FOUND and an error message, or HTTP status INTERNAL_SERVER_ERROR and an error message
-