Interface Permission
- All Known Implementing Classes:
ImmutablePermission
@Immutable
@Beta
public interface Permission
Permission inner object with PermissionValue details.
This class will be marked Beta until the featurePermissionDelegation amendment is enabled on mainnet.
Its API is subject to change.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutablePermission.Builderbuilder()Construct a builder for this class.static Permissionof(GranularPermission granularPermission) Create aPermissionfrom aGranularPermission.static Permissionof(TransactionType transactionType) Create aPermissionfrom aTransactionType.The transaction type that is being delegated, represented as a string.
-
Method Details
-
builder
Construct a builder for this class.- Returns:
- An
ImmutablePermission.Builder.
-
of
Create aPermissionfrom aTransactionType.The permission value is calculated as the transaction type code + 1.
- Parameters:
transactionType- TheTransactionTypeto create a permission for.- Returns:
- A
Permissionwith the permission value set to the transaction type code + 1.
-
of
Create aPermissionfrom aGranularPermission.- Parameters:
granularPermission- TheGranularPermissionto create a permission for.- Returns:
- A
Permissionwith the permission value set to the granular permission's string value.
-
permissionValue
String permissionValue()The transaction type that is being delegated, represented as a string.- Returns:
- A
Stringrepresenting the transaction type.
-