public interface PrismParser
Modifier and Type | Interface and Description |
---|---|
static interface |
PrismParser.ObjectHandler |
Modifier and Type | Method and Description |
---|---|
PrismParser |
compat()
Switches the parser into "compatibility" (or relaxed) parsing mode.
|
PrismParser |
context(ParsingContext context)
Provides a parsing context for the parser.
|
PrismParser |
definition(ItemDefinition<?> itemDefinition)
Tells parser which definition to use when parsing item (or an item value).
|
PrismParser |
json()
Sets the language of the parser to be JSON.
|
PrismParser |
language(String language)
For string inputs: sets the data language that the parser will try to parse; null means auto-detect.
|
PrismParser |
name(QName itemName)
Tells parser what name to use for parsed item.
|
<O extends Objectable> |
parse()
Parses the input as a prism object.
|
<IV extends PrismValue,ID extends ItemDefinition> |
parseItem()
Parses the input as a prism item.
|
Object |
parseItemOrRealValue()
Deprecated.
|
<IV extends PrismValue> |
parseItemValue()
Parses the input as a prism value.
|
List<PrismObject<? extends Objectable>> |
parseObjects()
Parses the input as a collection of prism objects.
|
void |
parseObjectsIteratively(PrismParser.ObjectHandler handler)
Currently implemented for JSON/YAML only.
|
<T> T |
parseRealValue()
Parses a real value.
|
<T> T |
parseRealValue(Class<T> clazz)
Parses a real value - either property or container value.
|
<T> JAXBElement<T> |
parseRealValueToJaxbElement()
Parses a real value and stores it into JAXBElement, using item name derived in the usual way.
|
RootXNode |
parseToXNode()
Parses the input into RootXNode.
|
PrismParser |
strict()
Switches the parser into "strict" parsing mode.
|
PrismParser |
type(Class<?> typeClass)
Tells parser what data type to expect.
|
PrismParser |
type(QName typeName)
Tells parser what data type to expect.
|
PrismParser |
xml()
Sets the language of the parser to be XML.
|
PrismParser |
yaml()
Sets the language of the parser to be YAML.
|
@NotNull PrismParser language(@Nullable String language)
language
- The language@NotNull PrismParser xml()
@NotNull PrismParser json()
@NotNull PrismParser yaml()
@NotNull PrismParser context(@NotNull ParsingContext context)
context
- The parsing context.@NotNull PrismParser strict()
@NotNull PrismParser compat()
@NotNull PrismParser definition(ItemDefinition<?> itemDefinition)
itemDefinition
- The definition@NotNull PrismParser type(QName typeName)
typeName
- Data type to expect.@NotNull PrismParser type(Class<?> typeClass)
typeClass
- Data type to expect.@NotNull PrismParser name(QName itemName)
itemName
- Item name to use.@NotNull <O extends Objectable> PrismObject<O> parse() throws SchemaException, IOException
SchemaException
IOException
<IV extends PrismValue,ID extends ItemDefinition> Item<IV,ID> parseItem() throws SchemaException, IOException
SchemaException
IOException
<IV extends PrismValue> IV parseItemValue() throws SchemaException, IOException
SchemaException
IOException
<T> T parseRealValue(@Nullable Class<T> clazz) throws IOException, SchemaException
clazz
- Expected class of the data. May be null if unknown.IOException
SchemaException
<T> T parseRealValue() throws IOException, SchemaException
IOException
SchemaException
<T> JAXBElement<T> parseRealValueToJaxbElement() throws IOException, SchemaException
IOException
SchemaException
RootXNode parseToXNode() throws IOException, SchemaException
IOException
SchemaException
@Deprecated Object parseItemOrRealValue() throws IOException, SchemaException
IOException
SchemaException
@NotNull List<PrismObject<? extends Objectable>> parseObjects() throws SchemaException, IOException
SchemaException
IOException
void parseObjectsIteratively(@NotNull PrismParser.ObjectHandler handler) throws SchemaException, IOException
handler
- SchemaException
IOException
Copyright © 2019 Evolveum. All rights reserved.