Skip to content

Commit

Permalink
Prepare for java 17 based releases
Browse files Browse the repository at this point in the history
  • Loading branch information
cuioss committed Aug 18, 2023
1 parent 724b773 commit f5b4e90
Show file tree
Hide file tree
Showing 94 changed files with 3,732 additions and 2,618 deletions.
4 changes: 2 additions & 2 deletions .github/project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ name: cui-core-ui-model
pages-reference: cui-core-ui-model
sonar-project-key: cuioss_cui-core-ui-model
release:
current-version: 1.1.2
next-version: 1.2.0-SNAPSHOT
current-version: 2.0.0
next-version: 2.0-SNAPSHOT
6 changes: 3 additions & 3 deletions .github/workflows/maven-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ jobs:
metadata-file-path: '.github/project.yml'
local-file: true

- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'temurin'
server-id: sonatype-nexus-snapshots
server-username: MAVEN_USERNAME
Expand All @@ -47,7 +47,7 @@ jobs:
run: |
git checkout -b release
mvn -B -Prelease release:clean release:prepare -DreleaseVersion=${{steps.metadata.outputs.current-version}} -DdevelopmentVersion=${{steps.metadata.outputs.next-version}}
mvn -B -Prelease javadoc:javadoc site:site site:stage
mvn -B -Prelease javadoc:aggregate site:site site:stage
git checkout ${{vars.GITHUB_BASE_REF}}
git rebase release
mvn -B -Prelease release:perform -DskipTests
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# documentation.

name: Master Build

Expand All @@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
version: [11, 17]
version: [17,20]

steps:
- uses: actions/checkout@v3
Expand All @@ -42,10 +42,10 @@ jobs:
with:
fetch-depth: 0

- name: Set up JDK 11 for Sonar-build
- name: Set up JDK 17 for Sonar-build
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'temurin'
cache: maven

Expand Down Expand Up @@ -76,10 +76,10 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Set up JDK 11 for snapshot release
- name: Set up JDK 17 for snapshot release
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'temurin'
server-id: sonatype-nexus-snapshots
server-username: MAVEN_USERNAME
Expand All @@ -95,7 +95,7 @@ jobs:
- name: Deploy Snapshot with Maven, version ${{ steps.project.outputs.version }}
if: ${{endsWith(steps.project.outputs.version, '-SNAPSHOT')}}
run: |
mvn -B -Prelease-snapshot javadoc:javadoc
mvn -B -Prelease-snapshot javadoc:aggregate
mvn -B -Prelease-snapshot deploy -Dmaven.test.skip=true
env:
MAVEN_USERNAME: ${{ secrets.OSS_SONATYPE_USERNAME }}
Expand Down
17 changes: 12 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,29 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>de.cuioss</groupId>
<artifactId>cui-java-parent</artifactId>
<version>0.2.9</version>
<version>0.4.1</version>
<relativePath />
</parent>
<artifactId>cui-core-ui-model</artifactId>
<name>cui core UI-Model</name>
<version>1.2.0-SNAPSHOT</version>
<description>Defines types and stuctures symplifying the integration of server-side ui.
<version>2.0-SNAPSHOT</version>
<description>Defines types and stuctures simplifying the integration of
server-side ui.
</description>
<packaging>jar</packaging>
<url>https://github.com/cuioss/cui-core-ui-model/</url>
<scm>
<url>https://github.com/cuioss/cui-core-ui-model/</url>
<connection>scm:git:https://github.com/cuioss/cui-core-ui-model.git</connection>
<developerConnection>scm:git:https://github.com/cuioss/cui-core-ui-model/</developerConnection>
<developerConnection>
scm:git:https://github.com/cuioss/cui-core-ui-model/</developerConnection>
<tag>HEAD</tag>
</scm>
<issueManagement>
<url>https://github.com/cuioss/cui-core-ui-model/issues</url>
<system>GitHub Issues</system>
</issueManagement>
<properties>
<maven.jar.plugin.automatic.module.name>de.cuioss.uimodel</maven.jar.plugin.automatic.module.name>
</properties>
<dependencies>
<!-- Provided -->
<dependency>
Expand Down
77 changes: 46 additions & 31 deletions src/main/java/de/cuioss/uimodel/application/CuiProjectStage.java
Original file line number Diff line number Diff line change
@@ -1,31 +1,46 @@
package de.cuioss.uimodel.application;

import java.io.Serializable;

