Package com.evolveum.midpoint.schema
Class ResourceShadowDiscriminator
- java.lang.Object
-
- com.evolveum.midpoint.schema.ResourceShadowCoordinates
-
- com.evolveum.midpoint.schema.ResourceShadowDiscriminator
-
- All Implemented Interfaces:
DebugDumpable
,HumanReadableDescribable
,ShortDumpable
,Serializable
,Cloneable
public class ResourceShadowDiscriminator extends ResourceShadowCoordinates implements Serializable, DebugDumpable, ShortDumpable, HumanReadableDescribable, Cloneable
TODO Review this 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.- Author:
- Radovan Semancik
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.evolveum.midpoint.schema.ResourceShadowCoordinates
intent, kind, objectClass, resourceOid, tag
-
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
-
Constructor Summary
Constructors Constructor Description ResourceShadowDiscriminator(@NotNull ResourceShadowCoordinates coordinates)
ResourceShadowDiscriminator(ShadowDiscriminatorType accRefType)
ResourceShadowDiscriminator(ShadowDiscriminatorType accRefType, String defaultResourceOid, ShadowKindType defaultKind)
ResourceShadowDiscriminator(String resourceOid)
ResourceShadowDiscriminator(String resourceOid, ResourceObjectDefinition definition, String tag, boolean gone)
ResourceShadowDiscriminator(String resourceOid, ShadowKindType kind, String intent, String tag, boolean gone)
ResourceShadowDiscriminator(String resourceOid, ShadowKindType kind, String intent, QName objectClass)
ResourceShadowDiscriminator(String resourceOid, QName objectClass)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ResourceShadowDiscriminator
clone()
ResourceShadowDiscriminator
cloneBasic()
Copies everything except for object class name and order.String
debugDump(int indent)
boolean
equals(Object o)
static boolean
equalsIntent(String a, String b)
boolean
equivalent(Object obj)
Similar to equals but ignores the order.static ResourceShadowDiscriminator
fromResourceShadowDiscriminatorType(ShadowDiscriminatorType bean, boolean provideDefaultIntent)
int
getOrder()
int
hashCode()
boolean
isGone()
"Gone" flag is true: the account no longer exists.void
setGone(boolean gone)
void
setOrder(int order)
void
shortDump(StringBuilder sb)
Show the content of the object intended for diagnostics.String
toHumanReadableDescription()
String
toHumanReadableDescription(boolean writeOid)
ShadowDiscriminatorType
toResourceShadowDiscriminatorType()
String
toString()
-
Methods inherited from class com.evolveum.midpoint.schema.ResourceShadowCoordinates
getIntent, getKind, getObjectClass, getResourceOid, getTag, isWildcard, setObjectClass
-
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, ResourceObjectDefinition definition, String tag, boolean gone)
-
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)
-
ResourceShadowDiscriminator
public ResourceShadowDiscriminator(String resourceOid, QName objectClass)
-
ResourceShadowDiscriminator
public ResourceShadowDiscriminator(String resourceOid, ShadowKindType kind, String intent, QName objectClass)
-
ResourceShadowDiscriminator
public ResourceShadowDiscriminator(@NotNull @NotNull ResourceShadowCoordinates coordinates)
-
-
Method Detail
-
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)
-
toResourceShadowDiscriminatorType
public ShadowDiscriminatorType toResourceShadowDiscriminatorType()
-
fromResourceShadowDiscriminatorType
public static ResourceShadowDiscriminator fromResourceShadowDiscriminatorType(ShadowDiscriminatorType bean, boolean provideDefaultIntent)
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classResourceShadowCoordinates
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classResourceShadowCoordinates
-
equivalent
public boolean equivalent(Object obj)
Similar to equals but ignores the order.- Overrides:
equivalent
in classResourceShadowCoordinates
-
toString
public String toString()
- Overrides:
toString
in classResourceShadowCoordinates
-
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
- Overrides:
shortDump
in classResourceShadowCoordinates
- 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
- Overrides:
toHumanReadableDescription
in classResourceShadowCoordinates
-
toHumanReadableDescription
public String toHumanReadableDescription(boolean writeOid)
- Overrides:
toHumanReadableDescription
in classResourceShadowCoordinates
-
debugDump
public String debugDump(int indent)
- Specified by:
debugDump
in interfaceDebugDumpable
- Overrides:
debugDump
in classResourceShadowCoordinates
-
clone
public ResourceShadowDiscriminator clone()
- Overrides:
clone
in classResourceShadowCoordinates
-
cloneBasic
public ResourceShadowDiscriminator cloneBasic()
Copies everything except for object class name and order.- Overrides:
cloneBasic
in classResourceShadowCoordinates
-
-