Search in sources :

Example 16 with Implementation

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

the class ITImplementationLookup method load.

@Override
public void load() {
    // in case the Elasticsearch extension is enabled, reinit a clean index for all available domains
    if (AopUtils.getTargetClass(anySearchDAO).getName().contains("Elasticsearch")) {
        for (Map.Entry<String, DataSource> entry : domainsHolder.getDomains().entrySet()) {
            AuthContextUtils.execWithAuthContext(entry.getKey(), () -> {
                Implementation reindex = implementationDAO.find(ImplementationType.TASKJOB_DELEGATE).stream().filter(impl -> impl.getEngine() == ImplementationEngine.JAVA && ES_REINDEX.equals(impl.getBody())).findAny().orElse(null);
                if (reindex == null) {
                    reindex = entityFactory.newEntity(Implementation.class);
                    reindex.setEngine(ImplementationEngine.JAVA);
                    reindex.setType(ImplementationType.TASKJOB_DELEGATE);
                    reindex.setBody(ES_REINDEX);
                    reindex = implementationDAO.save(reindex);
                }
                SchedTaskTO task = new SchedTaskTO();
                task.setJobDelegate(reindex.getKey());
                task.setName("Elasticsearch Reindex");
                task = taskLogic.createSchedTask(TaskType.SCHEDULED, task);
                taskLogic.execute(task.getKey(), null, false);
                return null;
            });
        }
    }
}
Also used : SchedTaskTO(org.apache.syncope.common.lib.to.SchedTaskTO) Map(java.util.Map) HashMap(java.util.HashMap) Implementation(org.apache.syncope.core.persistence.api.entity.Implementation) DataSource(javax.sql.DataSource)

Example 17 with Implementation

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

the class JobManagerImpl method register.

