-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
15bbd66
commit 520d3cb
Showing
3 changed files
with
17 additions
and
40 deletions.
There are no files selected for viewing
31 changes: 9 additions & 22 deletions
31
...on/pdl-klient/src/main/java/no/nav/vedtak/felles/integrasjon/pdl/PDLExceptionDetails.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 |
---|---|---|
@@ -1,34 +1,21 @@ | ||
package no.nav.vedtak.felles.integrasjon.pdl; | ||
|
||
import com.fasterxml.jackson.annotation.JsonCreator; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
public class PDLExceptionDetails { | ||
private final String type; | ||
private final String cause; | ||
private final String policy; | ||
|
||
@JsonCreator | ||
public PDLExceptionDetails(@JsonProperty("type") String type, @JsonProperty("cause") String cause, @JsonProperty("policy") String policy) { | ||
this.type = type; | ||
this.cause = cause; | ||
this.policy = policy; | ||
} | ||
|
||
public record PDLExceptionDetails(String type, String cause,String policy) { | ||
|
||
@Deprecated(since = "2.3", forRemoval = true) | ||
public String getType() { | ||
return type; | ||
return type(); | ||
} | ||
|
||
@Deprecated(since = "2.3", forRemoval = true) | ||
public String getCause() { | ||
return cause; | ||
return cause(); | ||
} | ||
|
||
@Deprecated(since = "2.3", forRemoval = true) | ||
public String getPolicy() { | ||
return policy; | ||
return policy(); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return getClass().getSimpleName() + " [type=" + type + ", cause=" + cause + ", policy=" + policy + "]"; | ||
} | ||
|
||
} |
22 changes: 4 additions & 18 deletions
22
.../pdl-klient/src/main/java/no/nav/vedtak/felles/integrasjon/pdl/PDLExceptionExtension.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 |
---|---|---|
@@ -1,29 +1,15 @@ | ||
package no.nav.vedtak.felles.integrasjon.pdl; | ||
|
||
import com.fasterxml.jackson.annotation.JsonCreator; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
public class PDLExceptionExtension { | ||
private final String code; | ||
private final PDLExceptionDetails details; | ||
|
||
@JsonCreator | ||
public PDLExceptionExtension(@JsonProperty("code") String code, @JsonProperty("details") PDLExceptionDetails details) { | ||
this.code = code; | ||
this.details = details; | ||
} | ||
public record PDLExceptionExtension(String code, PDLExceptionDetails details) { | ||
|
||
@Deprecated(since = "2.3", forRemoval = true) | ||
public PDLExceptionDetails getDetails() { | ||
return details; | ||
} | ||
|
||
@Deprecated(since = "2.3", forRemoval = true) | ||
public String getCode() { | ||
return code; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return getClass().getSimpleName() + " [code=" + code + ", details=" + details + "]"; | ||
return code(); | ||
} | ||
|
||
} |
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