Skip to content

Commit d7a432d

Browse files
committed
Fix build
1 parent e18a168 commit d7a432d

File tree

5 files changed

+107
-1
lines changed

5 files changed

+107
-1
lines changed

stroom-app/src/main/resources/ui/noauth/swagger/stroom.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11831,6 +11831,34 @@
1183111831
"tags" : [ "Word List (v1)" ]
1183211832
}
1183311833
},
11834+
"/xmlSchema/v1/validate" : {
11835+
"post" : {
11836+
"operationId" : "validateXmlSchema",
11837+
"requestBody" : {
11838+
"content" : {
11839+
"text/plain" : {
11840+
"schema" : {
11841+
"type" : "string"
11842+
}
11843+
}
11844+
}
11845+
},
11846+
"responses" : {
11847+
"default" : {
11848+
"content" : {
11849+
"application/json" : {
11850+
"schema" : {
11851+
"$ref" : "#/components/schemas/XmlSchemaValidationResponse"
11852+
}
11853+
}
11854+
},
11855+
"description" : "default response"
11856+
}
11857+
},
11858+
"summary" : "Validate an XML schema",
11859+
"tags" : [ "XML Schemas" ]
11860+
}
11861+
},
1183411862
"/xmlSchema/v1/{uuid}" : {
1183511863
"get" : {
1183611864
"operationId" : "fetchXmlSchema",
@@ -24987,6 +25015,17 @@
2498725015
}
2498825016
}
2498925017
},
25018+
"XmlSchemaValidationResponse" : {
25019+
"type" : "object",
25020+
"properties" : {
25021+
"error" : {
25022+
"type" : "string"
25023+
},
25024+
"ok" : {
25025+
"type" : "boolean"
25026+
}
25027+
}
25028+
},
2499025029
"XsltDoc" : {
2499125030
"type" : "object",
2499225031
"properties" : {

stroom-app/src/main/resources/ui/noauth/swagger/stroom.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8113,6 +8113,24 @@ paths:
81138113
summary: Fetch a list of words from a dictionary by its UUID
81148114
tags:
81158115
- Word List (v1)
8116+
/xmlSchema/v1/validate:
8117+
post:
8118+
operationId: validateXmlSchema
8119+
requestBody:
8120+
content:
8121+
text/plain:
8122+
schema:
8123+
type: string
8124+
responses:
8125+
default:
8126+
content:
8127+
application/json:
8128+
schema:
8129+
$ref: "#/components/schemas/XmlSchemaValidationResponse"
8130+
description: default response
8131+
summary: Validate an XML schema
8132+
tags:
8133+
- XML Schemas
81168134
/xmlSchema/v1/{uuid}:
81178135
get:
81188136
operationId: fetchXmlSchema
@@ -18670,6 +18688,13 @@ components:
1867018688
type: string
1867118689
version:
1867218690
type: string
18691+
XmlSchemaValidationResponse:
18692+
type: object
18693+
properties:
18694+
error:
18695+
type: string
18696+
ok:
18697+
type: boolean
1867318698
XsltDoc:
1867418699
type: object
1867518700
properties:

stroom-core-shared/src/main/java/stroom/receive/rules/shared/HashedReceiveDataRules.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import stroom.query.api.datasource.QueryField;
1010
import stroom.security.shared.HashAlgorithm;
1111
import stroom.util.shared.NullSafe;
12+
import stroom.util.shared.SerialisationTestConstructor;
1213

1314
import com.fasterxml.jackson.annotation.JsonCreator;
1415
import com.fasterxml.jackson.annotation.JsonIgnore;
@@ -18,6 +19,7 @@
1819
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
1920
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
2021

22+
import java.util.Collections;
2123
import java.util.List;
2224
import java.util.Locale;
2325
import java.util.Map;
@@ -93,6 +95,15 @@ public HashedReceiveDataRules(
9395
this.hashAlgorithm);
9496
}
9597

98+
@SerialisationTestConstructor
99+
private HashedReceiveDataRules() {
100+
this(0L,
101+
ReceiveDataRules.builder().build(),
102+
Collections.emptyMap(),
103+
Collections.emptyMap(),
104+
HashAlgorithm.BCRYPT);
105+
}
106+
96107
public HashedReceiveDataRules(final ReceiveDataRules receiveDataRules,
97108
final Map<String, DictionaryDoc> uuidToFlattenedDictMap,
98109
final Map<String, String> fieldNameToSaltMap,

stroom-core-shared/src/main/java/stroom/receive/rules/shared/ReceiveDataRule.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020

2121
import stroom.query.api.ExpressionOperator;
22+
import stroom.util.shared.SerialisationTestConstructor;
2223

2324
import com.fasterxml.jackson.annotation.JsonCreator;
2425
import com.fasterxml.jackson.annotation.JsonInclude;
@@ -60,6 +61,16 @@ public ReceiveDataRule(@JsonProperty("ruleNumber") final int ruleNumber,
6061
this.action = Objects.requireNonNull(action);
6162
}
6263

64+
@SerialisationTestConstructor
65+
private ReceiveDataRule() {
66+
this(1,
67+
0L,
68+
"test",
69+
true,
70+
ExpressionOperator.builder().build(),
71+
ReceiveAction.RECEIVE);
72+
}
73+
6374
private ReceiveDataRule(final Builder builder) {
6475
this(builder.ruleNumber,
6576
builder.creationTime,

stroom-core-shared/src/main/java/stroom/security/shared/AppPermissionSetImpl.java

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package stroom.security.shared;
22

33
import stroom.util.shared.NullSafe;
4+
import stroom.util.shared.SerialisationTestConstructor;
45

56
import com.fasterxml.jackson.annotation.JsonCreator;
67
import com.fasterxml.jackson.annotation.JsonIgnore;
@@ -9,6 +10,7 @@
910
import com.fasterxml.jackson.annotation.JsonProperty;
1011
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
1112

13+
import java.util.Arrays;
1214
import java.util.Collection;
1315
import java.util.Collections;
1416
import java.util.EnumSet;
@@ -48,6 +50,14 @@ public class AppPermissionSetImpl implements AppPermissionSet {
4850
.collect(Collectors.toCollection(() -> EnumSet.noneOf(AppPermission.class))));
4951
}
5052

53+
@SerialisationTestConstructor
54+
private AppPermissionSetImpl() {
55+
this(AppPermissionOperator.ALL_OF,
56+
Arrays
57+
.stream(new AppPermission[]{AppPermission.ADMINISTRATOR, AppPermission.ANNOTATIONS})
58+
.collect(Collectors.toList()));
59+
}
60+
5161
@Override
5262
public Set<AppPermission> asSet() {
5363
return appPermissions;
@@ -155,6 +165,11 @@ public static class SingletonAppPermissionSet implements AppPermissionSet {
155165
this.appPermission = Objects.requireNonNull(appPermission);
156166
}
157167

168+
@SerialisationTestConstructor
169+
private SingletonAppPermissionSet() {
170+
this(AppPermission.ADMINISTRATOR);
171+
}
172+
158173
@Override
159174
public Set<AppPermission> asSet() {
160175
return Collections.singleton(appPermission);
@@ -281,11 +296,16 @@ public AppPermission next() {
281296
// This field is pointless, but can't seem to get jackson to play ball without it.
282297
// Empty perm sets are unlikely to be used anyway, so not worth losing sleep over.
283298
if (operator != AppPermissionOperator.EMPTY) {
284-
throw new IllegalArgumentException("Only ALL_OF allowed");
299+
throw new IllegalArgumentException("Only EMPTY allowed");
285300
}
286301
this.operator = operator;
287302
}
288303

304+
@SerialisationTestConstructor
305+
private EmptyAppPermissionSet() {
306+
this(AppPermissionOperator.EMPTY);
307+
}
308+
289309
@Override
290310
public Set<AppPermission> asSet() {
291311
return Collections.emptySet();

0 commit comments

Comments
 (0)