class urn_perun_group_resource_attribute_def_def_vomsGroupName extends GroupResourceAttributesModuleAbstract implements GroupResourceAttributesModuleImplApi {

    @Override
    public void checkAttributeSyntax(PerunSessionImpl perunSession, Group group, Resource resource, Attribute attribute) throws WrongAttributeValueException {
        String vomsGroupName = attribute.valueAsString();

        if(vomsGroupName == null) return;

        Matcher matcher = pattern.matcher(vomsGroupName);

        if(!matcher.matches()) {
            throw new WrongAttributeValueException(attribute, group, resource, "Bad format of attribute vomsGroupName. It should not contain '<>&=' characters.");
        }
    }

}