github-advanced-security[bot] commented on code in PR #915: URL: https://github.com/apache/syncope/pull/915#discussion_r1863758034
########## core/persistence-neo4j/src/main/java/org/apache/syncope/core/persistence/neo4j/entity/task/Neo4jTaskUtilsFactory.java: ########## @@ -61,7 +63,9 @@ @Override public TaskUtils getInstance(final Task<?> task) { TaskType type; - if (task instanceof PullTask) { + if (task instanceof LiveSyncTask) { Review Comment: ## Chain of 'instanceof' tests This if block performs a chain of 7 type tests - consider alternatives, e.g. polymorphism or the visitor pattern. [Show more details](https://github.com/apache/syncope/security/code-scanning/1745) ########## core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/InboundActions.java: ########## @@ -60,224 +60,225 @@ } /** - * Pre-process the pull information received by the underlying connector, before any internal activity occurs. + * Pre-process the inbound information received by the underlying connector, before any internal activity occurs. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information - * @return pull information, possibly altered. + * @param <T> sync delta class + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information + * @return inbound information, possibly altered. */ - default SyncDelta preprocess(ProvisioningProfile<?, ?> profile, SyncDelta delta) { + default <T extends LiveSyncDelta> T preprocess(ProvisioningProfile<?, ?> profile, T delta) { return delta; } /** - * Action to be executed before to create a pulled entity locally. - * The entity is created locally upon pull in case of the un-matching rule + * Action to be executed before to create a inbounded entity locally. + * The entity is created locally upon inbound in case of the un-matching rule * {@link org.apache.syncope.common.lib.types.UnmatchingRule#PROVISION} (default un-matching rule) is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param createReq create request */ default void beforeProvision( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, AnyCR createReq) { } /** * Action to be executed before locally creating a linked account. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param linkedAccount create request */ default void beforeProvision( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, Review Comment: ## Useless parameter The parameter 'delta' is never used. [Show more details](https://github.com/apache/syncope/security/code-scanning/1736) ########## core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/InboundActions.java: ########## @@ -60,224 +60,225 @@ } /** - * Pre-process the pull information received by the underlying connector, before any internal activity occurs. + * Pre-process the inbound information received by the underlying connector, before any internal activity occurs. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information - * @return pull information, possibly altered. + * @param <T> sync delta class + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information + * @return inbound information, possibly altered. */ - default SyncDelta preprocess(ProvisioningProfile<?, ?> profile, SyncDelta delta) { + default <T extends LiveSyncDelta> T preprocess(ProvisioningProfile<?, ?> profile, T delta) { Review Comment: ## Useless parameter The parameter 'profile' is never used. [Show more details](https://github.com/apache/syncope/security/code-scanning/1739) ########## core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/AbstractProvisioningJobDelegate.java: ########## @@ -56,35 +56,63 @@ private static final String LINKED_ACCOUNT = "LINKED_ACCOUNT"; - /** - * ConnInstance loader. - */ @Autowired protected ConnectorManager connectorManager; - /** - * AnyTypeDAO DAO - */ @Autowired protected AnyTypeDAO anyTypeDAO; - /** - * Resource DAO. - */ @Autowired protected ExternalResourceDAO resourceDAO; @Autowired protected EntityFactory entityFactory; - /** - * Policy DAO. - */ + @Autowired + protected AnyUtilsFactory anyUtilsFactory; + @Autowired protected PolicyDAO policyDAO; protected Optional<ProvisionSorter> perContextProvisionSorter = Optional.empty(); + protected Connector connector; + + @Override + protected void init( + final TaskType taskType, + final String taskKey, + final JobExecutionContext context) throws JobExecutionException { + + super.init(taskType, taskKey, context); + + boolean noMapping = true; + for (Provision provision : task.getResource().getProvisions().stream(). + filter(provision -> provision.getMapping() != null).toList()) { + + noMapping = false; + if (provision.getMapping().getConnObjectKeyItem() == null) { + throw new JobExecutionException("Invalid ConnObjectKey mapping for provision " + provision); Review Comment: ## Use of default toString() Default toString(): Provision inherits toString() from Object, and so is not suitable for printing. [Show more details](https://github.com/apache/syncope/security/code-scanning/1704) ########## core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/rules/InboundCorrelationRule.java: ########## @@ -57,21 +57,21 @@ * @param provision resource provision * @return matching information */ - default PullMatch matching(Any<?> any, SyncDelta syncDelta, Provision provision) { - return new PullMatch(MatchType.ANY, any); + default InboundMatch matching(Any<?> any, LiveSyncDelta syncDelta, Provision provision) { + return new InboundMatch(MatchType.ANY, any); } /** * Optionally create matching information in case no matching Any was found for the given - * {@link SyncDelta} and {@link Provision}. + * {@link LiveSyncDelta} and {@link Provision}. * For users, this might end with creating a * {@link org.apache.syncope.core.persistence.api.entity.user.LinkedAccount}. * * @param syncDelta change operation, including external attributes * @param provision resource provision * @return matching information */ - default Optional<PullMatch> unmatching(SyncDelta syncDelta, Provision provision) { + default Optional<InboundMatch> unmatching(LiveSyncDelta syncDelta, Provision provision) { Review Comment: ## Useless parameter The parameter 'syncDelta' is never used. [Show more details](https://github.com/apache/syncope/security/code-scanning/1742) ########## core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/InboundActions.java: ########## @@ -60,224 +60,225 @@ } /** - * Pre-process the pull information received by the underlying connector, before any internal activity occurs. + * Pre-process the inbound information received by the underlying connector, before any internal activity occurs. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information - * @return pull information, possibly altered. + * @param <T> sync delta class + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information + * @return inbound information, possibly altered. */ - default SyncDelta preprocess(ProvisioningProfile<?, ?> profile, SyncDelta delta) { + default <T extends LiveSyncDelta> T preprocess(ProvisioningProfile<?, ?> profile, T delta) { return delta; } /** - * Action to be executed before to create a pulled entity locally. - * The entity is created locally upon pull in case of the un-matching rule + * Action to be executed before to create a inbounded entity locally. + * The entity is created locally upon inbound in case of the un-matching rule * {@link org.apache.syncope.common.lib.types.UnmatchingRule#PROVISION} (default un-matching rule) is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param createReq create request */ default void beforeProvision( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, AnyCR createReq) { } /** * Action to be executed before locally creating a linked account. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param linkedAccount create request */ default void beforeProvision( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, LinkedAccountTO linkedAccount) { } /** - * Action to be executed before to create a pulled realm locally. - * The realm is created locally upon pull in case of the un-matching rule + * Action to be executed before to create a inbounded realm locally. + * The realm is created locally upon inbound in case of the un-matching rule * {@link org.apache.syncope.common.lib.types.UnmatchingRule#PROVISION} (default un-matching rule) is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param realm realm */ default void beforeProvision( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, RealmTO realm) { } /** - * Action to be executed before creating (and linking to the resource) a pulled entity locally. - * The entity is created locally and linked to the pulled resource upon pull in case of the + * Action to be executed before creating (and linking to the resource) a inbounded entity locally. + * The entity is created locally and linked to the inbounded resource upon inbound in case of the * un-matching rule {@link org.apache.syncope.common.lib.types.UnmatchingRule#ASSIGN} is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param createReq create request */ default void beforeAssign( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, Review Comment: ## Useless parameter The parameter 'delta' is never used. [Show more details](https://github.com/apache/syncope/security/code-scanning/1731) ########## core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/InboundActions.java: ########## @@ -60,224 +60,225 @@ } /** - * Pre-process the pull information received by the underlying connector, before any internal activity occurs. + * Pre-process the inbound information received by the underlying connector, before any internal activity occurs. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information - * @return pull information, possibly altered. + * @param <T> sync delta class + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information + * @return inbound information, possibly altered. */ - default SyncDelta preprocess(ProvisioningProfile<?, ?> profile, SyncDelta delta) { + default <T extends LiveSyncDelta> T preprocess(ProvisioningProfile<?, ?> profile, T delta) { return delta; } /** - * Action to be executed before to create a pulled entity locally. - * The entity is created locally upon pull in case of the un-matching rule + * Action to be executed before to create a inbounded entity locally. + * The entity is created locally upon inbound in case of the un-matching rule * {@link org.apache.syncope.common.lib.types.UnmatchingRule#PROVISION} (default un-matching rule) is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param createReq create request */ default void beforeProvision( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, AnyCR createReq) { } /** * Action to be executed before locally creating a linked account. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param linkedAccount create request */ default void beforeProvision( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, LinkedAccountTO linkedAccount) { } /** - * Action to be executed before to create a pulled realm locally. - * The realm is created locally upon pull in case of the un-matching rule + * Action to be executed before to create a inbounded realm locally. + * The realm is created locally upon inbound in case of the un-matching rule * {@link org.apache.syncope.common.lib.types.UnmatchingRule#PROVISION} (default un-matching rule) is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param realm realm */ default void beforeProvision( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, RealmTO realm) { } /** - * Action to be executed before creating (and linking to the resource) a pulled entity locally. - * The entity is created locally and linked to the pulled resource upon pull in case of the + * Action to be executed before creating (and linking to the resource) a inbounded entity locally. + * The entity is created locally and linked to the inbounded resource upon inbound in case of the * un-matching rule {@link org.apache.syncope.common.lib.types.UnmatchingRule#ASSIGN} is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param createReq create request */ default void beforeAssign( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, AnyCR createReq) { } /** * Action to be executed before locally creating a linked account. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param linkedAccount linked account */ default void beforeAssign( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, LinkedAccountTO linkedAccount) { } /** - * Action to be executed before creating (and linking to the resource) a pulled realm locally. - * The realm is created locally and linked to the pulled resource upon pull in case of the + * Action to be executed before creating (and linking to the resource) a inbounded realm locally. + * The realm is created locally and linked to the inbounded resource upon inbound in case of the * un-matching rule {@link org.apache.syncope.common.lib.types.UnmatchingRule#ASSIGN} is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param realm realm */ default void beforeAssign( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, RealmTO realm) { } /** - * Action to be executed before unlinking resource from the pulled entity and de-provisioning. - * The entity is unlinked and de-provisioned from the pulled resource upon pull in case of the + * Action to be executed before unlinking resource from the inbounded entity and de-provisioning. + * The entity is unlinked and de-provisioned from the inbounded resource upon inbound in case of the * matching rule {@link org.apache.syncope.common.lib.types.MatchingRule#UNASSIGN} is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param entity entity */ default void beforeUnassign( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, Review Comment: ## Useless parameter The parameter 'delta' is never used. [Show more details](https://github.com/apache/syncope/security/code-scanning/1722) ########## core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/task/JPATaskUtilsFactory.java: ########## @@ -61,7 +63,9 @@ @Override public TaskUtils getInstance(final Task<?> task) { TaskType type; - if (task instanceof PullTask) { + if (task instanceof LiveSyncTask) { Review Comment: ## Chain of 'instanceof' tests This if block performs a chain of 7 type tests - consider alternatives, e.g. polymorphism or the visitor pattern. [Show more details](https://github.com/apache/syncope/security/code-scanning/1744) ########## core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/InboundActions.java: ########## @@ -60,224 +60,225 @@ } /** - * Pre-process the pull information received by the underlying connector, before any internal activity occurs. + * Pre-process the inbound information received by the underlying connector, before any internal activity occurs. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information - * @return pull information, possibly altered. + * @param <T> sync delta class + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information + * @return inbound information, possibly altered. */ - default SyncDelta preprocess(ProvisioningProfile<?, ?> profile, SyncDelta delta) { + default <T extends LiveSyncDelta> T preprocess(ProvisioningProfile<?, ?> profile, T delta) { return delta; } /** - * Action to be executed before to create a pulled entity locally. - * The entity is created locally upon pull in case of the un-matching rule + * Action to be executed before to create a inbounded entity locally. + * The entity is created locally upon inbound in case of the un-matching rule * {@link org.apache.syncope.common.lib.types.UnmatchingRule#PROVISION} (default un-matching rule) is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param createReq create request */ default void beforeProvision( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, AnyCR createReq) { } /** * Action to be executed before locally creating a linked account. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param linkedAccount create request */ default void beforeProvision( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, LinkedAccountTO linkedAccount) { } /** - * Action to be executed before to create a pulled realm locally. - * The realm is created locally upon pull in case of the un-matching rule + * Action to be executed before to create a inbounded realm locally. + * The realm is created locally upon inbound in case of the un-matching rule * {@link org.apache.syncope.common.lib.types.UnmatchingRule#PROVISION} (default un-matching rule) is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param realm realm */ default void beforeProvision( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, RealmTO realm) { } /** - * Action to be executed before creating (and linking to the resource) a pulled entity locally. - * The entity is created locally and linked to the pulled resource upon pull in case of the + * Action to be executed before creating (and linking to the resource) a inbounded entity locally. + * The entity is created locally and linked to the inbounded resource upon inbound in case of the * un-matching rule {@link org.apache.syncope.common.lib.types.UnmatchingRule#ASSIGN} is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param createReq create request */ default void beforeAssign( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, AnyCR createReq) { } /** * Action to be executed before locally creating a linked account. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param linkedAccount linked account */ default void beforeAssign( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, Review Comment: ## Useless parameter The parameter 'delta' is never used. [Show more details](https://github.com/apache/syncope/security/code-scanning/1728) ########## core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/InboundActions.java: ########## @@ -60,224 +60,225 @@ } /** - * Pre-process the pull information received by the underlying connector, before any internal activity occurs. + * Pre-process the inbound information received by the underlying connector, before any internal activity occurs. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information - * @return pull information, possibly altered. + * @param <T> sync delta class + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information + * @return inbound information, possibly altered. */ - default SyncDelta preprocess(ProvisioningProfile<?, ?> profile, SyncDelta delta) { + default <T extends LiveSyncDelta> T preprocess(ProvisioningProfile<?, ?> profile, T delta) { return delta; } /** - * Action to be executed before to create a pulled entity locally. - * The entity is created locally upon pull in case of the un-matching rule + * Action to be executed before to create a inbounded entity locally. + * The entity is created locally upon inbound in case of the un-matching rule * {@link org.apache.syncope.common.lib.types.UnmatchingRule#PROVISION} (default un-matching rule) is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param createReq create request */ default void beforeProvision( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, AnyCR createReq) { } /** * Action to be executed before locally creating a linked account. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param linkedAccount create request */ default void beforeProvision( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, LinkedAccountTO linkedAccount) { } /** - * Action to be executed before to create a pulled realm locally. - * The realm is created locally upon pull in case of the un-matching rule + * Action to be executed before to create a inbounded realm locally. + * The realm is created locally upon inbound in case of the un-matching rule * {@link org.apache.syncope.common.lib.types.UnmatchingRule#PROVISION} (default un-matching rule) is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param realm realm */ default void beforeProvision( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, RealmTO realm) { } /** - * Action to be executed before creating (and linking to the resource) a pulled entity locally. - * The entity is created locally and linked to the pulled resource upon pull in case of the + * Action to be executed before creating (and linking to the resource) a inbounded entity locally. + * The entity is created locally and linked to the inbounded resource upon inbound in case of the * un-matching rule {@link org.apache.syncope.common.lib.types.UnmatchingRule#ASSIGN} is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param createReq create request */ default void beforeAssign( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, AnyCR createReq) { } /** * Action to be executed before locally creating a linked account. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param linkedAccount linked account */ default void beforeAssign( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, LinkedAccountTO linkedAccount) { } /** - * Action to be executed before creating (and linking to the resource) a pulled realm locally. - * The realm is created locally and linked to the pulled resource upon pull in case of the + * Action to be executed before creating (and linking to the resource) a inbounded realm locally. + * The realm is created locally and linked to the inbounded resource upon inbound in case of the * un-matching rule {@link org.apache.syncope.common.lib.types.UnmatchingRule#ASSIGN} is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param realm realm */ default void beforeAssign( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, RealmTO realm) { } /** - * Action to be executed before unlinking resource from the pulled entity and de-provisioning. - * The entity is unlinked and de-provisioned from the pulled resource upon pull in case of the + * Action to be executed before unlinking resource from the inbounded entity and de-provisioning. + * The entity is unlinked and de-provisioned from the inbounded resource upon inbound in case of the * matching rule {@link org.apache.syncope.common.lib.types.MatchingRule#UNASSIGN} is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param entity entity */ default void beforeUnassign( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, EntityTO entity) { } /** * Action to be executed before de-provisioning action only. - * The entity is de-provisioned (without unlinking) from the pulled resource upon pull in case of + * The entity is de-provisioned (without unlinking) from the inbounded resource upon inbound in case of * the matching rule {@link org.apache.syncope.common.lib.types.MatchingRule#DEPROVISION} is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param entity entity */ default void beforeDeprovision( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, Review Comment: ## Useless parameter The parameter 'delta' is never used. [Show more details](https://github.com/apache/syncope/security/code-scanning/1719) ########## core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/InboundActions.java: ########## @@ -60,224 +60,225 @@ } /** - * Pre-process the pull information received by the underlying connector, before any internal activity occurs. + * Pre-process the inbound information received by the underlying connector, before any internal activity occurs. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information - * @return pull information, possibly altered. + * @param <T> sync delta class + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information + * @return inbound information, possibly altered. */ - default SyncDelta preprocess(ProvisioningProfile<?, ?> profile, SyncDelta delta) { + default <T extends LiveSyncDelta> T preprocess(ProvisioningProfile<?, ?> profile, T delta) { return delta; } /** - * Action to be executed before to create a pulled entity locally. - * The entity is created locally upon pull in case of the un-matching rule + * Action to be executed before to create a inbounded entity locally. + * The entity is created locally upon inbound in case of the un-matching rule * {@link org.apache.syncope.common.lib.types.UnmatchingRule#PROVISION} (default un-matching rule) is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param createReq create request */ default void beforeProvision( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, Review Comment: ## Useless parameter The parameter 'delta' is never used. [Show more details](https://github.com/apache/syncope/security/code-scanning/1738) ########## core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/InboundActions.java: ########## @@ -60,224 +60,225 @@ } /** - * Pre-process the pull information received by the underlying connector, before any internal activity occurs. + * Pre-process the inbound information received by the underlying connector, before any internal activity occurs. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information - * @return pull information, possibly altered. + * @param <T> sync delta class + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information + * @return inbound information, possibly altered. */ - default SyncDelta preprocess(ProvisioningProfile<?, ?> profile, SyncDelta delta) { + default <T extends LiveSyncDelta> T preprocess(ProvisioningProfile<?, ?> profile, T delta) { return delta; } /** - * Action to be executed before to create a pulled entity locally. - * The entity is created locally upon pull in case of the un-matching rule + * Action to be executed before to create a inbounded entity locally. + * The entity is created locally upon inbound in case of the un-matching rule * {@link org.apache.syncope.common.lib.types.UnmatchingRule#PROVISION} (default un-matching rule) is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param createReq create request */ default void beforeProvision( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, AnyCR createReq) { } /** * Action to be executed before locally creating a linked account. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param linkedAccount create request */ default void beforeProvision( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, LinkedAccountTO linkedAccount) { } /** - * Action to be executed before to create a pulled realm locally. - * The realm is created locally upon pull in case of the un-matching rule + * Action to be executed before to create a inbounded realm locally. + * The realm is created locally upon inbound in case of the un-matching rule * {@link org.apache.syncope.common.lib.types.UnmatchingRule#PROVISION} (default un-matching rule) is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param realm realm */ default void beforeProvision( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, RealmTO realm) { } /** - * Action to be executed before creating (and linking to the resource) a pulled entity locally. - * The entity is created locally and linked to the pulled resource upon pull in case of the + * Action to be executed before creating (and linking to the resource) a inbounded entity locally. + * The entity is created locally and linked to the inbounded resource upon inbound in case of the * un-matching rule {@link org.apache.syncope.common.lib.types.UnmatchingRule#ASSIGN} is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param createReq create request */ default void beforeAssign( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, AnyCR createReq) { } /** * Action to be executed before locally creating a linked account. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param linkedAccount linked account */ default void beforeAssign( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, LinkedAccountTO linkedAccount) { } /** - * Action to be executed before creating (and linking to the resource) a pulled realm locally. - * The realm is created locally and linked to the pulled resource upon pull in case of the + * Action to be executed before creating (and linking to the resource) a inbounded realm locally. + * The realm is created locally and linked to the inbounded resource upon inbound in case of the * un-matching rule {@link org.apache.syncope.common.lib.types.UnmatchingRule#ASSIGN} is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param realm realm */ default void beforeAssign( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, Review Comment: ## Useless parameter The parameter 'delta' is never used. [Show more details](https://github.com/apache/syncope/security/code-scanning/1725) ########## core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/InboundActions.java: ########## @@ -60,224 +60,225 @@ } /** - * Pre-process the pull information received by the underlying connector, before any internal activity occurs. + * Pre-process the inbound information received by the underlying connector, before any internal activity occurs. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information - * @return pull information, possibly altered. + * @param <T> sync delta class + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information + * @return inbound information, possibly altered. */ - default SyncDelta preprocess(ProvisioningProfile<?, ?> profile, SyncDelta delta) { + default <T extends LiveSyncDelta> T preprocess(ProvisioningProfile<?, ?> profile, T delta) { return delta; } /** - * Action to be executed before to create a pulled entity locally. - * The entity is created locally upon pull in case of the un-matching rule + * Action to be executed before to create a inbounded entity locally. + * The entity is created locally upon inbound in case of the un-matching rule * {@link org.apache.syncope.common.lib.types.UnmatchingRule#PROVISION} (default un-matching rule) is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param createReq create request */ default void beforeProvision( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, AnyCR createReq) { } /** * Action to be executed before locally creating a linked account. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param linkedAccount create request */ default void beforeProvision( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, LinkedAccountTO linkedAccount) { } /** - * Action to be executed before to create a pulled realm locally. - * The realm is created locally upon pull in case of the un-matching rule + * Action to be executed before to create a inbounded realm locally. + * The realm is created locally upon inbound in case of the un-matching rule * {@link org.apache.syncope.common.lib.types.UnmatchingRule#PROVISION} (default un-matching rule) is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param realm realm */ default void beforeProvision( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, Review Comment: ## Useless parameter The parameter 'delta' is never used. [Show more details](https://github.com/apache/syncope/security/code-scanning/1733) ########## core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/InboundActions.java: ########## @@ -60,224 +60,225 @@ } /** - * Pre-process the pull information received by the underlying connector, before any internal activity occurs. + * Pre-process the inbound information received by the underlying connector, before any internal activity occurs. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information - * @return pull information, possibly altered. + * @param <T> sync delta class + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information + * @return inbound information, possibly altered. */ - default SyncDelta preprocess(ProvisioningProfile<?, ?> profile, SyncDelta delta) { + default <T extends LiveSyncDelta> T preprocess(ProvisioningProfile<?, ?> profile, T delta) { return delta; } /** - * Action to be executed before to create a pulled entity locally. - * The entity is created locally upon pull in case of the un-matching rule + * Action to be executed before to create a inbounded entity locally. + * The entity is created locally upon inbound in case of the un-matching rule * {@link org.apache.syncope.common.lib.types.UnmatchingRule#PROVISION} (default un-matching rule) is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param createReq create request */ default void beforeProvision( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, AnyCR createReq) { } /** * Action to be executed before locally creating a linked account. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param linkedAccount create request */ default void beforeProvision( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, LinkedAccountTO linkedAccount) { } /** - * Action to be executed before to create a pulled realm locally. - * The realm is created locally upon pull in case of the un-matching rule + * Action to be executed before to create a inbounded realm locally. + * The realm is created locally upon inbound in case of the un-matching rule * {@link org.apache.syncope.common.lib.types.UnmatchingRule#PROVISION} (default un-matching rule) is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param realm realm */ default void beforeProvision( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, RealmTO realm) { } /** - * Action to be executed before creating (and linking to the resource) a pulled entity locally. - * The entity is created locally and linked to the pulled resource upon pull in case of the + * Action to be executed before creating (and linking to the resource) a inbounded entity locally. + * The entity is created locally and linked to the inbounded resource upon inbound in case of the * un-matching rule {@link org.apache.syncope.common.lib.types.UnmatchingRule#ASSIGN} is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param createReq create request */ default void beforeAssign( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, AnyCR createReq) { } /** * Action to be executed before locally creating a linked account. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param linkedAccount linked account */ default void beforeAssign( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, LinkedAccountTO linkedAccount) { } /** - * Action to be executed before creating (and linking to the resource) a pulled realm locally. - * The realm is created locally and linked to the pulled resource upon pull in case of the + * Action to be executed before creating (and linking to the resource) a inbounded realm locally. + * The realm is created locally and linked to the inbounded resource upon inbound in case of the * un-matching rule {@link org.apache.syncope.common.lib.types.UnmatchingRule#ASSIGN} is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param realm realm */ default void beforeAssign( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, RealmTO realm) { } /** - * Action to be executed before unlinking resource from the pulled entity and de-provisioning. - * The entity is unlinked and de-provisioned from the pulled resource upon pull in case of the + * Action to be executed before unlinking resource from the inbounded entity and de-provisioning. + * The entity is unlinked and de-provisioned from the inbounded resource upon inbound in case of the * matching rule {@link org.apache.syncope.common.lib.types.MatchingRule#UNASSIGN} is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param entity entity */ default void beforeUnassign( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, EntityTO entity) { } /** * Action to be executed before de-provisioning action only. - * The entity is de-provisioned (without unlinking) from the pulled resource upon pull in case of + * The entity is de-provisioned (without unlinking) from the inbounded resource upon inbound in case of * the matching rule {@link org.apache.syncope.common.lib.types.MatchingRule#DEPROVISION} is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param entity entity */ default void beforeDeprovision( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, EntityTO entity) { } /** - * Action to be executed before unlinking resource from the pulled entity. - * The entity is unlinked (without de-provisioning) from the pulled resource upon pull in case of + * Action to be executed before unlinking resource from the inbounded entity. + * The entity is unlinked (without de-provisioning) from the inbounded resource upon inbound in case of * the matching rule {@link org.apache.syncope.common.lib.types.MatchingRule#UNLINK} is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param entity entity */ default void beforeUnlink( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, EntityTO entity) { } /** - * Action to be executed before linking resource to the pulled entity. - * The entity is linked (without updating) to the pulled resource upon pull in case of + * Action to be executed before linking resource to the inbounded entity. + * The entity is linked (without updating) to the inbounded resource upon inbound in case of * the matching rule {@link org.apache.syncope.common.lib.types.MatchingRule#LINK} is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param entity entity */ default void beforeLink( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, Review Comment: ## Useless parameter The parameter 'delta' is never used. [Show more details](https://github.com/apache/syncope/security/code-scanning/1713) ########## core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/rules/InboundCorrelationRule.java: ########## @@ -57,21 +57,21 @@ * @param provision resource provision * @return matching information */ - default PullMatch matching(Any<?> any, SyncDelta syncDelta, Provision provision) { - return new PullMatch(MatchType.ANY, any); + default InboundMatch matching(Any<?> any, LiveSyncDelta syncDelta, Provision provision) { + return new InboundMatch(MatchType.ANY, any); } /** * Optionally create matching information in case no matching Any was found for the given - * {@link SyncDelta} and {@link Provision}. + * {@link LiveSyncDelta} and {@link Provision}. * For users, this might end with creating a * {@link org.apache.syncope.core.persistence.api.entity.user.LinkedAccount}. * * @param syncDelta change operation, including external attributes * @param provision resource provision * @return matching information */ - default Optional<PullMatch> unmatching(SyncDelta syncDelta, Provision provision) { + default Optional<InboundMatch> unmatching(LiveSyncDelta syncDelta, Provision provision) { Review Comment: ## Useless parameter The parameter 'provision' is never used. [Show more details](https://github.com/apache/syncope/security/code-scanning/1743) ########## core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/InboundActions.java: ########## @@ -60,224 +60,225 @@ } /** - * Pre-process the pull information received by the underlying connector, before any internal activity occurs. + * Pre-process the inbound information received by the underlying connector, before any internal activity occurs. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information - * @return pull information, possibly altered. + * @param <T> sync delta class + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information + * @return inbound information, possibly altered. */ - default SyncDelta preprocess(ProvisioningProfile<?, ?> profile, SyncDelta delta) { + default <T extends LiveSyncDelta> T preprocess(ProvisioningProfile<?, ?> profile, T delta) { return delta; } /** - * Action to be executed before to create a pulled entity locally. - * The entity is created locally upon pull in case of the un-matching rule + * Action to be executed before to create a inbounded entity locally. + * The entity is created locally upon inbound in case of the un-matching rule * {@link org.apache.syncope.common.lib.types.UnmatchingRule#PROVISION} (default un-matching rule) is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param createReq create request */ default void beforeProvision( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, AnyCR createReq) { } /** * Action to be executed before locally creating a linked account. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param linkedAccount create request */ default void beforeProvision( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, LinkedAccountTO linkedAccount) { } /** - * Action to be executed before to create a pulled realm locally. - * The realm is created locally upon pull in case of the un-matching rule + * Action to be executed before to create a inbounded realm locally. + * The realm is created locally upon inbound in case of the un-matching rule * {@link org.apache.syncope.common.lib.types.UnmatchingRule#PROVISION} (default un-matching rule) is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param realm realm */ default void beforeProvision( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, RealmTO realm) { } /** - * Action to be executed before creating (and linking to the resource) a pulled entity locally. - * The entity is created locally and linked to the pulled resource upon pull in case of the + * Action to be executed before creating (and linking to the resource) a inbounded entity locally. + * The entity is created locally and linked to the inbounded resource upon inbound in case of the * un-matching rule {@link org.apache.syncope.common.lib.types.UnmatchingRule#ASSIGN} is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param createReq create request */ default void beforeAssign( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, AnyCR createReq) { } /** * Action to be executed before locally creating a linked account. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param linkedAccount linked account */ default void beforeAssign( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, LinkedAccountTO linkedAccount) { } /** - * Action to be executed before creating (and linking to the resource) a pulled realm locally. - * The realm is created locally and linked to the pulled resource upon pull in case of the + * Action to be executed before creating (and linking to the resource) a inbounded realm locally. + * The realm is created locally and linked to the inbounded resource upon inbound in case of the * un-matching rule {@link org.apache.syncope.common.lib.types.UnmatchingRule#ASSIGN} is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param realm realm */ default void beforeAssign( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, RealmTO realm) { } /** - * Action to be executed before unlinking resource from the pulled entity and de-provisioning. - * The entity is unlinked and de-provisioned from the pulled resource upon pull in case of the + * Action to be executed before unlinking resource from the inbounded entity and de-provisioning. + * The entity is unlinked and de-provisioned from the inbounded resource upon inbound in case of the * matching rule {@link org.apache.syncope.common.lib.types.MatchingRule#UNASSIGN} is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param entity entity */ default void beforeUnassign( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, EntityTO entity) { } /** * Action to be executed before de-provisioning action only. - * The entity is de-provisioned (without unlinking) from the pulled resource upon pull in case of + * The entity is de-provisioned (without unlinking) from the inbounded resource upon inbound in case of * the matching rule {@link org.apache.syncope.common.lib.types.MatchingRule#DEPROVISION} is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param entity entity */ default void beforeDeprovision( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, EntityTO entity) { } /** - * Action to be executed before unlinking resource from the pulled entity. - * The entity is unlinked (without de-provisioning) from the pulled resource upon pull in case of + * Action to be executed before unlinking resource from the inbounded entity. + * The entity is unlinked (without de-provisioning) from the inbounded resource upon inbound in case of * the matching rule {@link org.apache.syncope.common.lib.types.MatchingRule#UNLINK} is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param entity entity */ default void beforeUnlink( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, EntityTO entity) { } /** - * Action to be executed before linking resource to the pulled entity. - * The entity is linked (without updating) to the pulled resource upon pull in case of + * Action to be executed before linking resource to the inbounded entity. + * The entity is linked (without updating) to the inbounded resource upon inbound in case of * the matching rule {@link org.apache.syncope.common.lib.types.MatchingRule#LINK} is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param entity entity */ default void beforeLink( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, EntityTO entity) { } /** - * Action to be executed before to update a pulled entity locally. - * The entity is updated upon pull in case of the matching rule + * Action to be executed before to update a inbounded entity locally. + * The entity is updated upon inbound in case of the matching rule * {@link org.apache.syncope.common.lib.types.MatchingRule#UPDATE} (default matching rule) is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param entity entity * @param anyUR modification * @throws JobExecutionException in case of generic failure. */ default void beforeUpdate( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, EntityTO entity, AnyUR anyUR) throws JobExecutionException { } /** - * Action to be executed before to delete a pulled entity locally. + * Action to be executed before to delete a inbounded entity locally. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param entity entity */ default void beforeDelete( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, Review Comment: ## Useless parameter The parameter 'delta' is never used. [Show more details](https://github.com/apache/syncope/security/code-scanning/1710) ########## core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/InboundActions.java: ########## @@ -60,224 +60,225 @@ } /** - * Pre-process the pull information received by the underlying connector, before any internal activity occurs. + * Pre-process the inbound information received by the underlying connector, before any internal activity occurs. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information - * @return pull information, possibly altered. + * @param <T> sync delta class + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information + * @return inbound information, possibly altered. */ - default SyncDelta preprocess(ProvisioningProfile<?, ?> profile, SyncDelta delta) { + default <T extends LiveSyncDelta> T preprocess(ProvisioningProfile<?, ?> profile, T delta) { return delta; } /** - * Action to be executed before to create a pulled entity locally. - * The entity is created locally upon pull in case of the un-matching rule + * Action to be executed before to create a inbounded entity locally. + * The entity is created locally upon inbound in case of the un-matching rule * {@link org.apache.syncope.common.lib.types.UnmatchingRule#PROVISION} (default un-matching rule) is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param createReq create request */ default void beforeProvision( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, AnyCR createReq) { } /** * Action to be executed before locally creating a linked account. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param linkedAccount create request */ default void beforeProvision( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, LinkedAccountTO linkedAccount) { } /** - * Action to be executed before to create a pulled realm locally. - * The realm is created locally upon pull in case of the un-matching rule + * Action to be executed before to create a inbounded realm locally. + * The realm is created locally upon inbound in case of the un-matching rule * {@link org.apache.syncope.common.lib.types.UnmatchingRule#PROVISION} (default un-matching rule) is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param realm realm */ default void beforeProvision( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, RealmTO realm) { } /** - * Action to be executed before creating (and linking to the resource) a pulled entity locally. - * The entity is created locally and linked to the pulled resource upon pull in case of the + * Action to be executed before creating (and linking to the resource) a inbounded entity locally. + * The entity is created locally and linked to the inbounded resource upon inbound in case of the * un-matching rule {@link org.apache.syncope.common.lib.types.UnmatchingRule#ASSIGN} is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param createReq create request */ default void beforeAssign( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, AnyCR createReq) { } /** * Action to be executed before locally creating a linked account. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param linkedAccount linked account */ default void beforeAssign( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, LinkedAccountTO linkedAccount) { } /** - * Action to be executed before creating (and linking to the resource) a pulled realm locally. - * The realm is created locally and linked to the pulled resource upon pull in case of the + * Action to be executed before creating (and linking to the resource) a inbounded realm locally. + * The realm is created locally and linked to the inbounded resource upon inbound in case of the * un-matching rule {@link org.apache.syncope.common.lib.types.UnmatchingRule#ASSIGN} is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param realm realm */ default void beforeAssign( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, RealmTO realm) { } /** - * Action to be executed before unlinking resource from the pulled entity and de-provisioning. - * The entity is unlinked and de-provisioned from the pulled resource upon pull in case of the + * Action to be executed before unlinking resource from the inbounded entity and de-provisioning. + * The entity is unlinked and de-provisioned from the inbounded resource upon inbound in case of the * matching rule {@link org.apache.syncope.common.lib.types.MatchingRule#UNASSIGN} is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param entity entity */ default void beforeUnassign( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, EntityTO entity) { } /** * Action to be executed before de-provisioning action only. - * The entity is de-provisioned (without unlinking) from the pulled resource upon pull in case of + * The entity is de-provisioned (without unlinking) from the inbounded resource upon inbound in case of * the matching rule {@link org.apache.syncope.common.lib.types.MatchingRule#DEPROVISION} is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param entity entity */ default void beforeDeprovision( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, EntityTO entity) { } /** - * Action to be executed before unlinking resource from the pulled entity. - * The entity is unlinked (without de-provisioning) from the pulled resource upon pull in case of + * Action to be executed before unlinking resource from the inbounded entity. + * The entity is unlinked (without de-provisioning) from the inbounded resource upon inbound in case of * the matching rule {@link org.apache.syncope.common.lib.types.MatchingRule#UNLINK} is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param entity entity */ default void beforeUnlink( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, Review Comment: ## Useless parameter The parameter 'delta' is never used. [Show more details](https://github.com/apache/syncope/security/code-scanning/1716) ########## core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/pushpull/InboundActions.java: ########## @@ -60,224 +60,225 @@ } /** - * Pre-process the pull information received by the underlying connector, before any internal activity occurs. + * Pre-process the inbound information received by the underlying connector, before any internal activity occurs. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information - * @return pull information, possibly altered. + * @param <T> sync delta class + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information + * @return inbound information, possibly altered. */ - default SyncDelta preprocess(ProvisioningProfile<?, ?> profile, SyncDelta delta) { + default <T extends LiveSyncDelta> T preprocess(ProvisioningProfile<?, ?> profile, T delta) { return delta; } /** - * Action to be executed before to create a pulled entity locally. - * The entity is created locally upon pull in case of the un-matching rule + * Action to be executed before to create a inbounded entity locally. + * The entity is created locally upon inbound in case of the un-matching rule * {@link org.apache.syncope.common.lib.types.UnmatchingRule#PROVISION} (default un-matching rule) is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param createReq create request */ default void beforeProvision( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, AnyCR createReq) { } /** * Action to be executed before locally creating a linked account. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param linkedAccount create request */ default void beforeProvision( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, LinkedAccountTO linkedAccount) { } /** - * Action to be executed before to create a pulled realm locally. - * The realm is created locally upon pull in case of the un-matching rule + * Action to be executed before to create a inbounded realm locally. + * The realm is created locally upon inbound in case of the un-matching rule * {@link org.apache.syncope.common.lib.types.UnmatchingRule#PROVISION} (default un-matching rule) is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param realm realm */ default void beforeProvision( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, RealmTO realm) { } /** - * Action to be executed before creating (and linking to the resource) a pulled entity locally. - * The entity is created locally and linked to the pulled resource upon pull in case of the + * Action to be executed before creating (and linking to the resource) a inbounded entity locally. + * The entity is created locally and linked to the inbounded resource upon inbound in case of the * un-matching rule {@link org.apache.syncope.common.lib.types.UnmatchingRule#ASSIGN} is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param createReq create request */ default void beforeAssign( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, AnyCR createReq) { } /** * Action to be executed before locally creating a linked account. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param linkedAccount linked account */ default void beforeAssign( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, LinkedAccountTO linkedAccount) { } /** - * Action to be executed before creating (and linking to the resource) a pulled realm locally. - * The realm is created locally and linked to the pulled resource upon pull in case of the + * Action to be executed before creating (and linking to the resource) a inbounded realm locally. + * The realm is created locally and linked to the inbounded resource upon inbound in case of the * un-matching rule {@link org.apache.syncope.common.lib.types.UnmatchingRule#ASSIGN} is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param realm realm */ default void beforeAssign( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, RealmTO realm) { } /** - * Action to be executed before unlinking resource from the pulled entity and de-provisioning. - * The entity is unlinked and de-provisioned from the pulled resource upon pull in case of the + * Action to be executed before unlinking resource from the inbounded entity and de-provisioning. + * The entity is unlinked and de-provisioned from the inbounded resource upon inbound in case of the * matching rule {@link org.apache.syncope.common.lib.types.MatchingRule#UNASSIGN} is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param entity entity */ default void beforeUnassign( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, EntityTO entity) { } /** * Action to be executed before de-provisioning action only. - * The entity is de-provisioned (without unlinking) from the pulled resource upon pull in case of + * The entity is de-provisioned (without unlinking) from the inbounded resource upon inbound in case of * the matching rule {@link org.apache.syncope.common.lib.types.MatchingRule#DEPROVISION} is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param entity entity */ default void beforeDeprovision( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, EntityTO entity) { } /** - * Action to be executed before unlinking resource from the pulled entity. - * The entity is unlinked (without de-provisioning) from the pulled resource upon pull in case of + * Action to be executed before unlinking resource from the inbounded entity. + * The entity is unlinked (without de-provisioning) from the inbounded resource upon inbound in case of * the matching rule {@link org.apache.syncope.common.lib.types.MatchingRule#UNLINK} is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param entity entity */ default void beforeUnlink( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, EntityTO entity) { } /** - * Action to be executed before linking resource to the pulled entity. - * The entity is linked (without updating) to the pulled resource upon pull in case of + * Action to be executed before linking resource to the inbounded entity. + * The entity is linked (without updating) to the inbounded resource upon inbound in case of * the matching rule {@link org.apache.syncope.common.lib.types.MatchingRule#LINK} is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param entity entity */ default void beforeLink( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, EntityTO entity) { } /** - * Action to be executed before to update a pulled entity locally. - * The entity is updated upon pull in case of the matching rule + * Action to be executed before to update a inbounded entity locally. + * The entity is updated upon inbound in case of the matching rule * {@link org.apache.syncope.common.lib.types.MatchingRule#UPDATE} (default matching rule) is applied. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param entity entity * @param anyUR modification * @throws JobExecutionException in case of generic failure. */ default void beforeUpdate( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, EntityTO entity, AnyUR anyUR) throws JobExecutionException { } /** - * Action to be executed before to delete a pulled entity locally. + * Action to be executed before to delete a inbounded entity locally. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information * @param entity entity */ default void beforeDelete( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, EntityTO entity) { } /** - * Action to be executed after each local entity pull. + * Action to be executed after each local entity inbound. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information (may be modified by beforeProvisionTO / beforeUpdate / + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information (may be modified by beforeProvisionTO / beforeUpdate / * beforeDelete) * @param entity entity - * @param result global pull results at the current pull step + * @param result global inbound results at the current inbound step * @throws JobExecutionException in case of generic failure */ default void after( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, EntityTO entity, ProvisioningReport result) throws JobExecutionException { // do nothing } /** - * Action to be executed in case an exception is thrown during pull. + * Action to be executed in case an exception is thrown during inbound. * - * @param profile profile of the pull being executed. - * @param delta retrieved pull information (may be modified by beforeProvisionTO / beforeUpdate / + * @param profile profile of the inbound being executed. + * @param delta retrieved inbound information (may be modified by beforeProvisionTO / beforeUpdate / * beforeDelete) * @param e the exception thrown * @return an instance of the given exception type is that is to be thrown; {@code NULL} otherwise */ default IgnoreProvisionException onError( ProvisioningProfile<?, ?> profile, - SyncDelta delta, + LiveSyncDelta delta, Review Comment: ## Useless parameter The parameter 'delta' is never used. [Show more details](https://github.com/apache/syncope/security/code-scanning/1707) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@syncope.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org