Interface ModelElementContext<O extends ObjectType>

    • Method Detail

      • getObjectTypeClass

        Class<O> getObjectTypeClass()
        Returns:
        Type of object represented by this context. It is declared when context is created, so the actual type of the object can be its subtype. (Although this is quite unusual.)
      • isOfType

        boolean isOfType​(Class<?> aClass)
        Returns:
        True if the declared or actual object type is a subtype of aClass.
      • getObjectOld

        PrismObject<O> getObjectOld()
        "Old" state of the object i.e. the one that was present when the clockwork started. It can be present on the beginning or filled-in during projector execution by the context loaded. This value is used as an "old state" for resource object mappings (in constructions or resources), persona mappings, notifications, policy rules, and so on.
      • getObjectCurrent

        PrismObject<O> getObjectCurrent()
        "Current" state of the object i.e. the one that was present when the current clockwork click started. It is typically filled-in by the context loader. For projections, it is usually the same as the "old" state, as they are not updated iteratively but only once per clockwork run. This value used as an "old state" for focus mappings (in object template or assigned ones).
      • getObjectNew

        PrismObject<O> getObjectNew()
        Expected state of the object after application of currentDelta i.e. item deltas computed during current projection: objectCurrent + currentDelta = objectNew.
      • getObjectAny

        PrismObject<O> getObjectAny()
        Returns:
        "Any" value of the object in this order: new, current, old; taking the first non-null one. It is used when we are not interested in the details but we want just "any" value, e.g. for reporting purposes.
      • getOid

        String getOid()
        Returns:
        OID of the object. If not determined yet, it is obtained from available sources, like object old, current, new, or primary delta.
      • getPolicyRules

        @NotNull
        @NotNull Collection<? extends EvaluatedPolicyRule> getPolicyRules()
        Returns all policy rules that apply to this object - even those that were not triggered. The policy rules are compiled from all the applicable sources (target, meta-roles, etc.)
      • getSynchronizationIntent

        SynchronizationIntent getSynchronizationIntent()
        Initial intent regarding the account. It indicated what the initiator of the operation WANTS TO DO with the context. If set to null then the decision is left to "the engine". Null is also a typical value when the context is created. It may be pre-set under some circumstances, e.g. if an account is being unlinked.
      • isAdd

        boolean isAdd()
        Returns:
        true if the object (focus or projection) is to be added
      • isDelete

        boolean isDelete()
        Returns:
        true if the object (focus or projection) is to be deleted
      • getPrimaryDelta

        ObjectDelta<O> getPrimaryDelta()
        Returns:
        Primary delta i.e. one that the caller specified that has to be executed.
      • setPrimaryDelta

        void setPrimaryDelta​(ObjectDelta<O> primaryDelta)
        Sets the primary delta. Not to be publicly used. TODO reconsider this method here.
      • getSecondaryDelta

        ObjectDelta<O> getSecondaryDelta()
        Returns secondary delta for the current clockwork click. The caller MUST NOT modify returned object in any way.
      • getCurrentDelta

        ObjectDelta<?> getCurrentDelta()
        Returns object delta valid for the current clockwork click. It is either primary delta merged with the current secondary delta (if primary delta was not applied yet), or simply current secondary delta. The returned object is (kind of) immutable. Changing it may do strange things, but most likely the changes will be lost.
      • getSummaryDelta

        ObjectDelta<O> getSummaryDelta()
        Returns object delta comprising both primary delta and (all) secondary deltas, merged together. The returned object is (kind of) immutable. Changing it may do strange things, but most likely the changes will be lost.
      • getSummarySecondaryDelta

        ObjectDelta<O> getSummarySecondaryDelta()
        Returns all secondary deltas, merged together. The returned object is (kind of) immutable. Changing it may do strange things, but most likely the changes will be lost.
      • getArchetype

        ArchetypeType getArchetype()
        Returns:
        Determined archetype of the object. Currently not supported for projections.