@Override
public Map<String, Object> register(final SchedTask task, final Date startAt, final long interruptMaxRetries) throws SchedulerException {
    TaskJob job = createSpringBean(TaskJob.class);
    job.setTaskKey(task.getKey());
    Implementation jobDelegate = task.getJobDelegate() == null ? task instanceof PullTask ? implementationDAO.find(ImplementationType.TASKJOB_DELEGATE).stream().filter(impl -> PullJobDelegate.class.getName().equals(impl.getBody())).findFirst().orElse(null) : task instanceof PushTask ? implementationDAO.find(ImplementationType.TASKJOB_DELEGATE).stream().filter(impl -> PushJobDelegate.class.getName().equals(impl.getBody())).findFirst().orElse(null) : null : task.getJobDelegate();
    if (jobDelegate == null) {
        throw new IllegalArgumentException("Task " + task + " does not provide any " + SchedTaskJobDelegate.class.getSimpleName());
    }
    Map<String, Object> jobMap = new HashMap<>();
    jobMap.put(JobManager.DOMAIN_KEY, AuthContextUtils.getDomain());
    jobMap.put(TaskJob.DELEGATE_IMPLEMENTATION, jobDelegate.getKey());
    registerJob(JobNamer.getJobKey(task).getName(), job, task.getCronExpression(), startAt, jobMap);
    return jobMap;
}
Also used : Connection(java.sql.Connection) SyncopeLoader(org.apache.syncope.core.persistence.api.SyncopeLoader) Date(java.util.Date) LoggerFactory(org.slf4j.LoggerFactory) Autowired(org.springframework.beans.factory.annotation.Autowired) AbstractBeanDefinition(org.springframework.beans.factory.support.AbstractBeanDefinition) StringUtils(org.apache.commons.lang3.StringUtils) CPlainAttr(org.apache.syncope.core.persistence.api.entity.conf.CPlainAttr) JobBuilder(org.quartz.JobBuilder) Scheduler(org.quartz.Scheduler) Pair(org.apache.commons.lang3.tuple.Pair) ResultSet(java.sql.ResultSet) Map(java.util.Map) AuthContextUtils(org.apache.syncope.core.spring.security.AuthContextUtils) SchedulerFactoryBean(org.springframework.scheduling.quartz.SchedulerFactoryBean) ImplementationDAO(org.apache.syncope.core.persistence.api.dao.ImplementationDAO) PullJobDelegate(org.apache.syncope.core.provisioning.java.pushpull.PullJobDelegate) Constants(org.quartz.impl.jdbcjobstore.Constants) Task(org.apache.syncope.core.persistence.api.entity.task.Task) SchedTaskJobDelegate(org.apache.syncope.core.provisioning.api.job.SchedTaskJobDelegate) JobNamer(org.apache.syncope.core.provisioning.api.job.JobNamer) Set(java.util.Set) Implementation(org.apache.syncope.core.persistence.api.entity.Implementation) PreparedStatement(java.sql.PreparedStatement) NotFoundException(org.apache.syncope.core.persistence.api.dao.NotFoundException) JobDataMap(org.quartz.JobDataMap) Optional(java.util.Optional) TriggerKey(org.quartz.TriggerKey) ConfDAO(org.apache.syncope.core.persistence.api.dao.ConfDAO) DataSourceUtils(org.springframework.jdbc.datasource.DataSourceUtils) IOUtil(org.identityconnectors.common.IOUtil) HashMap(java.util.HashMap) Job(org.quartz.Job) JobKey(org.quartz.JobKey) TaskDAO(org.apache.syncope.core.persistence.api.dao.TaskDAO) HashSet(java.util.HashSet) SQLException(java.sql.SQLException) PullTask(org.apache.syncope.core.persistence.api.entity.task.PullTask) SchedulerException(org.quartz.SchedulerException) TriggerBuilder(org.quartz.TriggerBuilder) BeanCreationException(org.springframework.beans.factory.BeanCreationException) DataSource(javax.sql.DataSource) ImplementationType(org.apache.syncope.common.lib.types.ImplementationType) SchedTask(org.apache.syncope.core.persistence.api.entity.task.SchedTask) ReportJob(org.apache.syncope.core.provisioning.java.job.report.ReportJob) SyncopeConstants(org.apache.syncope.common.lib.SyncopeConstants) PushJobDelegate(org.apache.syncope.core.provisioning.java.pushpull.PushJobDelegate) Report(org.apache.syncope.core.persistence.api.entity.Report) Logger(org.slf4j.Logger) Iterator(java.util.Iterator) NotificationJob(org.apache.syncope.core.provisioning.java.job.notification.NotificationJob) ReportDAO(org.apache.syncope.core.persistence.api.dao.ReportDAO) JobManager(org.apache.syncope.core.provisioning.api.job.JobManager) PushTask(org.apache.syncope.core.persistence.api.entity.task.PushTask) DomainsHolder(org.apache.syncope.core.persistence.api.DomainsHolder) ApplicationContextProvider(org.apache.syncope.core.spring.ApplicationContextProvider) TaskType(org.apache.syncope.common.lib.types.TaskType) CronScheduleBuilder(org.quartz.CronScheduleBuilder) Transactional(org.springframework.transaction.annotation.Transactional) PushJobDelegate(org.apache.syncope.core.provisioning.java.pushpull.PushJobDelegate) HashMap(java.util.HashMap) PullTask(org.apache.syncope.core.persistence.api.entity.task.PullTask) PushTask(org.apache.syncope.core.persistence.api.entity.task.PushTask) Implementation(org.apache.syncope.core.persistence.api.entity.Implementation)

Example 18 with Implementation

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

the class TaskDataBinderImpl method createSchedTask.

@Override
public SchedTask createSchedTask(final SchedTaskTO taskTO, final TaskUtils taskUtils) {
    Class<? extends TaskTO> taskTOClass = taskUtils.taskTOClass();
    if (taskTOClass == null || !taskTOClass.equals(taskTO.getClass())) {
        throw new IllegalArgumentException(String.format("Expected %s, found %s", taskTOClass, taskTO.getClass()));
    }
    SchedTask task = taskUtils.newTask();
    task.setStartAt(taskTO.getStartAt());
    task.setCronExpression(taskTO.getCronExpression());
    task.setName(taskTO.getName());
    task.setDescription(taskTO.getDescription());
    task.setActive(taskTO.isActive());
    if (taskUtils.getType() == TaskType.SCHEDULED) {
        Implementation implementation = implementationDAO.find(taskTO.getJobDelegate());
        if (implementation == null) {
            throw new NotFoundException("Implementation " + taskTO.getJobDelegate());
        }
        task.setJobDelegate(implementation);
    } else if (taskTO instanceof ProvisioningTaskTO) {
        ProvisioningTaskTO provisioningTaskTO = (ProvisioningTaskTO) taskTO;
        ExternalResource resource = resourceDAO.find(provisioningTaskTO.getResource());
        if (resource == null) {
            throw new NotFoundException("Resource " + provisioningTaskTO.getResource());
        }
        ((ProvisioningTask) task).setResource(resource);
        fill((ProvisioningTask) task, provisioningTaskTO);
    }
    return task;
}
Also used : SchedTask(org.apache.syncope.core.persistence.api.entity.task.SchedTask) ProvisioningTaskTO(org.apache.syncope.common.lib.to.ProvisioningTaskTO) ProvisioningTask(org.apache.syncope.core.persistence.api.entity.task.ProvisioningTask) NotFoundException(org.apache.syncope.core.persistence.api.dao.NotFoundException) ExternalResource(org.apache.syncope.core.persistence.api.entity.resource.ExternalResource) Implementation(org.apache.syncope.core.persistence.api.entity.Implementation)

