Package com.artipie.npm.proxy
Class RxNpmProxyStorage
java.lang.Object
com.artipie.npm.proxy.RxNpmProxyStorage
- All Implemented Interfaces:
NpmProxyStorage
Base NPM Proxy storage implementation. It encapsulates storage format details
and allows to handle both primary data and metadata files within one calls.
It uses underlying RxStorage and works in Rx-way.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionio.reactivex.Maybe
<NpmAsset> Retrieve NPM asset by path.io.reactivex.Maybe
<NpmPackage> getPackage
(String name) Retrieve NPM package by name.io.reactivex.Completable
Persist NPM Asset.io.reactivex.Completable
save
(NpmPackage pkg) Persist NPM Package.
-
Constructor Details
-
RxNpmProxyStorage
Ctor.- Parameters:
storage
- Underlying storage
-
-
Method Details
-
save
Description copied from interface:NpmProxyStorage
Persist NPM Package.- Specified by:
save
in interfaceNpmProxyStorage
- Parameters:
pkg
- Package to persist- Returns:
- Completion or error signal
-
save
Description copied from interface:NpmProxyStorage
Persist NPM Asset.- Specified by:
save
in interfaceNpmProxyStorage
- Parameters:
asset
- Asset to persist- Returns:
- Completion or error signal
-
getPackage
Description copied from interface:NpmProxyStorage
Retrieve NPM package by name.- Specified by:
getPackage
in interfaceNpmProxyStorage
- Parameters:
name
- Package name- Returns:
- NPM package or empty
-
getAsset
Description copied from interface:NpmProxyStorage
Retrieve NPM asset by path.- Specified by:
getAsset
in interfaceNpmProxyStorage
- Parameters:
path
- Asset path- Returns:
- NPM asset or empty
-