Class PrismSerializerImpl<T>
java.lang.Object
com.evolveum.midpoint.prism.impl.marshaller.PrismSerializerImpl<T>
- All Implemented Interfaces:
PrismSerializer<T>
-
Constructor Summary
ConstructorsConstructorDescriptionPrismSerializerImpl(@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:PrismSerializerSets the context for the serialization operation, containing e.g. serialization options.- Specified by:
contextin interfacePrismSerializer<T>- Parameters:
context- Context to be set.- Returns:
- Serializer with the context set.
-
root
Description copied from interface:PrismSerializerSets the name of the root element. Can be done either here or during call to serialize(..) methods.- Specified by:
rootin interfacePrismSerializer<T>- Parameters:
elementName- Name of the root element- Returns:
- Serializer with the root element name set.
-
definition
Description copied from interface:PrismSerializerSets the item definition to be used during serialization. (Not much used.)- Specified by:
definitionin interfacePrismSerializer<T>- Parameters:
itemDefinition- Definition to be used.- Returns:
- Serializer with the definition set.
-
options
Description copied from interface:PrismSerializerSets the serialization options (part of the context).- Specified by:
optionsin interfacePrismSerializer<T>- Parameters:
options- Options to be set.- Returns:
- Serializer with the options set.
-
itemsToSkip
Description copied from interface:PrismSerializerThese items will be skipped during serialization. If present, their original presence is indicated by the "incomplete" flag.- Specified by:
itemsToSkipin interfacePrismSerializer<T>- Parameters:
itemsToSkip- Paths of items to be skipped.- Returns:
- Serializer with the items to be skipped set.
-
serialize
Description copied from interface:PrismSerializerSerializes given prism item.- Specified by:
serializein 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:PrismSerializerSerializes 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:
serializein 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:PrismSerializerSerializes given prism value (property, reference, or container).- Specified by:
serializein 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:
serializein interfacePrismSerializer<T>- Throws:
SchemaException
-
serializeObjects
@NotNull public T serializeObjects(@NotNull @NotNull List<PrismObject<?>> objects) throws SchemaException - Specified by:
serializeObjectsin interfacePrismSerializer<T>- Throws:
SchemaException
-
serializeRealValue
- Specified by:
serializeRealValuein interfacePrismSerializer<T>- Throws:
SchemaException
-
serializeRealValue
- Specified by:
serializeRealValuein interfacePrismSerializer<T>- Throws:
SchemaException
-
serialize
- Specified by:
serializein interfacePrismSerializer<T>- Throws:
SchemaException
-
serializeAnyData
- Specified by:
serializeAnyDatain interfacePrismSerializer<T>- Throws:
SchemaException
-
serializeAnyData
- Specified by:
serializeAnyDatain interfacePrismSerializer<T>- Throws:
SchemaException
-