-
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.
Improve prototype for outliers and match rules analysis
- Loading branch information
1 parent
6e82d76
commit 964aa06
Showing
73 changed files
with
3,554 additions
and
187 deletions.
There are no files selected for viewing
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
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
52 changes: 52 additions & 0 deletions
52
...ain/java/com/evolveum/midpoint/gui/impl/factory/panel/RoleAnalysisWeightPanelFactory.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,52 @@ | ||
/* | ||
* Copyright (C) 2010-2023 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 java.io.Serializable; | ||
|
||
import jakarta.annotation.PostConstruct; | ||
import org.springframework.stereotype.Component; | ||
|
||
import com.evolveum.midpoint.gui.api.prism.wrapper.ItemWrapper; | ||
import com.evolveum.midpoint.gui.api.prism.wrapper.PrismValueWrapper; | ||
import com.evolveum.midpoint.prism.path.ItemPath; | ||
import com.evolveum.midpoint.web.component.input.TextPanel; | ||
import com.evolveum.midpoint.web.component.prism.InputPanel; | ||
import com.evolveum.midpoint.xml.ns._public.common.common_3.RoleAnalysisMatchingRuleType; | ||
import com.evolveum.midpoint.xml.ns._public.common.common_3.RoleAnalysisSessionType; | ||
|
||
//TODO check serializable | ||
@Component | ||
public class RoleAnalysisWeightPanelFactory extends AbstractInputGuiComponentFactory<Double> implements Serializable { | ||
|
||
@PostConstruct | ||
public void register() { | ||
getRegistry().addToRegistry(this); | ||
} | ||
|
||
@Override | ||
public <IW extends ItemWrapper<?, ?>, VW extends PrismValueWrapper<?>> boolean match(IW wrapper, VW valueWrapper) { | ||
ItemPath itemPath = wrapper.getPath().namedSegmentsOnly(); | ||
ItemPath wrapperPath = ItemPath.create(RoleAnalysisSessionType.F_MATCHING_RULE, RoleAnalysisMatchingRuleType.F_WEIGHT); | ||
return itemPath.equivalent(wrapperPath); | ||
} | ||
|
||
@Override | ||
protected InputPanel getPanel(PrismPropertyPanelContext<Double> panelCtx) { | ||
if (panelCtx.getRealValueModel().getObject() == null) { | ||
panelCtx.getRealValueModel().setObject(1.0); | ||
} | ||
return new TextPanel<>(panelCtx.getComponentId(), | ||
panelCtx.getRealValueModel(), panelCtx.getTypeClass(), false); | ||
} | ||
|
||
@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
Oops, something went wrong.