-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #319 from com-pas/develop
New release
- Loading branch information
Showing
16 changed files
with
181 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
app/src/main/java/org/lfenergy/compas/scl/data/rest/v1/model/DuplicateNameCheckRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// SPDX-FileCopyrightText: 2022 Alliander N.V. | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package org.lfenergy.compas.scl.data.rest.v1.model; | ||
|
||
import org.eclipse.microprofile.openapi.annotations.media.Schema; | ||
import org.lfenergy.compas.core.commons.constraint.FilenameValid; | ||
|
||
import javax.xml.bind.annotation.XmlAccessType; | ||
import javax.xml.bind.annotation.XmlAccessorType; | ||
import javax.xml.bind.annotation.XmlElement; | ||
import javax.xml.bind.annotation.XmlRootElement; | ||
|
||
import static org.lfenergy.compas.scl.data.SclDataServiceConstants.SCL_DATA_SERVICE_V1_NS_URI; | ||
|
||
@Schema(description = "Request to check for duplicate names.") | ||
@XmlRootElement(name = "DuplicateNameCheckRequest", namespace = SCL_DATA_SERVICE_V1_NS_URI) | ||
@XmlAccessorType(XmlAccessType.FIELD) | ||
public class DuplicateNameCheckRequest { | ||
@FilenameValid | ||
@Schema(description = "The name that will be stored as Private Element and can later be used to determine the filename.", | ||
example = "STATION-0012312") | ||
@XmlElement(name = "Name", namespace = SCL_DATA_SERVICE_V1_NS_URI, required = true) | ||
private String name; | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
app/src/main/java/org/lfenergy/compas/scl/data/rest/v1/model/DuplicateNameCheckResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// SPDX-FileCopyrightText: 2022 Alliander N.V. | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package org.lfenergy.compas.scl.data.rest.v1.model; | ||
|
||
import org.eclipse.microprofile.openapi.annotations.media.Schema; | ||
|
||
import javax.xml.bind.annotation.XmlAccessType; | ||
import javax.xml.bind.annotation.XmlAccessorType; | ||
import javax.xml.bind.annotation.XmlElement; | ||
import javax.xml.bind.annotation.XmlRootElement; | ||
|
||
import static org.lfenergy.compas.scl.data.SclDataServiceConstants.SCL_DATA_SERVICE_V1_NS_URI; | ||
|
||
@Schema(description = "Response from duplicate name check in the database.") | ||
@XmlRootElement(name = "DuplicateNameCheckResponse", namespace = SCL_DATA_SERVICE_V1_NS_URI) | ||
@XmlAccessorType(XmlAccessType.FIELD) | ||
public class DuplicateNameCheckResponse { | ||
@Schema(description = "Boolean result for duplicate name check.") | ||
@XmlElement(name = "Duplicate", namespace = SCL_DATA_SERVICE_V1_NS_URI) | ||
private boolean duplicate; | ||
|
||
public boolean isDuplicate() { | ||
return duplicate; | ||
} | ||
|
||
public void setDuplicate(boolean duplicate) { | ||
this.duplicate = duplicate; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
...c/test/java/org/lfenergy/compas/scl/data/rest/v1/model/DuplicateNameCheckRequestTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// SPDX-FileCopyrightText: 2022 Alliander N.V. | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package org.lfenergy.compas.scl.data.rest.v1.model; | ||
|
||
class DuplicateNameCheckRequestTest extends AbstractPojoTester { | ||
@Override | ||
protected Class<?> getClassToBeTested() { | ||
return DuplicateNameCheckRequest.class; | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
.../test/java/org/lfenergy/compas/scl/data/rest/v1/model/DuplicateNameCheckResponseTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// SPDX-FileCopyrightText: 2022 Alliander N.V. | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package org.lfenergy.compas.scl.data.rest.v1.model; | ||
|
||
class DuplicateNameCheckResponseTest extends AbstractPojoTester{ | ||
|
||
@Override | ||
protected Class<?> getClassToBeTested() { | ||
return DuplicateNameCheckResponse.class; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters