Interface RelationRegistry

All Known Implementing Classes:
RelationRegistryImpl

public interface RelationRegistry
A component that holds current definition of object relations.
  • Method Details

    • getRelationDefinitions

      List<RelationDefinitionType> getRelationDefinitions()
      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).
    • getRelationDefinition

      @Nullable @Nullable RelationDefinitionType getRelationDefinition(QName relation)
      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.
    • isOfKind

      boolean isOfKind(QName relation, RelationKindType kind)
      Returns true if the relation is of specified kind. The relation name need not be normalized.
    • isMember

      default boolean isMember(QName relation)
    • isManager

      default boolean isManager(QName relation)
    • isMeta

      default boolean isMeta(QName relation)
    • isDelegation

      default boolean isDelegation(QName relation)
    • isApprover

      default boolean isApprover(QName relation)
    • isOwner

      default boolean isOwner(QName relation)
    • isProcessedOnLogin

      boolean isProcessedOnLogin(QName relation)
      Whether this kind of relations is processed on login. By default, only relations of MEMBER and DELEGATION kinds are.
    • isProcessedOnRecompute

      boolean isProcessedOnRecompute(QName relation)
      Whether this kind of relations is processed on recompute. By default, only relations of MEMBER, MANAGER and DELEGATION kinds are.
    • isStoredIntoParentOrgRef

      boolean isStoredIntoParentOrgRef(QName relation)
      Whether this kind of relations is stored in parentOrgRef. By default, only relations of MEMBER kind are.
    • isAutomaticallyMatched

      boolean isAutomaticallyMatched(QName relation)
      Whether this kind of relations is automatically matched by order constraints. By default, only relations of MEMBER, META and DELEGATION kinds are.
    • getDefaultRelation

      QName getDefaultRelation()
      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.
    • isDefault

      boolean isDefault(QName relation)
      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.
    • getAllRelationsFor

      @NotNull @NotNull Collection<QName> getAllRelationsFor(RelationKindType kind)
      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.
    • getDefaultRelationFor

      @Nullable @Nullable QName getDefaultRelationFor(RelationKindType kind)
      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.
    • normalizeRelation

      @NotNull @NotNull QName normalizeRelation(QName relation)
      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.
    • applyRelationsConfiguration

      void applyRelationsConfiguration(SystemConfigurationType systemConfiguration)
      This method should be called whenever midPoint determines that the relations definition in system configuration might have been changed.
    • getAliases

      @NotNull @NotNull Collection<QName> getAliases(QName relation)
      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.