rule.setDialPatterns(calculateDialPatterns(areaCode)); List perms = Collections.singletonList(getPermission()); rule.setPermissions(perms);
rule.setDialPatterns(calculateDialPatterns(areaCode)); List<String> permNames = new ArrayList<String>(1); permNames.add(getPermissionName()); rule.setPermissionNames(permNames);
    private CustomDialingRule createCustomRule(String areaCode) {        CustomDialingRule rule = new CustomDialingRule();        rule.setName(getName());        rule.setDescription(getDescription());        rule.setEnabled(isEnabled());        rule.setGateways(getGateways());        rule.setCallPattern(calculateCallPattern(areaCode));        rule.setDialPatterns(calculateDialPatterns(areaCode));        List perms = Collections.singletonList(getPermission());        rule.setPermissions(perms);        return rule;    }