Package com.evolveum.midpoint.prism
Interface PrismContext
- All Superinterfaces:
- ProtectorCreator
- All Known Implementing Classes:
- PrismContextImpl
- Author:
- semancik
- 
Field SummaryFields
- 
Method SummaryModifier and TypeMethodDescriptionvoidadopt(Containerable containerable) <T extends Objectable>
 voidadopt(ObjectDelta<T> delta) voidadopt(Objectable objectable) <C extends Containerable>
 voidadopt(PrismContainer<C> object, Class<C> declaredType) <T extends Containerable>
 voidadopt(PrismContainer<T> object) voidadopt(PrismContainerValue<?> value) <C extends Containerable,O extends Objectable> 
 voidadopt(PrismContainerValue<C> prismContainerValue, Class<O> type, ItemPath path) <C extends Containerable>
 voidadopt(PrismContainerValue<C> prismContainerValue, QName typeName, ItemPath path) <C extends Containerable,O extends Objectable> 
 voidvoidcreateCanonicalItemPath(ItemPath itemPath) TemporarycreateCanonicalItemPath(ItemPath itemPath, QName objectType) Temporary@NotNull PolyStringNormalizerCreates a configured poly string normalizer for the use by the client.<O extends Objectable>
 @NotNull PrismObject<O>createKnownObject(@NotNull Class<O> clazz) Creates a new PrismObject of a given static type.<O extends Objectable>
 OcreateKnownObjectable(@NotNull Class<O> clazz) Creates a new Objectable of a given static type.<O extends Objectable>
 @NotNull PrismObject<O>createObject(@NotNull Class<O> clazz) Creates a new PrismObject of a given type.<O extends Objectable>
 OcreateObjectable(@NotNull Class<O> clazz) Creates a new Objectable of a given type.default PrismQueryLanguageParsercreateQueryParser(Map<String, String> prefixToNamespace) @NotNull DefinitionFactory@NotNull DeltaFactoryAccess point to the "old" way of creating deltas.<C extends Containerable>
 S_ItemEntryStarts a delta builder, with the default item definition resolution (i.e.<C extends Containerable>
 S_ItemEntrydeltaFor(Class<C> objectClass, ItemDefinitionResolver itemDefinitionResolver) Starts a delta builder, with a custom item definition resolver (e.g.@NotNull StringdetectLanguage(@NotNull File file) @NotNull PrismSerializer<Element>Creates a serializer for DOM.static PrismContextget()@NotNull PolyStringNormalizerReturns the default PolyString normalizer.Returns the default protector.Define default reference target type for cases, when missing it in schema for reference item.Type name for serialization of Referencable that's not of XML type (e.g.If defined, it is considered to be the same as the relation of 'null'.If defined, marks the 'multiple objects' element.@NotNull QueryConverter@NotNull SchemaRegistryReturns the schema registry.hacks()voidInitializes the prism context, e.g.booleanisDefaultRelation(QName relation) @NotNull ItemFactory@NotNull ItemPathParser@NotNull ItemPathSerializer@NotNull PrismSerializer<String>Creates a serializer for JSON language.default <T extends Objectable>
 PrismObject<T>parseObject(File file) default <T extends Objectable>
 PrismObject<T>parseObject(String dataString) @NotNull PrismParserNoIOCreates a parser ready to process data from the given XNode tree.@NotNull PrismParserCreates a parser ready to process the given file.@NotNull PrismParserparserFor(@NotNull InputStream stream) Creates a parser ready to process data from the given input stream.@NotNull PrismParserNoIOCreates a parser ready to process data from the given string.@NotNull PrismParserNoIOCreates a parser ready to process data from the given DOM element.@NotNull QueryFactoryAccess point to the "old" way of creating queries, filters and paging instructions.queryFor(Class<? extends Containerable> type) Starts a query builder with the goal of creating a query targeted at given object or container type.queryFor(Class<? extends Containerable> type, ItemDefinitionResolver itemDefinitionResolver) Starts a query builder, with a custom item definition resolver (e.g.queryForReferenceOwnedBy(Class<? extends Containerable> ownerClass, ItemPath referencePath) Starts a query builder for reference search, with the default item definition resolution (i.e.voidvoidbooleanrelationMatches(@NotNull List<QName> relationQuery, QName relation) Returns true of any of the relation in the relationQuery list matches specified relation.booleanrelationMatches(QName relationQuery, QName relation) booleanrelationsEquivalent(QName relation1, QName relation2) @NotNull SchemaFactory@NotNull PrismSerializer<String>serializerFor(@NotNull String language) Creates a serializer for the given language.voidsetDefaultRelation(QName name) voidsetExtensionContainerTypeName(QName typeName) voidsetExtraValidation(boolean value) voidsetMonitor(PrismMonitor monitor) voidsetParsingMigrator(ParsingMigrator migrator) voiddefault ItemPathtoPath(ItemPathType path) @NotNull UniformItemPathtoUniformPath(ItemPath path) TemporarytoUniformPath(ItemPathType path) @Nullable UniformItemPathvalueBasedDefinitionLookupsForType(QName typeName) @NotNull PrismSerializer<String>Creates a serializer for XML language.@NotNull PrismSerializer<RootXNode>Creates a serializer for XNode.@NotNull PrismSerializer<String>Creates a serializer for YAML language.Methods inherited from interface com.evolveum.midpoint.prism.crypto.ProtectorCreatorcreateInitializedProtector, createProtector
- 
Field Details- 
LANG_XML- See Also:
 
- 
LANG_JSON- See Also:
 
- 
LANG_YAML- See Also:
 
 
- 
- 
Method Details- 
initializeInitializes the prism context, e.g. loads and parses all the schemas.- Throws:
- SchemaException
- SAXException
- IOException
 
- 
configurePolyStringNormalizervoid configurePolyStringNormalizer(PolyStringNormalizerConfigurationType configuration) throws ClassNotFoundException, InstantiationException, IllegalAccessException 
- 
createConfiguredPolyStringNormalizer@NotNull @NotNull PolyStringNormalizer createConfiguredPolyStringNormalizer(PolyStringNormalizerConfigurationType configuration) throws InstantiationException, IllegalAccessException, ClassNotFoundException Creates a configured poly string normalizer for the use by the client. Does not set anything inPrismContext.
- 
getSchemaRegistryReturns the schema registry.
- 
getDefaultPolyStringNormalizerReturns the default PolyString normalizer.
- 
getDefaultProtectorProtector getDefaultProtector()Returns the default protector.
- 
getQueryConverter
- 
parserForCreates a parser ready to process the given file.- Parameters:
- file- File to be parsed.
- Returns:
- Parser that can be invoked to retrieve the (parsed) content of the file.
 
- 
parserForCreates a parser ready to process data from the given input stream.- Parameters:
- stream- Input stream to be parsed.
- Returns:
- Parser that can be invoked to retrieve the (parsed) content of the input stream.
 
- 
parserForCreates a parser ready to process data from the given string. Format/language of the data will be auto-detected, so the typically followingPrismParser.language(String)can be omitted.- Parameters:
- data- String with the data to be parsed.
- Returns:
- Parser that can be invoked to retrieve the (parsed) content.
 
- 
parserForCreates a parser ready to process data from the given XNode tree.- Parameters:
- xnode- XNode tree with the data to be parsed.
- Returns:
- Parser that can be invoked to retrieve the (parsed) content.
 
- 
parserForCreates a parser ready to process data from the given DOM element.- Parameters:
- element- Element with the data to be parsed.
- Returns:
- Parser that can be invoked to retrieve the (parsed) content.
 
- 
detectLanguage- Throws:
- IOException
 
- 
parseObjectdefault <T extends Objectable> PrismObject<T> parseObject(File file) throws SchemaException, IOException - Throws:
- SchemaException
- IOException
 
- 
parseObject- Throws:
- SchemaException
 
- 
getParsingMigratorParsingMigrator getParsingMigrator()
- 
setParsingMigrator
- 
adopt<C extends Containerable> void adopt(PrismContainer<C> object, Class<C> declaredType) throws SchemaException - Throws:
- SchemaException
 
- 
adopt- Throws:
- SchemaException
 
- 
adopt- Throws:
- SchemaException
 
- 
adopt- Throws:
- SchemaException
 
- 
adopt- Throws:
- SchemaException
 
- 
adopt- Throws:
- SchemaException
 
- 
adopt<C extends Containerable,O extends Objectable> void adopt(C containerable, Class<O> type, ItemPath path) throws SchemaException - Throws:
- SchemaException
 
- 
adopt<C extends Containerable,O extends Objectable> void adopt(PrismContainerValue<C> prismContainerValue, Class<O> type, ItemPath path) throws SchemaException - Throws:
- SchemaException
 
- 
adopt<C extends Containerable> void adopt(PrismContainerValue<C> prismContainerValue, QName typeName, ItemPath path) throws SchemaException - Throws:
- SchemaException
 
- 
serializerForCreates a serializer for the given language.- Parameters:
- language- Language (like xml, json, yaml).
- Returns:
- The serializer.
 
- 
xmlSerializerCreates a serializer for XML language.- Returns:
- The serializer.
 
- 
jsonSerializerCreates a serializer for JSON language.- Returns:
- The serializer.
 
- 
yamlSerializerCreates a serializer for YAML language.- Returns:
- The serializer.
 
- 
domSerializerCreates a serializer for DOM. The difference from XML serializer is that XML produces String output whereas this one produces a DOM Element.- Returns:
- The serializer.
 
- 
xnodeSerializerCreates a serializer for XNode. The output of this serializer is intermediate XNode representation.- Returns:
- The serializer.
 
- 
createObject@NotNull <O extends Objectable> @NotNull PrismObject<O> createObject(@NotNull @NotNull Class<O> clazz) throws SchemaException Creates a new PrismObject of a given type.- Parameters:
- clazz- Static type of the object to be created.
- Returns:
- New PrismObject.
- Throws:
- SchemaException- If a definition for the given class couldn't be found.
 
- 
createObjectable@NotNull <O extends Objectable> O createObjectable(@NotNull @NotNull Class<O> clazz) throws SchemaException Creates a new Objectable of a given type.- Parameters:
- clazz- Static type of the object to be created.
- Returns:
- New PrismObject's objectable content.
- Throws:
- SchemaException- If a definition for the given class couldn't be found.
 
- 
createKnownObject@NotNull <O extends Objectable> @NotNull PrismObject<O> createKnownObject(@NotNull @NotNull Class<O> clazz) Creates a new PrismObject of a given static type. It is expected that the type exists, so any SchemaExceptions will be thrown as run-time exception.- Parameters:
- clazz- Static type of the object to be created.
- Returns:
- New PrismObject.
 
- 
createKnownObjectableCreates a new Objectable of a given static type. It is expected that the type exists, so any SchemaExceptions will be thrown as run-time exception.- Parameters:
- clazz- Static type of the object to be created.
- Returns:
- New PrismObject's objectable content.
 
- 
getMonitorPrismMonitor getMonitor()
- 
setMonitor
- 
getDefaultRelationQName getDefaultRelation()If defined, it is considered to be the same as the relation of 'null'. Currently in midPoint, it is the value of org:default.
- 
setDefaultRelation
- 
getObjectsElementNameQName getObjectsElementName()If defined, marks the 'multiple objects' element.
- 
getDefaultReferenceTypeNameType name for serialization of Referencable that's not of XML type (e.g. DefaultReferencableImpl). In midPoint it's c:ObjectReferenceType.VERY EXPERIMENTAL. Maybe we should simply use t:ObjectReferenceType in such cases. 
- 
isDefaultRelation
- 
getDefaultReferenceTargetTypeQName getDefaultReferenceTargetType()Define default reference target type for cases, when missing it in schema for reference item.
- 
relationsEquivalent
- 
relationMatches
- 
relationMatchesReturns true of any of the relation in the relationQuery list matches specified relation.
- 
getExtensionContainerTypeName- Returns:
- Name of the generic type for object/container extension (e.g. c:ExtensionType).
 
- 
setExtensionContainerTypeName
- 
getDefaultParsingContextParsingContext getDefaultParsingContext()
- 
createParsingContextForAllowMissingRefTypesParsingContext createParsingContextForAllowMissingRefTypes()
- 
createParsingContextForCompatibilityModeParsingContext createParsingContextForCompatibilityMode()
- 
emptyPathUniformItemPath emptyPath()
- 
path
- 
hacksHacks hacks()
- 
xnodeFactoryXNodeFactory xnodeFactory()
- 
xnodeMutatorXNodeMutator xnodeMutator()
- 
toUniformPathTemporary
- 
toUniformPathKeepNull
- 
toUniformPath
- 
toPath
- 
createCanonicalItemPathTemporary
- 
createCanonicalItemPathTemporary
- 
deltaForStarts a delta builder, with the default item definition resolution (i.e. from the system-wide schema).- Throws:
- SchemaException
 
- 
deltaFor<C extends Containerable> S_ItemEntry deltaFor(Class<C> objectClass, ItemDefinitionResolver itemDefinitionResolver) throws SchemaException Starts a delta builder, with a custom item definition resolver (e.g. for resource-specific deltas). Usually not called directly from a general client code.- Throws:
- SchemaException
 
- 
queryForStarts a query builder with the goal of creating a query targeted at given object or container type. The resolution of items (properties, references, containers) used in the query formulation is done by the default process, i.e. from the system-wide schema.- Parameters:
- type- The type of object or container values queried. This information is used to resolve the definitions of items used in query formulation. It is _not_ meant to restrict the objects returned when the query is eventually applied. If you want to restrict the type of objects returned right in the query (and not just when making e.g. the `searchObjects` call), please consider using- S_FilterEntry.type(Class)or- S_FilterEntry.type(QName).
 
- 
queryForS_FilterEntryOrEmpty queryFor(Class<? extends Containerable> type, ItemDefinitionResolver itemDefinitionResolver) Starts a query builder, with a custom item definition resolver (e.g. for resource-specific queries). Usually not called directly from a general client code.- See Also:
 
- 
queryForReferenceOwnedByS_FilterEntryOrEmpty queryForReferenceOwnedBy(Class<? extends Containerable> ownerClass, ItemPath referencePath) Starts a query builder for reference search, with the default item definition resolution (i.e. from the system-wide schema). After this call the mandatory owned-by filter based on the provided parameters is initiated. The next step can be: * writing a filter (e.g. item+condition call) which will be interpreted as a nested owner filter; * starting a block, which will, again, specify the nested owner filter; * continuing with other filter using and/or (which finishes the owned-by filter) - unless a logical filter, the next filter should be a ref filter; * or callingS_QueryExit.build()to finish the query builder.
- 
deltaFactoryAccess point to the "old" way of creating deltas. It is generally considered deprecated. DeltaBuilder (accessed via deltaFor method) should be used instead.However, because there is some functionality (like creation of empty deltas) that is not covered by the delta builder, we keep this method not marked as deprecated. Only particular parts of DeltaFactory are marked as deprecated. 
- 
queryFactoryAccess point to the "old" way of creating queries, filters and paging instructions. It is generally considered deprecated. QueryBuilder (accessed via queryFor method) should be used instead.However, because there is some functionality (like creation of standalone paging instructions) that is not covered by the query builder, we keep this method not marked as deprecated. Only particular parts of QueryFactory are marked as deprecated. 
- 
itemFactory
- 
definitionFactory
- 
itemPathParser
- 
itemPathSerializer
- 
setExtraValidation
- 
schemaFactory
- 
setValueMetadataFactory
- 
getValueMetadataFactory
- 
getProvenanceEquivalenceStrategy
- 
createQueryParser- Returns:
- Prism Query Language Parser with static default namespaces declared
 
- 
registerQueryExpressionFactory
- 
registerValueBasedDefinitionLookup
- 
valueBasedDefinitionLookupsForType@Experimental Collection<ValueBasedDefinitionLookupHelper> valueBasedDefinitionLookupsForType(QName typeName) 
- 
createQueryParser
- 
querySerializerPrismQuerySerializer querySerializer()
- 
get
 
-