Class AssignmentPathImpl
- java.lang.Object
-
- com.evolveum.midpoint.model.impl.lens.AssignmentPathImpl
-
- All Implemented Interfaces:
AssignmentPath
,DebugDumpable
,ShortDumpable
,Cloneable
public class AssignmentPathImpl extends Object implements AssignmentPath
- Author:
- semancik
-
-
Field Summary
-
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
-
Constructor Summary
Constructors Constructor Description AssignmentPathImpl(PrismContext prismContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(AssignmentPathSegmentImpl segment)
AssignmentPathSegmentImpl
beforeLast(int n)
AssignmentPathImpl
clone()
Shallow clone.AssignmentPathImpl
cloneFirst(int n)
ExtensionType
collectExtensions(int startAt)
int
countTargetOccurrences(ObjectType target)
String
debugDump(int indent)
boolean
equivalent(AssignmentPath other)
Preliminary (limited) implementation.AssignmentPathSegmentImpl
first()
List<ObjectType>
getFirstOrderChain()
Returns a "user understandable" part of this path.PrismContext
getPrismContext()
ObjectType
getProtoRole()
In the context of meta-roles this is the role that the currently-processed inducement "applies to".AssignmentPathSegment
getSegment(int index)
Returns segment specified by index.List<AssignmentPathSegmentImpl>
getSegments()
boolean
hasOnlyOrgs()
boolean
isEmpty()
AssignmentPathSegmentImpl
last()
boolean
matches(List<OrderConstraintsType> orderConstraints)
Returns true if the path matches specified order constraints.void
removeLast(AssignmentPathSegmentImpl segment)
void
shortDump(StringBuilder sb)
Show the content of the object intended for diagnostics.int
size()
AssignmentPathType
toAssignmentPathType(boolean includeAssignmentsContent)
String
toString()
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.evolveum.midpoint.model.api.context.AssignmentPath
getAt
-
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
-
AssignmentPathImpl
public AssignmentPathImpl(PrismContext prismContext)
-
-
Method Detail
-
getSegments
@NotNull public List<AssignmentPathSegmentImpl> getSegments()
- Specified by:
getSegments
in interfaceAssignmentPath
-
getSegment
public AssignmentPathSegment getSegment(int index)
Description copied from interface:AssignmentPath
Returns segment specified by index. Negative indexes work in reverse direction.- Specified by:
getSegment
in interfaceAssignmentPath
-
add
public void add(AssignmentPathSegmentImpl segment)
-
removeLast
public void removeLast(AssignmentPathSegmentImpl segment)
-
first
public AssignmentPathSegmentImpl first()
- Specified by:
first
in interfaceAssignmentPath
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceAssignmentPath
-
size
public int size()
- Specified by:
size
in interfaceAssignmentPath
-
last
public AssignmentPathSegmentImpl last()
- Specified by:
last
in interfaceAssignmentPath
-
beforeLast
public AssignmentPathSegmentImpl beforeLast(int n)
- Specified by:
beforeLast
in interfaceAssignmentPath
-
countTargetOccurrences
public int countTargetOccurrences(ObjectType target)
- Specified by:
countTargetOccurrences
in interfaceAssignmentPath
-
getFirstOrderChain
@NotNull public List<ObjectType> getFirstOrderChain()
Description copied from interface:AssignmentPath
Returns a "user understandable" part of this path. I.e. only those objects that are of "order 1" above the focal object. E.g. from chain of jack =(a)=> Engineer =(i)=> Employee =(a)=> PersonMetarole =(i2)=> Person =(i)=> Entity the result would be Engineer -> Employee -> Person -> Entity TODO find a better name- Specified by:
getFirstOrderChain
in interfaceAssignmentPath
-
getProtoRole
public ObjectType getProtoRole()
Description copied from interface:AssignmentPath
In the context of meta-roles this is the role that the currently-processed inducement "applies to". I.e. the role that would contain this inducement in case that meta-roles were not used. Technically, this is the last element in the "first order chain" or roles. Note: proto- is the opposite of meta-- Specified by:
getProtoRole
in interfaceAssignmentPath
-
hasOnlyOrgs
public boolean hasOnlyOrgs()
-
clone
public AssignmentPathImpl clone()
Description copied from interface:AssignmentPath
Shallow clone.- Specified by:
clone
in interfaceAssignmentPath
- Overrides:
clone
in classObject
-
cloneFirst
public AssignmentPathImpl cloneFirst(int n)
- Specified by:
cloneFirst
in interfaceAssignmentPath
-
debugDump
public String debugDump(int indent)
- Specified by:
debugDump
in interfaceDebugDumpable
-
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.
-
toAssignmentPathType
public AssignmentPathType toAssignmentPathType(boolean includeAssignmentsContent)
- Specified by:
toAssignmentPathType
in interfaceAssignmentPath
-
getPrismContext
@NotNull public PrismContext getPrismContext()
-
collectExtensions
public ExtensionType collectExtensions(int startAt) throws SchemaException
- Specified by:
collectExtensions
in interfaceAssignmentPath
- Throws:
SchemaException
-
matches
public boolean matches(@NotNull List<OrderConstraintsType> orderConstraints)
Description copied from interface:AssignmentPath
Returns true if the path matches specified order constraints. All of them must match. Although there are some defaults, it is recommended to specify constraints explicitly. Currently not supported on empty paths. Not all parts of OrderConstraintsType are supported. Namely, resetOrder item has no meaning here.- Specified by:
matches
in interfaceAssignmentPath
-
equivalent
public boolean equivalent(AssignmentPath other)
Description copied from interface:AssignmentPath
Preliminary (limited) implementation. To be used to compare paths pointing to the same target object. Use with care.- Specified by:
equivalent
in interfaceAssignmentPath
-
-