Package org.hyperledger.fabric.sdk
Class ChaincodeCollectionConfiguration
java.lang.Object
org.hyperledger.fabric.sdk.ChaincodeCollectionConfiguration
-
Method Summary
Modifier and TypeMethodDescriptionfromCollectionConfigPackage(org.hyperledger.fabric.protos.peer.Collection.CollectionConfigPackage collectionConfigPackage) fromJsonFile(File configFile) Creates a new ChaincodeCollectionConfiguration instance configured with details supplied in a JSON file.fromJsonObject(javax.json.JsonArray jsonConfig) Creates a new ChaincodeCollectionConfiguration instance configured with details supplied in a JSON objectfromJsonStream(InputStream configStream) Creates a new ChaincodeCollectionConfiguration instance configured with details supplied in JSON formatfromYamlFile(File configFile) Creates a new ChaincodeCollectionConfiguration instance configured with details supplied in a YAML file.fromYamlStream(InputStream configStream) Creates a new ChaincodeCollectionConfiguration instance configured with details supplied in YAML formatbyte[]
-
Method Details
-
getAsBytes
-
fromYamlFile
public static ChaincodeCollectionConfiguration fromYamlFile(File configFile) throws InvalidArgumentException, IOException, ChaincodeCollectionConfigurationException Creates a new ChaincodeCollectionConfiguration instance configured with details supplied in a YAML file.- Parameters:
configFile- The file containing the network configuration- Returns:
- A new ChaincodeCollectionConfiguration instance
- Throws:
InvalidArgumentExceptionIOExceptionChaincodeCollectionConfigurationException
-
fromJsonFile
public static ChaincodeCollectionConfiguration fromJsonFile(File configFile) throws InvalidArgumentException, IOException, ChaincodeCollectionConfigurationException Creates a new ChaincodeCollectionConfiguration instance configured with details supplied in a JSON file.- Parameters:
configFile- The file containing the network configuration- Returns:
- A new ChaincodeCollectionConfiguration instance
- Throws:
InvalidArgumentExceptionIOExceptionChaincodeCollectionConfigurationException
-
fromYamlStream
public static ChaincodeCollectionConfiguration fromYamlStream(InputStream configStream) throws InvalidArgumentException, ChaincodeCollectionConfigurationException Creates a new ChaincodeCollectionConfiguration instance configured with details supplied in YAML format- Parameters:
configStream- A stream opened on a YAML document containing network configuration details- Returns:
- A new ChaincodeCollectionConfiguration instance
- Throws:
InvalidArgumentExceptionChaincodeCollectionConfigurationException
-
fromJsonStream
public static ChaincodeCollectionConfiguration fromJsonStream(InputStream configStream) throws InvalidArgumentException, ChaincodeCollectionConfigurationException Creates a new ChaincodeCollectionConfiguration instance configured with details supplied in JSON format- Parameters:
configStream- A stream opened on a JSON document containing network configuration details- Returns:
- A new ChaincodeCollectionConfiguration instance
- Throws:
InvalidArgumentExceptionChaincodeCollectionConfigurationException
-
fromJsonObject
public static ChaincodeCollectionConfiguration fromJsonObject(javax.json.JsonArray jsonConfig) throws InvalidArgumentException, ChaincodeCollectionConfigurationException Creates a new ChaincodeCollectionConfiguration instance configured with details supplied in a JSON object- Parameters:
jsonConfig- JSON object containing network configuration details- Returns:
- A new ChaincodeCollectionConfiguration instance
- Throws:
InvalidArgumentExceptionChaincodeCollectionConfigurationException
-
fromCollectionConfigPackage
public static ChaincodeCollectionConfiguration fromCollectionConfigPackage(org.hyperledger.fabric.protos.peer.Collection.CollectionConfigPackage collectionConfigPackage) throws InvalidArgumentException - Throws:
InvalidArgumentException
-