Interface PrismValue

    • Method Detail

      • setPrismContext

        void setPrismContext​(PrismContext prismContext)
      • getUserData

        Object getUserData​(@NotNull
                           @NotNull String key)
      • setUserData

        void setUserData​(@NotNull
                         @NotNull String key,
                         Object value)
      • setParent

        void setParent​(Itemable parent)
      • getValueMetadata

        @Experimental
        @NotNull
        @NotNull ValueMetadata getValueMetadata()
        Maybe it is better to expect empty value metadata if these are absent. Client code would be simpler. HIGHLY EXPERIMENTAL.
      • getValueMetadataAsContainer

        @Experimental
        @NotNull
        default <C extends Containerable> @NotNull PrismContainer<C> getValueMetadataAsContainer()
        Returns value metadata as typed PrismContainer. Useful for lazy clients because of the type matching.
      • hasValueMetadata

        boolean hasValueMetadata()
        Returns:
        True if this value has any metadata (i.e. the metadata container has any value). TODO Or should we accept only non-empty values? Probably not.
      • getPath

        @NotNull
        @NotNull ItemPath getPath()
      • clearParent

        void clearParent()
        Used when we are removing the value from the previous parent. Or when we know that the previous parent will be discarded and we want to avoid unnecessary cloning.
      • recompute

        void recompute()
        Recompute the value or otherwise "initialize" it before adding it to a prism tree. This may as well do nothing if no recomputing or initialization is needed.
      • checkConsistenceInternal

        void checkConsistenceInternal​(Itemable rootItem,
                                      boolean requireDefinitions,
                                      boolean prohibitRaw,
                                      ConsistencyCheckScope scope)
      • representsSameValue

        boolean representsSameValue​(PrismValue other,
                                    boolean lax)
        Returns true if this and other value represent the same value. E.g. if they have the same IDs, OIDs or it is otherwise know that they "belong together" without a deep examination of the values.
        Parameters:
        lax - If we can reasonably assume that the two values belong together even if they don't have the same ID, e.g. if they both belong to single-valued parent items. This is useful e.g. when comparing multi-valued containers. But can cause problems when we want to be sure we are removing the correct value.
      • normalize

        void normalize()
        Currently doing nothing.
      • createImmutableClone

        PrismValue createImmutableClone()
      • getRealClass

        @Nullable
        @Nullable Class<?> getRealClass()
      • getRealValue

        @Nullable
        <T> T getRealValue()
        Returns the statically-typed "real value". TODO specify when exactly the returned value can be null. TODO decide for containers: they throw an exception if the value is not statically typed.
      • getTypeName

        QName getTypeName()
      • isRaw

        boolean isRaw()
      • isEmpty

        boolean isEmpty()
      • toHumanReadableString

        String toHumanReadableString()
      • isTransient

        @Experimental
        boolean isTransient()
        Returns:
        True if the value is transient, so it won't be serialized if serialization of transient value is disabled.
      • setTransient

        @Experimental
        void setTransient​(boolean value)