/** * Parses the rules contained in the property file * * @param props */ protected void loadRules(Properties props) { TreeSet<ServiceAccessRule> result = new TreeSet<ServiceAccessRule>(); for (Map.Entry<Object, Object> entry : props.entrySet()) { String ruleKey = (String) entry.getKey(); String ruleValue = (String) entry.getValue(); ServiceAccessRule rule = parseServiceAccessRule(ruleKey, ruleValue); if (rule != null) { if (result.contains(rule)) LOGGER.warning( "Rule " + ruleKey + "." + ruleValue + " overwrites another rule on the same path"); result.add(rule); } } // make sure to add the "all access alloed" rule if the set if empty if (result.size() == 0) { result.add(new ServiceAccessRule(new ServiceAccessRule())); } rules = result; }
return new ServiceAccessRule(service, method, roles);
@Override protected Comparable convertEntryToRule(Entry entry) { String[] parts = parseElements((String) entry.getKey()); return new ServiceAccessRule(parts[0], parts[1], parseRoles((String) entry.getValue())); }
public EditServiceAccessRulePage(ServiceAccessRule rule) { super(new ServiceAccessRule(rule)); //save the original this.orig = rule; //set drop downs to disabled serviceChoice.setEnabled(false); methodChoice.setEnabled(false); }
public EditServiceAccessRulePage(ServiceAccessRule rule) { super(new ServiceAccessRule(rule)); // save the original this.orig = rule; // set drop downs to disabled serviceChoice.setEnabled(false); methodChoice.setEnabled(false); }
public EditServiceAccessRulePage(ServiceAccessRule rule) { super(new ServiceAccessRule(rule)); //save the original this.orig = rule; //set drop downs to disabled serviceChoice.setEnabled(false); methodChoice.setEnabled(false); }
public NewServiceAccessRulePage() { super(new ServiceAccessRule()); ((Form)get("form")).add(new DuplicateRuleValidator()); }
public NewServiceAccessRulePage() { super(new ServiceAccessRule()); ((Form)get("form")).add(new DuplicateRuleValidator()); }
public NewServiceAccessRulePage() { super(new ServiceAccessRule()); ((Form) get("form")).add(new DuplicateRuleValidator()); }