/**
* Generalization for JSFs / DeltaSpikes Project-Stage
*
* @author Oliver Wolff
*/
public interface CuiProjectStage extends Serializable {

/**
* @return true if project stage is 'development'.
*/
boolean isDevelopment();

/**
* @return true if project stage is 'test'.
*/
boolean isTest();

/**
* @return true if project stage is 'configuration'.
*/
boolean isConfiguration();

/**
* @return true if project stage is 'production' or unknown.
*/
boolean isProduction();
}
/*
* Copyright 2023 the original author or authors.
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* https://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package de.cuioss.uimodel.application;

import java.io.Serializable;

/**
* Generalization for JSFs / DeltaSpikes Project-Stage
*
* @author Oliver Wolff
*/
public interface CuiProjectStage extends Serializable {

/**
* @return true if project stage is 'development'.
*/
boolean isDevelopment();

/**
* @return true if project stage is 'test'.
*/
boolean isTest();

/**
* @return true if project stage is 'configuration'.
*/
boolean isConfiguration();

/**
* @return true if project stage is 'production' or unknown.
*/
boolean isProduction();
}
125 changes: 70 additions & 55 deletions src/main/java/de/cuioss/uimodel/application/LoginCredentials.java
Original file line number Diff line number Diff line change
@@ -1,55 +1,70 @@
package de.cuioss.uimodel.application;

import static de.cuioss.tools.string.MoreStrings.isEmpty;

import java.io.Serializable;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

/**
* Simple class providing credentials for form-based login
*
* @author Oliver Wolff
*/
@EqualsAndHashCode(exclude = "password", doNotUseGetters = true)
@ToString(exclude = "password", doNotUseGetters = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class LoginCredentials implements Serializable {

private static final long serialVersionUID = -5554252114058479008L;

@Getter
@Setter
private String password;

@Getter
@Setter
private String username;

@Getter
@Setter
private String userStore;

@Getter
@Setter
private boolean rememberLoginCredentials;

/**
* Checks whether the given credentials are syntactically correct, saying {@link #getUsername()}
* and {@link #getPassword()} are neither null nor empty.
*
* @return boolean indicating the completeness of the configuration
*/
public boolean isComplete() {
return !isEmpty(getUsername()) && !isEmpty(getPassword());
}

}
/*
* Copyright 2023 the original author or authors.
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* https://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package de.cuioss.uimodel.application;

import static de.cuioss.tools.string.MoreStrings.isEmpty;

import java.io.Serializable;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

/**
* Simple class providing credentials for form-based login
*
* @author Oliver Wolff
*/
@EqualsAndHashCode(exclude = "password", doNotUseGetters = true)
@ToString(exclude = "password", doNotUseGetters = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class LoginCredentials implements Serializable {

private static final long serialVersionUID = -5554252114058479008L;

@Getter
@Setter
private String password;

@Getter
@Setter
private String username;

@Getter
@Setter
private String userStore;

@Getter
@Setter
private boolean rememberLoginCredentials;

/**
* Checks whether the given credentials are syntactically correct, saying
* {@link #getUsername()} and {@link #getPassword()} are neither null nor empty.
*
* @return boolean indicating the completeness of the configuration
*/
public boolean isComplete() {
return !isEmpty(getUsername()) && !isEmpty(getPassword());
}

}
52 changes: 34 additions & 18 deletions src/main/java/de/cuioss/uimodel/field/DynamicField.java
Original file line number Diff line number Diff line change
@@ -1,18 +1,34 @@
package de.cuioss.uimodel.field;

import java.io.Serializable;

/**
* Extends {@linkplain TracedDynamicField} and include {@linkplain DynamicFieldType} information
*
* @author Eugen Fischer
* @author Oliver Wolff
* @param <T> bounded type must be {@link Serializable}
*/
public interface DynamicField<T extends Serializable> extends TracedDynamicField<T> {

/**
* @return the content type of this field.
*/
DynamicFieldType getFieldType();
}
/*
* Copyright 2023 the original author or authors.
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* https://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package de.cuioss.uimodel.field;

import java.io.Serializable;

/**
* Extends {@linkplain TracedDynamicField} and include
* {@linkplain DynamicFieldType} information
*
* @author Eugen Fischer
* @author Oliver Wolff
* @param <T> bounded type must be {@link Serializable}
*/
public interface DynamicField<T extends Serializable> extends TracedDynamicField<T> {

/**
* @return the content type of this field.
*/
DynamicFieldType getFieldType();
}
Loading

0 comments on commit f5b4e90

Please sign in to comment.