use of com.evolveum.midpoint.xml.ns._public.common.common_3.GuiObjectDetailsPageType 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;
}
};
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.GuiObjectDetailsPageType in project midpoint by Evolveum.
the class AssignmentHolderDetailsModel method applyArchetypePolicy.
protected GuiObjectDetailsPageType applyArchetypePolicy(GuiObjectDetailsPageType defaultPageConfig) {
OperationResult result = new OperationResult("mergeArchetypeConfig");
PrismObject<AH> assignmentHolder = getPrismObject();
try {
ArchetypePolicyType archetypePolicyType = getModelServiceLocator().getModelInteractionService().determineArchetypePolicy(assignmentHolder, result);
return getAdminGuiConfigurationMergeManager().mergeObjectDetailsPageConfiguration(defaultPageConfig, archetypePolicyType, result);
} catch (SchemaException | ConfigurationException e) {
LOGGER.error("Cannot merge details page configuration from archetype policy, {}", e.getMessage(), e);
return defaultPageConfig;
}
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.GuiObjectDetailsPageType in project midpoint by Evolveum.
the class ArchetypeAdminGuiConfigurationAsserter method objectDetails.
public GuiObjectDetailsPageAsserter<ArchetypeAdminGuiConfigurationAsserter<RA>> objectDetails() {
Assertions.assertThat(archetypeAdminGuiConfig).isNotNull();
GuiObjectDetailsPageType details = archetypeAdminGuiConfig.getObjectDetails();
return new GuiObjectDetailsPageAsserter<>(details, this, "from archetype admin gui " + archetypeAdminGuiConfig);
}
Aggregations