Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/release-5u23'
Browse files Browse the repository at this point in the history
  • Loading branch information
tisuchida committed Sep 28, 2023
2 parents 360cce3 + 2a86e5b commit 59277fd
Show file tree
Hide file tree
Showing 23 changed files with 1,023 additions and 337 deletions.
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>com.nablarch.example</groupId>
<artifactId>nablarch-example-rest</artifactId>
<version>5u22</version>
<version>5u23</version>
<packaging>war</packaging>

<properties>
Expand Down Expand Up @@ -39,7 +39,7 @@
<dependency>
<groupId>com.nablarch.profile</groupId>
<artifactId>nablarch-bom</artifactId>
<version>5u22</version>
<version>5u23</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -120,7 +120,7 @@
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>2.1.214</version>
<version>2.2.220</version>
<scope>runtime</scope>
</dependency>

Expand Down Expand Up @@ -229,7 +229,7 @@
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>2.1.214</version>
<version>2.2.220</version>
<scope>runtime</scope>
</dependency>
</dependencies>
Expand Down
8 changes: 6 additions & 2 deletions src/main/java/com/nablarch/example/code/CodeEnum.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
package com.nablarch.example.code;

import nablarch.core.validation.ee.EnumElement.WithValue;

/**
* コード値を定義したEnumが実装するインタフェース。
*
* @author Nabu Rakutaro
*/
public interface CodeEnum {
public interface CodeEnum extends WithValue<String> {
/**
* ラベルを返却する。
* @return ラベル
Expand All @@ -14,7 +16,9 @@ public interface CodeEnum {

/**
* コード値を返却する。
* コード値はバリデーション時に許容する列挙値としても使用する。
* @return コード値
*/
String getCode();
@Override // override for Javadoc
String getValue();
}
12 changes: 6 additions & 6 deletions src/main/java/com/nablarch/example/code/ProjectClass.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ public enum ProjectClass implements CodeEnum {
private final String label;

/** プロジェクト分類のコード */
private final String code;
private final String value;

/**
* コンストラクタ。
*
* @param code コード値
* @param value コード値
* @param label ラベル
*/
ProjectClass(String code, String label) {
ProjectClass(String value, String label) {
this.label = label;
this.code = code;
this.value = value;
}

@Override
Expand All @@ -42,7 +42,7 @@ public String getLabel() {
}

@Override
public String getCode() {
return code;
public String getValue() {
return value;
}
}
12 changes: 6 additions & 6 deletions src/main/java/com/nablarch/example/code/ProjectType.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ public enum ProjectType implements CodeEnum {
/** プロジェクト種類のラベル */
private final String label;
/** プロジェクト種類のコード */
private final String code;
private final String value;

/**
* コンストラクタ。
* @param code コード値
* @param value コード値
* @param label ラベル
*/
ProjectType(String code, String label) {
ProjectType(String value, String label) {
this.label = label;
this.code = code;
this.value = value;
}

@Override
Expand All @@ -32,7 +32,7 @@ public String getLabel() {
}

@Override
public String getCode() {
return code;
public String getValue() {
return value;
}
}
10 changes: 5 additions & 5 deletions src/main/java/com/nablarch/example/domain/RestExampleDomain.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

import com.nablarch.example.code.ProjectClass;
import com.nablarch.example.code.ProjectType;
import com.nablarch.example.validator.CodeValue;
import com.nablarch.example.validator.YYYYMMDD;
import nablarch.core.validation.ee.DateFormat;
import nablarch.core.validation.ee.Digits;
import nablarch.core.validation.ee.EnumElement;
import nablarch.core.validation.ee.Length;
import nablarch.core.validation.ee.NumberRange;
import nablarch.core.validation.ee.SystemChar;
Expand All @@ -27,15 +27,15 @@ public class RestExampleDomain {
private String projectName;

/** 新規開発PJ、または保守PJを表すコード値 */
@CodeValue(enumClass = ProjectType.class)
@EnumElement(ProjectType.class)
private String projectType;

/** プロジェクトの規模を表すコード値 */
@CodeValue(enumClass = ProjectClass.class)
@EnumElement(ProjectClass.class)
private String projectClass;

/** 日付 */
@YYYYMMDD
@DateFormat
private String date;

/** ユーザ氏名(漢字) */
Expand Down
70 changes: 0 additions & 70 deletions src/main/java/com/nablarch/example/validator/CodeValue.java

This file was deleted.

This file was deleted.

72 changes: 0 additions & 72 deletions src/main/java/com/nablarch/example/validator/YYYYMMDD.java

This file was deleted.

This file was deleted.

Loading

0 comments on commit 59277fd

Please sign in to comment.