Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Multiaccounts: reworking construction collector. It does NOT compile,…
… WIP (MID-6242)
- Loading branch information
Showing
12 changed files
with
313 additions
and
247 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
78 changes: 0 additions & 78 deletions
78
model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/ConstructionPack.java
This file was deleted.
Oops, something went wrong.
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
77 changes: 77 additions & 0 deletions
77
...l-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/EvaluatedConstructionPack.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,77 @@ | ||
/* | ||
* 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.model.impl.lens; | ||
|
||
import java.util.ArrayList; | ||
import java.util.Collection; | ||
|
||
import com.evolveum.midpoint.model.api.context.EvaluatedConstruction; | ||
import com.evolveum.midpoint.prism.PrismPropertyValue; | ||
import com.evolveum.midpoint.schema.util.SchemaDebugUtil; | ||
import com.evolveum.midpoint.util.DebugDumpable; | ||
import com.evolveum.midpoint.util.DebugUtil; | ||
import com.evolveum.midpoint.xml.ns._public.common.common_3.AssignmentHolderType; | ||
|
||
/** | ||
* @author semancik | ||
* | ||
*/ | ||
public class EvaluatedConstructionPack<EC extends EvaluatedConstructionImpl> implements DebugDumpable { | ||
|
||
private final Collection<EC> evaluatedConstructions = new ArrayList<>(); | ||
private boolean forceRecon; | ||
private boolean hasValidAssignment = false; | ||
|
||
public boolean isForceRecon() { | ||
return forceRecon; | ||
} | ||
|
||
public void setForceRecon(boolean forceRecon) { | ||
this.forceRecon = forceRecon; | ||
} | ||
|
||
public Collection<EC> getEvaluatedConstructions() { | ||
return evaluatedConstructions; | ||
} | ||
|
||
public void add(EC evaluatedConstruction) { | ||
evaluatedConstructions.add(evaluatedConstruction); | ||
} | ||
|
||
public boolean hasValidAssignment() { | ||
return hasValidAssignment; | ||
} | ||
|
||
public void setHasValidAssignment(boolean hasValidAssignment) { | ||
this.hasValidAssignment = hasValidAssignment; | ||
} | ||
|
||
public boolean hasNonWeakConstruction() { | ||
for (EC evaluatedConstruction: evaluatedConstructions) { | ||
if (!evaluatedConstruction.getConstruction().isWeak()) { | ||
return true; | ||
} | ||
} | ||
return false; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "EvaluatedConstructionPack(" + SchemaDebugUtil.prettyPrint(evaluatedConstructions) + (forceRecon ? ", forceRecon" : "") + ")"; | ||
} | ||
|
||
@Override | ||
public String debugDump(int indent) { | ||
StringBuilder sb = new StringBuilder(); | ||
DebugUtil.debugDumpLabelLn(sb, "EvaluatedConstructionPack", indent); | ||
DebugUtil.debugDumpWithLabelLn(sb, "forceRecon", forceRecon, indent + 1); | ||
DebugUtil.debugDumpWithLabelLn(sb, "hasValidAssignment", hasValidAssignment, indent + 1); | ||
DebugUtil.debugDumpWithLabel(sb, "evaluatedConstructions", evaluatedConstructions, indent + 1); | ||
return sb.toString(); | ||
} | ||
|
||
} |
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.