Interface MappingManager

    • Method Detail

      • getConnObjectKeyValue

        Optional<String> getConnObjectKeyValue​(Any<?> any,
                                               ExternalResource resource,
                                               Provision provision)
        Get connObjectKey internal value.
        Parameters:
        any - any object
        resource - resource information
        provision - provision information
        Returns:
        connObjectKey internal value
      • getConnObjectKeyValue

        Optional<String> getConnObjectKeyValue​(Realm realm,
                                               OrgUnit orgUnit)
        Get connObjectKey internal value.
        Parameters:
        realm - realm
        orgUnit - orgUnit information
        Returns:
        connObjectKey internal value
      • getIntValues

        Pair<AttrSchemaType,​List<PlainAttrValue>> getIntValues​(ExternalResource resource,
                                                                     Provision provision,
                                                                     Item mapItem,
                                                                     IntAttrName intAttrName,
                                                                     AttrSchemaType schemaType,
                                                                     Any<?> any,
                                                                     AccountGetter usernameAccountGetter,
                                                                     PlainAttrGetter plainAttrGetter)
        Get attribute values for the given Item and any object.
        Parameters:
        resource - resource information
        provision - provision information
        mapItem - mapping item
        intAttrName - int attr name
        schemaType - schema type
        any - any object
        usernameAccountGetter - function to get actual account instance for username
        plainAttrGetter - function to get PlainAttr instances
        Returns:
        attribute values and their type
      • prepareAttr

        Pair<String,​Attribute> prepareAttr​(ExternalResource resource,
                                                 Provision provision,
                                                 Item item,
                                                 Any<?> any,
                                                 String password,
                                                 AccountGetter usernameAccountGetter,
                                                 AccountGetter passwordAccountGetter,
                                                 PlainAttrGetter plainAttrGetter)
        Prepare attribute for sending to a connector instance.
        Parameters:
        resource - resource information
        provision - provision information
        item - mapping item
        any - given any object
        password - clear-text password
        usernameAccountGetter - function to get actual account instance for username
        passwordAccountGetter - function to get actual account instance for password
        plainAttrGetter - function to get PlainAttr instances
        Returns:
        connObjectLink (if it is the case) + prepared attribute
      • prepareAttrsFromAny

        Pair<String,​Set<Attribute>> prepareAttrsFromAny​(Any<?> any,
                                                              String password,
                                                              boolean changePwd,
                                                              Boolean enable,
                                                              ExternalResource resource,
                                                              Provision provision)
        Prepare attributes for sending to a connector instance.
        Parameters:
        any - given any object
        password - clear-text password
        changePwd - whether password should be included for propagation attributes or not
        enable - whether any object must be enabled or not
        resource - resource information
        provision - provision information
        Returns:
        connObjectLink + prepared attributes
      • prepareAttrsFromLinkedAccount

        Set<Attribute> prepareAttrsFromLinkedAccount​(User user,
                                                     LinkedAccount account,
                                                     String password,
                                                     boolean changePwd,
                                                     Provision provision)
        Prepare attributes for sending to a connector instance.
        Parameters:
        user - given user
        account - linked account
        password - user's clear-text password, to use as default value in case
        changePwd - whether password should be included for propagation attributes or not
        provision - provision information
        Returns:
        prepared attributes
      • prepareAttrsFromRealm

        Pair<String,​Set<Attribute>> prepareAttrsFromRealm​(Realm realm,
                                                                OrgUnit orgUnit)
        Prepare attributes for sending to a connector instance.
        Parameters:
        realm - Realm
        orgUnit - provision information
        Returns:
        connObjectLink + prepared attributes
      • setIntValues

        <T extends AnyTO> void setIntValues​(Item mapItem,
                                            Attribute attr,
                                            T anyTO)
        Set attribute values, according to the given Item, to any object from attribute received from connector.
        Type Parameters:
        T - any object
        Parameters:
        mapItem - mapping item
        attr - attribute received from connector
        anyTO - any object
      • setIntValues

        void setIntValues​(Item orgUnitItem,
                          Attribute attr,
                          RealmTO realmTO)
        Set attribute values, according to the given Item, to realm from attribute received from connector.
        Parameters:
        orgUnitItem - mapping item
        attr - attribute received from connector
        realmTO - realm
      • hasMustChangePassword

        boolean hasMustChangePassword​(Provision provision)
        Checks if there is a mapping item in the given Provision for mustChangePassword.
        Parameters:
        provision - provision
        Returns:
        if there is a mapping item in the given provision for mustChangePassword