Package org.hyperledger.fabric.sdk
Class LifecycleApproveChaincodeDefinitionForMyOrgRequest
java.lang.Object
org.hyperledger.fabric.sdk.LifecycleApproveChaincodeDefinitionForMyOrgRequest
LifecycleApproveChaincodeDefinitionForMyOrgRequest parameters for approving chaincode with lifecycle.
Send to peers with
Channel.sendLifecycleApproveChaincodeDefinitionForMyOrgProposal(LifecycleApproveChaincodeDefinitionForMyOrgRequest, Collection)-
Method Summary
Modifier and TypeMethodDescriptionvoidsetChaincodeCollectionConfiguration(ChaincodeCollectionConfiguration chaincodeCollectionConfiguration) The collections configuration for this chaincode;voidsetChaincodeEndorsementPlugin(String chaincodeEndorsementPlugin) This is the chaincode endorsement plugin.voidsetChaincodeEndorsementPolicy(LifecycleChaincodeEndorsementPolicy lifecycleChaincodeEndorsementPolicy) The chaincode endorsement policy.voidsetChaincodeName(String chaincodeName) The name of the chaincode to approve.voidsetChaincodeValidationPlugin(String chaincodeValidationPlugin) This is the chaincode validation plugin.voidsetChaincodeVersion(String chaincodeVersion) The version of the chaincode to approve.voidsetInitRequired(boolean initRequired) If set the chaincode will need to have an explicit initializer.voidsetPackageId(String packageId) The packageId being approved.voidsetProposalWaitTime(long proposalWaitTime) Sets the timeout for a single proposal request to endorser in milliseconds.voidsetSequence(long sequence) The sequence of this change.voidsetSourceUnavailable(boolean sourceUnavailable) There is no specific packageId for this approval.voidsetUserContext(User userContext) Set the user context for this request.voidsetValidationParameter(byte[] validationParameter) The chaincode validation parameter.
-
Method Details
-
setValidationParameter
The chaincode validation parameter. Only this or chaincode endorsement policysetChaincodeEndorsementPolicy(LifecycleChaincodeEndorsementPolicy)may be set at any one time.- Parameters:
validationParameter-- Throws:
InvalidArgumentException
-
setChaincodeEndorsementPolicy
public void setChaincodeEndorsementPolicy(LifecycleChaincodeEndorsementPolicy lifecycleChaincodeEndorsementPolicy) throws InvalidArgumentException The chaincode endorsement policy. Only this or setValdationParamtersetValidationParameter(byte[])maybe set at any one time.- Parameters:
lifecycleChaincodeEndorsementPolicy-- Throws:
InvalidArgumentException
-
setInitRequired
public void setInitRequired(boolean initRequired) If set the chaincode will need to have an explicit initializer. SeeTransactionRequest.setInit(boolean)must be true, for first invoke. Optional and if not set the chaincode will default to false with the chaincode not needing an initializer.- Parameters:
initRequired- set to true in chaincode will need initialization.
-
setChaincodeName
The name of the chaincode to approve.- Parameters:
chaincodeName-- Throws:
InvalidArgumentException
-
setChaincodeVersion
The version of the chaincode to approve.- Parameters:
chaincodeVersion- the version.- Throws:
InvalidArgumentException
-
setSequence
public void setSequence(long sequence) The sequence of this change. Latest sequence can be determined fromQueryLifecycleQueryChaincodeDefinitionRequest- Parameters:
sequence-
-
setPackageId
The packageId being approved. This is the package id gotten fromLifecycleInstallChaincodeProposalResponse.getPackageId()or fromLifecycleQueryInstalledChaincodesProposalResponse,LifecycleQueryInstalledChaincodeProposalResponseOnly packageID or the sourceUnavailable to true may be set any time.
- Parameters:
packageId- the package ID- Throws:
InvalidArgumentException
-
setChaincodeCollectionConfiguration
public void setChaincodeCollectionConfiguration(ChaincodeCollectionConfiguration chaincodeCollectionConfiguration) throws InvalidArgumentException The collections configuration for this chaincode;- Parameters:
chaincodeCollectionConfiguration- the collection configurtationChaincodeCollectionConfiguration- Throws:
InvalidArgumentException
-
setChaincodeEndorsementPlugin
public void setChaincodeEndorsementPlugin(String chaincodeEndorsementPlugin) throws InvalidArgumentException This is the chaincode endorsement plugin. Should default, not needing set. ONLY set if there is a specific endorsement is set for your organization- Parameters:
chaincodeEndorsementPlugin-- Throws:
InvalidArgumentException
-
setChaincodeValidationPlugin
public void setChaincodeValidationPlugin(String chaincodeValidationPlugin) throws InvalidArgumentException This is the chaincode validation plugin. Should default, not needing set. ONLY set if there is a specific validation is set for your organization- Parameters:
chaincodeValidationPlugin-- Throws:
InvalidArgumentException
-
setUserContext
Set the user context for this request. This context will override the user context set onHFClient.setUserContext(User)- Parameters:
userContext- The user context for this request used for signing.
-
setProposalWaitTime
public void setProposalWaitTime(long proposalWaitTime) Sets the timeout for a single proposal request to endorser in milliseconds.- Parameters:
proposalWaitTime- the timeout for a single proposal request to endorser in milliseconds