Package com.evolveum.midpoint.prism
Interface PrismReferenceValue
-
- All Superinterfaces:
DebugDumpable
,PathVisitable
,PrismValue
,Revivable
,Serializable
,ShortDumpable
,Visitable
- All Known Implementing Classes:
PrismReferenceValueImpl
public interface PrismReferenceValue extends PrismValue, ShortDumpable
- Author:
- Radovan Semancik
-
-
Field Summary
-
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
applyDefinition(ItemDefinition definition, boolean force)
void
applyDefinition(PrismReferenceDefinition definition, boolean force)
Referencable
asReferencable()
void
checkConsistenceInternal(Itemable rootItem, boolean requireDefinitions, boolean prohibitRaw, ConsistencyCheckScope scope)
PrismReferenceValue
clone()
Literal clone.PrismReferenceValue
cloneComplex(CloneStrategy strategy)
Complex clone with different cloning strategies.String
debugDump()
Show the content of the object intended for diagnostics by system administrator.String
debugDump(int indent)
String
debugDump(int indent, boolean expandObject)
boolean
equals(Object obj)
Object
find(ItemPath path)
<IV extends PrismValue,ID extends ItemDefinition>
PartiallyResolvedItem<IV,ID>findPartial(ItemPath path)
PrismReferenceDefinition
getDefinition()
String
getDescription()
SearchFilterType
getFilter()
PrismObject
getObject()
Returns object that this reference points to.String
getOid()
OID of the object that this reference refers to (reference target).Class<?>
getRealClass()
Referencable
getRealValue()
QName
getRelation()
EvaluationTimeType
getResolutionTime()
PolyString
getTargetName()
Returns cached name of the target object.QName
getTargetType()
Returns XSD type of the object that this reference refers to.Class<Objectable>
getTargetTypeCompileTimeClass()
Class<Objectable>
getTargetTypeCompileTimeClass(PrismContext prismContext)
int
hashCode()
boolean
isEmpty()
boolean
isRaw()
void
recompute(PrismContext prismContext)
PrismReferenceValue
relation(QName relation)
void
revive(PrismContext prismContext)
void
setDescription(String description)
void
setFilter(SearchFilterType filter)
void
setObject(PrismObject object)
void
setOid(String oid)
void
setRelation(QName relation)
void
setResolutionTime(EvaluationTimeType resolutionTime)
void
setTargetName(PolyString name)
void
setTargetName(PolyStringType name)
void
setTargetType(QName targetType)
void
setTargetType(QName targetType, boolean allowEmptyNamespace)
void
shortDump(StringBuilder sb)
Show the content of the object intended for diagnostics.PrismReferenceValue
toCanonical()
Returns a version of this value that is canonical, that means it has the minimal form.String
toHumanReadableString()
String
toString()
-
Methods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDumpLazily, debugDumpLazily
-
Methods inherited from interface com.evolveum.midpoint.prism.PrismValue
accept, accept, applyDefinition, clearParent, diff, diff, equals, equals, equals, getAllValues, getOriginObject, getOriginType, getParent, getParentContainerValue, getPath, getPrismContext, getRealValueOrRawType, getRootValue, getTypeName, getUserData, getUserData, hashCode, hashCode, hasRealClass, isImmutable, normalize, recompute, representsSameValue, setImmutable, setOriginObject, setOriginType, setParent, setPrismContext, setUserData
-
Methods inherited from interface com.evolveum.midpoint.util.ShortDumpable
shortDump, shortDumpLazily
-
-
-
-
Method Detail
-
getOid
String getOid()
OID of the object that this reference refers to (reference target). May return null, but the reference is in that case incomplete and unusable.- Returns:
- the target oid
-
setOid
void setOid(String oid)
-
getObject
PrismObject getObject()
Returns object that this reference points to. The object is supposed to be used for caching and optimizations. Only oid and type of the object really matters for the reference. The object is transient. It will NOT be serialized. Therefore the client must expect that the object can disappear when serialization boundary is crossed. The client must expect that the object is null.
-
setObject
void setObject(PrismObject object)
-
getTargetType
QName getTargetType()
Returns XSD type of the object that this reference refers to. It may be used in XPath expressions and similar filters. May return null if the type name is not set.- Returns:
- the target type name
-
setTargetType
void setTargetType(QName targetType)
-
setTargetType
void setTargetType(QName targetType, boolean allowEmptyNamespace)
- Parameters:
targetType
-allowEmptyNamespace
- This is an ugly hack. See comment in DOMUtil.validateNonEmptyQName.
-
getTargetName
PolyString getTargetName()
Returns cached name of the target object. This is a ephemeral value. It is usually not stored. It may be computed at object retrieval time or it may not be present at all. This is NOT an authoritative information. Setting it or changing it will not influence the reference meaning. OID is the only authoritative linking mechanism.- Returns:
- cached name of the target object.
-
setTargetName
void setTargetName(PolyString name)
-
setTargetName
void setTargetName(PolyStringType name)
-
getTargetTypeCompileTimeClass
Class<Objectable> getTargetTypeCompileTimeClass()
-
getTargetTypeCompileTimeClass
Class<Objectable> getTargetTypeCompileTimeClass(PrismContext prismContext)
-
getRelation
QName getRelation()
-
setRelation
void setRelation(QName relation)
-
relation
PrismReferenceValue relation(QName relation)
-
getDescription
String getDescription()
-
setDescription
void setDescription(String description)
-
getFilter
SearchFilterType getFilter()
-
setFilter
void setFilter(SearchFilterType filter)
-
getResolutionTime
EvaluationTimeType getResolutionTime()
-
setResolutionTime
void setResolutionTime(EvaluationTimeType resolutionTime)
-
getDefinition
PrismReferenceDefinition getDefinition()
-
isRaw
boolean isRaw()
- Specified by:
isRaw
in interfacePrismValue
-
find
Object find(ItemPath path)
- Specified by:
find
in interfacePrismValue
-
findPartial
<IV extends PrismValue,ID extends ItemDefinition> PartiallyResolvedItem<IV,ID> findPartial(ItemPath path)
-
applyDefinition
void applyDefinition(ItemDefinition definition, boolean force) throws SchemaException
- Specified by:
applyDefinition
in interfacePrismValue
- Throws:
SchemaException
-
applyDefinition
void applyDefinition(PrismReferenceDefinition definition, boolean force) throws SchemaException
- Throws:
SchemaException
-
recompute
void recompute(PrismContext prismContext)
- Specified by:
recompute
in interfacePrismValue
-
checkConsistenceInternal
void checkConsistenceInternal(Itemable rootItem, boolean requireDefinitions, boolean prohibitRaw, ConsistencyCheckScope scope)
- Specified by:
checkConsistenceInternal
in interfacePrismValue
-
isEmpty
boolean isEmpty()
- Specified by:
isEmpty
in interfacePrismValue
-
toCanonical
PrismReferenceValue toCanonical()
Returns a version of this value that is canonical, that means it has the minimal form. E.g. it will have only OID and no object.
-
asReferencable
Referencable asReferencable()
-
debugDump
String debugDump()
Description copied from interface:DebugDumpable
Show the content of the object intended for diagnostics by system administrator. The out put should be suitable to use in system logs at "debug" level. It may be multi-line, but in that case it should be well indented and quite terse. As it is intended to be used by system administrator, it should not use any developer terms such as class names, exceptions or stack traces.- Specified by:
debugDump
in interfaceDebugDumpable
- Returns:
- content of the object intended for diagnostics by system administrator.
-
debugDump
String debugDump(int indent)
- Specified by:
debugDump
in interfaceDebugDumpable
-
debugDump
String debugDump(int indent, boolean expandObject)
-
clone
PrismReferenceValue clone()
Description copied from interface:PrismValue
Literal clone.- Specified by:
clone
in interfacePrismValue
-
cloneComplex
PrismReferenceValue cloneComplex(CloneStrategy strategy)
Description copied from interface:PrismValue
Complex clone with different cloning strategies.- Specified by:
cloneComplex
in interfacePrismValue
- See Also:
CloneStrategy
-
toHumanReadableString
String toHumanReadableString()
- Specified by:
toHumanReadableString
in interfacePrismValue
-
getRealClass
Class<?> getRealClass()
- Specified by:
getRealClass
in interfacePrismValue
-
getRealValue
@Nullable Referencable getRealValue()
- Specified by:
getRealValue
in interfacePrismValue
-
revive
void revive(PrismContext prismContext) throws SchemaException
- Specified by:
revive
in interfacePrismValue
- Specified by:
revive
in interfaceRevivable
- Throws:
SchemaException
-
shortDump
void shortDump(StringBuilder sb)
Description copied from interface:ShortDumpable
Show the content of the object intended for diagnostics. This method is supposed to append a compact, human-readable output in a single line. Unlike toString() method, there is no requirement to identify the actual class or type of the object. It is assumed that the class/type will be obvious from the context in which the output is used.- Specified by:
shortDump
in interfaceShortDumpable
- Parameters:
sb
- StringBuilder to which to a compact one-line content of the object intended for diagnostics by system administrator should be appended.
-
-