-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
40a7818
commit 34f2e7e
Showing
33 changed files
with
908 additions
and
1,526 deletions.
There are no files selected for viewing
80 changes: 80 additions & 0 deletions
80
...min-gui/src/main/java/com/evolveum/midpoint/gui/impl/factory/panel/RangePanelFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
/* | ||
* Copyright (C) 2010-2020 Evolveum and contributors | ||
* | ||
* This work is dual-licensed under the Apache License 2.0 | ||
* and European Union Public License. See LICENSE file for details. | ||
*/ | ||
package com.evolveum.midpoint.gui.impl.factory.panel; | ||
|
||
import com.evolveum.midpoint.gui.api.prism.wrapper.ItemWrapper; | ||
import com.evolveum.midpoint.gui.api.prism.wrapper.PrismPropertyWrapper; | ||
import com.evolveum.midpoint.gui.api.prism.wrapper.PrismValueWrapper; | ||
import com.evolveum.midpoint.gui.api.util.ObjectTypeListUtil; | ||
import com.evolveum.midpoint.gui.impl.page.admin.role.mining.components.RangeSliderPanel; | ||
import com.evolveum.midpoint.prism.path.ItemPath; | ||
import com.evolveum.midpoint.util.DOMUtil; | ||
import com.evolveum.midpoint.web.component.input.DropDownChoicePanel; | ||
import com.evolveum.midpoint.web.component.input.QNameObjectTypeChoiceRenderer; | ||
import com.evolveum.midpoint.web.component.prism.InputPanel; | ||
import com.evolveum.midpoint.web.page.admin.configuration.component.EmptyOnChangeAjaxFormUpdatingBehavior; | ||
import com.evolveum.midpoint.xml.ns._public.common.common_3.*; | ||
|
||
import com.evolveum.prism.xml.ns._public.types_3.ItemPathType; | ||
|
||
import jakarta.annotation.PostConstruct; | ||
import org.apache.wicket.model.Model; | ||
import org.springframework.stereotype.Component; | ||
|
||
import javax.xml.namespace.QName; | ||
import java.util.List; | ||
|
||
@Component | ||
public class RangePanelFactory extends AbstractInputGuiComponentFactory<Double> { | ||
|
||
@PostConstruct | ||
public void register() { | ||
getRegistry().addToRegistry(this); | ||
} | ||
|
||
@Override | ||
public <IW extends ItemWrapper<?, ?>, VW extends PrismValueWrapper<?>> boolean match(IW wrapper, VW valueWrapper) { | ||
return RoleAnalysisSessionOptionType.F_SIMILARITY_THRESHOLD.equals(wrapper.getItemName()); | ||
} | ||
|
||
@Override | ||
protected InputPanel getPanel(PrismPropertyPanelContext<Double> panelCtx) { | ||
List<QName> typesList; | ||
// if (AssignmentType.F_FOCUS_TYPE.equals(panelCtx.getDefinitionName()) | ||
// || ItemPath.create( | ||
// ResourceType.F_SCHEMA_HANDLING, | ||
// SchemaHandlingType.F_OBJECT_TYPE, | ||
// ResourceObjectTypeDefinitionType.F_FOCUS, | ||
// ResourceObjectFocusSpecificationType.F_TYPE) | ||
// .equivalent(panelCtx.unwrapWrapperModel().getPath().namedSegmentsOnly())) { | ||
// typesList = ObjectTypeListUtil.createFocusTypeList(); | ||
// } else if ((ObjectCollectionType.F_TYPE.equals(panelCtx.getDefinitionName()) || GuiObjectListViewType.F_TYPE.equals(panelCtx.getDefinitionName())) | ||
// && panelCtx.unwrapWrapperModel().getParent().getDefinition() != null && | ||
// (ObjectCollectionType.class.equals(panelCtx.unwrapWrapperModel().getParent().getDefinition().getTypeClass()) | ||
// || GuiObjectListViewType.class.equals(panelCtx.unwrapWrapperModel().getParent().getDefinition().getTypeClass()))) { | ||
// typesList = ObjectTypeListUtil.createContainerableTypesQnameList(); | ||
// } else { | ||
// typesList = ObjectTypeListUtil.createObjectTypeList(); | ||
// } | ||
|
||
|
||
|
||
RangeSliderPanel rangeSliderPanel = new RangeSliderPanel(panelCtx.getComponentId(),panelCtx.getRealValueModel()); | ||
// DropDownChoicePanel<QName> typePanel = new DropDownChoicePanel<QName>(panelCtx.getComponentId(), panelCtx.getRealValueModel(), | ||
// Model.ofList(typesList), new QNameObjectTypeChoiceRenderer(), true); | ||
rangeSliderPanel.getBaseFormComponent().add(new EmptyOnChangeAjaxFormUpdatingBehavior()); | ||
rangeSliderPanel.setOutputMarkupId(true); | ||
return rangeSliderPanel; | ||
} | ||
|
||
@Override | ||
public Integer getOrder() { | ||
return 10000; | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.