void generateNoAccess(List gateways) { CustomDialingRule rule = new CustomDialingRule(); rule.setDescription(NO_ACCESS_RULE); rule.setGateways(gateways); rule.setPermissions(Collections.singletonList(Permission.NO_ACCESS)); rule.setCallPattern(new CallPattern("", CallDigits.FIXED_DIGITS)); DialPattern matchAll = new DialPattern(".", 0); rule.setDialPatterns(Collections.singletonList(matchAll)); generate(rule);
void generateNoAccess(Collection<Gateway> gateways) { Element mappings = m_doc.getRootElement(); Element hostMatch = mappings.addElement(HOST_MATCH); hostMatch.addElement("description").setText(NO_ACCESS_RULE); for (Gateway gateway : gateways) { Element hostPattern = hostMatch.addElement(HOST_PATTERN); hostPattern.setText(gateway.getAddress()); } Element userMatch = hostMatch.addElement(USER_MATCH); userMatch.addElement(USER_PATTERN).setText("."); Element permissionMatch = userMatch.addElement(PERMISSION_MATCH); permissionMatch.addElement(PERMISSION).setText(Permission.NO_ACCESS.getName());
    void generateNoAccess(List gateways) {        CustomDialingRule rule = new CustomDialingRule();        rule.setDescription(NO_ACCESS_RULE);        rule.setGateways(gateways);        rule.setPermissions(Collections.singletonList(Permission.NO_ACCESS));        rule.setCallPattern(new CallPattern("", CallDigits.FIXED_DIGITS));        DialPattern matchAll = new DialPattern(".", 0);                rule.setDialPatterns(Collections.singletonList(matchAll));        generate(rule);    }