class urn_perun_group_resource_attribute_def_def_vomsRoles extends GroupResourceAttributesModuleAbstract implements GroupResourceAttributesModuleImplApi {

	@Override
	@SuppressWarnings("unchecked")
	public void checkAttributeSyntax(PerunSessionImpl perunSession, Group group, Resource resource, Attribute attribute) throws WrongAttributeValueException {
		if(attribute.getValue() == null) {
			return;
		}
		List<String> vomRoles = attribute.valueAsList();

		for (String vomRole : vomRoles) {
			Matcher matcher = pattern.matcher(vomRole);
			if(!matcher.matches()) {
				throw new WrongAttributeValueException(attribute, "Bad group vomsRoles value. It should not contain '<>&' characters.");
			}
		}
	}

}