Package org.identityconnectors.framework.common.objects

Examples of org.identityconnectors.framework.common.objects.Name


        Long result = null;

        final AttributableUtil attrUtil = AttributableUtil.getInstance(oclass);

        final List<ConnectorObject> found = connector.search(oclass,
                new EqualsFilter(new Name(name)), connector.getOperationOptions(
                        attrUtil.getMappingItems(resource, MappingPurpose.SYNCHRONIZATION)));

        if (found.isEmpty()) {
            LOG.debug("No {} found on {} with __NAME__ {}", oclass, resource, name);
        } else {
View Full Code Here


        }

        return Uid.NAME.equals(name)
                ? new Uid(values.isEmpty() || values.get(0) == null ? null : values.get(0).toString())
                : Name.NAME.equals(name)
                ? new Name(values.isEmpty() || values.get(0) == null ? null : values.get(0).toString())
                : AttributeBuilder.build(name, values);
    }
View Full Code Here

        if (beforeObj == null) {
            LOG.debug("Create {} on {}", attributes, resource);
            connector.create(propagationMode, oclass, attributes, null, propagationAttempted);
        } else {
            // 1. check if rename is really required
            final Name newName = (Name) AttributeUtil.find(Name.NAME, attributes);

            LOG.debug("Rename required with value {}", newName);

                if (newName != null && newName.equals(beforeObj.getName())
                        && !newName.getNameValue().equals(beforeObj.getUid().getUidValue())) {

                LOG.debug("Remote object name unchanged");
                attributes.remove(newName);
            }
View Full Code Here

        // AccountId must be propagated. It could be a simple attribute for
        // the target resource or the key (depending on the accountLink)
        if (evalAccountLink.isEmpty()) {
            // add accountId as __NAME__ attribute ...
            LOG.debug("Add AccountId [{}] as __NAME__", accountId);
            attributes.add(new Name(accountId));
        } else {
            LOG.debug("Add AccountLink [{}] as __NAME__", evalAccountLink);
            attributes.add(new Name(evalAccountLink));

            // AccountId not propagated:
            // it will be used to set the value for __UID__ attribute
            LOG.debug("AccountId will be used just as __UID__ attribute");
        }
View Full Code Here

                        if (before == null) {
                            // 1. get accountId
                            final String accountId = task.getAccountId();

                            // 2. get name
                            final Name name = (Name) AttributeUtil.find(Name.NAME, attributes);

                            // 3. check if:
                            //      * accountId is not blank;
                            //      * accountId is not equal to Name.
                            if (StringUtils.hasText(accountId)
                                    && (name == null || !accountId.equals(name.getNameValue()))) {

                                // 3.a retrieve uid
                                final Uid uid = (Uid) AttributeUtil.find(Uid.NAME, attributes);

                                // 3.b add Uid if not provided
                                if (uid == null) {
                                    attributes.add(AttributeBuilder.build(Uid.NAME, Collections.singleton(accountId)));
                                }
                            }

                            // 4. provision entry
                            connector.create(task.getPropagationMode(), ObjectClass.ACCOUNT, attributes, null,
                                    propagationAttempted);
                        } else {

                            // 1. check if rename is really required
                            final Name newName = (Name) AttributeUtil.find(Name.NAME, attributes);

                            LOG.debug("Rename required with value {}", newName);

                            if (newName != null && newName.equals(before.getName())
                                    && !before.getUid().getUidValue().equals(newName.getNameValue())) {

                                LOG.debug("Remote object name unchanged");
                                attributes.remove(newName);
                            }

View Full Code Here

TOP

Related Classes of org.identityconnectors.framework.common.objects.Name

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.