Search in sources :

Example 1 with ObjectPolicyConfigurationEditor

use of com.evolveum.midpoint.web.component.ObjectPolicyConfigurationEditor in project midpoint by Evolveum.

the class SystemConfigPanel method initLayout.

protected void initLayout() {
    ChooseTypePanel<ValuePolicyType> passPolicyChoosePanel = new ChooseTypePanel<ValuePolicyType>(ID_GLOBAL_PASSWORD_POLICY_CHOOSER, new PropertyModel<ObjectViewDto<ValuePolicyType>>(getModel(), SystemConfigurationDto.F_PASSWORD_POLICY));
    ChooseTypePanel<SecurityPolicyType> securityPolicyChoosePanel = new ChooseTypePanel<SecurityPolicyType>(ID_GLOBAL_SECURITY_POLICY_CHOOSER, new PropertyModel<ObjectViewDto<SecurityPolicyType>>(getModel(), SystemConfigurationDto.F_SECURITY_POLICY));
    add(passPolicyChoosePanel);
    add(securityPolicyChoosePanel);
    ObjectPolicyConfigurationEditor objectPolicyEditor = new ObjectPolicyConfigurationEditor(ID_OBJECT_POLICY_EDITOR, new PropertyModel<List<ObjectPolicyConfigurationTypeDto>>(getModel(), SystemConfigurationDto.F_OBJECT_POLICY_LIST));
    add(objectPolicyEditor);
    DropDownChoice<AEPlevel> aepLevel = new DropDownChoice<>(ID_GLOBAL_AEP, new PropertyModel<AEPlevel>(getModel(), SystemConfigurationDto.F_AEP_LEVEL), WebComponentUtil.createReadonlyModelFromEnum(AEPlevel.class), new EnumChoiceRenderer<AEPlevel>(SystemConfigPanel.this));
    aepLevel.setOutputMarkupId(true);
    if (aepLevel.getModel().getObject() == null) {
        aepLevel.getModel().setObject(null);
    }
    aepLevel.add(new EmptyOnChangeAjaxFormUpdatingBehavior());
    add(aepLevel);
    TextField<String> auditRecordsField = WebComponentUtil.createAjaxTextField(ID_CLEANUP_AUDIT_RECORDS, new PropertyModel<String>(getModel(), SystemConfigurationDto.F_AUDIT_CLEANUP));
    TextField<String> closedTasksField = WebComponentUtil.createAjaxTextField(ID_CLEANUP_CLOSED_TASKS, new PropertyModel<String>(getModel(), SystemConfigurationDto.F_TASK_CLEANUP));
    add(auditRecordsField);
    add(closedTasksField);
    createTooltip(ID_CLEANUP_AUDIT_RECORDS_TOOLTIP);
    createTooltip(ID_CLEANUP_CLOSED_TASKS_TOOLTIP);
    CheckBox experimentalCodeCheck = WebComponentUtil.createAjaxCheckBox(ID_EXPERIMENTAL_CODE_CHECKBOX, new PropertyModel<Boolean>(getModel(), SystemConfigurationDto.F_ENABLE_EXPERIMENTAL_CODE));
    add(experimentalCodeCheck);
}
Also used : ValuePolicyType(com.evolveum.midpoint.xml.ns._public.common.common_3.ValuePolicyType) AEPlevel(com.evolveum.midpoint.web.page.admin.configuration.dto.AEPlevel) SecurityPolicyType(com.evolveum.midpoint.xml.ns._public.common.common_3.SecurityPolicyType) DropDownChoice(org.apache.wicket.markup.html.form.DropDownChoice) CheckBox(org.apache.wicket.markup.html.form.CheckBox) List(java.util.List) ObjectViewDto(com.evolveum.midpoint.web.page.admin.dto.ObjectViewDto) ObjectPolicyConfigurationEditor(com.evolveum.midpoint.web.component.ObjectPolicyConfigurationEditor)

Aggregations

ObjectPolicyConfigurationEditor (com.evolveum.midpoint.web.component.ObjectPolicyConfigurationEditor)1 AEPlevel (com.evolveum.midpoint.web.page.admin.configuration.dto.AEPlevel)1 ObjectViewDto (com.evolveum.midpoint.web.page.admin.dto.ObjectViewDto)1 SecurityPolicyType (com.evolveum.midpoint.xml.ns._public.common.common_3.SecurityPolicyType)1 ValuePolicyType (com.evolveum.midpoint.xml.ns._public.common.common_3.ValuePolicyType)1 List (java.util.List)1 CheckBox (org.apache.wicket.markup.html.form.CheckBox)1 DropDownChoice (org.apache.wicket.markup.html.form.DropDownChoice)1