Interface ProjectionContextKeyFactory

All Known Implementing Classes:
ProjectionContextKeyFactoryImpl

public interface ProjectionContextKeyFactory
  • Method Details

    • createKey

      ProjectionContextKey createKey(@NotNull @NotNull ShadowType shadow, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult result)
      Determines ProjectionContextKey for a given shadow as precisely as possible. This process is very important because precise projection keys are needed for the correct functioning of the projector, namely for: 1. assigning resource object constructions to correct projections, 2. resolving dependencies between projections, 3. ensuring projection context uniqueness (w.r.t. resource/kind/intent/tag/order/gone). The troublesome piece is the `kind`/`intent` pair. It requires the shadow to be classified to determine it precisely. Therefore, this method tries to classify the shadow if it's not classified. If it does not succeed, it applies some guesswork called "emergency classification": 1. obtains the most appropriate definition for shadow's object class (see ResourceSchema.findDefinitionForObjectClass(QName)), 2. as the last hope it checks ResourceObjectClassDefinition.isDefaultAccountDefinition() flag.