Skip to content

Commit

Permalink
Bye bye core/persistence-jpa-json
Browse files Browse the repository at this point in the history
  • Loading branch information
ilgrosso committed Aug 21, 2024
1 parent e977eb2 commit ff5fb71
Show file tree
Hide file tree
Showing 245 changed files with 1,958 additions and 10,121 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/fit_Elasticsearch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@ jobs:
${{ runner.os }}-maven-
- name: Build
run: mvn -U -T 1C -P 'skipTests,all'
- name: 'Elasticsearch / H2 / JSON'
- name: 'Elasticsearch / PostgreSQL / JSON'
run: mvn -f fit/core-reference/pom.xml -P elasticsearch-it -Dinvoker.streamLogs=true -Dmodernizer.skip=true -Drat.skip=true -Dcheckstyle.skip=true -Djacoco.skip=true
2 changes: 1 addition & 1 deletion .github/workflows/fit_OpenSearch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@ jobs:
${{ runner.os }}-maven-
- name: Build
run: mvn -U -T 1C -P 'skipTests,all'
- name: 'OpenSearch / H2 / JSON'
- name: 'OpenSearch / PostgreSQL / JSON'
run: mvn -f fit/core-reference/pom.xml -P opensearch-it -Dinvoker.streamLogs=true -Dmodernizer.skip=true -Drat.skip=true -Dcheckstyle.skip=true -Djacoco.skip=true
2 changes: 1 addition & 1 deletion .github/workflows/fit_Payara.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@ jobs:
${{ runner.os }}-maven-
- name: Build
run: mvn -U -T 1C -P 'skipTests,all'
- name: 'Payara / H2 / JSON'
- name: 'Payara / PostgreSQL / JSON'
run: mvn -f fit/core-reference/pom.xml -P payara-it -Dinvoker.streamLogs=true -Dmodernizer.skip=true -Drat.skip=true -Dcheckstyle.skip=true -Djacoco.skip=true
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@ jobs:
${{ runner.os }}-maven-
- name: Build
run: mvn -U -T 1C -P 'skipTests,all'
- name: 'Tomcat / H2 / JSON'
- name: 'Tomcat / PostgreSQL / JSON'
run: mvn -f fit/core-reference/pom.xml verify -Dinvoker.streamLogs=true -Dmodernizer.skip=true -Drat.skip=true -Dcheckstyle.skip=true -Djacoco.skip=true
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@ jobs:
${{ runner.os }}-maven-
- name: Build
run: mvn -U -T 1C -P 'skipTests,all'
- name: 'Tomcat / H2 / XML'
- name: 'Tomcat / PostgreSQL / XML'
run: mvn -f fit/core-reference/pom.xml verify -Djaxrs.content.type=application/xml -Dit.test=org.apache.syncope.fit.core.*ITCase -Dinvoker.streamLogs=true -Dmodernizer.skip=true -Drat.skip=true -Dcheckstyle.skip=true -Djacoco.skip=true
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@ jobs:
${{ runner.os }}-maven-
- name: Build
run: mvn -U -T 1C -P 'skipTests,all'
- name: 'Tomcat / H2 / YAML'
- name: 'Tomcat / PostgreSQL / YAML'
run: mvn -f fit/core-reference/pom.xml verify -Djaxrs.content.type=application/yaml -Dit.test=org.apache.syncope.fit.core.*ITCase -Dinvoker.streamLogs=true -Dmodernizer.skip=true -Drat.skip=true -Dcheckstyle.skip=true -Djacoco.skip=true
2 changes: 1 addition & 1 deletion .github/workflows/fit_Wildfly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@ jobs:
${{ runner.os }}-maven-
- name: Build
run: mvn -U -T 1C -P 'skipTests,all'
- name: 'Wildfly / H2 / JSON'
- name: 'Wildfly / PostgreSQL / JSON'
run: mvn -f fit/core-reference/pom.xml -P wildfly-it -Dinvoker.streamLogs=true -Dmodernizer.skip=true -Drat.skip=true -Dcheckstyle.skip=true -Djacoco.skip=true
2 changes: 1 addition & 1 deletion .github/workflows/fit_Zookeeper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@ jobs:
${{ runner.os }}-maven-
- name: Build
run: mvn -U -T 1C -P 'skipTests,all'
- name: 'Zookeeper / H2 / JSON'
- name: 'Zookeeper / PostgreSQL / JSON'
run: mvn -f fit/core-reference/pom.xml -P zookeeper-it -Dinvoker.streamLogs=true -Dmodernizer.skip=true -Drat.skip=true -Dcheckstyle.skip=true -Djacoco.skip=true
30 changes: 2 additions & 28 deletions .github/workflows/mariadb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,33 +49,7 @@ jobs:
${{ runner.os }}-maven-
- name: Build
run: mvn -U -T 1C -P 'skipTests,all'
- name: 'Unit Tests: MariaDB'
run: mvn -f core/persistence-jpa/pom.xml -P mariadb -Dinvoker.streamLogs=true -Dmodernizer.skip=true -Dianal.phase=none -Drat.skip=true -Dcheckstyle.skip=true -Djacoco.skip=true
- name: 'Integration Tests: MariaDB'
run: mvn -f fit/core-reference/pom.xml -P mariadb-it -Dinvoker.streamLogs=true -Dmodernizer.skip=true -Drat.skip=true -Dcheckstyle.skip=true -Djacoco.skip=true

