}
@Override
public void doSave(GWTJahiaNode node, List<GWTJahiaNodeProperty> changedProperties, Map<String, List<GWTJahiaNodeProperty>> changedI18NProperties, Set<String> addedTypes, Set<String> removedTypes, GWTJahiaNodeACL acl) {
PropertiesTabItem propertiesTabItem = this;
PropertiesEditor pe = propertiesTabItem.getPropertiesEditor();
// if (pe != null && node != null) {
// //properties.addAll(pe.getProperties());
// node.getNodeTypes().removeAll(pe.getRemovedTypes());
// node.getNodeTypes().addAll(pe.getAddedTypes());
// node.getNodeTypes().addAll(pe.getExternalMixin());
// }
if (pe != null) {
addedTypes.addAll(pe.getAddedTypes());
addedTypes.addAll(pe.getExternalMixin());
}
if (isMultiLang()) {
// for now only contentTabItem has multilang. properties
Set<String> set = new HashSet<String>(langPropertiesEditorMap.keySet());
set.addAll(this.changedProperties.keySet());
for (String lang : set) {
if (!changedI18NProperties.containsKey(lang)) {
changedI18NProperties.put(lang, new ArrayList<GWTJahiaNodeProperty>());
}
changedI18NProperties.get(lang).addAll(getLanguageProperties(true, lang));
}
if (propertiesEditor != null) {
changedProperties.addAll(propertiesEditor.getProperties(false, true, true));
}
} else {
if (propertiesEditor != null) {
changedProperties.addAll(propertiesEditor.getProperties(true, true, true));
}
}
if (pe != null) {
removedTypes.addAll(pe.getRemovedTypes());
}
}