com.evolveum.midpoint.prism
Class PrismValue

java.lang.Object
  extended by com.evolveum.midpoint.prism.PrismValue
All Implemented Interfaces:
Visitable, DebugDumpable, Dumpable, Serializable
Direct Known Subclasses:
PrismContainerValue, PrismPropertyValue, PrismReferenceValue

public abstract class PrismValue
extends Object
implements Visitable, Serializable, Dumpable, DebugDumpable

Author:
semancik
See Also:
Serialized Form

Field Summary
protected  Element domElement
           
 
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
 
Method Summary
 void accept(Visitor visitor)
           
 void applyDefinition(ItemDefinition definition)
           
 void applyDefinition(ItemDefinition definition, boolean force)
           
 Element asDomElement()
           
abstract  void checkConsistenceInternal(Itemable rootItem, ItemPath parentPath, boolean requireDefinitions, boolean prohibitRaw)
           
protected  void clearDomElement()
           
abstract  PrismValue clone()
           
static
<T extends PrismValue>
Collection<T>
cloneCollection(Collection<T> values)
           
static
<X extends PrismValue>
Collection<X>
cloneValues(Collection<X> values)
           
static
<V extends PrismValue>
boolean
containsRealValue(Collection<V> collection, V value)
           
protected  void copyValues(PrismValue clone)
           
protected abstract  Element createDomElement()
           
 Collection<? extends ItemDelta> diff(PrismValue otherValue)
          Assumes matching representations.
 Collection<? extends ItemDelta> diff(PrismValue otherValue, ItemPath pathPrefix, boolean ignoreMetadata, boolean isLiteral)
          Assumes matching representations.
 boolean equals(Object obj)
           
 boolean equals(PrismValue otherValue, boolean ignoreMetadata)
           
 boolean equals(PrismValue thisValue, PrismValue otherValue)
           
 boolean equalsComplex(PrismValue other, boolean ignoreMetadata, boolean isLiteral)
           
 boolean equalsRealValue(PrismValue otherValue)
           
 boolean equalsRealValue(PrismValue thisValue, PrismValue otherValue)
           
 Objectable getOriginObject()
           
 OriginType getOriginType()
           
 Itemable getParent()
           
 ItemPath getPath(ItemPath pathPrefix)
           
 PrismContext getPrismContext()
           
 int hashCode()
           
abstract  boolean isEmpty()
           
abstract  boolean isRaw()
          Returns true if the value is raw.
 void normalize()
           
 void recompute()
          Recompute the value or otherwise "initialize" it before adding it to a prism tree.
abstract  void recompute(PrismContext prismContext)
           
 boolean representsSameValue(PrismValue other)
          Returns true if this and other value represent the same value.
static
<T extends PrismValue>
Collection<T>
resetParentCollection(Collection<T> values)
          Sets all parents to null.
 void revive(PrismContext prismContext)
           
 void setOriginObject(Objectable source)
           
 void setOriginType(OriginType type)
           
 void setParent(Itemable parent)
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.evolveum.midpoint.util.Dumpable
dump
 
Methods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDump, debugDump
 

Field Detail

domElement

protected Element domElement
Method Detail

setOriginObject

public void setOriginObject(Objectable source)

setOriginType

public void setOriginType(OriginType type)

getOriginType

public OriginType getOriginType()

getOriginObject

public Objectable getOriginObject()

getParent

public Itemable getParent()

setParent

public void setParent(Itemable parent)

getPath

public ItemPath getPath(ItemPath pathPrefix)

getPrismContext

public PrismContext getPrismContext()

applyDefinition

public void applyDefinition(ItemDefinition definition)
                     throws SchemaException
Throws:
SchemaException

applyDefinition

public void applyDefinition(ItemDefinition definition,
                            boolean force)
                     throws SchemaException
Throws:
SchemaException

revive

public void revive(PrismContext prismContext)

recompute

public 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.


recompute

public abstract void recompute(PrismContext prismContext)

accept

public void accept(Visitor visitor)
Specified by:
accept in interface Visitable

asDomElement

public Element asDomElement()

createDomElement

protected abstract Element createDomElement()

clearDomElement

protected void clearDomElement()

checkConsistenceInternal

public abstract void checkConsistenceInternal(Itemable rootItem,
                                              ItemPath parentPath,
                                              boolean requireDefinitions,
                                              boolean prohibitRaw)

representsSameValue

public boolean representsSameValue(PrismValue other)
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.


containsRealValue

public static <V extends PrismValue> boolean containsRealValue(Collection<V> collection,
                                                               V value)

isEmpty

public abstract boolean isEmpty()

normalize

public void normalize()

isRaw

public abstract boolean isRaw()
Returns true if the value is raw. Raw value is a semi-parsed value. A value for which we don't have a full definition yet and therefore the parsing could not be finished until the defintion is supplied.


cloneValues

public static <X extends PrismValue> Collection<X> cloneValues(Collection<X> values)

clone

public abstract PrismValue clone()
Overrides:
clone in class Object

copyValues

protected void copyValues(PrismValue clone)

cloneCollection

public static <T extends PrismValue> Collection<T> cloneCollection(Collection<T> values)

resetParentCollection

public static <T extends PrismValue> Collection<T> resetParentCollection(Collection<T> values)
Sets all parents to null. This is good if the items are to be "transplanted" into a different Containerable.


hashCode

public int hashCode()
Overrides:
hashCode in class Object

equalsComplex

public boolean equalsComplex(PrismValue other,
                             boolean ignoreMetadata,
                             boolean isLiteral)

equals

public boolean equals(PrismValue otherValue,
                      boolean ignoreMetadata)

equals

public boolean equals(PrismValue thisValue,
                      PrismValue otherValue)

equalsRealValue

public boolean equalsRealValue(PrismValue otherValue)

equalsRealValue

public boolean equalsRealValue(PrismValue thisValue,
                               PrismValue otherValue)

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

diff

public Collection<? extends ItemDelta> diff(PrismValue otherValue)
Assumes matching representations. I.e. it assumes that both this and otherValue represent the same instance of item. E.g. the container with the same ID.


diff

public Collection<? extends ItemDelta> diff(PrismValue otherValue,
                                            ItemPath pathPrefix,
                                            boolean ignoreMetadata,
                                            boolean isLiteral)
Assumes matching representations. I.e. it assumes that both this and otherValue represent the same instance of item. E.g. the container with the same ID.



Copyright © 2013 evolveum. All Rights Reserved.