use of io.strimzi.api.kafka.model.AclRuleType in project strimzi-kafka-operator by strimzi.
the class SimpleAclRule method fromAclBinding.
/**
* Creates SimpleAclRule instance based on Kafka's AclBinding instance containing the resource the rule should apply to.
*
* @param aclBinding the AclBinding instance which should be used to create the rule
* @return the SimpleAclRule instance
*/
public static SimpleAclRule fromAclBinding(AclBinding aclBinding) {
SimpleAclRuleResource resource = SimpleAclRuleResource.fromKafkaResourcePattern(aclBinding.pattern());
AclRuleType type = fromKafkaAclPermissionType(aclBinding.entry().permissionType());
AclOperation operation = fromKafkaAclOperation(aclBinding.entry().operation());
return new SimpleAclRule(type, resource, aclBinding.entry().host(), operation);
}
use of io.strimzi.api.kafka.model.AclRuleType in project strimzi by strimzi.
the class SimpleAclRule method fromAclBinding.
/**
* Creates SimpleAclRule instance based on Kafka's AclBinding instance containing the resource the rule should apply to.
*
* @param aclBinding the AclBinding instance which should be used to create the rule
* @return the SimpleAclRule instance
*/
public static SimpleAclRule fromAclBinding(AclBinding aclBinding) {
SimpleAclRuleResource resource = SimpleAclRuleResource.fromKafkaResourcePattern(aclBinding.pattern());
AclRuleType type = fromKafkaAclPermissionType(aclBinding.entry().permissionType());
AclOperation operation = fromKafkaAclOperation(aclBinding.entry().operation());
return new SimpleAclRule(type, resource, aclBinding.entry().host(), operation);
}
Aggregations