Search in sources :

Example 1 with PlainSchema

use of org.apache.syncope.core.persistence.api.entity.PlainSchema in project syncope by apache.

the class JPAPlainSchemaDAO method findByAnyTypeClasses.

@Override
public List<PlainSchema> findByAnyTypeClasses(final Collection<AnyTypeClass> anyTypeClasses) {
    StringBuilder queryString = new StringBuilder("SELECT e FROM ").append(JPAPlainSchema.class.getSimpleName()).append(" e WHERE ");
    for (AnyTypeClass anyTypeClass : anyTypeClasses) {
        queryString.append("e.anyTypeClass.id='").append(anyTypeClass.getKey()).append("' OR ");
    }
    TypedQuery<PlainSchema> query = entityManager().createQuery(queryString.substring(0, queryString.length() - 4), PlainSchema.class);
    return query.getResultList();
}
Also used : JPAPlainSchema(org.apache.syncope.core.persistence.jpa.entity.JPAPlainSchema) PlainSchema(org.apache.syncope.core.persistence.api.entity.PlainSchema) AnyTypeClass(org.apache.syncope.core.persistence.api.entity.AnyTypeClass)

Example 2 with PlainSchema

use of org.apache.syncope.core.persistence.api.entity.PlainSchema in project syncope by apache.

the class AzurePropagationActions method after.

@Transactional
@Override
public void after(final PropagationTask task, final TaskExec execution, final ConnectorObject afterObj) {
    if (task.getOperation() == ResourceOperation.DELETE || task.getOperation() == ResourceOperation.NONE) {
        return;
    }
    if (AnyTypeKind.USER.equals(task.getAnyTypeKind())) {
        User user = userDAO.find(task.getEntityKey());
        if (user == null) {
            LOG.error("Could not find user {}, skipping", task.getEntityKey());
        } else {
            boolean modified = false;
            AnyUtils anyUtils = anyUtilsFactory.getInstance(user);
            // Azure User ID
            PlainSchema azureId = plainSchemaDAO.find(getAzureIdSchema());
            if (azureId == null) {
                LOG.error("Could not find schema {}, skipping", getAzureIdSchema());
            } else {
                // set back the __UID__ received by Azure
                UPlainAttr attr = user.getPlainAttr(getAzureIdSchema()).orElse(null);
                if (attr == null) {
                    attr = entityFactory.newEntity(UPlainAttr.class);
                    attr.setSchema(azureId);
                    attr.setOwner(user);
                    user.add(attr);
                    try {
                        attr.add(afterObj.getUid().getUidValue(), anyUtils);
                        modified = true;
                    } catch (InvalidPlainAttrValueException e) {
                        LOG.error("Invalid value for attribute {}: {}", azureId.getKey(), afterObj.getUid().getUidValue(), e);
                    }
                } else {
                    LOG.debug("User {} has already {} assigned: {}", user, azureId.getKey(), attr.getValuesAsStrings());
                }
            }
            if (modified) {
                userDAO.save(user);
            }
        }
    } else if (AnyTypeKind.GROUP.equals(task.getAnyTypeKind())) {
        Group group = groupDAO.find(task.getEntityKey());
        if (group == null) {
            LOG.error("Could not find group {}, skipping", task.getEntityKey());
        } else {
            boolean modified = false;
            AnyUtils anyUtils = anyUtilsFactory.getInstance(group);
            // Azure Group ID
            PlainSchema azureId = plainSchemaDAO.find(getAzureGroupIdSchema());
            if (azureId == null) {
                LOG.error("Could not find schema {}, skipping", getAzureGroupIdSchema());
            } else {
                // set back the __UID__ received by Azure
                GPlainAttr attr = group.getPlainAttr(getAzureGroupIdSchema()).orElse(null);
                if (attr == null) {
                    attr = entityFactory.newEntity(GPlainAttr.class);
                    attr.setSchema(azureId);
                    attr.setOwner(group);
                    group.add(attr);
                    try {
                        attr.add(afterObj.getUid().getUidValue(), anyUtils);
                        modified = true;
                    } catch (InvalidPlainAttrValueException e) {
                        LOG.error("Invalid value for attribute {}: {}", azureId.getKey(), afterObj.getUid().getUidValue(), e);
                    }
                } else {
                    LOG.debug("Group {} has already {} assigned: {}", group, azureId.getKey(), attr.getValuesAsStrings());
                }
            }
            if (modified) {
                groupDAO.save(group);
            }
        }
    }
}
Also used : Group(org.apache.syncope.core.persistence.api.entity.group.Group) GPlainAttr(org.apache.syncope.core.persistence.api.entity.group.GPlainAttr) User(org.apache.syncope.core.persistence.api.entity.user.User) PlainSchema(org.apache.syncope.core.persistence.api.entity.PlainSchema) UPlainAttr(org.apache.syncope.core.persistence.api.entity.user.UPlainAttr) AnyUtils(org.apache.syncope.core.persistence.api.entity.AnyUtils) InvalidPlainAttrValueException(org.apache.syncope.core.persistence.api.attrvalue.validation.InvalidPlainAttrValueException) Transactional(org.springframework.transaction.annotation.Transactional)

