java.lang.Comparable<Permission>
, net.sergeych.biserializer.BiSerializable
public class SplitJoinPermission extends Permission
params
Constructor | Description |
---|---|
SplitJoinPermission(Role role,
net.sergeych.tools.Binder params) |
Create new permission for change some numeric field.
|
Modifier and Type | Method | Description |
---|---|---|
void |
checkChangesQuantized(Contract contract,
Contract changed,
java.util.Map<java.lang.String,net.sergeych.diff.Delta> stateChanges,
java.util.Set<Contract> revokingItems,
java.util.Collection<com.icodici.crypto.PublicKey> keys) |
Check and remove changes that this permission allow.
|
void |
deserialize(net.sergeych.tools.Binder data,
net.sergeych.biserializer.BiDeserializer deserializer) |
|
protected void |
initFromParams() |
|
boolean |
validateMergeFields(Contract changed,
Contract c) |
Check matching fields of two contracts.
|
checkChanges, compareTo, equals, forName, getId, getName, getParams, getRole, isAllowedFor, isAllowedForKeys, isAllowedForKeys, isAllowedForKeysQuantized, isAllowedForKeysQuantized, isAllowedForQuantized, serialize, setId, toString
public SplitJoinPermission(Role role, net.sergeych.tools.Binder params)
role
- allows to permissionparams
- is parameters of permission: field_name, min_value, min_unit, join_match_fieldsprotected void initFromParams()
public void deserialize(net.sergeych.tools.Binder data, net.sergeych.biserializer.BiDeserializer deserializer)
deserialize
in interface net.sergeych.biserializer.BiSerializable
deserialize
in class Permission
public void checkChangesQuantized(Contract contract, Contract changed, java.util.Map<java.lang.String,net.sergeych.diff.Delta> stateChanges, java.util.Set<Contract> revokingItems, java.util.Collection<com.icodici.crypto.PublicKey> keys) throws Quantiser.QuantiserException
checkChangesQuantized
in class Permission
contract
- source (valid) contractchanged
- is contract for checkingstateChanges
- map of changes, see Delta
for detailsrevokingItems
- items to be revoked. The ones are getting joined will be removed during checkkeys
- keys contract is sealed with. Keys are used to check other contracts permissionsQuantiser.QuantiserException