Class PrismSerializerImpl<T>
java.lang.Object
com.evolveum.midpoint.prism.impl.marshaller.PrismSerializerImpl<T>
- All Implemented Interfaces:
PrismSerializer<T>
-
Constructor Summary
ConstructorDescriptionPrismSerializerImpl
(@NotNull SerializerTarget<T> target, QName itemName, ItemDefinition<?> itemDefinition, SerializationContext context, @NotNull PrismContextImpl prismContext, PathSet itemsToSkip) -
Method Summary
Modifier and TypeMethodDescription@NotNull PrismSerializerImpl<T>
context
(SerializationContext context) Sets the context for the serialization operation, containing e.g. serialization options.@NotNull PrismSerializer<T>
definition
(ItemDefinition itemDefinition) Sets the item definition to be used during serialization.@NotNull PrismSerializer<T>
itemsToSkip
(PathSet itemsToSkip) These items will be skipped during serialization.@NotNull PrismSerializerImpl<T>
options
(SerializationOptions options) Sets the serialization options (part of the context).@NotNull PrismSerializerImpl<T>
Sets the name of the root element.Serializes given prism item.serialize
(@NotNull PrismValue value) Serializes given prism value (property, reference, or container).serialize
(@NotNull PrismValue value, QName itemName) Serializes given prism value (property, reference, or container).serialize
(jakarta.xml.bind.JAXBElement<?> value) serializeAnyData
(Object value) serializeAnyData
(Object value, QName itemName) serializeObjects
(@NotNull List<PrismObject<?>> objects) serializeRealValue
(Object realValue) serializeRealValue
(Object realValue, QName itemName)
-
Constructor Details
-
PrismSerializerImpl
public PrismSerializerImpl(@NotNull @NotNull SerializerTarget<T> target, QName itemName, ItemDefinition<?> itemDefinition, SerializationContext context, @NotNull @NotNull PrismContextImpl prismContext, PathSet itemsToSkip)
-
-
Method Details
-
context
Description copied from interface:PrismSerializer
Sets the context for the serialization operation, containing e.g. serialization options.- Specified by:
context
in interfacePrismSerializer<T>
- Parameters:
context
- Context to be set.- Returns:
- Serializer with the context set.
-
root
Description copied from interface:PrismSerializer
Sets the name of the root element. Can be done either here or during call to serialize(..) methods.- Specified by:
root
in interfacePrismSerializer<T>
- Parameters:
elementName
- Name of the root element- Returns:
- Serializer with the root element name set.
-
definition
Description copied from interface:PrismSerializer
Sets the item definition to be used during serialization. (Not much used.)- Specified by:
definition
in interfacePrismSerializer<T>
- Parameters:
itemDefinition
- Definition to be used.- Returns:
- Serializer with the definition set.
-
options
Description copied from interface:PrismSerializer
Sets the serialization options (part of the context).- Specified by:
options
in interfacePrismSerializer<T>
- Parameters:
options
- Options to be set.- Returns:
- Serializer with the options set.
-
itemsToSkip
Description copied from interface:PrismSerializer
These items will be skipped during serialization. If present, their original presence is indicated by the "incomplete" flag.- Specified by:
itemsToSkip
in interfacePrismSerializer<T>
- Parameters:
itemsToSkip
- Paths of items to be skipped.- Returns:
- Serializer with the items to be skipped set.
-
serialize
Description copied from interface:PrismSerializer
Serializes given prism item.- Specified by:
serialize
in interfacePrismSerializer<T>
- Parameters:
item
- Item to be serialized.- Returns:
- String/RootXNode representation of the item.
- Throws:
SchemaException
-
serialize
@NotNull public T serialize(@NotNull @NotNull Item<?, ?> item, QName itemName) throws SchemaException- Throws:
SchemaException
-
serialize
Description copied from interface:PrismSerializer
Serializes given prism value (property, reference, or container). Name of the root element is derived in the following way: 1. if explicit name is set (- Specified by:
serialize
in interfacePrismSerializer<T>
- Parameters:
value
- Value to be serialized.- Returns:
- String/RootXNode representation of the value.
- Throws:
SchemaException
-
serialize
@NotNull public T serialize(@NotNull @NotNull PrismValue value, QName itemName) throws SchemaException Description copied from interface:PrismSerializer
Serializes given prism value (property, reference, or container).- Specified by:
serialize
in interfacePrismSerializer<T>
- Parameters:
value
- Value to be serialized.itemName
- Name of the root element. (Overrides other means of deriving the name.)- Returns:
- String/RootXNode representation of the value.
- Throws:
SchemaException
-
serialize
- Specified by:
serialize
in interfacePrismSerializer<T>
- Throws:
SchemaException
-
serializeObjects
@NotNull public T serializeObjects(@NotNull @NotNull List<PrismObject<?>> objects) throws SchemaException - Specified by:
serializeObjects
in interfacePrismSerializer<T>
- Throws:
SchemaException
-
serializeRealValue
- Specified by:
serializeRealValue
in interfacePrismSerializer<T>
- Throws:
SchemaException
-
serializeRealValue
- Specified by:
serializeRealValue
in interfacePrismSerializer<T>
- Throws:
SchemaException
-
serialize
- Specified by:
serialize
in interfacePrismSerializer<T>
- Throws:
SchemaException
-
serializeAnyData
- Specified by:
serializeAnyData
in interfacePrismSerializer<T>
- Throws:
SchemaException
-
serializeAnyData
- Specified by:
serializeAnyData
in interfacePrismSerializer<T>
- Throws:
SchemaException
-