class urn_perun_group_attribute_def_def_o365EmailAddresses_o365mu extends GroupAttributesModuleAbstract implements GroupAttributesModuleImplApi {

	@Override
	public Attribute fillAttribute(PerunSessionImpl sess, Group group, AttributeDefinition attrDef) throws WrongAttributeAssignmentException {
		if (!AttributesManager.NS_GROUP_ATTR_DEF.equals(attrDef.getNamespace())) throw new WrongAttributeAssignmentException(attrDef);
		try {
			Attribute result = new Attribute(attrDef);
			String adName = sess.getPerunBl().getAttributesManagerBl().getAttribute(sess, group, ADNAME_ATTRIBUTE).valueAsString();
			if (adName != null) {
				result.setValue(Lists.newArrayList(adName + "@group.muni.cz"));
			}
			return result;
		} catch (AttributeNotExistsException e) {
			throw new InternalErrorException(e.getMessage(), e);
		}
	}

}