if (id == null) {
throw new NullPointerException("No null id accepted");
}
POMSession session = manager.getSession();
WorkspaceObject obj = session.findObjectById(id);
I18NAdapter able = obj.adapt(I18NAdapter.class);
Collection<Locale> locales = able.removeI18NMixin(Described.class);
for (Locale locale : locales) {
cache.removeState(new CacheKey(locale, id));
}
// Interface specifies it allows a null description map
if (descriptions != null) {
for (Map.Entry<Locale, Described.State> entry : descriptions.entrySet()) {
Described described = able.addI18NMixin(Described.class, entry.getKey());
described.setState(entry.getValue());
}
}
}