Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make ModelContext really serializable (MID-6890)
While ModelContext was declared serializable, many of its constituents were, in fact, not. So this commit makes a lot of types/classes really serializable: - AbstractConstruction and its subclasses - EvaluatedAbstractConstruction and its subclasses - EvaluatedResourceObjectConstruction and its subtypes - EvaluatedAssignment - EvaluatedAssignmentTarget - AssignmentPath - AssignmentPathSegment - EvaluationOrder - AssignmentOrigin - AssignmentPathVariables - FocalMappingEvaluationRequest and its subclasses - ExpressionEvaluatorProfile - ExpressionPermissionProfile - ScriptExpressionProfile - ExpressionProfile - ItemDeltaItem and subclasses - Mapping, MappingParser, ConditionState, TimeConstraintsEvaluation In order to do this: - ModelBeans are now reachable via static ModelBeans.get() call, - SchemaService is now reachable via static SchemaService.get() call, - PrismContext is now reachable via static PrismContext.get() call. BEHAVIOR CHANGE: - Mapping state now can contain only serializable values.
- Loading branch information
Showing
62 changed files
with
505 additions
and
257 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
33 changes: 33 additions & 0 deletions
33
infra/prism-api/src/main/java/com/evolveum/midpoint/prism/PrismService.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,33 @@ | ||
/* | ||
* Copyright (C) 2010-2021 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.prism; | ||
|
||
/** | ||
* Statically holds an instance of PrismContext (and maybe other beans later). | ||
*/ | ||
public class PrismService { | ||
|
||
private static final PrismService INSTANCE = new PrismService(); | ||
|
||
private static PrismContext prismContext; | ||
|
||
private PrismService() { | ||
} | ||
|
||
public static PrismService get() { | ||
return INSTANCE; | ||
} | ||
|
||
public PrismContext prismContext() { | ||
return prismContext; | ||
} | ||
|
||
public void prismContext(PrismContext prismContext) { | ||
PrismService.prismContext = prismContext; | ||
} | ||
} |
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
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
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.