Search in sources :

Example 6 with Entity

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

the class ResourceDataBinderImpl method getResourceTO.

@Override
public ResourceTO getResourceTO(final ExternalResource resource) {
    ResourceTO resourceTO = new ResourceTO();
    // set the resource name
    resourceTO.setKey(resource.getKey());
    // set the connector instance
    ConnInstance connector = resource.getConnector();
    resourceTO.setConnector(connector == null ? null : connector.getKey());
    resourceTO.setConnectorDisplayName(connector == null ? null : connector.getDisplayName());
    // set the provision information
    resource.getProvisions().stream().map(provision -> {
        ProvisionTO provisionTO = new ProvisionTO();
        provisionTO.setKey(provision.getKey());
        provisionTO.setAnyType(provision.getAnyType().getKey());
        provisionTO.setObjectClass(provision.getObjectClass().getObjectClassValue());
        provisionTO.getAuxClasses().addAll(provision.getAuxClasses().stream().map(cls -> cls.getKey()).collect(Collectors.toList()));
        provisionTO.setSyncToken(provision.getSerializedSyncToken());
        if (provision.getMapping() != null) {
            MappingTO mappingTO = new MappingTO();
            provisionTO.setMapping(mappingTO);
            mappingTO.setConnObjectLink(provision.getMapping().getConnObjectLink());
            populateItems(provision.getMapping().getItems(), mappingTO);
        }
        virSchemaDAO.findByProvision(provision).forEach(virSchema -> {
            provisionTO.getVirSchemas().add(virSchema.getKey());
            MappingItem linkingMappingItem = virSchema.asLinkingMappingItem();
            ItemTO itemTO = new ItemTO();
            itemTO.setKey(linkingMappingItem.getKey());
            BeanUtils.copyProperties(linkingMappingItem, itemTO, ITEM_IGNORE_PROPERTIES);
            provisionTO.getMapping().getLinkingItems().add(itemTO);
        });
        return provisionTO;
    }).forEachOrdered(provisionTO -> {
        resourceTO.getProvisions().add(provisionTO);
    });
    if (resource.getOrgUnit() != null) {
        OrgUnit orgUnit = resource.getOrgUnit();
        OrgUnitTO orgUnitTO = new OrgUnitTO();
        orgUnitTO.setKey(orgUnit.getKey());
        orgUnitTO.setObjectClass(orgUnit.getObjectClass().getObjectClassValue());
        orgUnitTO.setSyncToken(orgUnit.getSerializedSyncToken());
        orgUnitTO.setConnObjectLink(orgUnit.getConnObjectLink());
        populateItems(orgUnit.getItems(), orgUnitTO);
        resourceTO.setOrgUnit(orgUnitTO);
    }
    resourceTO.setEnforceMandatoryCondition(resource.isEnforceMandatoryCondition());
    resourceTO.setPropagationPriority(resource.getPropagationPriority());
    resourceTO.setRandomPwdIfNotProvided(resource.isRandomPwdIfNotProvided());
    resourceTO.setCreateTraceLevel(resource.getCreateTraceLevel());
    resourceTO.setUpdateTraceLevel(resource.getUpdateTraceLevel());
    resourceTO.setDeleteTraceLevel(resource.getDeleteTraceLevel());
    resourceTO.setProvisioningTraceLevel(resource.getProvisioningTraceLevel());
    resourceTO.setPasswordPolicy(resource.getPasswordPolicy() == null ? null : resource.getPasswordPolicy().getKey());
    resourceTO.setAccountPolicy(resource.getAccountPolicy() == null ? null : resource.getAccountPolicy().getKey());
    resourceTO.setPullPolicy(resource.getPullPolicy() == null ? null : resource.getPullPolicy().getKey());
    resourceTO.getConfOverride().addAll(resource.getConfOverride());
    Collections.sort(resourceTO.getConfOverride());
    resourceTO.setOverrideCapabilities(resource.isOverrideCapabilities());
    resourceTO.getCapabilitiesOverride().addAll(resource.getCapabilitiesOverride());
    resourceTO.getPropagationActions().addAll(resource.getPropagationActions().stream().map(Entity::getKey).collect(Collectors.toList()));
    return resourceTO;
}
Also used : ProvisionTO(org.apache.syncope.common.lib.to.ProvisionTO) SyncopeClientException(org.apache.syncope.common.lib.SyncopeClientException) PullPolicy(org.apache.syncope.core.persistence.api.entity.policy.PullPolicy) Date(java.util.Date) LoggerFactory(org.slf4j.LoggerFactory) AnyType(org.apache.syncope.core.persistence.api.entity.AnyType) Autowired(org.springframework.beans.factory.annotation.Autowired) Entity(org.apache.syncope.core.persistence.api.entity.Entity) JexlUtils(org.apache.syncope.core.provisioning.java.jexl.JexlUtils) OrgUnit(org.apache.syncope.core.persistence.api.entity.resource.OrgUnit) AuthContextUtils(org.apache.syncope.core.spring.security.AuthContextUtils) ParseException(java.text.ParseException) ImplementationDAO(org.apache.syncope.core.persistence.api.dao.ImplementationDAO) AnyTypeClass(org.apache.syncope.core.persistence.api.entity.AnyTypeClass) MappingTO(org.apache.syncope.common.lib.to.MappingTO) OrgUnitItem(org.apache.syncope.core.persistence.api.entity.resource.OrgUnitItem) Implementation(org.apache.syncope.core.persistence.api.entity.Implementation) SchemaType(org.apache.syncope.common.lib.types.SchemaType) ConnInstanceDAO(org.apache.syncope.core.persistence.api.dao.ConnInstanceDAO) ResourceDataBinder(org.apache.syncope.core.provisioning.api.data.ResourceDataBinder) Collectors(java.util.stream.Collectors) MappingItem(org.apache.syncope.core.persistence.api.entity.resource.MappingItem) AnyTypeDAO(org.apache.syncope.core.persistence.api.dao.AnyTypeDAO) EntityFactory(org.apache.syncope.core.persistence.api.entity.EntityFactory) List(java.util.List) AccountPolicy(org.apache.syncope.core.persistence.api.entity.policy.AccountPolicy) Provision(org.apache.syncope.core.persistence.api.entity.resource.Provision) ObjectClass(org.identityconnectors.framework.common.objects.ObjectClass) PolicyDAO(org.apache.syncope.core.persistence.api.dao.PolicyDAO) ConfDAO(org.apache.syncope.core.persistence.api.dao.ConfDAO) ExternalResourceHistoryConfDAO(org.apache.syncope.core.persistence.api.dao.ExternalResourceHistoryConfDAO) IntAttrName(org.apache.syncope.core.provisioning.api.IntAttrName) ResourceHistoryConfTO(org.apache.syncope.common.lib.to.ResourceHistoryConfTO) BeanUtils(org.apache.syncope.core.spring.BeanUtils) HashSet(java.util.HashSet) PasswordPolicy(org.apache.syncope.core.persistence.api.entity.policy.PasswordPolicy) ItemTO(org.apache.syncope.common.lib.to.ItemTO) SyncopeClientCompositeException(org.apache.syncope.common.lib.SyncopeClientCompositeException) ClientExceptionType(org.apache.syncope.common.lib.types.ClientExceptionType) Item(org.apache.syncope.core.persistence.api.entity.resource.Item) AnyTypeClassTO(org.apache.syncope.common.lib.to.AnyTypeClassTO) Mapping(org.apache.syncope.core.persistence.api.entity.resource.Mapping) Logger(org.slf4j.Logger) Iterator(java.util.Iterator) ResourceTO(org.apache.syncope.common.lib.to.ResourceTO) ItemContainerTO(org.apache.syncope.common.lib.to.ItemContainerTO) IteratorChain(org.apache.syncope.common.lib.collections.IteratorChain) ExternalResourceHistoryConf(org.apache.syncope.core.persistence.api.entity.resource.ExternalResourceHistoryConf) ConnInstance(org.apache.syncope.core.persistence.api.entity.ConnInstance) VirSchema(org.apache.syncope.core.persistence.api.entity.VirSchema) ExternalResource(org.apache.syncope.core.persistence.api.entity.resource.ExternalResource) Component(org.springframework.stereotype.Component) MappingPurpose(org.apache.syncope.common.lib.types.MappingPurpose) OrgUnitTO(org.apache.syncope.common.lib.to.OrgUnitTO) VirSchemaDAO(org.apache.syncope.core.persistence.api.dao.VirSchemaDAO) IntAttrNameParser(org.apache.syncope.core.provisioning.java.IntAttrNameParser) Collections(java.util.Collections) AnyTypeClassDAO(org.apache.syncope.core.persistence.api.dao.AnyTypeClassDAO) OrgUnit(org.apache.syncope.core.persistence.api.entity.resource.OrgUnit) Entity(org.apache.syncope.core.persistence.api.entity.Entity) MappingTO(org.apache.syncope.common.lib.to.MappingTO) MappingItem(org.apache.syncope.core.persistence.api.entity.resource.MappingItem) OrgUnitTO(org.apache.syncope.common.lib.to.OrgUnitTO) ResourceTO(org.apache.syncope.common.lib.to.ResourceTO) ProvisionTO(org.apache.syncope.common.lib.to.ProvisionTO) ItemTO(org.apache.syncope.common.lib.to.ItemTO) ConnInstance(org.apache.syncope.core.persistence.api.entity.ConnInstance)

