Skip to content

Commit

Permalink
Merge branch 'master' of github.com:apache/syncope
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelGaro committed Oct 25, 2023
2 parents 785f28e + 534c75c commit 783b2da
Show file tree
Hide file tree
Showing 85 changed files with 650 additions and 545 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- name: Setup Java JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
distribution: 'temurin'
java-version: 21
- name: Setup Maven
uses: stCarolas/[email protected]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/crosschecks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
fail-fast: false
matrix:
language: ['java']
java: [ '21' ]
java: [ '21', '22-ea' ]
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
Expand All @@ -42,7 +42,7 @@ jobs:
- name: Setup Java JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
distribution: 'temurin'
java-version: ${{ matrix.java }}
- name: Setup Maven
uses: stCarolas/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fit_Elasticsearch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Setup Java JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
distribution: 'temurin'
java-version: 21
- name: Setup Maven
uses: stCarolas/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fit_Payara.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Setup Java JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
distribution: 'temurin'
java-version: 21
- name: Setup Maven
uses: stCarolas/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fit_Tomcat_H2_JSON.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Setup Java JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
distribution: 'temurin'
java-version: 21
- name: Setup Maven
uses: stCarolas/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fit_Tomcat_H2_XML.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Setup Java JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
distribution: 'temurin'
java-version: 21
- name: Setup Maven
uses: stCarolas/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fit_Tomcat_H2_YAML.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Setup Java JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
distribution: 'temurin'
java-version: 21
- name: Setup Maven
uses: stCarolas/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fit_WA_SAML2PS4UI_OIDCC4UI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Setup Java JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
distribution: 'temurin'
java-version: 21
- name: Setup Maven
uses: stCarolas/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fit_WA_SRA_CASClient.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Setup Java JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
distribution: 'temurin'
java-version: 21
- name: Setup Maven
uses: stCarolas/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fit_WA_SRA_OAuth2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Setup Java JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
distribution: 'temurin'
java-version: 21
- name: Setup Maven
uses: stCarolas/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fit_WA_SRA_OIDC.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Setup Java JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
distribution: 'temurin'
java-version: 21
- name: Setup Maven
uses: stCarolas/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fit_WA_SRA_SAML2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Setup Java JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
distribution: 'temurin'
java-version: 21
- name: Setup Maven
uses: stCarolas/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fit_Wildfly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Setup Java JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
distribution: 'temurin'
java-version: 21
- name: Setup Maven
uses: stCarolas/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fit_Zookeeper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Setup Java JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
distribution: 'temurin'
java-version: 21
- name: Setup Maven
uses: stCarolas/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mariadb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Setup Java JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
distribution: 'temurin'
java-version: 21
- name: Setup Maven
uses: stCarolas/[email protected]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Setup Java JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
distribution: 'temurin'
java-version: 21
- name: Setup Maven
uses: stCarolas/[email protected]
Expand All @@ -61,7 +61,7 @@ jobs:
- name: Setup Java JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
distribution: 'temurin'
java-version: 21
- name: Setup Maven
uses: stCarolas/[email protected]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/oracle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Setup Java JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
distribution: 'temurin'
java-version: 21
- name: Setup Maven
uses: stCarolas/[email protected]
Expand All @@ -61,7 +61,7 @@ jobs:
- name: Setup Java JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
distribution: 'temurin'
java-version: 21
- name: Setup Maven
uses: stCarolas/[email protected]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/postgresql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Setup Java JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
distribution: 'temurin'
java-version: 21
- name: Setup Maven
uses: stCarolas/[email protected]
Expand All @@ -61,7 +61,7 @@ jobs:
- name: Setup Java JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
distribution: 'temurin'
java-version: 21
- name: Setup Maven
uses: stCarolas/[email protected]
Expand Down
5 changes: 5 additions & 0 deletions client/idrepo/console/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@ under the License.
<artifactId>disruptor</artifactId>
</dependency>