Example 19 with Implementation

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

the class TaskDataBinderImpl method fill.

private void fill(final ProvisioningTask task, final ProvisioningTaskTO taskTO) {
    if (task instanceof PushTask && taskTO instanceof PushTaskTO) {
        PushTask pushTask = (PushTask) task;
        PushTaskTO pushTaskTO = (PushTaskTO) taskTO;
        Implementation jobDelegate = pushTaskTO.getJobDelegate() == null ? implementationDAO.find(ImplementationType.TASKJOB_DELEGATE).stream().filter(impl -> PushJobDelegate.class.getName().equals(impl.getBody())).findFirst().orElse(null) : implementationDAO.find(pushTaskTO.getJobDelegate());
        if (jobDelegate == null) {
            jobDelegate = entityFactory.newEntity(Implementation.class);
            jobDelegate.setKey(PushJobDelegate.class.getSimpleName());
            jobDelegate.setEngine(ImplementationEngine.JAVA);
            jobDelegate.setType(ImplementationType.TASKJOB_DELEGATE);
            jobDelegate.setBody(PushJobDelegate.class.getName());
            jobDelegate = implementationDAO.save(jobDelegate);
        }
        pushTask.setJobDelegate(jobDelegate);
        pushTask.setSourceRealm(realmDAO.findByFullPath(pushTaskTO.getSourceRealm()));
        pushTask.setMatchingRule(pushTaskTO.getMatchingRule() == null ? MatchingRule.LINK : pushTaskTO.getMatchingRule());
        pushTask.setUnmatchingRule(pushTaskTO.getUnmatchingRule() == null ? UnmatchingRule.ASSIGN : pushTaskTO.getUnmatchingRule());
        pushTaskTO.getFilters().forEach((type, fiql) -> {
            AnyType anyType = anyTypeDAO.find(type);
            if (anyType == null) {
                LOG.debug("Invalid AnyType {} specified, ignoring...", type);
            } else {
                PushTaskAnyFilter filter = pushTask.getFilter(anyType).orElse(null);
                if (filter == null) {
                    filter = entityFactory.newEntity(PushTaskAnyFilter.class);
                    filter.setAnyType(anyType);
                    filter.setPushTask(pushTask);
                    pushTask.add(filter);
                }
                filter.setFIQLCond(fiql);
            }
        });
        // remove all filters not contained in the TO
        pushTask.getFilters().removeIf(anyFilter -> !pushTaskTO.getFilters().containsKey(anyFilter.getAnyType().getKey()));
    } else if (task instanceof PullTask && taskTO instanceof PullTaskTO) {
        PullTask pullTask = (PullTask) task;
        PullTaskTO pullTaskTO = (PullTaskTO) taskTO;
        Implementation jobDelegate = pullTaskTO.getJobDelegate() == null ? implementationDAO.find(ImplementationType.TASKJOB_DELEGATE).stream().filter(impl -> PullJobDelegate.class.getName().equals(impl.getBody())).findFirst().orElse(null) : implementationDAO.find(pullTaskTO.getJobDelegate());
        if (jobDelegate == null) {
            jobDelegate = entityFactory.newEntity(Implementation.class);
            jobDelegate.setKey(PullJobDelegate.class.getSimpleName());
            jobDelegate.setEngine(ImplementationEngine.JAVA);
            jobDelegate.setType(ImplementationType.TASKJOB_DELEGATE);
            jobDelegate.setBody(PullJobDelegate.class.getName());
            jobDelegate = implementationDAO.save(jobDelegate);
        }
        pullTask.setJobDelegate(jobDelegate);
        pullTask.setPullMode(pullTaskTO.getPullMode());
        if (pullTaskTO.getReconFilterBuilder() == null) {
            pullTask.setReconFilterBuilder(null);
        } else {
            Implementation reconFilterBuilder = implementationDAO.find(pullTaskTO.getReconFilterBuilder());
            if (reconFilterBuilder == null) {
                LOG.debug("Invalid " + Implementation.class.getSimpleName() + " {}, ignoring...", pullTaskTO.getReconFilterBuilder());
            } else {
                pullTask.setReconFilterBuilder(reconFilterBuilder);
            }
        }
        pullTask.setDestinationRealm(realmDAO.findByFullPath(pullTaskTO.getDestinationRealm()));
        pullTask.setMatchingRule(pullTaskTO.getMatchingRule() == null ? MatchingRule.UPDATE : pullTaskTO.getMatchingRule());
        pullTask.setUnmatchingRule(pullTaskTO.getUnmatchingRule() == null ? UnmatchingRule.PROVISION : pullTaskTO.getUnmatchingRule());
        // validate JEXL expressions from templates and proceed if fine
        templateUtils.check(pullTaskTO.getTemplates(), ClientExceptionType.InvalidPullTask);
        pullTaskTO.getTemplates().forEach((type, template) -> {
            AnyType anyType = anyTypeDAO.find(type);
            if (anyType == null) {
                LOG.debug("Invalid AnyType {} specified, ignoring...", type);
            } else {
                AnyTemplatePullTask anyTemplate = pullTask.getTemplate(anyType).orElse(null);
                if (anyTemplate == null) {
                    anyTemplate = entityFactory.newEntity(AnyTemplatePullTask.class);
                    anyTemplate.setAnyType(anyType);
                    anyTemplate.setPullTask(pullTask);
                    pullTask.add(anyTemplate);
                }
                anyTemplate.set(template);
            }
        });
        // remove all templates not contained in the TO
        pullTask.getTemplates().removeIf(anyTemplate -> !pullTaskTO.getTemplates().containsKey(anyTemplate.getAnyType().getKey()));
        pullTask.setRemediation(pullTaskTO.isRemediation());
    }
    // 3. fill the remaining fields
    task.setPerformCreate(taskTO.isPerformCreate());
    task.setPerformUpdate(taskTO.isPerformUpdate());
    task.setPerformDelete(taskTO.isPerformDelete());
    task.setSyncStatus(taskTO.isSyncStatus());
    taskTO.getActions().forEach(action -> {
        Implementation implementation = implementationDAO.find(action);
        if (implementation == null) {
            LOG.debug("Invalid " + Implementation.class.getSimpleName() + " {}, ignoring...", action);
        } else {
            task.add(implementation);
        }
    });
    // remove all implementations not contained in the TO
    task.getActions().removeIf(implementation -> !taskTO.getActions().contains(implementation.getKey()));
}
Also used : SyncopeClientException(org.apache.syncope.common.lib.SyncopeClientException) TaskTO(org.apache.syncope.common.lib.to.TaskTO) LoggerFactory(org.slf4j.LoggerFactory) AnyType(org.apache.syncope.core.persistence.api.entity.AnyType) Autowired(org.springframework.beans.factory.annotation.Autowired) NotificationTask(org.apache.syncope.core.persistence.api.entity.task.NotificationTask) Entity(org.apache.syncope.core.persistence.api.entity.Entity) StringUtils(org.apache.commons.lang3.StringUtils) PropagationTask(org.apache.syncope.core.persistence.api.entity.task.PropagationTask) Scheduler(org.quartz.Scheduler) PropagationTaskTO(org.apache.syncope.common.lib.to.PropagationTaskTO) SchedTaskTO(org.apache.syncope.common.lib.to.SchedTaskTO) ProvisioningTaskTO(org.apache.syncope.common.lib.to.ProvisioningTaskTO) TaskExecDAO(org.apache.syncope.core.persistence.api.dao.TaskExecDAO) SchedulerFactoryBean(org.springframework.scheduling.quartz.SchedulerFactoryBean) ImplementationDAO(org.apache.syncope.core.persistence.api.dao.ImplementationDAO) NotificationTaskTO(org.apache.syncope.common.lib.to.NotificationTaskTO) PullJobDelegate(org.apache.syncope.core.provisioning.java.pushpull.PullJobDelegate) ExecTO(org.apache.syncope.common.lib.to.ExecTO) Task(org.apache.syncope.core.persistence.api.entity.task.Task) JobNamer(org.apache.syncope.core.provisioning.api.job.JobNamer) Implementation(org.apache.syncope.core.persistence.api.entity.Implementation) Collectors(java.util.stream.Collectors) UnmatchingRule(org.apache.syncope.common.lib.types.UnmatchingRule) NotFoundException(org.apache.syncope.core.persistence.api.dao.NotFoundException) AnyTypeDAO(org.apache.syncope.core.persistence.api.dao.AnyTypeDAO) ImplementationEngine(org.apache.syncope.common.lib.types.ImplementationEngine) EntityFactory(org.apache.syncope.core.persistence.api.entity.EntityFactory) AnyTemplatePullTask(org.apache.syncope.core.persistence.api.entity.task.AnyTemplatePullTask) TaskUtilsFactory(org.apache.syncope.core.persistence.api.entity.task.TaskUtilsFactory) ProvisioningTask(org.apache.syncope.core.persistence.api.entity.task.ProvisioningTask) TriggerKey(org.quartz.TriggerKey) ExternalResourceDAO(org.apache.syncope.core.persistence.api.dao.ExternalResourceDAO) TaskDataBinder(org.apache.syncope.core.provisioning.api.data.TaskDataBinder) BeanUtils(org.apache.syncope.core.spring.BeanUtils) PullTask(org.apache.syncope.core.persistence.api.entity.task.PullTask) SchedulerException(org.quartz.SchedulerException) Trigger(org.quartz.Trigger) ImplementationType(org.apache.syncope.common.lib.types.ImplementationType) TaskExec(org.apache.syncope.core.persistence.api.entity.task.TaskExec) ClientExceptionType(org.apache.syncope.common.lib.types.ClientExceptionType) SchedTask(org.apache.syncope.core.persistence.api.entity.task.SchedTask) RealmDAO(org.apache.syncope.core.persistence.api.dao.RealmDAO) TemplateUtils(org.apache.syncope.core.provisioning.java.utils.TemplateUtils) PushJobDelegate(org.apache.syncope.core.provisioning.java.pushpull.PushJobDelegate) PushTaskTO(org.apache.syncope.common.lib.to.PushTaskTO) Logger(org.slf4j.Logger) PushTaskAnyFilter(org.apache.syncope.core.persistence.api.entity.task.PushTaskAnyFilter) TaskUtils(org.apache.syncope.core.persistence.api.entity.task.TaskUtils) ExternalResource(org.apache.syncope.core.persistence.api.entity.resource.ExternalResource) PushTask(org.apache.syncope.core.persistence.api.entity.task.PushTask) Component(org.springframework.stereotype.Component) PullTaskTO(org.apache.syncope.common.lib.to.PullTaskTO) JobType(org.apache.syncope.common.lib.types.JobType) MatchingRule(org.apache.syncope.common.lib.types.MatchingRule) TaskType(org.apache.syncope.common.lib.types.TaskType) PushTaskAnyFilter(org.apache.syncope.core.persistence.api.entity.task.PushTaskAnyFilter) PushJobDelegate(org.apache.syncope.core.provisioning.java.pushpull.PushJobDelegate) AnyTemplatePullTask(org.apache.syncope.core.persistence.api.entity.task.AnyTemplatePullTask) PullTask(org.apache.syncope.core.persistence.api.entity.task.PullTask) PushTaskTO(org.apache.syncope.common.lib.to.PushTaskTO) AnyTemplatePullTask(org.apache.syncope.core.persistence.api.entity.task.AnyTemplatePullTask) PullTaskTO(org.apache.syncope.common.lib.to.PullTaskTO) PushTask(org.apache.syncope.core.persistence.api.entity.task.PushTask) AnyType(org.apache.syncope.core.persistence.api.entity.AnyType) Implementation(org.apache.syncope.core.persistence.api.entity.Implementation)

