* @author aaime
*
*/
class DuplicateRuleValidator extends AbstractFormValidator {
public void validate(Form form) {
DataAccessRule rule = new DataAccessRule((String) workspace.getConvertedInput(),
(String) layer.getConvertedInput(),
(AccessMode) accessMode.getConvertedInput(), rolesForComponent.getRolePalette()
.getDefaultModelObjectAsString());
if (DataAccessRuleDAO.get().getRules().contains(rule)) {
form.error(new ParamResourceModel("duplicateRule", getPage(), rule.getKey())
.getString());
}
}