eventController.fireDataMapEvent(new DataMapEvent(this, dataMap));
}
void setDataMapName(String newName) {
if (newName == null || newName.trim().length() == 0) {
throw new ValidationException("Enter name for DataMap");
}
DataMap map = eventController.getCurrentDataMap();
// search for matching map name across domains, as currently they have to be
// unique globally
Configuration config = ((ApplicationProject) Application.getProject())
.getConfiguration();
DataMap matchingMap = null;
for (DataDomain domain : config.getDomains()) {
DataMap nextMap = domain.getMap(newName);
if (nextMap == map) {
continue;
}
if (nextMap != null) {
matchingMap = nextMap;
break;
}
}
if (matchingMap != null) {
// there is an entity with the same name
throw new ValidationException("There is another DataMap named '"
+ newName
+ "'. Use a different name.");
}
String oldName = map.getName();
if (Util.nullSafeEquals(newName, oldName)) {