Example 7 with Entity

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

the class RoleDataBinderImpl method getRoleTO.

@Override
public RoleTO getRoleTO(final Role role) {
    RoleTO roleTO = new RoleTO();
    roleTO.setKey(role.getKey());
    roleTO.getEntitlements().addAll(role.getEntitlements());
    roleTO.getRealms().addAll(role.getRealms().stream().map(Realm::getFullPath).collect(Collectors.toList()));
    roleTO.getDynRealms().addAll(role.getDynRealms().stream().map(Entity::getKey).collect(Collectors.toList()));
    if (role.getDynMembership() != null) {
        roleTO.setDynMembershipCond(role.getDynMembership().getFIQLCond());
    }
    roleTO.getPrivileges().addAll(role.getPrivileges().stream().map(Entity::getKey).collect(Collectors.toList()));
    return roleTO;
}
Also used : Entity(org.apache.syncope.core.persistence.api.entity.Entity) RoleTO(org.apache.syncope.common.lib.to.RoleTO) Realm(org.apache.syncope.core.persistence.api.entity.Realm) DynRealm(org.apache.syncope.core.persistence.api.entity.DynRealm)

Example 8 with Entity

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

the class PolicyDataBinderImpl method getPolicyTO.

@SuppressWarnings("unchecked")
@Override
public <T extends PolicyTO> T getPolicyTO(final Policy policy) {
    T policyTO = null;
    if (policy instanceof PasswordPolicy) {
        PasswordPolicy passwordPolicy = PasswordPolicy.class.cast(policy);
        PasswordPolicyTO passwordPolicyTO = new PasswordPolicyTO();
        policyTO = (T) passwordPolicyTO;
        passwordPolicyTO.setAllowNullPassword(passwordPolicy.isAllowNullPassword());
        passwordPolicyTO.setHistoryLength(passwordPolicy.getHistoryLength());
        passwordPolicyTO.getRules().addAll(passwordPolicy.getRules().stream().map(Entity::getKey).collect(Collectors.toList()));
    } else if (policy instanceof AccountPolicy) {
        AccountPolicy accountPolicy = AccountPolicy.class.cast(policy);
        AccountPolicyTO accountPolicyTO = new AccountPolicyTO();
        policyTO = (T) accountPolicyTO;
        accountPolicyTO.setMaxAuthenticationAttempts(accountPolicy.getMaxAuthenticationAttempts());
        accountPolicyTO.setPropagateSuspension(accountPolicy.isPropagateSuspension());
        accountPolicyTO.getRules().addAll(accountPolicy.getRules().stream().map(Entity::getKey).collect(Collectors.toList()));
        accountPolicyTO.getPassthroughResources().addAll(accountPolicy.getResources().stream().map(Entity::getKey).collect(Collectors.toList()));
    } else if (policy instanceof PullPolicy) {
        PullPolicy pullPolicy = PullPolicy.class.cast(policy);
        PullPolicyTO pullPolicyTO = new PullPolicyTO();
        policyTO = (T) pullPolicyTO;
        pullPolicyTO.setConflictResolutionAction(((PullPolicy) policy).getConflictResolutionAction());
        pullPolicy.getCorrelationRules().forEach(rule -> {
            pullPolicyTO.getCorrelationRules().put(rule.getAnyType().getKey(), rule.getImplementation().getKey());
        });
    }
    if (policyTO != null) {
        policyTO.setKey(policy.getKey());
        policyTO.setDescription(policy.getDescription());
        for (ExternalResource resource : resourceDAO.findByPolicy(policy)) {
            policyTO.getUsedByResources().add(resource.getKey());
        }
        for (Realm realm : realmDAO.findByPolicy(policy)) {
            policyTO.getUsedByRealms().add(realm.getFullPath());
        }
    }
    return policyTO;
}
Also used : Entity(org.apache.syncope.core.persistence.api.entity.Entity) AccountPolicy(org.apache.syncope.core.persistence.api.entity.policy.AccountPolicy) PullPolicyTO(org.apache.syncope.common.lib.policy.PullPolicyTO) PasswordPolicy(org.apache.syncope.core.persistence.api.entity.policy.PasswordPolicy) PullPolicy(org.apache.syncope.core.persistence.api.entity.policy.PullPolicy) AccountPolicyTO(org.apache.syncope.common.lib.policy.AccountPolicyTO) ExternalResource(org.apache.syncope.core.persistence.api.entity.resource.ExternalResource) Realm(org.apache.syncope.core.persistence.api.entity.Realm) PasswordPolicyTO(org.apache.syncope.common.lib.policy.PasswordPolicyTO)

