Class ItemDefinitionImpl<I extends Item<?,​?>>

    • Field Detail

      • itemName

        @NotNull
        protected @NotNull ItemName itemName
      • substitutionHead

        protected QName substitutionHead
      • heterogeneousListItem

        protected boolean heterogeneousListItem
    • Method Detail

      • useSerializationProxy

        protected static boolean useSerializationProxy​(boolean localEnabled)
      • getItemName

        @NotNull
        public @NotNull ItemName getItemName()
        Returns name of the defined entity. The name is a name of the entity instance if it is fixed by the schema. E.g. it may be a name of the property in the container that cannot be changed. The name corresponds to the XML element name in the XML representation of the schema. It does NOT correspond to a XSD type name. Name is optional. If name is not set the null value is returned. If name is not set the type is "abstract", does not correspond to the element.
        Specified by:
        getItemName in interface ItemDefinition<I extends Item<?,​?>>
        Returns:
        the name name of the entity or null.
      • getMaxOccurs

        public int getMaxOccurs()
        Description copied from interface: ItemDefinition
        Return the number of maximal value occurrences. Any negative number means "unbounded".
        Specified by:
        getMaxOccurs in interface ItemDefinition<I extends Item<?,​?>>
      • isOperational

        public boolean isOperational()
        Description copied from interface: ItemDefinition
        Marks operational item. Operational properties are auxiliary data (or meta-data) that are usually not modifiable by the end user. They are generated and maintained by the system. Operational items are also not usually displayed unless it is explicitly requested. The example of operational items are modification timestamps, create timestamps, user that made the last change, etc. They are also treated in a special way when comparing values. See ParameterizedEquivalenceStrategy.
        Specified by:
        isOperational in interface ItemDefinition<I extends Item<?,​?>>
      • isDynamic

        public boolean isDynamic()
        Description copied from interface: ItemDefinition
        Returns true if definition was created during the runtime based on a dynamic information such as xsi:type attributes in XML. This means that the definition needs to be stored alongside the data to have a successful serialization "roundtrip". The definition is not part of any schema and therefore cannot be determined. It may even be different for every instance of the associated item (element name).
        Specified by:
        isDynamic in interface ItemDefinition<I extends Item<?,​?>>
      • canRead

        public boolean canRead()
        Returns true if the property can be read. I.e. if it is returned in objects retrieved from "get", "search" and similar operations.
        Specified by:
        canRead in interface PrismItemAccessDefinition
      • canModify

        public boolean canModify()
        Returns true if the item can be modified. I.e. if it can be changed during a modification of existing object.
        Specified by:
        canModify in interface PrismItemAccessDefinition
      • canAdd

        public boolean canAdd()
        Returns true if the item can be added. I.e. if it can be present in the object when a new object is created.
        Specified by:
        canAdd in interface PrismItemAccessDefinition
      • getSubstitutionHead

        public QName getSubstitutionHead()
        Description copied from interface: ItemDefinition
        Returns the name of an element this one can be substituted for (e.g. c:user -> c:object, s:pipeline -> s:expression, etc). EXPERIMENTAL
        Specified by:
        getSubstitutionHead in interface ItemDefinition<I extends Item<?,​?>>
      • getValueEnumerationRef

        public PrismReferenceValue getValueEnumerationRef()
        Description copied from interface: ItemDefinition
        Reference to an object that directly or indirectly represents possible values for this item. We do not define here what exactly the object has to be. It can be a lookup table, script that dynamically produces the values or anything similar. The object must produce the values of the correct type for this item otherwise an error occurs.
        Specified by:
        getValueEnumerationRef in interface ItemDefinition<I extends Item<?,​?>>
      • isValidFor

        public boolean isValidFor​(@NotNull
                                  @NotNull QName elementQName,
                                  @NotNull
                                  @NotNull Class<? extends ItemDefinition<?>> clazz,
                                  boolean caseInsensitive)
        Description copied from interface: ItemDefinition
        Returns true if this definition is valid for given element name and definition class, in either case-sensitive (the default) or case-insensitive way. Used e.g. for "slow" path lookup where we iterate over all definitions in a complex type.
        Specified by:
        isValidFor in interface ItemDefinition<I extends Item<?,​?>>
      • adoptElementDefinitionFrom

        public void adoptElementDefinitionFrom​(ItemDefinition<?> otherDef)
        Description copied from interface: ItemDefinition
        Transfers selected parts of the definition (currently item name, min/max occurs) from another definition. TODO used only on few places, consider removing
        Specified by:
        adoptElementDefinitionFrom in interface ItemDefinition<I extends Item<?,​?>>
      • findItemDefinition

        public <T extends ItemDefinition<?>> T findItemDefinition​(@NotNull
                                                                  @NotNull ItemPath path,
                                                                  @NotNull
                                                                  @NotNull Class<T> clazz)
        Description copied from interface: ItemDefinition
        Used to find a matching item definition _within_ this definition. Treats e.g. de-referencing in prism references.
        Specified by:
        findItemDefinition in interface ItemDefinition<I extends Item<?,​?>>
      • copyDefinitionDataFrom

        protected void copyDefinitionDataFrom​(ItemDefinition<I> source)
      • revive

        public void revive​(PrismContext prismContext)
        Description copied from interface: Revivable
        TODO: Is revive necessary if prism context is static? TODO document (if it's found to be necessary)
        Specified by:
        revive in interface Revivable
        Specified by:
        revive in class DefinitionImpl
      • debugDumpShortToString

        public void debugDumpShortToString​(StringBuilder sb)
        Used in debugDumping items. Does not need to have name in it as item already has it. Does not need to have class as that is just too much info that is almost anytime pretty obvious anyway.
        Specified by:
        debugDumpShortToString in interface ItemDefinition<I extends Item<?,​?>>
      • debugMultiplicity

        public String debugMultiplicity()
      • debugFlags

        public String debugFlags()
      • extendToString

        protected void extendToString​(StringBuilder sb)
      • isInherited

        public boolean isInherited()
        Description copied from interface: ItemDefinition
        Whether the item is inherited from a supertype.
        Specified by:
        isInherited in interface ItemDefinition<I extends Item<?,​?>>
      • isIndexOnly

        public boolean isIndexOnly()
        Description copied from interface: ItemDefinition
        If true, this item is not stored in XML representation in repo. TODO better name
        Specified by:
        isIndexOnly in interface ItemDefinition<I extends Item<?,​?>>
      • writeReplace

        protected Object writeReplace()