Interface PrismContext

    • Method Detail

      • getSchemaRegistry

        @NotNull
        @NotNull SchemaRegistry getSchemaRegistry()
        Returns the schema registry.
      • getDefaultPolyStringNormalizer

        @NotNull
        @NotNull PolyStringNormalizer getDefaultPolyStringNormalizer()
        Returns the default PolyString normalizer.
      • getDefaultProtector

        Protector getDefaultProtector()
        Returns the default protector. (TODO)
      • getQueryConverter

        @NotNull
        @NotNull QueryConverter getQueryConverter()
      • parserFor

        @NotNull
        @NotNull PrismParser parserFor​(@NotNull
                                       @NotNull File file)
        Creates 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.
      • parserFor

        @NotNull
        @NotNull PrismParser parserFor​(@NotNull
                                       @NotNull InputStream stream)
        Creates 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.
      • parserFor

        @NotNull
        @NotNull PrismParserNoIO parserFor​(@NotNull
                                           @NotNull String data)
        Creates a parser ready to process data from the given string.
        Parameters:
        data - String with the data to be parsed. It has be in UTF-8 encoding. (For other encodings please use InputStream or File source.)
        Returns:
        Parser that can be invoked to retrieve the (parsed) content.
      • parserFor

        @NotNull
        @NotNull PrismParserNoIO parserFor​(@NotNull
                                           @NotNull RootXNode xnode)
        Creates 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.
      • parserFor

        @NotNull
        @NotNull PrismParserNoIO parserFor​(@NotNull
                                           @NotNull Element element)
        Creates 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.
      • setParsingMigrator

        void setParsingMigrator​(ParsingMigrator migrator)
      • serializerFor

        @NotNull
        @NotNull PrismSerializer<String> serializerFor​(@NotNull
                                                       @NotNull String language)
        Creates a serializer for the given language.
        Parameters:
        language - Language (like xml, json, yaml).
        Returns:
        The serializer.
      • xmlSerializer

        @NotNull
        @NotNull PrismSerializer<String> xmlSerializer()
        Creates a serializer for XML language.
        Returns:
        The serializer.
      • jsonSerializer

        @NotNull
        @NotNull PrismSerializer<String> jsonSerializer()
        Creates a serializer for JSON language.
        Returns:
        The serializer.
      • yamlSerializer

        @NotNull
        @NotNull PrismSerializer<String> yamlSerializer()
        Creates a serializer for YAML language.
        Returns:
        The serializer.
      • domSerializer

        @NotNull
        @NotNull PrismSerializer<Element> domSerializer()
        Creates 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.
      • xnodeSerializer

        @NotNull
        @NotNull PrismSerializer<RootXNode> xnodeSerializer()
        Creates a serializer for XNode. The output of this serializer is intermediate XNode representation.
        Returns:
        The serializer.
      • canSerialize

        boolean canSerialize​(Object value)
        TODO
        Parameters:
        value -
        Returns:
      • 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.
      • createKnownObjectable

        @NotNull
        <O extends Objectable> O createKnownObjectable​(@NotNull
                                                       @NotNull Class<O> clazz)
        Creates 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.
      • getDefaultRelation

        QName 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

        void setDefaultRelation​(QName name)
      • getObjectsElementName

        QName getObjectsElementName()
        If defined, marks the 'multiple objects' element.
      • getDefaultReferenceTypeName

        @Experimental
        QName getDefaultReferenceTypeName()
        Type 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

        boolean isDefaultRelation​(QName relation)
      • relationsEquivalent

        boolean relationsEquivalent​(QName relation1,
                                    QName relation2)
      • relationMatches

        boolean relationMatches​(QName relationQuery,
                                QName relation)
      • relationMatches

        boolean relationMatches​(@NotNull
                                @NotNull List<QName> relationQuery,
                                QName relation)
        Returns true of any of the relation in the relationQuery list matches specified relation.
      • createParsingContextForAllowMissingRefTypes

        ParsingContext createParsingContextForAllowMissingRefTypes()
      • createParsingContextForCompatibilityMode

        ParsingContext createParsingContextForCompatibilityMode()
      • deltaFactory

        @NotNull
        @NotNull DeltaFactory deltaFactory()
        Access 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.
      • queryFactory

        @NotNull
        @NotNull QueryFactory queryFactory()
        Access 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

        @NotNull
        @NotNull ItemFactory itemFactory()
      • setExtraValidation

        @Experimental
        void setExtraValidation​(boolean value)