diff --git a/core/idrepo/logic/src/main/java/org/apache/syncope/core/logic/init/ClassPathScanImplementationLookup.java b/core/idrepo/logic/src/main/java/org/apache/syncope/core/logic/init/ClassPathScanImplementationLookup.java index 58acb1cbf3f..9405d9f2ddc 100644 --- a/core/idrepo/logic/src/main/java/org/apache/syncope/core/logic/init/ClassPathScanImplementationLookup.java +++ b/core/idrepo/logic/src/main/java/org/apache/syncope/core/logic/init/ClassPathScanImplementationLookup.java @@ -44,6 +44,7 @@ import org.apache.syncope.core.provisioning.api.job.report.ReportConfClass; import org.apache.syncope.core.provisioning.api.job.report.ReportJobDelegate; import org.apache.syncope.core.provisioning.api.macro.Command; +import org.apache.syncope.core.provisioning.api.macro.MacroActions; import org.apache.syncope.core.provisioning.api.notification.RecipientsProvider; import org.apache.syncope.core.provisioning.api.propagation.PropagationActions; import org.apache.syncope.core.provisioning.api.pushpull.PullActions; @@ -138,15 +139,7 @@ public void load() { continue; } - if (ReportJobDelegate.class.isAssignableFrom(clazz)) { - ReportConfClass annotation = clazz.getAnnotation(ReportConfClass.class); - if (annotation == null) { - LOG.warn("Found Report {} without declared configuration", clazz.getName()); - } else { - classNames.get(IdRepoImplementationType.REPORT_DELEGATE).add(clazz.getName()); - reportJobDelegateClasses.put(annotation.value(), (Class) clazz); - } - } else if (AccountRule.class.isAssignableFrom(clazz)) { + if (AccountRule.class.isAssignableFrom(clazz)) { AccountRuleConfClass annotation = clazz.getAnnotation(AccountRuleConfClass.class); if (annotation == null) { LOG.warn("Found account policy rule {} without declared configuration", clazz.getName()); @@ -162,6 +155,42 @@ public void load() { classNames.get(IdRepoImplementationType.PASSWORD_RULE).add(clazz.getName()); passwordRuleClasses.put(annotation.value(), (Class) clazz); } + } else if (SchedTaskJobDelegate.class.isAssignableFrom(clazz) + && !PullJobDelegate.class.isAssignableFrom(clazz) + && !PushJobDelegate.class.isAssignableFrom(clazz) + && !GroupMemberProvisionTaskJobDelegate.class.isAssignableFrom(clazz)) { + + classNames.get(IdRepoImplementationType.TASKJOB_DELEGATE).add(bd.getBeanClassName()); + } else if (ReportJobDelegate.class.isAssignableFrom(clazz)) { + ReportConfClass annotation = clazz.getAnnotation(ReportConfClass.class); + if (annotation == null) { + LOG.warn("Found Report {} without declared configuration", clazz.getName()); + } else { + classNames.get(IdRepoImplementationType.REPORT_DELEGATE).add(clazz.getName()); + reportJobDelegateClasses.put(annotation.value(), (Class) clazz); + } + } else if (LogicActions.class.isAssignableFrom(clazz)) { + classNames.get(IdRepoImplementationType.LOGIC_ACTIONS).add(bd.getBeanClassName()); + } else if (MacroActions.class.isAssignableFrom(clazz)) { + classNames.get(IdRepoImplementationType.MACRO_ACTIONS).add(bd.getBeanClassName()); + } else if (PlainAttrValueValidator.class.isAssignableFrom(clazz)) { + classNames.get(IdRepoImplementationType.ATTR_VALUE_VALIDATOR).add(bd.getBeanClassName()); + } else if (Command.class.isAssignableFrom(clazz)) { + classNames.get(IdRepoImplementationType.COMMAND).add(bd.getBeanClassName()); + } else if (RecipientsProvider.class.isAssignableFrom(clazz)) { + classNames.get(IdRepoImplementationType.RECIPIENTS_PROVIDER).add(bd.getBeanClassName()); + } else if (ItemTransformer.class.isAssignableFrom(clazz) + && !clazz.equals(JEXLItemTransformerImpl.class)) { + + classNames.get(IdRepoImplementationType.ITEM_TRANSFORMER).add(clazz.getName()); + } else if (ReconFilterBuilder.class.isAssignableFrom(clazz)) { + classNames.get(IdMImplementationType.RECON_FILTER_BUILDER).add(bd.getBeanClassName()); + } else if (PropagationActions.class.isAssignableFrom(clazz)) { + classNames.get(IdMImplementationType.PROPAGATION_ACTIONS).add(bd.getBeanClassName()); + } else if (PullActions.class.isAssignableFrom(clazz)) { + classNames.get(IdMImplementationType.PULL_ACTIONS).add(bd.getBeanClassName()); + } else if (PushActions.class.isAssignableFrom(clazz)) { + classNames.get(IdMImplementationType.PUSH_ACTIONS).add(bd.getBeanClassName()); } else if (PullCorrelationRule.class.isAssignableFrom(clazz)) { PullCorrelationRuleConfClass annotation = clazz.getAnnotation(PullCorrelationRuleConfClass.class); if (annotation == null) { @@ -178,34 +207,8 @@ public void load() { classNames.get(IdMImplementationType.PUSH_CORRELATION_RULE).add(clazz.getName()); pushCRClasses.put(annotation.value(), (Class) clazz); } - } else if (ItemTransformer.class.isAssignableFrom(clazz) - && !clazz.equals(JEXLItemTransformerImpl.class)) { - - classNames.get(IdRepoImplementationType.ITEM_TRANSFORMER).add(clazz.getName()); - } else if (SchedTaskJobDelegate.class.isAssignableFrom(clazz) - && !PullJobDelegate.class.isAssignableFrom(clazz) - && !PushJobDelegate.class.isAssignableFrom(clazz) - && !GroupMemberProvisionTaskJobDelegate.class.isAssignableFrom(clazz)) { - - classNames.get(IdRepoImplementationType.TASKJOB_DELEGATE).add(bd.getBeanClassName()); - } else if (ReconFilterBuilder.class.isAssignableFrom(clazz)) { - classNames.get(IdMImplementationType.RECON_FILTER_BUILDER).add(bd.getBeanClassName()); - } else if (LogicActions.class.isAssignableFrom(clazz)) { - classNames.get(IdRepoImplementationType.LOGIC_ACTIONS).add(bd.getBeanClassName()); - } else if (PropagationActions.class.isAssignableFrom(clazz)) { - classNames.get(IdMImplementationType.PROPAGATION_ACTIONS).add(bd.getBeanClassName()); - } else if (PullActions.class.isAssignableFrom(clazz)) { - classNames.get(IdMImplementationType.PULL_ACTIONS).add(bd.getBeanClassName()); - } else if (PushActions.class.isAssignableFrom(clazz)) { - classNames.get(IdMImplementationType.PUSH_ACTIONS).add(bd.getBeanClassName()); - } else if (PlainAttrValueValidator.class.isAssignableFrom(clazz)) { - classNames.get(IdRepoImplementationType.ATTR_VALUE_VALIDATOR).add(bd.getBeanClassName()); - } else if (RecipientsProvider.class.isAssignableFrom(clazz)) { - classNames.get(IdRepoImplementationType.RECIPIENTS_PROVIDER).add(bd.getBeanClassName()); } else if (ProvisionSorter.class.isAssignableFrom(clazz)) { classNames.get(IdMImplementationType.PROVISION_SORTER).add(bd.getBeanClassName()); - } else if (Command.class.isAssignableFrom(clazz)) { - classNames.get(IdRepoImplementationType.COMMAND).add(bd.getBeanClassName()); } else { extImplTypes.forEach((typeName, typeInterface) -> { Class tic = ClassUtils.resolveClassName(typeInterface, ClassUtils.getDefaultClassLoader());