<dependency>
<groupId>org.apache.wicket</groupId>
<artifactId>wicket-tester</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
*/
package org.apache.syncope.client.console;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
import org.apache.syncope.client.console.pages.BasePage;
Expand All @@ -31,49 +30,12 @@ public class ConsoleProperties extends CommonUIProperties {

private static final long serialVersionUID = -6444470724127309370L;

public static class Topology implements Serializable {

private static final long serialVersionUID = -4530238696048859905L;

private int corePoolSize = 10;

private int maxPoolSize = 20;

private int queueCapacity = 50;

public int getCorePoolSize() {
return corePoolSize;
}

public void setCorePoolSize(final int corePoolSize) {
this.corePoolSize = corePoolSize;
}

public int getMaxPoolSize() {
return maxPoolSize;
}

public void setMaxPoolSize(final int maxPoolSize) {
this.maxPoolSize = maxPoolSize;
}

public int getQueueCapacity() {
return queueCapacity;
}

public void setQueueCapacity(final int queueCapacity) {
this.queueCapacity = queueCapacity;
}
}

private final Map<String, Class<? extends BasePage>> page = new HashMap<>();

private String defaultAnyPanelClass = AnyPanel.class.getName();

private int realmsFullTreeThreshold = 20;

private final Topology topology = new Topology();

public Map<String, Class<? extends BasePage>> getPage() {
return page;
}
Expand All @@ -93,8 +55,4 @@ public int getRealmsFullTreeThreshold() {
public void setRealmsFullTreeThreshold(final int realmsFullTreeThreshold) {
this.realmsFullTreeThreshold = realmsFullTreeThreshold;
}

public Topology getTopology() {
return topology;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
import java.util.Set;
import java.util.concurrent.Callable;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.stream.Collectors;
import org.apache.commons.lang3.ArrayUtils;
Expand Down Expand Up @@ -63,7 +65,6 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.core.task.TaskRejectedException;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import org.springframework.util.CollectionUtils;

public class SyncopeConsoleSession extends AuthenticatedWebSession implements BaseSession {
Expand Down Expand Up @@ -103,7 +104,7 @@ public static SyncopeConsoleSession get() {

protected final Map<Class<?>, Object> services = Collections.synchronizedMap(new HashMap<>());

protected final ThreadPoolTaskExecutor executor;
protected final ExecutorService executor = Executors.newVirtualThreadPerTaskExecutor();

protected String domain;

Expand Down Expand Up @@ -131,8 +132,6 @@ public SyncopeConsoleSession(final Request request) {
super(request);

clientFactory = SyncopeWebApplication.get().newClientFactory();

executor = SyncopeWebApplication.get().newThreadPoolTaskExecutor();
}

protected String message(final SyncopeClientException sce) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.aop.support.AopUtils;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;

public class SyncopeWebApplication extends WicketBootSecuredWebApplication {

Expand Down Expand Up @@ -276,16 +275,6 @@ public Class<? extends BasePage> getPageClass(final String name) {
return props.getPage().get(name);
}

public ThreadPoolTaskExecutor newThreadPoolTaskExecutor() {
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
executor.setWaitForTasksToCompleteOnShutdown(false);
executor.setCorePoolSize(props.getTopology().getCorePoolSize());
executor.setMaxPoolSize(props.getTopology().getMaxPoolSize());
executor.setQueueCapacity(props.getTopology().getQueueCapacity());
executor.initialize();
return executor;
}

public SyncopeAnonymousClient newAnonymousClient(final String domain) {
return newClientFactory().
setDomain(domain).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public class GroupDirectoryPanel extends AnyDirectoryPanel<GroupTO, GroupRestCli

protected final BaseModal<Serializable> membersModal = new BaseModal<>(Constants.OUTER);

protected final MembersTogglePanel templates;
protected final MembersTogglePanel membersTogglePanel;

protected GroupDirectoryPanel(final String id, final Builder builder, final boolean wizardInModal) {
super(id, builder, wizardInModal);
Expand All @@ -118,7 +118,7 @@ protected GroupDirectoryPanel(final String id, final Builder builder, final bool
addOuterObject(membersModal);
membersModal.size(Modal.Size.Large);

templates = new MembersTogglePanel(page.getPageReference()) {
membersTogglePanel = new MembersTogglePanel(page.getPageReference()) {

private static final long serialVersionUID = -8765794727538618705L;

Expand Down Expand Up @@ -200,7 +200,7 @@ protected Serializable onApplyInternal(
}
};

addOuterObject(templates);
addOuterObject(membersTogglePanel);
}

@Override
Expand Down Expand Up @@ -273,8 +273,9 @@ public void onClick(final AjaxRequestTarget target, final GroupTO ignore) {

@Override
public void onClick(final AjaxRequestTarget target, final GroupTO ignore) {
templates.setTargetObject(model.getObject());
templates.toggle(target, true);
membersTogglePanel.setHeader(target, model.getObject().getName());
membersTogglePanel.setTargetObject(model.getObject());
membersTogglePanel.toggle(target, model.getObject(), true);
}

@Override
Expand Down
Loading

0 comments on commit 783b2da

Please sign in to comment.