Example 3 with PlainSchema

use of org.apache.syncope.core.persistence.api.entity.PlainSchema in project syncope by apache.

the class PullUtils method findByConnObjectKey.

private List<String> findByConnObjectKey(final ConnectorObject connObj, final Provision provision, final AnyUtils anyUtils) {
    String connObjectKey = null;
    Optional<MappingItem> connObjectKeyItem = MappingUtils.getConnObjectKeyItem(provision);
    if (connObjectKeyItem.isPresent()) {
        Attribute connObjectKeyAttr = connObj.getAttributeByName(connObjectKeyItem.get().getExtAttrName());
        if (connObjectKeyAttr != null) {
            connObjectKey = AttributeUtil.getStringValue(connObjectKeyAttr);
        }
    }
    if (connObjectKey == null) {
        return Collections.emptyList();
    }
    for (ItemTransformer transformer : MappingUtils.getItemTransformers(connObjectKeyItem.get())) {
        List<Object> output = transformer.beforePull(connObjectKeyItem.get(), null, Collections.<Object>singletonList(connObjectKey));
        if (output != null && !output.isEmpty()) {
            connObjectKey = output.get(0).toString();
        }
    }
    List<String> result = new ArrayList<>();
    IntAttrName intAttrName;
    try {
        intAttrName = intAttrNameParser.parse(connObjectKeyItem.get().getIntAttrName(), provision.getAnyType().getKind());
    } catch (ParseException e) {
        LOG.error("Invalid intAttrName '{}' specified, ignoring", connObjectKeyItem.get().getIntAttrName(), e);
        return result;
    }
    if (intAttrName.getField() != null) {
        switch(intAttrName.getField()) {
            case "key":
                Any<?> any = getAnyDAO(provision.getAnyType().getKind()).find(connObjectKey);
                if (any != null) {
                    result.add(any.getKey());
                }
                break;
            case "username":
                User user = userDAO.findByUsername(connObjectKey);
                if (user != null) {
                    result.add(user.getKey());
                }
                break;
            case "name":
                Group group = groupDAO.findByName(connObjectKey);
                if (group != null) {
                    result.add(group.getKey());
                }
                AnyObject anyObject = anyObjectDAO.findByName(connObjectKey);
                if (anyObject != null) {
                    result.add(anyObject.getKey());
                }
                break;
            default:
        }
    } else if (intAttrName.getSchemaType() != null) {
        switch(intAttrName.getSchemaType()) {
            case PLAIN:
                PlainAttrValue value = anyUtils.newPlainAttrValue();
                PlainSchema schema = plainSchemaDAO.find(intAttrName.getSchemaName());
                if (schema == null) {
                    value.setStringValue(connObjectKey);
                } else {
                    try {
                        value.parseValue(schema, connObjectKey);
                    } catch (ParsingValidationException e) {
                        LOG.error("While parsing provided __UID__ {}", value, e);
                        value.setStringValue(connObjectKey);
                    }
                }
                result.addAll(getAnyDAO(provision.getAnyType().getKind()).findByPlainAttrValue(intAttrName.getSchemaName(), value).stream().map(Entity::getKey).collect(Collectors.toList()));
                break;
            case DERIVED:
                result.addAll(getAnyDAO(provision.getAnyType().getKind()).findByDerAttrValue(intAttrName.getSchemaName(), connObjectKey).stream().map(Entity::getKey).collect(Collectors.toList()));
                break;
            default:
        }
    }
    return result;
}
Also used : Group(org.apache.syncope.core.persistence.api.entity.group.Group) MappingItem(org.apache.syncope.core.persistence.api.entity.resource.MappingItem) User(org.apache.syncope.core.persistence.api.entity.user.User) Attribute(org.identityconnectors.framework.common.objects.Attribute) ItemTransformer(org.apache.syncope.core.provisioning.api.data.ItemTransformer) ArrayList(java.util.ArrayList) IntAttrName(org.apache.syncope.core.provisioning.api.IntAttrName) ParsingValidationException(org.apache.syncope.core.persistence.api.attrvalue.validation.ParsingValidationException) AnyObject(org.apache.syncope.core.persistence.api.entity.anyobject.AnyObject) PlainAttrValue(org.apache.syncope.core.persistence.api.entity.PlainAttrValue) ConnectorObject(org.identityconnectors.framework.common.objects.ConnectorObject) AnyObject(org.apache.syncope.core.persistence.api.entity.anyobject.AnyObject) ParseException(java.text.ParseException) PlainSchema(org.apache.syncope.core.persistence.api.entity.PlainSchema)