majson:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Java JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
- name: Setup Maven
uses: stCarolas/setup-maven@v5
with:
maven-version: 3.9.6
- uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build
run: mvn -U -T 1C -P 'skipTests,all'
- name: 'Unit Tests: MariaDB JPA JSON'
run: mvn -f core/persistence-jpa-json/pom.xml -P majson -Dinvoker.streamLogs=true -Dmodernizer.skip=true -Dianal.phase=none -Drat.skip=true -Dcheckstyle.skip=true -Djacoco.skip=true
- name: 'Integration Tests: MariaDB JPA JSON'
run: mvn -f fit/core-reference/pom.xml -P majson-it -Dinvoker.streamLogs=true -Dmodernizer.skip=true -Drat.skip=true -Dcheckstyle.skip=true -Djacoco.skip=true
30 changes: 2 additions & 28 deletions .github/workflows/mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,33 +49,7 @@ jobs:
${{ runner.os }}-maven-
- name: Build
run: mvn -U -T 1C -P 'skipTests,all'
- name: 'Unit Tests: MySQL'
run: mvn -f core/persistence-jpa/pom.xml -P mysql -Dinvoker.streamLogs=true -Dmodernizer.skip=true -Dianal.phase=none -Drat.skip=true -Dcheckstyle.skip=true -Djacoco.skip=true
- name: 'Integration Tests: MySQL'
run: mvn -f fit/core-reference/pom.xml -P mysql-it -Dinvoker.streamLogs=true -Dmodernizer.skip=true -Drat.skip=true -Dcheckstyle.skip=true -Djacoco.skip=true

myjson:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Java JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
- name: Setup Maven
uses: stCarolas/setup-maven@v5
with:
maven-version: 3.9.6
- uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build
run: mvn -U -T 1C -P 'skipTests,all'
- name: 'Unit Tests: MySQL JPA JSON'
run: mvn -f core/persistence-jpa-json/pom.xml -P myjson -Dinvoker.streamLogs=true -Dmodernizer.skip=true -Dianal.phase=none -Drat.skip=true -Dcheckstyle.skip=true -Djacoco.skip=true
- name: 'Integration Tests: MySQL JPA JSON'
run: mvn -f fit/core-reference/pom.xml -P myjson-it -Dinvoker.streamLogs=true -Dmodernizer.skip=true -Drat.skip=true -Dcheckstyle.skip=true -Djacoco.skip=true
30 changes: 2 additions & 28 deletions .github/workflows/oracle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,33 +49,7 @@ jobs:
${{ runner.os }}-maven-
- name: Build
run: mvn -U -T 1C -P 'skipTests,all'
- name: 'Unit Tests: Oracle'
run: mvn -f core/persistence-jpa-json/pom.xml -P oracle -Dinvoker.streamLogs=true -Dmodernizer.skip=true -Dianal.phase=none -Drat.skip=true -Dcheckstyle.skip=true -Djacoco.skip=true
- name: 'Integration Tests: Oracle'
run: mvn -f fit/core-reference/pom.xml -P oracle-it -Dinvoker.streamLogs=true -Dmodernizer.skip=true -Drat.skip=true -Dcheckstyle.skip=true -Djacoco.skip=true

ojson:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Java JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
- name: Setup Maven
uses: stCarolas/setup-maven@v5
with:
maven-version: 3.9.6
- uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build
run: mvn -U -T 1C -P 'skipTests,all'
- name: 'Unit Tests: Oracle JPA JSON'
run: mvn -f core/persistence-jpa-json/pom.xml -P ojson -Dinvoker.streamLogs=true -Dmodernizer.skip=true -Dianal.phase=none -Drat.skip=true -Dcheckstyle.skip=true -Djacoco.skip=true
- name: 'Integration Tests: Oracle JPA JSON'
run: mvn -f fit/core-reference/pom.xml -P ojson-it -Dinvoker.streamLogs=true -Dmodernizer.skip=true -Drat.skip=true -Dcheckstyle.skip=true -Djacoco.skip=true
81 changes: 0 additions & 81 deletions .github/workflows/postgresql.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@
import org.apache.syncope.common.keymaster.client.api.model.JPADomain;
import org.apache.syncope.core.persistence.api.DomainRegistry;
import org.apache.syncope.core.persistence.api.content.ContentLoader;
import org.apache.syncope.core.persistence.jpa.MasterDomain;
import org.apache.syncope.core.persistence.jpa.MariaDBPersistenceContext;
import org.apache.syncope.core.persistence.jpa.MySQLPersistenceContext;
import org.apache.syncope.core.persistence.jpa.OraclePersistenceContext;
import org.apache.syncope.core.persistence.jpa.PGPersistenceContext;
import org.apache.syncope.core.persistence.jpa.PersistenceContext;
import org.apache.syncope.core.persistence.jpa.StartupDomainLoader;
import org.apache.syncope.core.provisioning.api.ImplementationLookup;
Expand All @@ -44,8 +47,18 @@
import org.springframework.mail.javamail.JavaMailSender;

