Class StateBasedEndorsementImpl
- java.lang.Object
-
- org.hyperledger.fabric.shim.ext.sbe.impl.StateBasedEndorsementImpl
-
- All Implemented Interfaces:
StateBasedEndorsement
public class StateBasedEndorsementImpl extends java.lang.Object implements StateBasedEndorsement
ImplementsStateBasedEndorsement
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.hyperledger.fabric.shim.ext.sbe.StateBasedEndorsement
StateBasedEndorsement.RoleType
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addOrgs(StateBasedEndorsement.RoleType role, java.lang.String... organizations)
Adds the specified orgs to the list of orgs that are required to endorse.void
delOrgs(java.lang.String... organizations)
deletes the specified channel orgs from the existing key-level endorsement policy for this KVS key.java.util.List<java.lang.String>
listOrgs()
Returns an array of channel orgs that are required to endorse changesbyte[]
policy()
Returns the endorsement policy as bytes
-
-
-
Method Detail
-
policy
public byte[] policy()
Description copied from interface:StateBasedEndorsement
Returns the endorsement policy as bytes- Specified by:
policy
in interfaceStateBasedEndorsement
- Returns:
-
addOrgs
public void addOrgs(StateBasedEndorsement.RoleType role, java.lang.String... organizations)
Description copied from interface:StateBasedEndorsement
Adds the specified orgs to the list of orgs that are required to endorse. All orgs MSP role types will be set to the role that is specified in the first parameter. Among other aspects the desired role depends on the channel's configuration: if it supports node OUs, it is likely going to be the PEER role, while the MEMBER role is the suited one if it does not.- Specified by:
addOrgs
in interfaceStateBasedEndorsement
-
delOrgs
public void delOrgs(java.lang.String... organizations)
Description copied from interface:StateBasedEndorsement
deletes the specified channel orgs from the existing key-level endorsement policy for this KVS key.- Specified by:
delOrgs
in interfaceStateBasedEndorsement
-
listOrgs
public java.util.List<java.lang.String> listOrgs()
Description copied from interface:StateBasedEndorsement
Returns an array of channel orgs that are required to endorse changes- Specified by:
listOrgs
in interfaceStateBasedEndorsement
- Returns:
-
-