Example 4 with PlainSchema

use of org.apache.syncope.core.persistence.api.entity.PlainSchema in project syncope by apache.

the class ResourceDataBinderTest method issue42.

@Test
public void issue42() {
    PlainSchema userId = plainSchemaDAO.find("userId");
    Set<MappingItem> beforeUserIdMappings = new HashSet<>();
    for (ExternalResource res : resourceDAO.findAll()) {
        if (res.getProvision(anyTypeDAO.findUser()).isPresent() && res.getProvision(anyTypeDAO.findUser()).get().getMapping() != null) {
            for (MappingItem mapItem : res.getProvision(anyTypeDAO.findUser()).get().getMapping().getItems()) {
                if (userId.getKey().equals(mapItem.getIntAttrName())) {
                    beforeUserIdMappings.add(mapItem);
                }
            }
        }
    }
    ResourceTO resourceTO = new ResourceTO();
    resourceTO.setKey("resource-issue42");
    resourceTO.setConnector("88a7a819-dab5-46b4-9b90-0b9769eabdb8");
    resourceTO.setEnforceMandatoryCondition(true);
    ProvisionTO provisionTO = new ProvisionTO();
    provisionTO.setAnyType(AnyTypeKind.USER.name());
    provisionTO.setObjectClass(ObjectClass.ACCOUNT_NAME);
    resourceTO.getProvisions().add(provisionTO);
    MappingTO mapping = new MappingTO();
    provisionTO.setMapping(mapping);
    ItemTO item = new ItemTO();
    item.setIntAttrName("userId");
    item.setExtAttrName("campo1");
    item.setConnObjectKey(true);
    item.setMandatoryCondition("false");
    item.setPurpose(MappingPurpose.BOTH);
    mapping.setConnObjectKeyItem(item);
    ExternalResource resource = resourceDataBinder.create(resourceTO);
    resource = resourceDAO.save(resource);
    assertNotNull(resource);
    assertNotNull(resource.getProvision(anyTypeDAO.findUser()).get().getMapping());
    assertEquals(1, resource.getProvision(anyTypeDAO.findUser()).get().getMapping().getItems().size());
    resourceDAO.flush();
    ExternalResource actual = resourceDAO.find("resource-issue42");
    assertNotNull(actual);
    assertEquals(resource, actual);
    userId = plainSchemaDAO.find("userId");
    Set<MappingItem> afterUserIdMappings = new HashSet<>();
    for (ExternalResource res : resourceDAO.findAll()) {
        if (res.getProvision(anyTypeDAO.findUser()).isPresent() && res.getProvision(anyTypeDAO.findUser()).get().getMapping() != null) {
            for (MappingItem mapItem : res.getProvision(anyTypeDAO.findUser()).get().getMapping().getItems()) {
                if (userId.getKey().equals(mapItem.getIntAttrName())) {
                    afterUserIdMappings.add(mapItem);
                }
            }
        }
    }
    assertEquals(beforeUserIdMappings.size(), afterUserIdMappings.size() - 1);
}
Also used : MappingItem(org.apache.syncope.core.persistence.api.entity.resource.MappingItem) MappingTO(org.apache.syncope.common.lib.to.MappingTO) ResourceTO(org.apache.syncope.common.lib.to.ResourceTO) ProvisionTO(org.apache.syncope.common.lib.to.ProvisionTO) PlainSchema(org.apache.syncope.core.persistence.api.entity.PlainSchema) ExternalResource(org.apache.syncope.core.persistence.api.entity.resource.ExternalResource) ItemTO(org.apache.syncope.common.lib.to.ItemTO) HashSet(java.util.HashSet) Test(org.junit.jupiter.api.Test)

