Package com.evolveum.midpoint.schema
Class ResourceShadowDiscriminator
- java.lang.Object
-
- com.evolveum.midpoint.schema.ResourceShadowDiscriminator
-
- All Implemented Interfaces:
DebugDumpable
,HumanReadableDescribable
,ShortDumpable
,Serializable
,Cloneable
public class ResourceShadowDiscriminator extends Object implements Serializable, DebugDumpable, ShortDumpable, HumanReadableDescribable, Cloneable
Aggregate bean containing resource OID, intent and tombstone flag. It uniquely identifies an shadow projection (usually account) for a specific user regardless whether it has OID, does not have OID yet, it exists of was deleted. This is used mostly as a key in hashes and for searches. TODO: split to two objects: 1: ResourceShadowCoordinates which will stay in common 2: ResourceShadowDiscriminator (subclass) which will go to model. This will contains tombstone and order.- Author:
- Radovan Semancik
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
-
Constructor Summary
Constructors Constructor Description ResourceShadowDiscriminator(ShadowDiscriminatorType accRefType)
ResourceShadowDiscriminator(ShadowDiscriminatorType accRefType, String defaultResourceOid, ShadowKindType defaultKind)
ResourceShadowDiscriminator(String resourceOid)
ResourceShadowDiscriminator(String resourceOid, ShadowKindType kind, String intent, String tag, boolean gone)
ResourceShadowDiscriminator(String resourceOid, QName objectClass)
-
Method Summary
-
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.util.ShortDumpable
shortDump, shortDumpLazily
-
-
-
-
Constructor Detail
-
ResourceShadowDiscriminator
public ResourceShadowDiscriminator(String resourceOid, ShadowKindType kind, String intent, String tag, boolean gone)
-
ResourceShadowDiscriminator
public ResourceShadowDiscriminator(ShadowDiscriminatorType accRefType)
-
ResourceShadowDiscriminator
public ResourceShadowDiscriminator(ShadowDiscriminatorType accRefType, String defaultResourceOid, ShadowKindType defaultKind)
-
ResourceShadowDiscriminator
public ResourceShadowDiscriminator(String resourceOid)
-
-
Method Detail
-
getResourceOid
public String getResourceOid()
-
getKind
public ShadowKindType getKind()
-
getIntent
public String getIntent()
-
getTag
public String getTag()
-
getObjectClass
public QName getObjectClass()
-
setObjectClass
public void setObjectClass(QName objectClass)
-
getOrder
public int getOrder()
-
setOrder
public void setOrder(int order)
-
isGone
public boolean isGone()
"Gone" flag is true: the account no longer exists. The data we have are the latest metadata we were able to get. The projection will be marked as gone if we discover that the associated resource object is gone. Or the shadow is gone and we can no longer associate the resource object. In any way the "gone" projection is marked for removal. It will be eventually unlinked and the shadow will be deleted. The shadow may stay around in the "dead" state for some time for reporting purposes. In the terms of shadow lifecycle state, this covers corpse and tombstone states.
-
setGone
public void setGone(boolean gone)
-
isWildcard
public boolean isWildcard()
-
toResourceShadowDiscriminatorType
public ShadowDiscriminatorType toResourceShadowDiscriminatorType()
-
fromResourceShadowDiscriminatorType
public static ResourceShadowDiscriminator fromResourceShadowDiscriminatorType(ShadowDiscriminatorType bean, boolean provideDefaultIntent)
-
equivalent
public boolean equivalent(Object obj)
Similar to equals but ignores the order.
-
shortDump
public 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.
-
toHumanReadableDescription
public String toHumanReadableDescription()
- Specified by:
toHumanReadableDescription
in interfaceHumanReadableDescribable
-
toHumanReadableDescription
public String toHumanReadableDescription(boolean writeOid)
-
debugDump
public String debugDump(int indent)
- Specified by:
debugDump
in interfaceDebugDumpable
-
clone
public ResourceShadowDiscriminator clone()
-
cloneBasic
public ResourceShadowDiscriminator cloneBasic()
Copies everything except for object class name and order.
-
-