Search in sources :

Example 1 with AssignmentHolderDetailsModel

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;
        }
    };
}
Also used : PrismObject(com.evolveum.midpoint.prism.PrismObject) GuiObjectDetailsPageType(com.evolveum.midpoint.xml.ns._public.common.common_3.GuiObjectDetailsPageType) QName(javax.xml.namespace.QName) AssignmentHolderDetailsModel(com.evolveum.midpoint.gui.impl.page.admin.assignmentholder.AssignmentHolderDetailsModel) CompiledGuiProfile(com.evolveum.midpoint.model.api.authentication.CompiledGuiProfile)

Aggregations

AssignmentHolderDetailsModel (com.evolveum.midpoint.gui.impl.page.admin.assignmentholder.AssignmentHolderDetailsModel)1 CompiledGuiProfile (com.evolveum.midpoint.model.api.authentication.CompiledGuiProfile)1 PrismObject (com.evolveum.midpoint.prism.PrismObject)1 GuiObjectDetailsPageType (com.evolveum.midpoint.xml.ns._public.common.common_3.GuiObjectDetailsPageType)1 QName (javax.xml.namespace.QName)1