Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
It was split into ShadowAcquisitionHelper and ShadowedObjectConstructionHelper. These are more aligned with the other components names.
- Loading branch information
Showing
8 changed files
with
110 additions
and
90 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
93 changes: 47 additions & 46 deletions
93
...sioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/shadows/GetHelper.java
Large diffs are not rendered by default.
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
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
45 changes: 45 additions & 0 deletions
45
...ava/com/evolveum/midpoint/provisioning/impl/shadows/ShadowedObjectConstructionHelper.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,45 @@ | ||
package com.evolveum.midpoint.provisioning.impl.shadows; | ||
|
||
import org.jetbrains.annotations.NotNull; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.stereotype.Component; | ||
|
||
import com.evolveum.midpoint.prism.PrismObject; | ||
import com.evolveum.midpoint.prism.crypto.EncryptionException; | ||
import com.evolveum.midpoint.provisioning.api.GenericConnectorException; | ||
import com.evolveum.midpoint.provisioning.impl.CommonBeans; | ||
import com.evolveum.midpoint.provisioning.impl.ProvisioningContext; | ||
import com.evolveum.midpoint.schema.result.OperationResult; | ||
import com.evolveum.midpoint.util.annotation.Experimental; | ||
import com.evolveum.midpoint.util.exception.*; | ||
import com.evolveum.midpoint.xml.ns._public.common.common_3.ShadowType; | ||
|
||
/** | ||
* Helps with the fetched resource object shadowing process (acquiring repo shadows, shadowed object construction). | ||
* | ||
* Currently it delegates these activities to dedicated classes: {@link ShadowAcquisition}, {@link ShadowedObjectConstruction}. | ||
*/ | ||
@Experimental | ||
@Component | ||
class ShadowedObjectConstructionHelper { | ||
|
||
@Autowired private CommonBeans commonBeans; | ||
|
||
/** | ||
* TODO improve the description | ||
* TODO devise better name ... like constructAdoptedObject? dunno... | ||
* | ||
* Make sure that the repo shadow is complete, e.g. that all the mandatory fields | ||
* are filled (e.g name, resourceRef, ...) Also transforms the shadow with | ||
* respect to simulated capabilities. Also shadowRefs are added to associations. | ||
*/ | ||
@NotNull PrismObject<ShadowType> constructShadowedObject(@NotNull ProvisioningContext ctx, | ||
@NotNull PrismObject<ShadowType> repoShadow, @NotNull PrismObject<ShadowType> resourceObject, | ||
@NotNull OperationResult result) | ||
throws SchemaException, ConfigurationException, ObjectNotFoundException, CommunicationException, | ||
SecurityViolationException, GenericConnectorException, ExpressionEvaluationException, EncryptionException { | ||
|
||
return ShadowedObjectConstruction.create(ctx, repoShadow, resourceObject, commonBeans) | ||
.construct(result); | ||
} | ||
} |
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