Class DummyContainerImpl<C extends Containerable>
- java.lang.Object
-
- com.evolveum.midpoint.prism.impl.item.DummyContainerImpl<C>
-
- All Implemented Interfaces:
Item<PrismContainerValue<C>,PrismContainerDefinition<C>>
,Itemable
,ParentVisitable
,PathVisitable
,PrismContainer<C>
,PrismContainerable<C>
,Revivable
,Visitable
,DebugDumpable
,Serializable
public class DummyContainerImpl<C extends Containerable> extends Object implements PrismContainer<C>
- Author:
- semancik
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
-
Constructor Summary
Constructors Constructor Description DummyContainerImpl(PrismContainer<C> realContainer, ItemPath path)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(Visitor visitor)
void
accept(Visitor visitor, ItemPath path, boolean recursive)
void
acceptParentVisitor(Visitor visitor)
Accepts a visitor that visits each item/value on the way to the structure root.void
add(Item<?,?> item)
Convenience method.boolean
add(PrismContainerValue<C> newValue)
Adds a given value, unless an equivalent one is already there.boolean
add(PrismContainerValue<C> newValue, boolean checkUniqueness)
Adds a given value, unless an equivalent one is already there (if checkUniqueness is true).boolean
add(PrismContainerValue<C> newValue, EquivalenceStrategy equivalenceStrategy)
Adds a given value, unless an equivalent one is already there.boolean
addAll(Collection<PrismContainerValue<C>> newValues)
Adds given values, with the same semantics as repeated add(..) calls.boolean
addAll(Collection<PrismContainerValue<C>> newValues, EquivalenceStrategy strategy)
Adds given values, with the same semantics as repeated add(..) calls.void
applyDefinition(PrismContainerDefinition<C> definition)
void
applyDefinition(PrismContainerDefinition<C> definition, boolean force)
void
assertDefinitions()
void
assertDefinitions(boolean tolarateRaw, String sourceDescription)
void
assertDefinitions(String sourceDescription)
boolean
canRepresent(Class<?> compileTimeClass)
Returns true if values of this container can be represented as specified compile-time class.boolean
canRepresent(QName type)
Returns true if values of this container can be presented as specified type (from compile-time or runtime schema).void
checkConsistence()
void
checkConsistence(boolean requireDefinitions, boolean prohibitRaw)
void
checkConsistence(boolean requireDefinitions, boolean prohibitRaw, ConsistencyCheckScope scope)
void
checkConsistence(boolean requireDefinitions, ConsistencyCheckScope scope)
void
checkConsistence(ConsistencyCheckScope scope)
void
checkConsistenceInternal(Itemable rootItem, boolean requireDefinitions, boolean prohibitRaw, ConsistencyCheckScope scope)
void
checkImmutability()
void
clear()
Removes all values from the item.PrismContainer<C>
clone()
Literal clone.PrismContainer<C>
cloneComplex(CloneStrategy strategy)
Complex clone with different cloning strategies.boolean
contains(PrismContainerValue<C> value)
boolean
contains(PrismContainerValue<C> value, EquivalenceStrategy strategy)
boolean
contains(PrismContainerValue<C> value, EquivalenceStrategy strategy, Comparator<PrismContainerValue<C>> comparator)
boolean
containsEquivalentValue(PrismContainerValue<C> value)
boolean
containsEquivalentValue(PrismContainerValue<C> value, Comparator<PrismContainerValue<C>> comparator)
boolean
containsItem(ItemPath itemPath, boolean acceptEmptyItem)
ContainerDelta<C>
createDelta()
Creates specific subclass of ItemDelta appropriate for type of item that this definition represents (e.g.ContainerDelta<C>
createDelta(ItemPath path)
PrismContainerValue<C>
createNewValue()
String
debugDump(int indent)
PrismContainerDefinition<C>
deepCloneDefinition(boolean ultraDeep, Consumer<ItemDefinition> postCloneAction)
ItemDelta<PrismContainerValue<C>,PrismContainerDefinition<C>>
diff(Item<PrismContainerValue<C>,PrismContainerDefinition<C>> other, ParameterizedEquivalenceStrategy strategy)
Computes a difference (delta) with the specified item using given equivalence strategy.ContainerDelta<C>
diff(PrismContainer<C> other)
ContainerDelta<C>
diff(PrismContainer<C> other, ParameterizedEquivalenceStrategy strategy)
List<? extends ItemDelta>
diffModifications(PrismContainer<C> other)
List<? extends ItemDelta>
diffModifications(PrismContainer<C> other, ParameterizedEquivalenceStrategy strategy)
boolean
equals(Object obj)
Compares this item to the specified object under NOT_LITERAL strategy (if no other is pre-set).boolean
equals(Object obj, EquivalenceStrategy equivalenceStrategy)
Compares this item to the specified object under given strategy.boolean
equals(Object obj, ParameterizedEquivalenceStrategy equivalenceStrategy)
Compares this item to the specified object under given strategy.boolean
equivalent(Object obj)
This method ignores some part of the object during comparison (e.g.void
filterValues(Function<PrismContainerValue<C>,Boolean> function)
Object
find(ItemPath path)
Returns object (Item or PrismValue) pointed to by the given path.<T extends Containerable>
PrismContainer<T>findContainer(ItemPath path)
<IV extends PrismValue,ID extends ItemDefinition,I extends Item<IV,ID>>
IfindCreateItem(ItemPath itemPath, Class<I> type, ID itemDefinition, boolean create)
<IV extends PrismValue,ID extends ItemDefinition,I extends Item<IV,ID>>
IfindCreateItem(QName itemQName, Class<I> type, boolean create)
<IV extends PrismValue,ID extends ItemDefinition>
Item<IV,ID>findItem(ItemPath path)
<IV extends PrismValue,ID extends ItemDefinition,I extends Item<IV,ID>>
IfindItem(ItemPath path, Class<I> type)
<IV extends PrismValue,ID extends ItemDefinition,I extends Item<IV,ID>>
IfindItem(QName itemQName, Class<I> type)
<T extends Containerable>
PrismContainer<T>findOrCreateContainer(ItemPath containerPath)
<IV extends PrismValue,ID extends ItemDefinition,I extends Item<IV,ID>>
IfindOrCreateItem(ItemPath containerPath, Class<I> type)
<IV extends PrismValue,ID extends ItemDefinition,I extends Item<IV,ID>>
IfindOrCreateItem(ItemPath containerPath, Class<I> type, ID definition)
<T> PrismProperty<T>
findOrCreateProperty(ItemPath propertyPath)
PrismReference
findOrCreateReference(ItemPath propertyPath)
<IV extends PrismValue,ID extends ItemDefinition>
PartiallyResolvedItem<IV,ID>findPartial(ItemPath path)
<T> PrismProperty<T>
findProperty(ItemPath path)
PrismReference
findReference(ItemPath path)
PrismContainerValue<C>
findValue(long id)
PrismContainerValue<C>
findValue(PrismContainerValue<C> value, EquivalenceStrategy strategy)
Collection<PrismValue>
getAllValues(ItemPath path)
PrismContainerValue<C>
getAnyValue()
Returns any of the values.Collection<PrismContainerValue<C>>
getClonedValues()
Class<C>
getCompileTimeClass()
Returns the static type of data represented by values of this container, if known and applicable.PrismContainerDefinition<C>
getDefinition()
Returns applicable property container definition.String
getDisplayName()
Returns a display name for the item.ItemName
getElementName()
Returns the name of the item.String
getHelp()
Returns help message defined for the item.Long
getHighestId()
PrismContainerValue<?>
getParent()
Returns the parent of this item (if exists).ItemPath
getPath()
Returns the path of this item (sequence of names from the "root" container or similar object to this item).PrismContext
getPrismContext()
PrismContext
getPrismContextLocal()
<T> T
getPropertyRealValue(ItemPath propertyPath, Class<T> type)
C
getRealValue()
Returns the "real value" (content) of this item: - value contained in PrismPropertyValue - Referencable in PrismReferenceValue - Containerable in PrismContainerValue - Objectable in PrismObjectValue Note that the real value can contain operational items.Collection<C>
getRealValues()
Returns (potentially empty) collection of "real values".Map<String,Object>
getUserData()
Returns the "user data", a map that allows attaching arbitrary named data to this item.<T> T
getUserData(String key)
Returns the user data for the given key (name).PrismContainerValue<C>
getValue()
Returns the value, if there is only one.PrismContainerValue<C>
getValue(Long id)
List<PrismContainerValue<C>>
getValues()
Returns the values for this item.boolean
hasCompleteDefinition()
Returns true if this item and all contained items have proper definition.int
hashCode()
Computes hash code to be used under NOT_LITERAL equivalence strategy.int
hashCode(EquivalenceStrategy equivalenceStrategy)
Computes hash code to be used under given equivalence strategy.int
hashCode(ParameterizedEquivalenceStrategy equivalenceStrategy)
Computes hash code to be used under given equivalence strategy.boolean
hasNoValues()
boolean
hasRaw()
Returns true is at least one of the values is raw.boolean
isEmpty()
boolean
isImmutable()
boolean
isIncomplete()
Flag that indicates incomplete item.boolean
isOperational()
Returns true if this item is metadata item that should be ignored for metadata-insensitive comparisons and hashCode functions.boolean
isRaw()
Returns true is all the values are raw.boolean
isSingleValue()
Returns true if the item contains 0 or 1 values and (by definition) is not multivalued.void
merge(Item<PrismContainerValue<C>,PrismContainerDefinition<C>> otherItem)
Merge all the values of other item to this item.void
mergeValue(PrismContainerValue<C> otherValue)
void
mergeValues(PrismContainer<C> other)
void
mergeValues(Collection<PrismContainerValue<C>> otherValues)
void
modifyUnfrozen(Runnable mutator)
void
modifyUnfrozen(Consumer<Item<PrismContainerValue<C>,PrismContainerDefinition<C>>> mutator)
void
normalize()
void
recomputeAllValues()
Re-apply PolyString (and possible other) normalizations to the object.void
remove(Item<?,?> item)
Convenience method.boolean
remove(PrismContainerValue<C> value)
Removes given value from the item.boolean
remove(PrismContainerValue<C> value, EquivalenceStrategy strategy)
Removes values equivalent to given value from the item; under specified equivalence strategy OR when values represent the same value via "representsSameValue(.., lax=false)" method.boolean
removeAll(Collection<PrismContainerValue<C>> values)
Removes all given values from the item.void
removeContainer(ItemPath path)
<IV extends PrismValue,ID extends ItemDefinition,I extends Item<IV,ID>>
voidremoveItem(ItemPath path, Class<I> itemType)
void
removeProperty(ItemPath path)
void
removeReference(ItemPath path)
void
replace(PrismContainerValue<C> newValue)
Replaces all values of the item by given value.void
replaceAll(Collection<PrismContainerValue<C>> newValues, EquivalenceStrategy strategy)
Replaces all values of the item by given values.void
revive(PrismContext prismContext)
<C extends Containerable>
voidsetContainerRealValue(QName containerName, C realValue)
void
setDefinition(PrismContainerDefinition<C> definition)
Sets applicable property container definition.void
setElementName(QName elementName)
Sets the name of the item.void
setImmutable(boolean immutable)
void
setIncomplete(boolean incomplete)
Flags the item as incomplete.void
setParent(PrismContainerValue<?> parentValue)
Sets the parent of this item.void
setPrismContext(PrismContext prismContext)
<T> void
setPropertyRealValue(QName propertyName, T realValue)
<T> void
setPropertyRealValues(QName propertyName, T... realValues)
void
setUserData(String key, Object value)
Sets the user data for the given key (name).void
setValue(PrismContainerValue<C> value)
int
size()
Returns the number of values for this item.String
toString()
void
trim()
Remove all empty valuesvoid
trimDefinitionTree(Collection<? extends ItemPath> alwaysKeep)
Optimizes (trims) definition tree by removing any definitions not corresponding to items in this container.boolean
valuesEqual(Collection<PrismContainerValue<C>> matchValues, Comparator<PrismContainerValue<C>> comparator)
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDump, debugDumpLazily, debugDumpLazily
-
Methods inherited from interface com.evolveum.midpoint.prism.Item
diff, getRealValuesOrRawTypes
-
Methods inherited from interface com.evolveum.midpoint.prism.PrismContainerable
getComplexTypeDefinition
-
-
-
-
Constructor Detail
-
DummyContainerImpl
public DummyContainerImpl(PrismContainer<C> realContainer, @NotNull ItemPath path)
-
-
Method Detail
-
accept
public void accept(Visitor visitor)
- Specified by:
accept
in interfaceVisitable<C extends Containerable>
-
hasCompleteDefinition
public boolean hasCompleteDefinition()
Description copied from interface:Item
Returns true if this item and all contained items have proper definition.- Specified by:
hasCompleteDefinition
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
-
getElementName
public ItemName getElementName()
Description copied from interface:Item
Returns the name of the item.The name is a QName. It uniquely defines an item.
The name may be null, but such an item will not work.
The name is the QName of XML element in the XML representation.
- Specified by:
getElementName
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
- Specified by:
getElementName
in interfaceItemable
- Returns:
- item name TODO consider making element name obligatory
-
getCompileTimeClass
public Class<C> getCompileTimeClass()
Description copied from interface:PrismContainer
Returns the static type of data represented by values of this container, if known and applicable. (There are containers that are purely dynamic, i.e. without any compile time class.)- Specified by:
getCompileTimeClass
in interfacePrismContainer<C extends Containerable>
- Specified by:
getCompileTimeClass
in interfacePrismContainerable<C extends Containerable>
-
canRepresent
public boolean canRepresent(@NotNull Class<?> compileTimeClass)
Description copied from interface:PrismContainer
Returns true if values of this container can be represented as specified compile-time class. For example, PrismContainer of AbstractRoleType has: - canRepresent(AbstractRoleType.class) = true - canRepresent(FocusType.class) = true - canRepresent(ObjectType.class) = true - canRepresent(TaskType.class) = false - canRepresent(RoleType.class) = false- Specified by:
canRepresent
in interfacePrismContainer<C extends Containerable>
-
setElementName
public void setElementName(QName elementName)
Description copied from interface:Item
Sets the name of the item.The name is a QName. It uniquely defines an item.
The name may be null, but such an item will not work.
The name is the QName of XML element in the XML representation.
- Specified by:
setElementName
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
- Parameters:
elementName
- the name to set TODO consider removing this method
-
canRepresent
public boolean canRepresent(QName type)
Description copied from interface:PrismContainer
Returns true if values of this container can be presented as specified type (from compile-time or runtime schema). In particular, returns true if type of this container or any of its supertypes match given type.- Specified by:
canRepresent
in interfacePrismContainer<C extends Containerable>
-
getDisplayName
public String getDisplayName()
Description copied from interface:Item
Returns a display name for the item.Returns null if the display name cannot be determined.
The display name is fetched from the definition. If no definition (schema) is available, the display name will not be returned.
- Specified by:
getDisplayName
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
- Returns:
- display name for the item
-
getRealValues
@NotNull public Collection<C> getRealValues()
Description copied from interface:Item
Returns (potentially empty) collection of "real values".- Specified by:
getRealValues
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
- Specified by:
getRealValues
in interfacePrismContainer<C extends Containerable>
-
getRealValue
@NotNull public C getRealValue()
Description copied from interface:Item
Returns the "real value" (content) of this item: - value contained in PrismPropertyValue - Referencable in PrismReferenceValue - Containerable in PrismContainerValue - Objectable in PrismObjectValue Note that the real value can contain operational items. It can also contain container IDs (although they are not considered to be part of the real value). It does not contain information about item element name nor other metadata like origin, definition, etc. (Although e.g. Containerable can be converted back into PrismContainerValue that can be used to retrieve this information.)- Specified by:
getRealValue
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
- Specified by:
getRealValue
in interfacePrismContainer<C extends Containerable>
-
setValue
public void setValue(@NotNull PrismContainerValue<C> value) throws SchemaException
- Specified by:
setValue
in interfacePrismContainer<C extends Containerable>
- Throws:
SchemaException
-
getValue
@NotNull public PrismContainerValue<C> getValue()
Description copied from interface:Item
Returns the value, if there is only one. Throws exception if there are more values. If there is no value, this method either: - returns null (for properties) - throws an exception (for items that can hold multiple values) - creates an empty value (for containers and references). TODO think again whether getOrCreateValue would not be better- Specified by:
getValue
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
- Specified by:
getValue
in interfacePrismContainer<C extends Containerable>
-
getValue
public PrismContainerValue<C> getValue(Long id)
- Specified by:
getValue
in interfacePrismContainer<C extends Containerable>
-
setPropertyRealValue
public <T> void setPropertyRealValue(QName propertyName, T realValue) throws SchemaException
- Specified by:
setPropertyRealValue
in interfacePrismContainer<C extends Containerable>
- Throws:
SchemaException
-
getHelp
public String getHelp()
Description copied from interface:Item
Returns help message defined for the item.Returns null if the help message cannot be determined.
The help message is fetched from the definition. If no definition (schema) is available, the help message will not be returned.
- Specified by:
getHelp
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
- Returns:
- help message for the item
-
setContainerRealValue
public <C extends Containerable> void setContainerRealValue(QName containerName, C realValue) throws SchemaException
- Specified by:
setContainerRealValue
in interfacePrismContainer<C extends Containerable>
- Throws:
SchemaException
-
setPropertyRealValues
public <T> void setPropertyRealValues(QName propertyName, T... realValues) throws SchemaException
- Specified by:
setPropertyRealValues
in interfacePrismContainer<C extends Containerable>
- Throws:
SchemaException
-
getPropertyRealValue
public <T> T getPropertyRealValue(ItemPath propertyPath, Class<T> type)
- Specified by:
getPropertyRealValue
in interfacePrismContainer<C extends Containerable>
-
add
public void add(Item<?,?> item) throws SchemaException
Description copied from interface:PrismContainer
Convenience method. Works only on single-valued containers.- Specified by:
add
in interfacePrismContainer<C extends Containerable>
- Throws:
SchemaException
-
isIncomplete
public boolean isIncomplete()
Description copied from interface:Item
Flag that indicates incomplete item. If set to true then the values in this item are not complete. If this flag is true then it can be assumed that the object that this item represents has at least one value. This is a method how to indicate that the item really has some values, but are not here. This may be used for variety of purposes. It may indicate that the account has a password, but the password value is not revealed. This may indicate that a user has a photo, but the photo was not requested and therefore is not returned. This may be used to indicate that only part of the attribute values were returned from the search. And so on.- Specified by:
isIncomplete
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
-
createNewValue
public PrismContainerValue<C> createNewValue()
- Specified by:
createNewValue
in interfacePrismContainer<C extends Containerable>
-
mergeValues
public void mergeValues(PrismContainer<C> other) throws SchemaException
- Specified by:
mergeValues
in interfacePrismContainer<C extends Containerable>
- Throws:
SchemaException
-
mergeValues
public void mergeValues(Collection<PrismContainerValue<C>> otherValues) throws SchemaException
- Specified by:
mergeValues
in interfacePrismContainer<C extends Containerable>
- Throws:
SchemaException
-
mergeValue
public void mergeValue(PrismContainerValue<C> otherValue) throws SchemaException
- Specified by:
mergeValue
in interfacePrismContainer<C extends Containerable>
- Throws:
SchemaException
-
trim
public void trim()
Description copied from interface:PrismContainer
Remove all empty values- Specified by:
trim
in interfacePrismContainer<C extends Containerable>
-
getDefinition
public PrismContainerDefinition<C> getDefinition()
Description copied from interface:PrismContainer
Returns applicable property container definition.May return null if no definition is applicable or the definition is not know.
- Specified by:
getDefinition
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
- Specified by:
getDefinition
in interfaceItemable
- Specified by:
getDefinition
in interfacePrismContainer<C extends Containerable>
- Specified by:
getDefinition
in interfacePrismContainerable<C extends Containerable>
- Returns:
- applicable property container definition
-
setDefinition
public void setDefinition(PrismContainerDefinition<C> definition)
Description copied from interface:PrismContainer
Sets applicable property container definition.- Specified by:
setDefinition
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
- Specified by:
setDefinition
in interfacePrismContainer<C extends Containerable>
- Parameters:
definition
- the definition to set
-
setIncomplete
public void setIncomplete(boolean incomplete)
Description copied from interface:Item
Flags the item as incomplete.- Specified by:
setIncomplete
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
- Parameters:
incomplete
- The new value- See Also:
Item.isIncomplete()
-
applyDefinition
public void applyDefinition(PrismContainerDefinition<C> definition) throws SchemaException
- Specified by:
applyDefinition
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
- Specified by:
applyDefinition
in interfacePrismContainer<C extends Containerable>
- Throws:
SchemaException
-
getParent
public PrismContainerValue<?> getParent()
Description copied from interface:Item
Returns the parent of this item (if exists). Currently this has to be a PrismContainerValue.- Specified by:
getParent
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
- Returns:
- The parent if exists
-
findItem
public <IV extends PrismValue,ID extends ItemDefinition,I extends Item<IV,ID>> I findItem(QName itemQName, Class<I> type)
- Specified by:
findItem
in interfacePrismContainer<C extends Containerable>
-
find
public Object find(ItemPath path)
Description copied from interface:Item
Returns object (Item or PrismValue) pointed to by the given path.- Specified by:
find
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
- Specified by:
find
in interfacePrismContainer<C extends Containerable>
-
setParent
public void setParent(PrismContainerValue<?> parentValue)
Description copied from interface:Item
Sets the parent of this item.- Specified by:
setParent
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
- Parameters:
parentValue
- The new parent
-
findPartial
public <IV extends PrismValue,ID extends ItemDefinition> PartiallyResolvedItem<IV,ID> findPartial(ItemPath path)
- Specified by:
findPartial
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
- Specified by:
findPartial
in interfacePrismContainer<C extends Containerable>
-
findCreateItem
public <IV extends PrismValue,ID extends ItemDefinition,I extends Item<IV,ID>> I findCreateItem(QName itemQName, Class<I> type, boolean create) throws SchemaException
- Specified by:
findCreateItem
in interfacePrismContainer<C extends Containerable>
- Throws:
SchemaException
-
getPath
@NotNull public ItemPath getPath()
Description copied from interface:Item
Returns the path of this item (sequence of names from the "root" container or similar object to this item). Note that if the containing object is a delta (usually a container delta), then the path- Specified by:
getPath
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
- Specified by:
getPath
in interfaceItemable
- Returns:
- the path
-
findItem
public <IV extends PrismValue,ID extends ItemDefinition,I extends Item<IV,ID>> I findItem(ItemPath path, Class<I> type)
- Specified by:
findItem
in interfacePrismContainer<C extends Containerable>
-
findItem
public <IV extends PrismValue,ID extends ItemDefinition> Item<IV,ID> findItem(ItemPath path)
- Specified by:
findItem
in interfacePrismContainer<C extends Containerable>
-
getUserData
@NotNull public Map<String,Object> getUserData()
Description copied from interface:Item
Returns the "user data", a map that allows attaching arbitrary named data to this item.- Specified by:
getUserData
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
- Returns:
- the user data map
-
containsItem
public boolean containsItem(ItemPath itemPath, boolean acceptEmptyItem) throws SchemaException
- Specified by:
containsItem
in interfacePrismContainer<C extends Containerable>
- Throws:
SchemaException
-
findCreateItem
public <IV extends PrismValue,ID extends ItemDefinition,I extends Item<IV,ID>> I findCreateItem(ItemPath itemPath, Class<I> type, ID itemDefinition, boolean create) throws SchemaException
- Specified by:
findCreateItem
in interfacePrismContainer<C extends Containerable>
- Throws:
SchemaException
-
getUserData
public <T> T getUserData(String key)
Description copied from interface:Item
Returns the user data for the given key (name).- Specified by:
getUserData
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
-
setUserData
public void setUserData(String key, Object value)
Description copied from interface:Item
Sets the user data for the given key (name).- Specified by:
setUserData
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
-
findValue
public PrismContainerValue<C> findValue(long id)
- Specified by:
findValue
in interfacePrismContainer<C extends Containerable>
-
getValues
@NotNull public List<PrismContainerValue<C>> getValues()
Description copied from interface:Item
Returns the values for this item. Although the ordering of this values is not important, and each value should be present at most once, we currently return them as a list instead of a set. TODO reconsider this- Specified by:
getValues
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
-
findContainer
public <T extends Containerable> PrismContainer<T> findContainer(ItemPath path)
- Specified by:
findContainer
in interfacePrismContainer<C extends Containerable>
-
findProperty
public <T> PrismProperty<T> findProperty(ItemPath path)
- Specified by:
findProperty
in interfacePrismContainer<C extends Containerable>
-
findReference
public PrismReference findReference(ItemPath path)
- Specified by:
findReference
in interfacePrismContainer<C extends Containerable>
-
findOrCreateItem
public <IV extends PrismValue,ID extends ItemDefinition,I extends Item<IV,ID>> I findOrCreateItem(ItemPath containerPath, Class<I> type) throws SchemaException
- Specified by:
findOrCreateItem
in interfacePrismContainer<C extends Containerable>
- Throws:
SchemaException
-
size
public int size()
Description copied from interface:Item
Returns the number of values for this item.- Specified by:
size
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
-
getAnyValue
public PrismContainerValue<C> getAnyValue()
Description copied from interface:Item
Returns any of the values. Usually called when we are quite confident that there is only a single value; or we don't care which of the values we get. Does not create values if there are none.- Specified by:
getAnyValue
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
-
findOrCreateItem
public <IV extends PrismValue,ID extends ItemDefinition,I extends Item<IV,ID>> I findOrCreateItem(ItemPath containerPath, Class<I> type, ID definition) throws SchemaException
- Specified by:
findOrCreateItem
in interfacePrismContainer<C extends Containerable>
- Throws:
SchemaException
-
findOrCreateContainer
public <T extends Containerable> PrismContainer<T> findOrCreateContainer(ItemPath containerPath) throws SchemaException
- Specified by:
findOrCreateContainer
in interfacePrismContainer<C extends Containerable>
- Throws:
SchemaException
-
findOrCreateProperty
public <T> PrismProperty<T> findOrCreateProperty(ItemPath propertyPath) throws SchemaException
- Specified by:
findOrCreateProperty
in interfacePrismContainer<C extends Containerable>
- Throws:
SchemaException
-
findOrCreateReference
public PrismReference findOrCreateReference(ItemPath propertyPath) throws SchemaException
- Specified by:
findOrCreateReference
in interfacePrismContainer<C extends Containerable>
- Throws:
SchemaException
-
remove
public void remove(Item<?,?> item)
Description copied from interface:PrismContainer
Convenience method. Works only on single-valued containers.- Specified by:
remove
in interfacePrismContainer<C extends Containerable>
-
removeProperty
public void removeProperty(ItemPath path)
- Specified by:
removeProperty
in interfacePrismContainer<C extends Containerable>
-
removeContainer
public void removeContainer(ItemPath path)
- Specified by:
removeContainer
in interfacePrismContainer<C extends Containerable>
-
removeReference
public void removeReference(ItemPath path)
- Specified by:
removeReference
in interfacePrismContainer<C extends Containerable>
-
removeItem
public <IV extends PrismValue,ID extends ItemDefinition,I extends Item<IV,ID>> void removeItem(ItemPath path, Class<I> itemType)
- Specified by:
removeItem
in interfacePrismContainer<C extends Containerable>
-
createDelta
public ContainerDelta<C> createDelta()
Description copied from interface:Item
Creates specific subclass of ItemDelta appropriate for type of item that this definition represents (e.g. PropertyDelta, ContainerDelta, ...)- Specified by:
createDelta
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
- Specified by:
createDelta
in interfacePrismContainer<C extends Containerable>
-
isSingleValue
public boolean isSingleValue()
Description copied from interface:Item
Returns true if the item contains 0 or 1 values and (by definition) is not multivalued.- Specified by:
isSingleValue
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
-
add
public boolean add(@NotNull PrismContainerValue<C> newValue, boolean checkUniqueness) throws SchemaException
Description copied from interface:Item
Adds a given value, unless an equivalent one is already there (if checkUniqueness is true).- Specified by:
add
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
- Returns:
- true if this item changed as a result of the call (i.e. if the value was really added) Note that even if checkUniqueness is false we check the cardinality of the item according to its definition, i.e. we do not allow single-valued item to contain more than one value.
- Throws:
SchemaException
-
createDelta
public ContainerDelta<C> createDelta(ItemPath path)
- Specified by:
createDelta
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
- Specified by:
createDelta
in interfacePrismContainer<C extends Containerable>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
- Specified by:
isEmpty
in interfacePrismContainer<C extends Containerable>
-
checkConsistenceInternal
public void checkConsistenceInternal(Itemable rootItem, boolean requireDefinitions, boolean prohibitRaw, ConsistencyCheckScope scope)
- Specified by:
checkConsistenceInternal
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
- Specified by:
checkConsistenceInternal
in interfacePrismContainer<C extends Containerable>
-
assertDefinitions
public void assertDefinitions(boolean tolarateRaw, String sourceDescription) throws SchemaException
- Specified by:
assertDefinitions
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
- Specified by:
assertDefinitions
in interfacePrismContainer<C extends Containerable>
- Throws:
SchemaException
-
add
public boolean add(@NotNull PrismContainerValue<C> newValue) throws SchemaException
Description copied from interface:Item
Adds a given value, unless an equivalent one is already there. It is the same as calling add with checkUniqueness=true.- Specified by:
add
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
- Returns:
- true if this item changed as a result of the call (i.e. if the value was really added)
- Throws:
SchemaException
-
diff
public ContainerDelta<C> diff(PrismContainer<C> other)
- Specified by:
diff
in interfacePrismContainer<C extends Containerable>
-
diff
public ContainerDelta<C> diff(PrismContainer<C> other, ParameterizedEquivalenceStrategy strategy)
- Specified by:
diff
in interfacePrismContainer<C extends Containerable>
-
diffModifications
public List<? extends ItemDelta> diffModifications(PrismContainer<C> other)
- Specified by:
diffModifications
in interfacePrismContainer<C extends Containerable>
-
add
public boolean add(@NotNull PrismContainerValue<C> newValue, @NotNull EquivalenceStrategy equivalenceStrategy) throws SchemaException
Description copied from interface:Item
Adds a given value, unless an equivalent one is already there. It is the same as calling add with checkUniqueness=true. Uses given strategy for equivalence testing.- Specified by:
add
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
- Returns:
- true if this item changed as a result of the call (i.e. if the value was really added)
- Throws:
SchemaException
-
diffModifications
public List<? extends ItemDelta> diffModifications(PrismContainer<C> other, ParameterizedEquivalenceStrategy strategy)
- Specified by:
diffModifications
in interfacePrismContainer<C extends Containerable>
-
clone
public PrismContainer<C> clone()
Description copied from interface:Item
Literal clone.- Specified by:
clone
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
- Specified by:
clone
in interfacePrismContainer<C extends Containerable>
- Overrides:
clone
in classObject
-
cloneComplex
public PrismContainer<C> cloneComplex(CloneStrategy strategy)
Description copied from interface:Item
Complex clone with different cloning strategies.- Specified by:
cloneComplex
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
- Specified by:
cloneComplex
in interfacePrismContainer<C extends Containerable>
- See Also:
CloneStrategy
-
deepCloneDefinition
public PrismContainerDefinition<C> deepCloneDefinition(boolean ultraDeep, Consumer<ItemDefinition> postCloneAction)
- Specified by:
deepCloneDefinition
in interfacePrismContainer<C extends Containerable>
-
accept
public void accept(Visitor visitor, ItemPath path, boolean recursive)
- Specified by:
accept
in interfacePathVisitable
- Specified by:
accept
in interfacePrismContainer<C extends Containerable>
-
addAll
public boolean addAll(Collection<PrismContainerValue<C>> newValues) throws SchemaException
Description copied from interface:Item
Adds given values, with the same semantics as repeated add(..) calls.- Specified by:
addAll
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
- Returns:
- true if this item changed as a result of the call (i.e. if at least one value was really added)
- Throws:
SchemaException
-
equivalent
public boolean equivalent(Object obj)
Description copied from interface:PrismContainer
This method ignores some part of the object during comparison (e.g. source demarcation in values) These methods compare the "meaningful" parts of the objects.- Specified by:
equivalent
in interfacePrismContainer<C extends Containerable>
-
toString
public String toString()
- Specified by:
toString
in interfacePrismContainer<C extends Containerable>
- Overrides:
toString
in classObject
-
addAll
public boolean addAll(Collection<PrismContainerValue<C>> newValues, EquivalenceStrategy strategy) throws SchemaException
Description copied from interface:Item
Adds given values, with the same semantics as repeated add(..) calls. For equality testing uses give strategy.- Specified by:
addAll
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
- Returns:
- true if this item changed as a result of the call (i.e. if at least one value was really added)
- Throws:
SchemaException
-
debugDump
public String debugDump(int indent)
- Specified by:
debugDump
in interfaceDebugDumpable
- Specified by:
debugDump
in interfacePrismContainer<C extends Containerable>
-
remove
public boolean remove(PrismContainerValue<C> value)
Description copied from interface:Item
Removes given value from the item. "Given value" currently means any value that is considered equivalent via REAL_VALUE equivalence strategy or a value that is considered "the same" via "representsSameValue(.., lax=false)" method.- Specified by:
remove
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
- Returns:
- true if this item changed as a result of the call (i.e. if at least one value was really removed) Note that there can be more than one values removed.
-
remove
public boolean remove(PrismContainerValue<C> value, @NotNull EquivalenceStrategy strategy)
Description copied from interface:Item
Removes values equivalent to given value from the item; under specified equivalence strategy OR when values represent the same value via "representsSameValue(.., lax=false)" method.- Specified by:
remove
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
- Returns:
- true if this item changed as a result of the call (i.e. if at least one value was really removed)
-
trimDefinitionTree
public void trimDefinitionTree(Collection<? extends ItemPath> alwaysKeep)
Description copied from interface:PrismContainer
Optimizes (trims) definition tree by removing any definitions not corresponding to items in this container. Works recursively by sub-containers of this one. USE WITH CARE. Make sure the definitions are not shared by other objects!- Specified by:
trimDefinitionTree
in interfacePrismContainer<C extends Containerable>
-
removeAll
public boolean removeAll(Collection<PrismContainerValue<C>> values)
Description copied from interface:Item
Removes all given values from the item. It is basically a shortcut for repeated remove(value) call.- Specified by:
removeAll
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
- Returns:
- true if this item changed as a result of the call (i.e. if at least one value was really removed)
-
clear
public void clear()
Description copied from interface:Item
Removes all values from the item.- Specified by:
clear
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
-
replaceAll
public void replaceAll(Collection<PrismContainerValue<C>> newValues, EquivalenceStrategy strategy) throws SchemaException
Description copied from interface:Item
Replaces all values of the item by given values.- Specified by:
replaceAll
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
- Throws:
SchemaException
-
replace
public void replace(PrismContainerValue<C> newValue) throws SchemaException
Description copied from interface:Item
Replaces all values of the item by given value.- Specified by:
replace
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
- Throws:
SchemaException
-
equals
public boolean equals(Object obj)
Description copied from interface:Item
Compares this item to the specified object under NOT_LITERAL strategy (if no other is pre-set).- Specified by:
equals
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
- Overrides:
equals
in classObject
-
equals
public boolean equals(Object obj, @NotNull EquivalenceStrategy equivalenceStrategy)
Description copied from interface:Item
Compares this item to the specified object under given strategy.- Specified by:
equals
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
-
equals
public boolean equals(Object obj, @NotNull ParameterizedEquivalenceStrategy equivalenceStrategy)
Description copied from interface:Item
Compares this item to the specified object under given strategy.- Specified by:
equals
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
-
hashCode
public int hashCode()
Description copied from interface:Item
Computes hash code to be used under NOT_LITERAL equivalence strategy.- Specified by:
hashCode
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
- Overrides:
hashCode
in classObject
-
hashCode
public int hashCode(@NotNull EquivalenceStrategy equivalenceStrategy)
Description copied from interface:Item
Computes hash code to be used under given equivalence strategy.- Specified by:
hashCode
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
-
hashCode
public int hashCode(@NotNull ParameterizedEquivalenceStrategy equivalenceStrategy)
Description copied from interface:Item
Computes hash code to be used under given equivalence strategy.- Specified by:
hashCode
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
-
contains
public boolean contains(PrismContainerValue<C> value)
- Specified by:
contains
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
- Returns:
- true if the item contains a given value (by default using NOT_LITERAL strategy) Note that the "sameness" (ID-only value matching) is NOT considered here.
-
contains
public boolean contains(PrismContainerValue<C> value, @NotNull EquivalenceStrategy strategy)
- Specified by:
contains
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
- Returns:
- true if the item contains a given value under specified equivalence strategy Note that the "sameness" (ID-only value matching) is NOT considered here.
-
contains
public boolean contains(PrismContainerValue<C> value, EquivalenceStrategy strategy, Comparator<PrismContainerValue<C>> comparator)
- Specified by:
contains
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
- Returns:
- true if the item contains a given value using comparator (if not null) or under specified equivalence strategy (if comparator is null). Note that the "sameness" (ID-only value matching) is NOT considered here.
-
containsEquivalentValue
public boolean containsEquivalentValue(PrismContainerValue<C> value)
- Specified by:
containsEquivalentValue
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
- Returns:
- true if the item contains an equivalent value (the same as
Item.containsEquivalentValue(PrismValue, Comparator)
with comparator being null)
-
containsEquivalentValue
public boolean containsEquivalentValue(PrismContainerValue<C> value, Comparator<PrismContainerValue<C>> comparator)
- Specified by:
containsEquivalentValue
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
- Returns:
- true if the item contains an equivalent value Item value is considered to be equivalent to the given value if: 1) given value is ID-only container value and item value has the same ID, or 2) comparator is not null and it gives "equals" (0) result when comparing these values, or 3) comparator is null and values match under IGNORE_METADATA_CONSIDER_DIFFERENT_IDS strategy
-
findValue
public PrismContainerValue<C> findValue(PrismContainerValue<C> value, @NotNull EquivalenceStrategy strategy)
- Specified by:
findValue
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
- Returns:
- a value of this item that is equivalent to the given one under given equivalence strategy (or null if no such value exists)
-
valuesEqual
public boolean valuesEqual(Collection<PrismContainerValue<C>> matchValues, Comparator<PrismContainerValue<C>> comparator)
- Specified by:
valuesEqual
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
- Returns:
- true if the values of this item match the "matchValues" collection, under given comparator. If comparator is null the default equals(..) comparison is used.
-
diff
public ItemDelta<PrismContainerValue<C>,PrismContainerDefinition<C>> diff(Item<PrismContainerValue<C>,PrismContainerDefinition<C>> other, @NotNull ParameterizedEquivalenceStrategy strategy)
Description copied from interface:Item
Computes a difference (delta) with the specified item using given equivalence strategy. Note this method cannot accept general EquivalenceStrategy here; it needs the parameterized strategy. Compares item values only -- does NOT dive into lower levels.- Specified by:
diff
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
-
getClonedValues
public Collection<PrismContainerValue<C>> getClonedValues()
- Specified by:
getClonedValues
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
-
normalize
public void normalize()
- Specified by:
normalize
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
-
merge
public void merge(Item<PrismContainerValue<C>,PrismContainerDefinition<C>> otherItem) throws SchemaException
Description copied from interface:Item
Merge all the values of other item to this item.- Specified by:
merge
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
- Throws:
SchemaException
-
acceptParentVisitor
public void acceptParentVisitor(@NotNull Visitor visitor)
Description copied from interface:Item
Accepts a visitor that visits each item/value on the way to the structure root.- Specified by:
acceptParentVisitor
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
- Specified by:
acceptParentVisitor
in interfaceParentVisitable
-
recomputeAllValues
public void recomputeAllValues()
Description copied from interface:Item
Re-apply PolyString (and possible other) normalizations to the object.- Specified by:
recomputeAllValues
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
-
filterValues
public void filterValues(Function<PrismContainerValue<C>,Boolean> function)
- Specified by:
filterValues
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
-
applyDefinition
public void applyDefinition(PrismContainerDefinition<C> definition, boolean force) throws SchemaException
- Specified by:
applyDefinition
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
- Throws:
SchemaException
-
revive
public void revive(PrismContext prismContext) throws SchemaException
- Specified by:
revive
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
- Specified by:
revive
in interfaceRevivable
- Throws:
SchemaException
-
checkConsistence
public void checkConsistence(boolean requireDefinitions, ConsistencyCheckScope scope)
- Specified by:
checkConsistence
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
-
checkConsistence
public void checkConsistence(boolean requireDefinitions, boolean prohibitRaw)
- Specified by:
checkConsistence
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
-
checkConsistence
public void checkConsistence(boolean requireDefinitions, boolean prohibitRaw, ConsistencyCheckScope scope)
- Specified by:
checkConsistence
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
-
checkConsistence
public void checkConsistence()
- Specified by:
checkConsistence
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
-
checkConsistence
public void checkConsistence(ConsistencyCheckScope scope)
- Specified by:
checkConsistence
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
-
assertDefinitions
public void assertDefinitions() throws SchemaException
- Specified by:
assertDefinitions
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
- Throws:
SchemaException
-
assertDefinitions
public void assertDefinitions(String sourceDescription) throws SchemaException
- Specified by:
assertDefinitions
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
- Throws:
SchemaException
-
isRaw
public boolean isRaw()
Description copied from interface:Item
Returns true is all the values are raw.- Specified by:
isRaw
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
-
hasRaw
public boolean hasRaw()
Description copied from interface:Item
Returns true is at least one of the values is raw.- Specified by:
hasRaw
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
-
hasNoValues
public boolean hasNoValues()
- Specified by:
hasNoValues
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
-
isOperational
public boolean isOperational()
Description copied from interface:Item
Returns true if this item is metadata item that should be ignored for metadata-insensitive comparisons and hashCode functions.- Specified by:
isOperational
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
-
isImmutable
public boolean isImmutable()
- Specified by:
isImmutable
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
-
setImmutable
public void setImmutable(boolean immutable)
- Specified by:
setImmutable
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
-
checkImmutability
public void checkImmutability()
- Specified by:
checkImmutability
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
-
modifyUnfrozen
public void modifyUnfrozen(Runnable mutator)
- Specified by:
modifyUnfrozen
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
-
modifyUnfrozen
public void modifyUnfrozen(Consumer<Item<PrismContainerValue<C>,PrismContainerDefinition<C>>> mutator)
- Specified by:
modifyUnfrozen
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
-
getAllValues
@NotNull public Collection<PrismValue> getAllValues(ItemPath path)
- Specified by:
getAllValues
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
-
getPrismContext
public PrismContext getPrismContext()
- Specified by:
getPrismContext
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
- Specified by:
getPrismContext
in interfaceItemable
-
getPrismContextLocal
public PrismContext getPrismContextLocal()
- Specified by:
getPrismContextLocal
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
-
setPrismContext
public void setPrismContext(PrismContext prismContext)
- Specified by:
setPrismContext
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
-
getHighestId
public Long getHighestId()
- Specified by:
getHighestId
in interfaceItem<PrismContainerValue<C extends Containerable>,PrismContainerDefinition<C extends Containerable>>
-
-