Skip to content

Commit

Permalink
gh-4594 Fix json ser test
Browse files Browse the repository at this point in the history
  • Loading branch information
at055612 committed Nov 15, 2024
1 parent d9d5627 commit 61032a3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,6 @@ public String getType() {
return getType(CaseType.SENTENCE);
}

@JsonIgnore
public String getType(final CaseType caseType) {
Objects.requireNonNull(caseType);
final String type = group
Expand Down
15 changes: 14 additions & 1 deletion stroom-util-shared/src/main/java/stroom/util/shared/UserRef.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,20 @@ public UserRef(@JsonProperty("uuid") final String uuid,
this.group = group;
}

/**
* Creates a {@link UserRef} representing a user (not a group).
*/
public static UserRef forUserUuid(final String userUuid) {
return new UserRef(userUuid, null, null, null, false);
}

/**
* Creates a {@link UserRef} representing a group.
*/
public static UserRef forGroupUuid(final String groupUuid) {
return new UserRef(groupUuid, null, null, null, true);
}

public String getUuid() {
return uuid;
}
Expand Down Expand Up @@ -74,7 +88,6 @@ public String getType() {
return getType(CaseType.SENTENCE);
}

@JsonIgnore
public String getType(final CaseType caseType) {
Objects.requireNonNull(caseType);
final String type = group
Expand Down

0 comments on commit 61032a3

Please sign in to comment.