Example 9 with Entity

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

the class ResourceTest method delete.

@Test
public void delete() {
    ExternalResource resource = resourceDAO.find("resource-testdb");
    assertNotNull(resource);
    // -------------------------------------
    // Get originally associated connector
    // -------------------------------------
    ConnInstance connector = resource.getConnector();
    assertNotNull(connector);
    // -------------------------------------
    // -------------------------------------
    // Get originally associated users
    // -------------------------------------
    List<User> users = userDAO.findByResource(resource);
    assertNotNull(users);
    Set<String> userKeys = users.stream().map(Entity::getKey).collect(Collectors.toSet());
    // -------------------------------------
    // Get tasks
    List<PropagationTask> propagationTasks = taskDAO.findAll(TaskType.PROPAGATION, resource, null, null, null, -1, -1, Collections.<OrderByClause>emptyList());
    assertFalse(propagationTasks.isEmpty());
    // delete resource
    resourceDAO.delete(resource.getKey());
    // close the transaction
    resourceDAO.flush();
    // resource must be removed
    ExternalResource actual = resourceDAO.find("resource-testdb");
    assertNull(actual);
    // resource must be not referenced any more from users
    userKeys.stream().map(key -> userDAO.find(key)).map(actualUser -> {
        assertNotNull(actualUser);
        return actualUser;
    }).forEachOrdered((actualUser) -> {
        userDAO.findAllResources(actualUser).forEach(res -> assertFalse(res.getKey().equalsIgnoreCase(resource.getKey())));
    });
    // resource must be not referenced any more from the connector
    ConnInstance actualConnector = connInstanceDAO.find(connector.getKey());
    assertNotNull(actualConnector);
    actualConnector.getResources().forEach(res -> assertFalse(res.getKey().equalsIgnoreCase(resource.getKey())));
    // there must be no tasks
    propagationTasks.forEach(task -> assertNull(taskDAO.find(task.getKey())));
}
Also used : JPAMappingItem(org.apache.syncope.core.persistence.jpa.entity.resource.JPAMappingItem) Assertions.assertNotNull(org.junit.jupiter.api.Assertions.assertNotNull) Assertions.assertNull(org.junit.jupiter.api.Assertions.assertNull) OrderByClause(org.apache.syncope.core.persistence.api.dao.search.OrderByClause) Autowired(org.springframework.beans.factory.annotation.Autowired) Entity(org.apache.syncope.core.persistence.api.entity.Entity) PropagationTask(org.apache.syncope.core.persistence.api.entity.task.PropagationTask) TaskDAO(org.apache.syncope.core.persistence.api.dao.TaskDAO) PasswordPolicy(org.apache.syncope.core.persistence.api.entity.policy.PasswordPolicy) Assertions.assertFalse(org.junit.jupiter.api.Assertions.assertFalse) JPAOrgUnit(org.apache.syncope.core.persistence.jpa.entity.resource.JPAOrgUnit) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) Mapping(org.apache.syncope.core.persistence.api.entity.resource.Mapping) UserDAO(org.apache.syncope.core.persistence.api.dao.UserDAO) Set(java.util.Set) User(org.apache.syncope.core.persistence.api.entity.user.User) ConnInstanceDAO(org.apache.syncope.core.persistence.api.dao.ConnInstanceDAO) Collectors(java.util.stream.Collectors) AnyTypeDAO(org.apache.syncope.core.persistence.api.dao.AnyTypeDAO) ConnInstance(org.apache.syncope.core.persistence.api.entity.ConnInstance) MappingItem(org.apache.syncope.core.persistence.api.entity.resource.MappingItem) Test(org.junit.jupiter.api.Test) ExternalResource(org.apache.syncope.core.persistence.api.entity.resource.ExternalResource) List(java.util.List) Provision(org.apache.syncope.core.persistence.api.entity.resource.Provision) MappingPurpose(org.apache.syncope.common.lib.types.MappingPurpose) ObjectClass(org.identityconnectors.framework.common.objects.ObjectClass) PolicyDAO(org.apache.syncope.core.persistence.api.dao.PolicyDAO) Assertions.assertTrue(org.junit.jupiter.api.Assertions.assertTrue) VirSchemaDAO(org.apache.syncope.core.persistence.api.dao.VirSchemaDAO) AbstractTest(org.apache.syncope.core.persistence.jpa.AbstractTest) Collections(java.util.Collections) ExternalResourceDAO(org.apache.syncope.core.persistence.api.dao.ExternalResourceDAO) TaskType(org.apache.syncope.common.lib.types.TaskType) Transactional(org.springframework.transaction.annotation.Transactional) User(org.apache.syncope.core.persistence.api.entity.user.User) PropagationTask(org.apache.syncope.core.persistence.api.entity.task.PropagationTask) ExternalResource(org.apache.syncope.core.persistence.api.entity.resource.ExternalResource) ConnInstance(org.apache.syncope.core.persistence.api.entity.ConnInstance) Test(org.junit.jupiter.api.Test) AbstractTest(org.apache.syncope.core.persistence.jpa.AbstractTest)