Example 20 with Implementation

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

the class GroupLogic method bulkMembersAction.

@PreAuthorize("hasRole('" + StandardEntitlement.TASK_CREATE + "') " + "and hasRole('" + StandardEntitlement.TASK_EXECUTE + "')")
@Transactional
public ExecTO bulkMembersAction(final String key, final BulkMembersActionType actionType) {
    Group group = groupDAO.find(key);
    if (group == null) {
        throw new NotFoundException("Group " + key);
    }
    Implementation jobDelegate = implementationDAO.find(ImplementationType.TASKJOB_DELEGATE).stream().filter(impl -> GroupMemberProvisionTaskJobDelegate.class.getName().equals(impl.getBody())).findFirst().orElse(null);
    if (jobDelegate == null) {
        jobDelegate = entityFactory.newEntity(Implementation.class);
        jobDelegate.setKey(GroupMemberProvisionTaskJobDelegate.class.getSimpleName());
        jobDelegate.setEngine(ImplementationEngine.JAVA);
        jobDelegate.setType(ImplementationType.TASKJOB_DELEGATE);
        jobDelegate.setBody(GroupMemberProvisionTaskJobDelegate.class.getName());
        jobDelegate = implementationDAO.save(jobDelegate);
    }
    SchedTask task = entityFactory.newEntity(SchedTask.class);
    task.setName("Bulk member provision for group " + group.getName());
    task.setActive(true);
    task.setJobDelegate(jobDelegate);
    task = taskDAO.save(task);
    try {
        Map<String, Object> jobDataMap = jobManager.register(task, null, confDAO.find("tasks.interruptMaxRetries", 1L));
        jobDataMap.put(TaskJob.DRY_RUN_JOBDETAIL_KEY, false);
        jobDataMap.put(GroupMemberProvisionTaskJobDelegate.GROUP_KEY_JOBDETAIL_KEY, key);
        jobDataMap.put(GroupMemberProvisionTaskJobDelegate.ACTION_TYPE_JOBDETAIL_KEY, actionType);
        scheduler.getScheduler().triggerJob(JobNamer.getJobKey(task), new JobDataMap(jobDataMap));
    } catch (Exception e) {
        LOG.error("While executing task {}", task, e);
        SyncopeClientException sce = SyncopeClientException.build(ClientExceptionType.Scheduling);
        sce.getElements().add(e.getMessage());
        throw sce;
    }
    ExecTO result = new ExecTO();
    result.setJobType(JobType.TASK);
    result.setRefKey(task.getKey());
    result.setRefDesc(taskDataBinder.buildRefDesc(task));
    result.setStart(new Date());
    result.setStatus("JOB_FIRED");
    result.setMessage("Job fired; waiting for results...");
    return result;
}
Also used : Group(org.apache.syncope.core.persistence.api.entity.group.Group) JobDataMap(org.quartz.JobDataMap) ExecTO(org.apache.syncope.common.lib.to.ExecTO) SyncopeClientException(org.apache.syncope.common.lib.SyncopeClientException) NotFoundException(org.apache.syncope.core.persistence.api.dao.NotFoundException) Implementation(org.apache.syncope.core.persistence.api.entity.Implementation) GroupMemberProvisionTaskJobDelegate(org.apache.syncope.core.provisioning.java.job.GroupMemberProvisionTaskJobDelegate) SyncopeClientException(org.apache.syncope.common.lib.SyncopeClientException) NotFoundException(org.apache.syncope.core.persistence.api.dao.NotFoundException) DelegatedAdministrationException(org.apache.syncope.core.spring.security.DelegatedAdministrationException) Date(java.util.Date) SchedTask(org.apache.syncope.core.persistence.api.entity.task.SchedTask) PreAuthorize(org.springframework.security.access.prepost.PreAuthorize) Transactional(org.springframework.transaction.annotation.Transactional)