Example 5 with PlainSchema

use of org.apache.syncope.core.persistence.api.entity.PlainSchema in project syncope by apache.

the class MappingManagerImpl method getIntValues.

@Transactional(readOnly = true)
@Override
public List<PlainAttrValue> getIntValues(final Provision provision, final Item mapItem, final IntAttrName intAttrName, final Any<?> any) {
    LOG.debug("Get internal values for {} as '{}' on {}", any, mapItem.getIntAttrName(), provision.getResource());
    Any<?> reference = null;
    Membership<?> membership = null;
    if (intAttrName.getEnclosingGroup() == null && intAttrName.getRelatedAnyObject() == null) {
        reference = any;
    }
    if (any instanceof GroupableRelatable) {
        GroupableRelatable<?, ?, ?, ?, ?> groupableRelatable = (GroupableRelatable<?, ?, ?, ?, ?>) any;
        if (intAttrName.getEnclosingGroup() != null) {
            Group group = groupDAO.findByName(intAttrName.getEnclosingGroup());
            if (group == null || !groupableRelatable.getMembership(group.getKey()).isPresent()) {
                LOG.warn("No membership for {} in {}, ignoring", intAttrName.getEnclosingGroup(), groupableRelatable);
            } else {
                reference = group;
            }
        } else if (intAttrName.getRelatedAnyObject() != null) {
            AnyObject anyObject = anyObjectDAO.findByName(intAttrName.getRelatedAnyObject());
            if (anyObject == null || groupableRelatable.getRelationships(anyObject.getKey()).isEmpty()) {
                LOG.warn("No relationship for {} in {}, ignoring", intAttrName.getRelatedAnyObject(), groupableRelatable);
            } else {
                reference = anyObject;
            }
        } else if (intAttrName.getMembershipOfGroup() != null) {
            Group group = groupDAO.findByName(intAttrName.getMembershipOfGroup());
            membership = groupableRelatable.getMembership(group.getKey()).orElse(null);
        }
    }
    if (reference == null) {
        LOG.warn("Could not determine the reference instance for {}", mapItem.getIntAttrName());
        return Collections.emptyList();
    }
    List<PlainAttrValue> values = new ArrayList<>();
    boolean transform = true;
    AnyUtils anyUtils = anyUtilsFactory.getInstance(reference);
    if (intAttrName.getField() != null) {
        PlainAttrValue attrValue = anyUtils.newPlainAttrValue();
        switch(intAttrName.getField()) {
            case "key":
                attrValue.setStringValue(reference.getKey());
                values.add(attrValue);
                break;
            case "realm":
                attrValue.setStringValue(reference.getRealm().getFullPath());
                values.add(attrValue);
                break;
            case "password":
                // ignore
                break;
            case "userOwner":
            case "groupOwner":
                Mapping uMapping = provision.getAnyType().equals(anyTypeDAO.findUser()) ? provision.getMapping() : null;
                Mapping gMapping = provision.getAnyType().equals(anyTypeDAO.findGroup()) ? provision.getMapping() : null;
                if (reference instanceof Group) {
                    Group group = (Group) reference;
                    String groupOwnerValue = null;
                    if (group.getUserOwner() != null && uMapping != null) {
                        groupOwnerValue = getGroupOwnerValue(provision, group.getUserOwner());
                    }
                    if (group.getGroupOwner() != null && gMapping != null) {
                        groupOwnerValue = getGroupOwnerValue(provision, group.getGroupOwner());
                    }
                    if (StringUtils.isNotBlank(groupOwnerValue)) {
                        attrValue.setStringValue(groupOwnerValue);
                        values.add(attrValue);
                    }
                }
                break;
            case "suspended":
                if (reference instanceof User) {
                    attrValue.setBooleanValue(((User) reference).isSuspended());
                    values.add(attrValue);
                }
                break;
            case "mustChangePassword":
                if (reference instanceof User) {
                    attrValue.setBooleanValue(((User) reference).isMustChangePassword());
                    values.add(attrValue);
                }
                break;
            default:
                try {
                    Object fieldValue = FieldUtils.readField(reference, intAttrName.getField(), true);
                    if (fieldValue instanceof Date) {
                        // needed because ConnId does not natively supports the Date type
                        attrValue.setStringValue(DateFormatUtils.ISO_8601_EXTENDED_DATETIME_TIME_ZONE_FORMAT.format((Date) fieldValue));
                    } else if (Boolean.TYPE.isInstance(fieldValue)) {
                        attrValue.setBooleanValue((Boolean) fieldValue);
                    } else if (Double.TYPE.isInstance(fieldValue) || Float.TYPE.isInstance(fieldValue)) {
                        attrValue.setDoubleValue((Double) fieldValue);
                    } else if (Long.TYPE.isInstance(fieldValue) || Integer.TYPE.isInstance(fieldValue)) {
                        attrValue.setLongValue((Long) fieldValue);
                    } else {
                        attrValue.setStringValue(fieldValue.toString());
                    }
                    values.add(attrValue);
                } catch (Exception e) {
                    LOG.error("Could not read value of '{}' from {}", intAttrName.getField(), reference, e);
                }
        }
    } else if (intAttrName.getSchemaType() != null) {
        switch(intAttrName.getSchemaType()) {
            case PLAIN:
                PlainAttr<?> attr;
                if (membership == null) {
                    attr = reference.getPlainAttr(intAttrName.getSchemaName()).orElse(null);
                } else {
                    attr = ((GroupableRelatable<?, ?, ?, ?, ?>) reference).getPlainAttr(intAttrName.getSchemaName(), membership).orElse(null);
                }
                if (attr == null) {
                    LOG.warn("Invalid PlainSchema {} or PlainAttr not found for {}", intAttrName.getSchemaName(), reference);
                } else {
                    if (attr.getUniqueValue() != null) {
                        values.add(anyUtils.clonePlainAttrValue(attr.getUniqueValue()));
                    } else if (attr.getValues() != null) {
                        attr.getValues().forEach(value -> values.add(anyUtils.clonePlainAttrValue(value)));
                    }
                }
                break;
            case DERIVED:
                DerSchema derSchema = derSchemaDAO.find(intAttrName.getSchemaName());
                if (derSchema == null) {
                    LOG.warn("Invalid DerSchema: {}", intAttrName.getSchemaName());
                } else {
                    String derValue = membership == null ? derAttrHandler.getValue(reference, derSchema) : derAttrHandler.getValue(reference, membership, derSchema);
                    if (derValue != null) {
                        PlainAttrValue attrValue = anyUtils.newPlainAttrValue();
                        attrValue.setStringValue(derValue);
                        values.add(attrValue);
                    }
                }
                break;
            case VIRTUAL:
                // virtual attributes don't get transformed
                transform = false;
                VirSchema virSchema = virSchemaDAO.find(intAttrName.getSchemaName());
                if (virSchema == null) {
                    LOG.warn("Invalid VirSchema: {}", intAttrName.getSchemaName());
                } else {
                    LOG.debug("Expire entry cache {}-{}", reference, intAttrName.getSchemaName());
                    virAttrCache.expire(reference.getType().getKey(), reference.getKey(), intAttrName.getSchemaName());
                    List<String> virValues = membership == null ? virAttrHandler.getValues(reference, virSchema) : virAttrHandler.getValues(reference, membership, virSchema);
                    virValues.forEach(virValue -> {
                        PlainAttrValue attrValue = anyUtils.newPlainAttrValue();
                        attrValue.setStringValue(virValue);
                        values.add(attrValue);
                    });
                }
                break;
            default:
        }
    } else if (intAttrName.getPrivilegesOfApplication() != null && reference instanceof User) {
        Application application = applicationDAO.find(intAttrName.getPrivilegesOfApplication());
        if (application == null) {
            LOG.warn("Invalid application: {}", intAttrName.getPrivilegesOfApplication());
        } else {
            userDAO.findAllRoles((User) reference).stream().flatMap(role -> role.getPrivileges(application).stream()).forEach(privilege -> {
                PlainAttrValue attrValue = anyUtils.newPlainAttrValue();
                attrValue.setStringValue(privilege.getKey());
                values.add(attrValue);
            });
        }
    }
    LOG.debug("Internal values: {}", values);
    List<PlainAttrValue> transformed = values;
    if (transform) {
        for (ItemTransformer transformer : MappingUtils.getItemTransformers(mapItem)) {
            transformed = transformer.beforePropagation(mapItem, any, transformed);
        }
        LOG.debug("Transformed values: {}", values);
    } else {
        LOG.debug("No transformation occurred");
    }
    return transformed;
}
Also used : Date(java.util.Date) Realm(org.apache.syncope.core.persistence.api.entity.Realm) PlainAttr(org.apache.syncope.core.persistence.api.entity.PlainAttr) LoggerFactory(org.slf4j.LoggerFactory) Autowired(org.springframework.beans.factory.annotation.Autowired) Schema(org.apache.syncope.core.persistence.api.entity.Schema) InvalidPasswordRuleConf(org.apache.syncope.core.provisioning.api.utils.policy.InvalidPasswordRuleConf) StringUtils(org.apache.commons.lang3.StringUtils) Attribute(org.identityconnectors.framework.common.objects.Attribute) GroupDAO(org.apache.syncope.core.persistence.api.dao.GroupDAO) Pair(org.apache.commons.lang3.tuple.Pair) AttrSchemaType(org.apache.syncope.common.lib.types.AttrSchemaType) AnyObjectDAO(org.apache.syncope.core.persistence.api.dao.AnyObjectDAO) ConnObjectUtils(org.apache.syncope.core.provisioning.java.utils.ConnObjectUtils) GroupableRelatableTO(org.apache.syncope.common.lib.to.GroupableRelatableTO) OrgUnit(org.apache.syncope.core.persistence.api.entity.resource.OrgUnit) ParseException(java.text.ParseException) OperationalAttributes(org.identityconnectors.framework.common.objects.OperationalAttributes) UserDAO(org.apache.syncope.core.persistence.api.dao.UserDAO) OrgUnitItem(org.apache.syncope.core.persistence.api.entity.resource.OrgUnitItem) DerAttrHandler(org.apache.syncope.core.provisioning.api.DerAttrHandler) Set(java.util.Set) PlainAttrValue(org.apache.syncope.core.persistence.api.entity.PlainAttrValue) GroupTO(org.apache.syncope.common.lib.to.GroupTO) AnyTypeDAO(org.apache.syncope.core.persistence.api.dao.AnyTypeDAO) MappingItem(org.apache.syncope.core.persistence.api.entity.resource.MappingItem) List(java.util.List) DerSchemaDAO(org.apache.syncope.core.persistence.api.dao.DerSchemaDAO) Provision(org.apache.syncope.core.persistence.api.entity.resource.Provision) AttributeUtil(org.identityconnectors.framework.common.objects.AttributeUtil) AttributeBuilder(org.identityconnectors.framework.common.objects.AttributeBuilder) PlainSchema(org.apache.syncope.core.persistence.api.entity.PlainSchema) Group(org.apache.syncope.core.persistence.api.entity.group.Group) Optional(java.util.Optional) IntAttrName(org.apache.syncope.core.provisioning.api.IntAttrName) VirAttrCache(org.apache.syncope.core.provisioning.api.cache.VirAttrCache) ApplicationDAO(org.apache.syncope.core.persistence.api.dao.ApplicationDAO) ItemTransformer(org.apache.syncope.core.provisioning.api.data.ItemTransformer) AttrTO(org.apache.syncope.common.lib.to.AttrTO) AnyUtilsFactory(org.apache.syncope.core.persistence.api.entity.AnyUtilsFactory) RealmTO(org.apache.syncope.common.lib.to.RealmTO) GroupableRelatable(org.apache.syncope.core.persistence.api.entity.GroupableRelatable) AnyTO(org.apache.syncope.common.lib.to.AnyTO) FrameworkUtil(org.identityconnectors.framework.common.FrameworkUtil) BooleanUtils(org.apache.commons.lang3.BooleanUtils) PasswordGenerator(org.apache.syncope.core.spring.security.PasswordGenerator) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) Application(org.apache.syncope.core.persistence.api.entity.Application) DerSchema(org.apache.syncope.core.persistence.api.entity.DerSchema) MappingManager(org.apache.syncope.core.provisioning.api.MappingManager) FieldUtils(org.apache.commons.lang3.reflect.FieldUtils) Item(org.apache.syncope.core.persistence.api.entity.resource.Item) RealmDAO(org.apache.syncope.core.persistence.api.dao.RealmDAO) MembershipTO(org.apache.syncope.common.lib.to.MembershipTO) Mapping(org.apache.syncope.core.persistence.api.entity.resource.Mapping) Encryptor(org.apache.syncope.core.spring.security.Encryptor) Logger(org.slf4j.Logger) AnyObject(org.apache.syncope.core.persistence.api.entity.anyobject.AnyObject) PlainSchemaDAO(org.apache.syncope.core.persistence.api.dao.PlainSchemaDAO) VirAttrHandler(org.apache.syncope.core.provisioning.api.VirAttrHandler) User(org.apache.syncope.core.persistence.api.entity.user.User) Membership(org.apache.syncope.core.persistence.api.entity.Membership) Name(org.identityconnectors.framework.common.objects.Name) VirSchema(org.apache.syncope.core.persistence.api.entity.VirSchema) MappingUtils(org.apache.syncope.core.provisioning.java.utils.MappingUtils) Component(org.springframework.stereotype.Component) VirSchemaDAO(org.apache.syncope.core.persistence.api.dao.VirSchemaDAO) UserTO(org.apache.syncope.common.lib.to.UserTO) AnyUtils(org.apache.syncope.core.persistence.api.entity.AnyUtils) Collections(java.util.Collections) Any(org.apache.syncope.core.persistence.api.entity.Any) DateFormatUtils(org.apache.commons.lang3.time.DateFormatUtils) AnyObjectTO(org.apache.syncope.common.lib.to.AnyObjectTO) ParsingValidationException(org.apache.syncope.core.persistence.api.attrvalue.validation.ParsingValidationException) Transactional(org.springframework.transaction.annotation.Transactional) Group(org.apache.syncope.core.persistence.api.entity.group.Group) User(org.apache.syncope.core.persistence.api.entity.user.User) PlainAttr(org.apache.syncope.core.persistence.api.entity.PlainAttr) ItemTransformer(org.apache.syncope.core.provisioning.api.data.ItemTransformer) ArrayList(java.util.ArrayList) Mapping(org.apache.syncope.core.persistence.api.entity.resource.Mapping) GroupableRelatable(org.apache.syncope.core.persistence.api.entity.GroupableRelatable) PlainAttrValue(org.apache.syncope.core.persistence.api.entity.PlainAttrValue) List(java.util.List) ArrayList(java.util.ArrayList) DerSchema(org.apache.syncope.core.persistence.api.entity.DerSchema) VirSchema(org.apache.syncope.core.persistence.api.entity.VirSchema) Date(java.util.Date) ParseException(java.text.ParseException) ParsingValidationException(org.apache.syncope.core.persistence.api.attrvalue.validation.ParsingValidationException) AnyObject(org.apache.syncope.core.persistence.api.entity.anyobject.AnyObject) AnyObject(org.apache.syncope.core.persistence.api.entity.anyobject.AnyObject) AnyUtils(org.apache.syncope.core.persistence.api.entity.AnyUtils) Application(org.apache.syncope.core.persistence.api.entity.Application) Transactional(org.springframework.transaction.annotation.Transactional)