Example 10 with Entity

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

the class ElasticsearchUtils method builder.

/**
 * Returns the builder specialized with content from the provided any.
 *
 * @param any user, group or any object to index
 * @return builder specialized with content from the provided any
 * @throws IOException in case of errors
 */
@Transactional
public XContentBuilder builder(final Any<?> any) throws IOException {
    XContentBuilder builder = XContentFactory.jsonBuilder().startObject().field("id", any.getKey()).field("realm", any.getRealm().getFullPath()).field("anyType", any.getType().getKey()).field("creationDate", any.getCreationDate()).field("creator", any.getCreator()).field("lastChangeDate", any.getLastChangeDate()).field("lastModified", any.getLastModifier()).field("status", any.getStatus()).field("resources", any instanceof User ? userDAO.findAllResourceKeys(any.getKey()) : any instanceof AnyObject ? anyObjectDAO.findAllResourceKeys(any.getKey()) : groupDAO.findAllResourceKeys(any.getKey())).field("dynRealms", any instanceof User ? userDAO.findDynRealms(any.getKey()) : any instanceof AnyObject ? anyObjectDAO.findDynRealms(any.getKey()) : groupDAO.findDynRealms(any.getKey()));
    if (any instanceof AnyObject) {
        AnyObject anyObject = ((AnyObject) any);
        builder = builder.field("name", anyObject.getName());
        List<Object> memberships = new ArrayList<>(anyObjectDAO.findAllGroupKeys(anyObject));
        builder = builder.field("memberships", memberships);
        List<Object> relationships = new ArrayList<>();
        List<Object> relationshipTypes = new ArrayList<>();
        anyObjectDAO.findAllRelationships(anyObject).forEach(relationship -> {
            relationships.add(relationship.getRightEnd().getKey());
            relationshipTypes.add(relationship.getType().getKey());
        });
        builder = builder.field("relationships", relationships);
        builder = builder.field("relationshipTypes", relationshipTypes);
    } else if (any instanceof Group) {
        Group group = ((Group) any);
        builder = builder.field("name", group.getName());
        if (group.getUserOwner() != null) {
            builder = builder.field("userOwner", group.getUserOwner().getKey());
        }
        if (group.getGroupOwner() != null) {
            builder = builder.field("groupOwner", group.getGroupOwner().getKey());
        }
        List<Object> members = groupDAO.findUMemberships(group).stream().map(membership -> membership.getLeftEnd().getKey()).collect(Collectors.toList());
        members.add(groupDAO.findUDynMembers(group));
        members.addAll(groupDAO.findAMemberships(group).stream().map(membership -> membership.getLeftEnd().getKey()).collect(Collectors.toList()));
        members.add(groupDAO.findADynMembers(group));
        builder = builder.field("members", members);
    } else if (any instanceof User) {
        User user = ((User) any);
        builder = builder.field("username", user.getUsername()).field("lastLoginDate", user.getLastLoginDate()).field("lastRecertification", user.getLastRecertification()).field("lastRecertificator", user.getLastRecertificator());
        List<Object> roles = userDAO.findAllRoles(user).stream().map(r -> r.getKey()).collect(Collectors.toList());
        builder = builder.field("roles", roles);
        Set<Object> privileges = userDAO.findAllRoles(user).stream().flatMap(role -> role.getPrivileges().stream()).map(Entity::getKey).collect(Collectors.toSet());
        builder = builder.field("privileges", privileges);
        List<Object> memberships = new ArrayList<>(userDAO.findAllGroupKeys(user));
        builder = builder.field("memberships", memberships);
        List<Object> relationships = new ArrayList<>();
        Set<Object> relationshipTypes = new HashSet<>();
        user.getRelationships().stream().map(relationship -> {
            relationships.add(relationship.getRightEnd().getKey());
            return relationship;
        }).forEachOrdered(relationship -> {
            relationshipTypes.add(relationship.getType().getKey());
        });
        builder = builder.field("relationships", relationships);
        builder = builder.field("relationshipTypes", relationshipTypes);
    }
    if (any.getPlainAttrs() != null) {
        for (PlainAttr<?> plainAttr : any.getPlainAttrs()) {
            List<Object> values = plainAttr.getValues().stream().map(value -> value.getValue()).collect(Collectors.toList());
            if (plainAttr.getUniqueValue() != null) {
                values.add(plainAttr.getUniqueValue().getValue());
            }
            builder = builder.field(plainAttr.getSchema().getKey(), values);
        }
    }
    builder = builder.endObject();
    return builder;
}
Also used : XContentFactory(org.elasticsearch.common.xcontent.XContentFactory) UserDAO(org.apache.syncope.core.persistence.api.dao.UserDAO) AnyObject(org.apache.syncope.core.persistence.api.entity.anyobject.AnyObject) PlainAttr(org.apache.syncope.core.persistence.api.entity.PlainAttr) Set(java.util.Set) User(org.apache.syncope.core.persistence.api.entity.user.User) Autowired(org.springframework.beans.factory.annotation.Autowired) IOException(java.io.IOException) Entity(org.apache.syncope.core.persistence.api.entity.Entity) XContentBuilder(org.elasticsearch.common.xcontent.XContentBuilder) Collectors(java.util.stream.Collectors) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) List(java.util.List) GroupDAO(org.apache.syncope.core.persistence.api.dao.GroupDAO) AnyObjectDAO(org.apache.syncope.core.persistence.api.dao.AnyObjectDAO) Group(org.apache.syncope.core.persistence.api.entity.group.Group) Any(org.apache.syncope.core.persistence.api.entity.Any) Transactional(org.springframework.transaction.annotation.Transactional) Group(org.apache.syncope.core.persistence.api.entity.group.Group) AnyObject(org.apache.syncope.core.persistence.api.entity.anyobject.AnyObject) User(org.apache.syncope.core.persistence.api.entity.user.User) ArrayList(java.util.ArrayList) AnyObject(org.apache.syncope.core.persistence.api.entity.anyobject.AnyObject) ArrayList(java.util.ArrayList) List(java.util.List) XContentBuilder(org.elasticsearch.common.xcontent.XContentBuilder) HashSet(java.util.HashSet) Transactional(org.springframework.transaction.annotation.Transactional)