Aggregations

Implementation (org.apache.syncope.core.persistence.api.entity.Implementation)28 SyncopeClientException (org.apache.syncope.common.lib.SyncopeClientException)12 NotFoundException (org.apache.syncope.core.persistence.api.dao.NotFoundException)8 ExternalResource (org.apache.syncope.core.persistence.api.entity.resource.ExternalResource)8 PasswordPolicy (org.apache.syncope.core.persistence.api.entity.policy.PasswordPolicy)7 ImplementationDAO (org.apache.syncope.core.persistence.api.dao.ImplementationDAO)6 AbstractTest (org.apache.syncope.core.persistence.jpa.AbstractTest)6 Test (org.junit.jupiter.api.Test)6 AnyType (org.apache.syncope.core.persistence.api.entity.AnyType)5 Date (java.util.Date)4 AnyTypeDAO (org.apache.syncope.core.persistence.api.dao.AnyTypeDAO)4 EntityFactory (org.apache.syncope.core.persistence.api.entity.EntityFactory)4 AccountPolicy (org.apache.syncope.core.persistence.api.entity.policy.AccountPolicy)4 PullPolicy (org.apache.syncope.core.persistence.api.entity.policy.PullPolicy)4 PullTask (org.apache.syncope.core.persistence.api.entity.task.PullTask)4 SchedTask (org.apache.syncope.core.persistence.api.entity.task.SchedTask)4 Logger (org.slf4j.Logger)4 LoggerFactory (org.slf4j.LoggerFactory)4 Autowired (org.springframework.beans.factory.annotation.Autowired)4 PreAuthorize (org.springframework.security.access.prepost.PreAuthorize)4