Class RelationRegistryImpl
- java.lang.Object
-
- com.evolveum.midpoint.schema.relation.RelationRegistryImpl
-
- All Implemented Interfaces:
RelationRegistry
@Component public class RelationRegistryImpl extends Object implements RelationRegistry
- Author:
- mederly, semancik
-
-
Constructor Summary
Constructors Constructor Description RelationRegistryImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
applyRelationsConfiguration(SystemConfigurationType systemConfiguration)
This method should be called whenever midPoint determines that the relations definition in system configuration might have been changed.@NotNull Collection<QName>
getAliases(QName relation)
Returns aliases of a relation.@NotNull Collection<QName>
getAllRelationsFor(RelationKindType kind)
Returns all relations of a given kind.QName
getDefaultRelation()
Returns the default relation i.e.QName
getDefaultRelationFor(RelationKindType kind)
Returns the default relation for a given kind.RelationDefinitionType
getRelationDefinition(QName relation)
Returns a relation definition for a specified relation name.List<RelationDefinitionType>
getRelationDefinitions()
Returns all relation definitions: explicitly specified as well as built-in ones.boolean
isAutomaticallyMatched(QName relation)
Whether this kind of relations is automatically matched by order constraints.boolean
isDefault(QName relation)
Checks whether the relation is equivalent to the default one.boolean
isOfKind(QName relation, RelationKindType kind)
Returns true if the relation is of specified kind.boolean
isProcessedOnLogin(QName relation)
Whether this kind of relations is processed on login.boolean
isProcessedOnRecompute(QName relation)
Whether this kind of relations is processed on recompute.boolean
isStoredIntoParentOrgRef(QName relation)
Whether this kind of relations is stored in parentOrgRef.@NotNull QName
normalizeRelation(QName relation)
Returns a normalized relation name, i.e.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.evolveum.midpoint.schema.RelationRegistry
isApprover, isDelegation, isManager, isMember, isMeta, isOwner
-
-
-
-
Method Detail
-
applyRelationsConfiguration
public void applyRelationsConfiguration(SystemConfigurationType systemConfiguration)
Description copied from interface:RelationRegistry
This method should be called whenever midPoint determines that the relations definition in system configuration might have been changed.- Specified by:
applyRelationsConfiguration
in interfaceRelationRegistry
-
getRelationDefinitions
public List<RelationDefinitionType> getRelationDefinitions()
Description copied from interface:RelationRegistry
Returns all relation definitions: explicitly specified as well as built-in ones. Invalid or duplicate definitions are filtered out and not mentioned here. Each relation is listed only once even if it can be referenced using various QNames (e.g. null, default, org:default).- Specified by:
getRelationDefinitions
in interfaceRelationRegistry
-
getRelationDefinition
public RelationDefinitionType getRelationDefinition(QName relation)
Description copied from interface:RelationRegistry
Returns a relation definition for a specified relation name. The relation name need not be normalized, i.e. all names for a relation might be used here (e.g. null, default, org:default); resulting in the same definition. Returns null if the definition cannot be found.- Specified by:
getRelationDefinition
in interfaceRelationRegistry
-
isOfKind
public boolean isOfKind(QName relation, RelationKindType kind)
Description copied from interface:RelationRegistry
Returns true if the relation is of specified kind. The relation name need not be normalized.- Specified by:
isOfKind
in interfaceRelationRegistry
-
isProcessedOnLogin
public boolean isProcessedOnLogin(QName relation)
Description copied from interface:RelationRegistry
Whether this kind of relations is processed on login. By default, only relations of MEMBER and DELEGATION kinds are.- Specified by:
isProcessedOnLogin
in interfaceRelationRegistry
-
isProcessedOnRecompute
public boolean isProcessedOnRecompute(QName relation)
Description copied from interface:RelationRegistry
Whether this kind of relations is processed on recompute. By default, only relations of MEMBER, MANAGER and DELEGATION kinds are.- Specified by:
isProcessedOnRecompute
in interfaceRelationRegistry
-
isStoredIntoParentOrgRef
public boolean isStoredIntoParentOrgRef(QName relation)
Description copied from interface:RelationRegistry
Whether this kind of relations is stored in parentOrgRef. By default, only relations of MEMBER kind are.- Specified by:
isStoredIntoParentOrgRef
in interfaceRelationRegistry
-
isAutomaticallyMatched
public boolean isAutomaticallyMatched(QName relation)
Description copied from interface:RelationRegistry
Whether this kind of relations is automatically matched by order constraints. By default, only relations of MEMBER, META and DELEGATION kinds are.- Specified by:
isAutomaticallyMatched
in interfaceRelationRegistry
-
getDefaultRelationFor
public QName getDefaultRelationFor(RelationKindType kind)
Description copied from interface:RelationRegistry
Returns the default relation for a given kind. The result might be a null value; although it is a bad practice to configure midPoint in that way. Unused relations are better hidden using categories.- Specified by:
getDefaultRelationFor
in interfaceRelationRegistry
-
getAllRelationsFor
@NotNull public @NotNull Collection<QName> getAllRelationsFor(RelationKindType kind)
Description copied from interface:RelationRegistry
Returns all relations of a given kind. Note that the result might be an empty set; although it is a bad practice to configure midPoint in that way. Unused relations are better hidden using categories.- Specified by:
getAllRelationsFor
in interfaceRelationRegistry
-
getDefaultRelation
public QName getDefaultRelation()
Description copied from interface:RelationRegistry
Returns the default relation i.e. the one that is equivalent to the null relation name. Please do NOT use this information for queries nor determining the behavior of the relation! Use relation kinds instead.- Specified by:
getDefaultRelation
in interfaceRelationRegistry
-
normalizeRelation
@NotNull public @NotNull QName normalizeRelation(QName relation)
Description copied from interface:RelationRegistry
Returns a normalized relation name, i.e. the one that is used in the "ref" item on the definition. It should be qualified (so please DO NOT use unqualified relation names in the definitions!) Returns default relation for null input, never returns null. If the relation is unknown, the relation name is returned unchanged.- Specified by:
normalizeRelation
in interfaceRelationRegistry
-
isDefault
public boolean isDefault(QName relation)
Description copied from interface:RelationRegistry
Checks whether the relation is equivalent to the default one. Please do NOT use this information for determining the behavior of the relation! Use relation kinds instead.- Specified by:
isDefault
in interfaceRelationRegistry
-
getAliases
@NotNull public @NotNull Collection<QName> getAliases(QName relation)
Description copied from interface:RelationRegistry
Returns aliases of a relation. Currently these are: - unqualified version of the relation QName - null if the relation is the default one -- In the future we might return some other values (e.g. explicitly configured aliases) as well. But we would need to adapt prismContext.relationsEquivalent method and other comparison methods as well. So it is perhaps not worth the effort.- Specified by:
getAliases
in interfaceRelationRegistry
-
-