Aggregations

Entity (org.apache.syncope.core.persistence.api.entity.Entity)17 Collectors (java.util.stream.Collectors)5 SyncopeClientException (org.apache.syncope.common.lib.SyncopeClientException)5 ExternalResource (org.apache.syncope.core.persistence.api.entity.resource.ExternalResource)5 Autowired (org.springframework.beans.factory.annotation.Autowired)5 List (java.util.List)4 AnyTypeDAO (org.apache.syncope.core.persistence.api.dao.AnyTypeDAO)4 Realm (org.apache.syncope.core.persistence.api.entity.Realm)4 Collections (java.util.Collections)3 HashSet (java.util.HashSet)3 Set (java.util.Set)3 User (org.apache.syncope.core.persistence.api.entity.user.User)3 PreAuthorize (org.springframework.security.access.prepost.PreAuthorize)3 Transactional (org.springframework.transaction.annotation.Transactional)3 ArrayList (java.util.ArrayList)2 Date (java.util.Date)2 StringUtils (org.apache.commons.lang3.StringUtils)2 SyncopeClientCompositeException (org.apache.syncope.common.lib.SyncopeClientCompositeException)2 AnyTypeClassTO (org.apache.syncope.common.lib.to.AnyTypeClassTO)2 ClientExceptionType (org.apache.syncope.common.lib.types.ClientExceptionType)2