Aggregations

PlainSchema (org.apache.syncope.core.persistence.api.entity.PlainSchema)55 Test (org.junit.jupiter.api.Test)22 AbstractTest (org.apache.syncope.core.persistence.jpa.AbstractTest)21 AnyUtils (org.apache.syncope.core.persistence.api.entity.AnyUtils)15 VirSchema (org.apache.syncope.core.persistence.api.entity.VirSchema)14 User (org.apache.syncope.core.persistence.api.entity.user.User)13 DerSchema (org.apache.syncope.core.persistence.api.entity.DerSchema)12 UPlainAttr (org.apache.syncope.core.persistence.api.entity.user.UPlainAttr)11 ArrayList (java.util.ArrayList)10 PlainAttrValue (org.apache.syncope.core.persistence.api.entity.PlainAttrValue)10 Transactional (org.springframework.transaction.annotation.Transactional)10 SyncopeClientException (org.apache.syncope.common.lib.SyncopeClientException)9 AnyTypeClass (org.apache.syncope.core.persistence.api.entity.AnyTypeClass)9 MappingItem (org.apache.syncope.core.persistence.api.entity.resource.MappingItem)9 Collections (java.util.Collections)8 HashSet (java.util.HashSet)8 List (java.util.List)8 Optional (java.util.Optional)8 NotFoundException (org.apache.syncope.core.persistence.api.dao.NotFoundException)8 ExternalResource (org.apache.syncope.core.persistence.api.entity.resource.ExternalResource)8