Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add "real" value metadata into PrismValueImpl
Related to MID-6275.
- Loading branch information
Showing
12 changed files
with
249 additions
and
8 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
24 changes: 24 additions & 0 deletions
24
infra/prism-api/src/main/java/com/evolveum/midpoint/prism/metadata/ValueMetadataFactory.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,24 @@ | ||
/* | ||
* Copyright (c) 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.prism.metadata; | ||
|
||
import com.evolveum.midpoint.prism.ValueMetadata; | ||
import com.evolveum.midpoint.util.annotation.Experimental; | ||
|
||
import org.jetbrains.annotations.NotNull; | ||
|
||
/** | ||
* Provides empty value metadata. | ||
*/ | ||
@Experimental | ||
public interface ValueMetadataFactory { | ||
|
||
@NotNull | ||
ValueMetadata createEmpty(); | ||
|
||
} |
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
36 changes: 36 additions & 0 deletions
36
...ema/src/main/java/com/evolveum/midpoint/schema/metadata/MidpointValueMetadataFactory.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,36 @@ | ||
/* | ||
* Copyright (c) 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.schema.metadata; | ||
|
||
import com.evolveum.midpoint.prism.PrismContext; | ||
import com.evolveum.midpoint.prism.ValueMetadata; | ||
import com.evolveum.midpoint.prism.impl.metadata.ValueMetadataAdapter; | ||
import com.evolveum.midpoint.prism.metadata.ValueMetadataFactory; | ||
import com.evolveum.midpoint.util.annotation.Experimental; | ||
|
||
import com.evolveum.midpoint.xml.ns._public.common.common_3.ValueMetadataType; | ||
|
||
import org.jetbrains.annotations.NotNull; | ||
|
||
@Experimental | ||
public class MidpointValueMetadataFactory implements ValueMetadataFactory { | ||
|
||
@NotNull private final PrismContext prismContext; | ||
|
||
public MidpointValueMetadataFactory(@NotNull PrismContext prismContext) { | ||
this.prismContext = prismContext; | ||
} | ||
|
||
@Override | ||
@NotNull | ||
public ValueMetadata createEmpty() { | ||
return ValueMetadataAdapter.holding( | ||
new ValueMetadataType(prismContext) | ||
.asPrismContainerValue()); | ||
} | ||
} |
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.