Skip to content

Commit 36fdaa6

Browse files
authored
[SYNCOPE-1829] Introducing support for Live Sync (#915)
1 parent 3a7ce47 commit 36fdaa6

File tree

308 files changed

+5141
-2703
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

308 files changed

+5141
-2703
lines changed

archetype/src/main/resources/archetype-resources/console/pom.xml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -122,14 +122,7 @@ under the License.
122122

123123
<profile>
124124
<id>standalone</id>
125-
126-
<dependencies>
127-
<dependency>
128-
<groupId>org.springframework.boot</groupId>
129-
<artifactId>spring-boot-starter-undertow</artifactId>
130-
</dependency>
131-
</dependencies>
132-
125+
133126
<build>
134127
<plugins>
135128
<plugin>

archetype/src/main/resources/archetype-resources/core/pom.xml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -169,14 +169,7 @@ under the License.
169169

170170
<profile>
171171
<id>standalone</id>
172-
173-
<dependencies>
174-
<dependency>
175-
<groupId>org.springframework.boot</groupId>
176-
<artifactId>spring-boot-starter-undertow</artifactId>
177-
</dependency>
178-
</dependencies>
179-
172+
180173
<build>
181174
<plugins>
182175
<plugin>

archetype/src/main/resources/archetype-resources/enduser/pom.xml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -150,13 +150,6 @@ under the License.
150150
<profile>
151151
<id>standalone</id>
152152

153-
<dependencies>
154-
<dependency>
155-
<groupId>org.springframework.boot</groupId>
156-
<artifactId>spring-boot-starter-undertow</artifactId>
157-
</dependency>
158-
</dependencies>
159-
160153
<build>
161154
<plugins>
162155
<plugin>

archetype/src/main/resources/archetype-resources/wa/pom.xml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,6 @@ under the License.
114114
<profiles>
115115
<profile>
116116
<id>standalone</id>
117-
118-
<dependencies>
119-
<dependency>
120-
<groupId>org.springframework.boot</groupId>
121-
<artifactId>spring-boot-starter-undertow</artifactId>
122-
</dependency>
123-
</dependencies>
124117

125118
<build>
126119
<plugins>

client/idm/console/src/main/java/org/apache/syncope/client/console/commons/IdMImplementationInfoProvider.java

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import java.util.stream.Collectors;
2525
import org.apache.syncope.client.console.init.ClassPathScanImplementationLookup;
2626
import org.apache.syncope.client.console.rest.ImplementationRestClient;
27-
import org.apache.syncope.common.lib.policy.PullCorrelationRuleConf;
27+
import org.apache.syncope.common.lib.policy.InboundCorrelationRuleConf;
2828
import org.apache.syncope.common.lib.policy.PushCorrelationRuleConf;
2929
import org.apache.syncope.common.lib.to.ImplementationTO;
3030
import org.apache.syncope.common.lib.types.IdMImplementationType;
@@ -44,7 +44,7 @@ public IdMImplementationInfoProvider(
4444

4545
@Override
4646
public ViewMode getViewMode(final ImplementationTO implementation) {
47-
return IdMImplementationType.PULL_CORRELATION_RULE.equals(implementation.getType())
47+
return IdMImplementationType.INBOUND_CORRELATION_RULE.equals(implementation.getType())
4848
|| IdMImplementationType.PUSH_CORRELATION_RULE.equals(implementation.getType())
4949
? ViewMode.JSON_BODY
5050
: super.getViewMode(implementation);
@@ -55,8 +55,8 @@ public List<String> getClasses(final ImplementationTO implementation, final View
5555
List<String> classes = new ArrayList<>();
5656
if (viewMode == ViewMode.JSON_BODY && IdMImplementationType.values().containsKey(implementation.getType())) {
5757
switch (implementation.getType()) {
58-
case IdMImplementationType.PULL_CORRELATION_RULE:
59-
classes = lookup.getClasses(PullCorrelationRuleConf.class).stream().
58+
case IdMImplementationType.INBOUND_CORRELATION_RULE:
59+
classes = lookup.getClasses(InboundCorrelationRuleConf.class).stream().
6060
map(Class::getName).collect(Collectors.toList());
6161
break;
6262

@@ -88,16 +88,16 @@ public String getGroovyTemplateClassName(final String implementationType) {
8888
templateClassName = "MyPropagationActions";
8989
break;
9090

91-
case IdMImplementationType.PULL_ACTIONS:
92-
templateClassName = "MyPullActions";
91+
case IdMImplementationType.INBOUND_ACTIONS:
92+
templateClassName = "MyInboundActions";
9393
break;
9494

9595
case IdMImplementationType.PUSH_ACTIONS:
9696
templateClassName = "MyPushActions";
9797
break;
9898

99-
case IdMImplementationType.PULL_CORRELATION_RULE:
100-
templateClassName = "MyPullCorrelationRule";
99+
case IdMImplementationType.INBOUND_CORRELATION_RULE:
100+
templateClassName = "MyInboundCorrelationRule";
101101
break;
102102

103103
case IdMImplementationType.PUSH_CORRELATION_RULE:
@@ -119,8 +119,8 @@ public String getGroovyTemplateClassName(final String implementationType) {
119119
public Class<?> getClass(final String implementationType, final String name) {
120120
Class<?> clazz;
121121
switch (implementationType) {
122-
case IdMImplementationType.PULL_CORRELATION_RULE:
123-
clazz = lookup.getClasses(PullCorrelationRuleConf.class).stream().
122+
case IdMImplementationType.INBOUND_CORRELATION_RULE:
123+
clazz = lookup.getClasses(InboundCorrelationRuleConf.class).stream().
124124
filter(c -> c.getName().equals(name)).findFirst().orElse(null);
125125
break;
126126

@@ -151,14 +151,28 @@ protected List<String> load() {
151151
}
152152

153153
@Override
154-
public IModel<List<String>> getPullActions() {
154+
public IModel<List<String>> getLiveSyncDeltaMappers() {
155155
return new LoadableDetachableModel<>() {
156156

157157
private static final long serialVersionUID = 5275935387613157437L;
158158

159159
@Override
160160
protected List<String> load() {
161-
return implementationRestClient.list(IdMImplementationType.PULL_ACTIONS).stream().
161+
return implementationRestClient.list(IdMImplementationType.LIVE_SYNC_DELTA_MAPPER).stream().
162+
map(ImplementationTO::getKey).sorted().collect(Collectors.toList());
163+
}
164+
};
165+
}
166+
167+
@Override
168+
public IModel<List<String>> getInboundActions() {
169+
return new LoadableDetachableModel<>() {
170+
171+
private static final long serialVersionUID = 5275935387613157437L;
172+
173+
@Override
174+
protected List<String> load() {
175+
return implementationRestClient.list(IdMImplementationType.INBOUND_ACTIONS).stream().
162176
map(ImplementationTO::getKey).sorted().collect(Collectors.toList());
163177
}
164178
};

client/idm/console/src/main/java/org/apache/syncope/client/console/commons/IdMPolicyTabProvider.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020

2121
import java.util.ArrayList;
2222
import java.util.List;
23+
import org.apache.syncope.client.console.policies.InboundPolicyDirectoryPanel;
2324
import org.apache.syncope.client.console.policies.PropagationPolicyDirectoryPanel;
24-
import org.apache.syncope.client.console.policies.PullPolicyDirectoryPanel;
2525
import org.apache.syncope.client.console.policies.PushPolicyDirectoryPanel;
2626
import org.apache.syncope.client.console.rest.PolicyRestClient;
2727
import org.apache.wicket.PageReference;
@@ -54,13 +54,13 @@ public Panel getPanel(final String panelId) {
5454
}
5555
});
5656

57-
tabs.add(new AbstractTab(new ResourceModel("policy.pull")) {
57+
tabs.add(new AbstractTab(new ResourceModel("policy.inbound")) {
5858

5959
private static final long serialVersionUID = -6815067322125799251L;
6060

6161
@Override
6262
public Panel getPanel(final String panelId) {
63-
return new PullPolicyDirectoryPanel(panelId, policyRestClient, pageRef);
63+
return new InboundPolicyDirectoryPanel(panelId, policyRestClient, pageRef);
6464
}
6565
});
6666

client/idm/console/src/main/java/org/apache/syncope/client/console/init/IdMClassPathScanImplementationContributor.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
package org.apache.syncope.client.console.init;
2020

2121
import java.util.Optional;
22-
import org.apache.syncope.common.lib.policy.PullCorrelationRuleConf;
22+
import org.apache.syncope.common.lib.policy.InboundCorrelationRuleConf;
2323
import org.apache.syncope.common.lib.policy.PushCorrelationRuleConf;
2424
import org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider;
2525
import org.springframework.core.type.filter.AssignableTypeFilter;
@@ -30,14 +30,14 @@ public class IdMClassPathScanImplementationContributor implements ClassPathScanI
3030

3131
@Override
3232
public void extend(final ClassPathScanningCandidateComponentProvider scanner) {
33-
scanner.addIncludeFilter(new AssignableTypeFilter(PullCorrelationRuleConf.class));
33+
scanner.addIncludeFilter(new AssignableTypeFilter(InboundCorrelationRuleConf.class));
3434
scanner.addIncludeFilter(new AssignableTypeFilter(PushCorrelationRuleConf.class));
3535
}
3636

3737
@Override
3838
public Optional<String> getLabel(final Class<?> clazz) {
39-
if (PullCorrelationRuleConf.class.isAssignableFrom(clazz)) {
40-
return Optional.of(PullCorrelationRuleConf.class.getName());
39+
if (InboundCorrelationRuleConf.class.isAssignableFrom(clazz)) {
40+
return Optional.of(InboundCorrelationRuleConf.class.getName());
4141
}
4242
if (PushCorrelationRuleConf.class.isAssignableFrom(clazz)) {
4343
return Optional.of(PushCorrelationRuleConf.class.getName());

0 commit comments

Comments
 (0)