use of com.evolveum.midpoint.gui.impl.page.admin.assignmentholder.AssignmentHolderDetailsModel in project midpoint by Evolveum.
the class PageBaseSystemConfiguration method createObjectDetailsModels.
@Override
protected AssignmentHolderDetailsModel<SystemConfigurationType> createObjectDetailsModels(PrismObject<SystemConfigurationType> object) {
return new AssignmentHolderDetailsModel<>(createPrismObjectModel(object), this) {
@Override
protected GuiObjectDetailsPageType loadDetailsPageConfiguration(PrismObject<SystemConfigurationType> assignmentHolder) {
CompiledGuiProfile profile = getModelServiceLocator().getCompiledGuiProfile();
try {
GuiObjectDetailsPageType defaultPageConfig = null;
for (Class<? extends Containerable> clazz : getAllDetailsTypes()) {
QName type = GuiImplUtil.getContainerableTypeName(clazz);
if (defaultPageConfig == null) {
defaultPageConfig = profile.findObjectDetailsConfiguration(type);
} else {
GuiObjectDetailsPageType anotherConfig = profile.findObjectDetailsConfiguration(type);
defaultPageConfig = getModelServiceLocator().getAdminGuiConfigurationMergeManager().mergeObjectDetailsPageConfiguration(defaultPageConfig, anotherConfig);
}
}
return applyArchetypePolicy(defaultPageConfig);
} catch (Exception ex) {
LOGGER.error("Couldn't create default gui object details page and apply archetype policy", ex);
}
return null;
}
};
}
Aggregations