Package org.identityconnectors.framework.common.objects

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


                            //      * 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)));
                                }
View Full Code Here


    private ConnectorObject getRemoteObject(final ConnectorFacadeProxy connector, final PropagationTask task,
            final boolean latest) {
        try {

            return connector.getObject(task.getPropagationMode(), task.getPropagationOperation(), ObjectClass.ACCOUNT,
                    new Uid(latest || task.getOldAccountId() == null
                    ? task.getAccountId()
                    : task.getOldAccountId()), connector.getOperationOptions(task.getResource()));

        } catch (RuntimeException ignore) {
            LOG.debug("Resolving username", ignore);
View Full Code Here

    @Override
    protected ConnectorObject getRemoteObject(final String accountId) {
        ConnectorObject obj = null;

        try {
            final Uid uid = new Uid(accountId);

            obj = profile.getConnector().getObject(
                    ObjectClass.ACCOUNT,
                    uid,
                    profile.getConnector().getOperationOptions(Collections.<AbstractMappingItem>emptySet()));
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

    protected ConnectorObject getRemoteObject(final String accountId) {
        ConnectorObject obj = null;

        try {

            final Uid uid = new Uid(accountId);

            obj = profile.getConnector().getObject(
                    ObjectClass.GROUP,
                    uid,
                    profile.getConnector().getOperationOptions(Collections.<AbstractMappingItem>emptySet()));
View Full Code Here

        ConnectorObject obj = null;
        try {
            obj = connector.getObject(task.getPropagationMode(),
                    task.getPropagationOperation(),
                    new ObjectClass(task.getObjectClassName()),
                    new Uid(accountId),
                    connector.getOperationOptions(AttributableUtil.getInstance(task.getSubjectType()).
                            getMappingItems(task.getResource(), MappingPurpose.PROPAGATION)));
        } catch (TimeoutException toe) {
            LOG.debug("Request timeout", toe);
            throw toe;
View Full Code Here

        connector.validate();
    }

    @Override
    public Uid authenticate(final String username, final String password, final OperationOptions options) {
        Uid result = null;

        if (activeConnInstance.getCapabilities().contains(ConnectorCapability.AUTHENTICATE)) {
            final Future<Uid> future = asyncFacade.authenticate(
                    connector, username, new GuardedString(password.toCharArray()), options);
            try {
View Full Code Here

    @Override
    public Uid create(final PropagationMode propagationMode, final ObjectClass objectClass, final Set<Attribute> attrs,
            final OperationOptions options, final Set<String> propagationAttempted) {

        Uid result = null;

        if (propagationMode == PropagationMode.ONE_PHASE
                ? activeConnInstance.getCapabilities().contains(ConnectorCapability.ONE_PHASE_CREATE)
                : activeConnInstance.getCapabilities().contains(ConnectorCapability.TWO_PHASES_CREATE)) {
View Full Code Here

    @Override
    public Uid update(final PropagationMode propagationMode, final ObjectClass objectClass, final Uid uid,
            final Set<Attribute> attrs, final OperationOptions options, final Set<String> propagationAttempted) {

        Uid result = null;

        if (propagationMode == PropagationMode.ONE_PHASE
                ? activeConnInstance.getCapabilities().contains(ConnectorCapability.ONE_PHASE_UPDATE)
                : activeConnInstance.getCapabilities().contains(ConnectorCapability.TWO_PHASES_UPDATE)) {
View Full Code Here

                subject, resource, attrUtil.getAccountIdItem(resource));

        final ObjectClass objectClass = SubjectType.USER == type ? ObjectClass.ACCOUNT : ObjectClass.GROUP;

        final Connector connector = connFactory.getConnector(resource);
        final ConnectorObject connectorObject = connector.getObject(objectClass, new Uid(accountIdValue),
                connector.getOperationOptions(attrUtil.getMappingItems(resource, MappingPurpose.BOTH)));
        if (connectorObject == null) {
            throw new NotFoundException("Object " + accountIdValue + " with class " + objectClass
                    + "not found on resource " + resourceName);
        }
View Full Code Here

TOP

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

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.