public class ChaincodeEndorsementPolicy extends Object
Constructor and Description |
---|
ChaincodeEndorsementPolicy()
The null constructor for the ChaincodeEndorsementPolicy wrapper.
|
Modifier and Type | Method and Description |
---|---|
static ChaincodeEndorsementPolicy |
fromBytes(byte[] policyAsBytes)
sets the ChaincodeEndorsementPolicy from a byte array
|
void |
fromFile(File policyFile)
constructs a ChaincodeEndorsementPolicy object with the actual policy gotten from the file system
|
void |
fromStream(InputStream inputStream)
Construct a chaincode endorsement policy from a stream.
|
void |
fromYamlFile(File yamlPolicyFile)
Deprecated.
|
static ChaincodeEndorsementPolicy |
fromYamlFile(Path yamlPolicyFile) |
byte[] |
getChaincodeEndorsementPolicyAsBytes() |
byte[] |
getPolicyBytes() |
public ChaincodeEndorsementPolicy()
fromBytes(byte[])
method to
populate the policypublic void fromFile(File policyFile) throws IOException
policyFile
- The file containing the policyIOException
@Deprecated public void fromYamlFile(File yamlPolicyFile) throws IOException, ChaincodeEndorsementPolicyParseException
fromYamlFile(Path)
yamlPolicyFile
- File location for the chaincode endorsement policy specification.IOException
ChaincodeEndorsementPolicyParseException
public static ChaincodeEndorsementPolicy fromYamlFile(Path yamlPolicyFile) throws IOException, ChaincodeEndorsementPolicyParseException
public void fromStream(InputStream inputStream) throws IOException
inputStream
- IOException
public static ChaincodeEndorsementPolicy fromBytes(byte[] policyAsBytes)
policyAsBytes
- the byte array containing the serialized policypublic byte[] getPolicyBytes()
public byte[] getChaincodeEndorsementPolicyAsBytes()
Copyright © 2022. All rights reserved.