public class DefaultContentManager extends java.lang.Object implements ContentManager
| Modifier and Type | Field and Description |
|---|---|
protected AHandleManager |
ahmgr |
protected io.nessus.Blockchain |
blockchain |
protected ContentManagerConfig |
config |
protected FHandleManager |
fhmgr |
protected FHeaderValues |
fhvals |
protected IPFSClient |
ipfsClient |
protected io.nessus.Network |
network |
protected io.nessus.Wallet |
wallet |
| Constructor and Description |
|---|
DefaultContentManager(ContentManagerConfig config) |
DefaultContentManager(IPFSClient ipfsClient,
io.nessus.Blockchain blockchain,
ContentManagerConfig config) |
| Modifier and Type | Method and Description |
|---|---|
FHandle |
addIpfsContent(io.nessus.Wallet.Address owner,
java.nio.file.Path srcPath)
Add content to IPFS from local file system.
|
FHandle |
addIpfsContent(io.nessus.Wallet.Address owner,
java.nio.file.Path srcPath,
boolean dryRun) |
FHandle |
addIpfsContent(io.nessus.Wallet.Address owner,
java.nio.file.Path dstPath,
java.io.InputStream input)
Add content to IPFS.
|
FHandle |
addIpfsContent(io.nessus.Wallet.Address owner,
java.nio.file.Path dstPath,
java.io.InputStream input,
boolean dryRun) |
FHandle |
addIpfsContent(io.nessus.Wallet.Address owner,
java.nio.file.Path path,
java.net.URL srcUrl)
Add content to IPFS.
|
FHandle |
buildTreeFromPath(io.nessus.Wallet.Address owner,
java.nio.file.Path path) |
FHandle |
decrypt(FHandle fhandle,
java.nio.file.Path dstPath,
boolean storePlain) |
AHandle |
findAddressRegistation(io.nessus.Wallet.Address owner,
java.lang.Long timeout)
Find the public encyption key for a given address.
|
java.util.List<FHandle> |
findIpfsContent(io.nessus.Wallet.Address owner,
java.lang.Long timeout)
Find registered IPFS content for a given address.
|
java.util.List<FHandle> |
findLocalContent(io.nessus.Wallet.Address owner)
Find local content for a given address.
|
FHandle |
findLocalContent(io.nessus.Wallet.Address owner,
java.nio.file.Path path)
Find local content for a given address and path.
|
AHandleManager |
getAHandleManager() |
wf.bitcoin.javabitcoindrpcclient.BitcoindRpcClient |
getBitcoinRpcClient() |
io.nessus.Blockchain |
getBlockchain()
Get the Blockchain
|
ContentManagerConfig |
getConfig() |
java.nio.file.Path |
getCryptPath(io.nessus.Wallet.Address owner) |
FHandleManager |
getFHandleManager() |
FHeaderValues |
getFHeaderValues() |
IPFSCache |
getIPFSCache() |
IPFSClient |
getIPFSClient()
Get the IPFS client
|
FHandle |
getIpfsContent(io.nessus.Wallet.Address owner,
io.ipfs.multihash.Multihash cid,
java.nio.file.Path path,
java.lang.Long timeout)
Get content from IPFS.
|
java.io.InputStream |
getLocalContent(io.nessus.Wallet.Address owner,
java.nio.file.Path path)
Show content of a plain file from local storage.
|
java.nio.file.Path |
getPlainPath(io.nessus.Wallet.Address owner) |
java.nio.file.Path |
getRootPath() |
java.nio.file.Path |
getTempPath() |
AHandle |
registerAddress(io.nessus.Wallet.Address owner)
Create the public encyption key for a given address.
|
AHandle |
registerAddress(io.nessus.Wallet.Address owner,
boolean dryRun) |
boolean |
removeLocalContent(io.nessus.Wallet.Address owner,
java.nio.file.Path path)
Remove a plain file content from local storage.
|
FHandle |
sendIpfsContent(io.nessus.Wallet.Address owner,
io.ipfs.multihash.Multihash cid,
io.nessus.Wallet.Address toAddr,
java.lang.Long timeout)
Send content to a target address via IPFS.
|
AHandle |
unregisterAddress(io.nessus.Wallet.Address owner)
Unregister the public encyption key for a given address.
|
java.util.List<io.ipfs.multihash.Multihash> |
unregisterIpfsContent(io.nessus.Wallet.Address owner,
java.util.List<io.ipfs.multihash.Multihash> cids)
Unregister a IPFS content.
|
protected final ContentManagerConfig config
protected final IPFSClient ipfsClient
protected final io.nessus.Blockchain blockchain
protected final io.nessus.Network network
protected final io.nessus.Wallet wallet
protected final FHeaderValues fhvals
protected final AHandleManager ahmgr
protected final FHandleManager fhmgr
public DefaultContentManager(ContentManagerConfig config)
public DefaultContentManager(IPFSClient ipfsClient, io.nessus.Blockchain blockchain, ContentManagerConfig config)
public ContentManagerConfig getConfig()
public io.nessus.Blockchain getBlockchain()
ContentManagergetBlockchain in interface ContentManagerpublic IPFSClient getIPFSClient()
ContentManagergetIPFSClient in interface ContentManagerpublic IPFSCache getIPFSCache()
public AHandleManager getAHandleManager()
public FHandleManager getFHandleManager()
public AHandle registerAddress(io.nessus.Wallet.Address owner) throws java.security.GeneralSecurityException, java.io.IOException
ContentManagerregisterAddress in interface ContentManagerjava.security.GeneralSecurityExceptionjava.io.IOExceptionpublic AHandle registerAddress(io.nessus.Wallet.Address owner, boolean dryRun) throws java.security.GeneralSecurityException, java.io.IOException
java.security.GeneralSecurityExceptionjava.io.IOExceptionpublic AHandle unregisterAddress(io.nessus.Wallet.Address owner)
ContentManagerunregisterAddress in interface ContentManagerpublic java.util.List<io.ipfs.multihash.Multihash> unregisterIpfsContent(io.nessus.Wallet.Address owner,
java.util.List<io.ipfs.multihash.Multihash> cids)
throws java.io.IOException
ContentManagerunregisterIpfsContent in interface ContentManagerjava.io.IOExceptionpublic FHandle addIpfsContent(io.nessus.Wallet.Address owner, java.nio.file.Path path, java.net.URL srcUrl) throws java.io.IOException, java.security.GeneralSecurityException
ContentManageraddIpfsContent in interface ContentManagerjava.io.IOExceptionjava.security.GeneralSecurityExceptionpublic FHandle addIpfsContent(io.nessus.Wallet.Address owner, java.nio.file.Path dstPath, java.io.InputStream input) throws java.io.IOException, java.security.GeneralSecurityException
ContentManageraddIpfsContent in interface ContentManagerjava.io.IOExceptionjava.security.GeneralSecurityExceptionpublic FHandle addIpfsContent(io.nessus.Wallet.Address owner, java.nio.file.Path dstPath, java.io.InputStream input, boolean dryRun) throws java.io.IOException, java.security.GeneralSecurityException
java.io.IOExceptionjava.security.GeneralSecurityExceptionpublic FHandle addIpfsContent(io.nessus.Wallet.Address owner, java.nio.file.Path srcPath) throws java.io.IOException, java.security.GeneralSecurityException
ContentManageraddIpfsContent in interface ContentManagerjava.io.IOExceptionjava.security.GeneralSecurityExceptionpublic FHandle addIpfsContent(io.nessus.Wallet.Address owner, java.nio.file.Path srcPath, boolean dryRun) throws java.io.IOException, java.security.GeneralSecurityException
java.io.IOExceptionjava.security.GeneralSecurityExceptionpublic FHandle buildTreeFromPath(io.nessus.Wallet.Address owner, java.nio.file.Path path) throws java.io.IOException
java.io.IOExceptionpublic FHandle getIpfsContent(io.nessus.Wallet.Address owner, io.ipfs.multihash.Multihash cid, java.nio.file.Path path, java.lang.Long timeout) throws java.io.IOException, java.security.GeneralSecurityException
ContentManagergetIpfsContent in interface ContentManagerjava.io.IOExceptionjava.security.GeneralSecurityExceptionpublic FHandle sendIpfsContent(io.nessus.Wallet.Address owner, io.ipfs.multihash.Multihash cid, io.nessus.Wallet.Address toAddr, java.lang.Long timeout) throws java.io.IOException, java.security.GeneralSecurityException
ContentManagersendIpfsContent in interface ContentManagerjava.io.IOExceptionjava.security.GeneralSecurityExceptionpublic AHandle findAddressRegistation(io.nessus.Wallet.Address owner, java.lang.Long timeout)
ContentManagerfindAddressRegistation in interface ContentManagerpublic java.util.List<FHandle> findIpfsContent(io.nessus.Wallet.Address owner, java.lang.Long timeout) throws java.io.IOException
ContentManagerfindIpfsContent in interface ContentManagerjava.io.IOExceptionpublic java.util.List<FHandle> findLocalContent(io.nessus.Wallet.Address owner) throws java.io.IOException
ContentManagerfindLocalContent in interface ContentManagerjava.io.IOExceptionpublic FHandle findLocalContent(io.nessus.Wallet.Address owner, java.nio.file.Path path) throws java.io.IOException
ContentManagerfindLocalContent in interface ContentManagerjava.io.IOExceptionpublic java.io.InputStream getLocalContent(io.nessus.Wallet.Address owner,
java.nio.file.Path path)
throws java.io.IOException
ContentManagergetLocalContent in interface ContentManagerjava.io.IOExceptionpublic boolean removeLocalContent(io.nessus.Wallet.Address owner,
java.nio.file.Path path)
throws java.io.IOException
ContentManagerremoveLocalContent in interface ContentManagerjava.io.IOExceptionpublic wf.bitcoin.javabitcoindrpcclient.BitcoindRpcClient getBitcoinRpcClient()
public FHeaderValues getFHeaderValues()
public java.nio.file.Path getRootPath()
public java.nio.file.Path getPlainPath(io.nessus.Wallet.Address owner)
public java.nio.file.Path getCryptPath(io.nessus.Wallet.Address owner)
public java.nio.file.Path getTempPath()
Copyright © 2018. All rights reserved.