@PropertySource("classpath:core-test.properties")
@Import({ IdRepoLogicContext.class, IdMLogicContext.class, SecurityContext.class,
PersistenceContext.class, MasterDomain.class, ProvisioningContext.class, WorkflowContext.class })
@Import({
SecurityContext.class,
WorkflowContext.class,
PersistenceContext.class,
PGPersistenceContext.class,
MySQLPersistenceContext.class,
MariaDBPersistenceContext.class,
OraclePersistenceContext.class,
ProvisioningContext.class,
IdRepoLogicContext.class,
IdMLogicContext.class
})
@Configuration(proxyBeanMethods = false)
public class IdMLogicTestContext {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@
import org.apache.syncope.common.keymaster.client.api.model.JPADomain;
import org.apache.syncope.core.persistence.api.DomainRegistry;
import org.apache.syncope.core.persistence.api.content.ContentLoader;
import org.apache.syncope.core.persistence.jpa.MasterDomain;
import org.apache.syncope.core.persistence.jpa.MariaDBPersistenceContext;
import org.apache.syncope.core.persistence.jpa.MySQLPersistenceContext;
import org.apache.syncope.core.persistence.jpa.OraclePersistenceContext;
import org.apache.syncope.core.persistence.jpa.PGPersistenceContext;
import org.apache.syncope.core.persistence.jpa.PersistenceContext;
import org.apache.syncope.core.persistence.jpa.StartupDomainLoader;
import org.apache.syncope.core.provisioning.api.ImplementationLookup;
Expand All @@ -44,8 +47,17 @@
import org.springframework.mail.javamail.JavaMailSender;

@PropertySource("classpath:core-test.properties")
@Import({ IdRepoLogicContext.class, IdRepoLogicContext.class, SecurityContext.class,
PersistenceContext.class, MasterDomain.class, ProvisioningContext.class, WorkflowContext.class })
@Import({
SecurityContext.class,
WorkflowContext.class,
PersistenceContext.class,
PGPersistenceContext.class,
MySQLPersistenceContext.class,
MariaDBPersistenceContext.class,
OraclePersistenceContext.class,
ProvisioningContext.class,
IdRepoLogicContext.class
})
@Configuration(proxyBeanMethods = false)
public class IdRepoLogicTestContext {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

public interface GroupablePlainAttr<A extends Any<?>, M extends Membership<A>> extends PlainAttr<A> {

String getMembershipKey();

M getMembership();

void setMembership(M membership);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,14 @@ public interface PlainAttr<A extends Any<?>> extends Entity {

void setOwner(A owner);

String getSchemaKey();

PlainSchema getSchema();

void setSchema(PlainSchema schema);

void add(PlainAttrValue attrValue);

void add(PlainAttrValidationManager validator, String value, AnyUtils anyUtils);

void add(PlainAttrValidationManager validator, String value, PlainAttrValue attrValue);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

public abstract class AbstractPersistenceProperties<D extends AbstractDomainProperties> {

private String indexesXML = "classpath:indexes.xml";
private String indexesXML = "classpath:META-INF/indexes.xml";

@NestedConfigurationProperty
private final List<D> domain = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ public abstract class AbstractValidator<A extends Annotation, T> implements Cons

protected static final Logger LOG = LoggerFactory.getLogger(AbstractValidator.class);

@Override
public void initialize(final A annotation) {
// no initialization
}

protected static String getTemplate(final EntityViolationType type, final String message) {
return type.name() + ';' + message;
}

protected boolean isHtml(final String text) {
protected static boolean isHtml(final String text) {
return text != null && (text.indexOf('<') != -1 || text.indexOf('>') != -1);
}

@Override
public void initialize(final A annotation) {
// no initialization
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.syncope.core.persistence.neo4j.entity;
package org.apache.syncope.core.persistence.common.validation;

import jakarta.validation.Constraint;
import jakarta.validation.Payload;
Expand All @@ -32,7 +32,7 @@
@Documented
public @interface AttributableCheck {

String message() default "{org.apache.syncope.core.persistence.validation.any}";
String message() default "{org.apache.syncope.core.persistence.common.validation}";

Class<?>[] groups() default {};

Expand Down
Loading

0 comments on commit ff5fb71

Please sign in to comment.