* @author aaime
*
*/
class DuplicateRuleValidator extends AbstractFormValidator {
public void validate(Form form) {
ServiceAccessRule rule = new ServiceAccessRule((String) service
.getConvertedInput(), (String) method
.getConvertedInput(), rolesForComponent.getRolePalette()
.getModelObjectAsString());
if (ServiceAccessRuleDAO.get().getRules().contains(rule)) {
form.error(new ParamResourceModel("duplicateRule", getPage(),
rule.getKey()).getString());
}
}