-
Notifications
You must be signed in to change notification settings - Fork 29
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
0c5a5e3
commit 22b0116
Showing
28 changed files
with
337 additions
and
166 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
44 changes: 0 additions & 44 deletions
44
extensions/protocols/dcp/credential-request-status-api/build.gradle.kts
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
...atus-api/src/main/resources/META-INF/services/org.eclipse.edc.spi.system.ServiceExtension
This file was deleted.
Oops, something went wrong.
8 changes: 0 additions & 8 deletions
8
...edential-request-status-api/src/main/resources/credential-request-status-api-version.json
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -39,6 +39,6 @@ dependencies { | |
|
||
edcBuild { | ||
swagger { | ||
apiGroup.set("credential-request-api") | ||
apiGroup.set("issuer-api") | ||
} | ||
} |
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
97 changes: 97 additions & 0 deletions
97
...hub/protocols/dcp/issuer/api/v1alpha/credentialrequeststatus/CredentialRequestStatus.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,97 @@ | ||
/* | ||
* Copyright (c) 2025 Cofinity-X | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Apache License, Version 2.0 which is available at | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* Contributors: | ||
* Cofinity-X - initial API and implementation | ||
* | ||
*/ | ||
|
||
package org.eclipse.edc.identityhub.protocols.dcp.issuer.api.v1alpha.credentialrequeststatus; | ||
|
||
import com.fasterxml.jackson.annotation.JsonCreator; | ||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize; | ||
import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; | ||
|
||
import java.time.Instant; | ||
import java.util.ArrayList; | ||
import java.util.List; | ||
import java.util.Objects; | ||
|
||
@JsonDeserialize(builder = CredentialRequestStatus.Builder.class) | ||
public class CredentialRequestStatus { | ||
private List<String> messages = new ArrayList<>(); | ||
private String requestStatus; //todo: change this to an enum later | ||
private Instant timestamp; | ||
private String requestId; | ||
|
||
private CredentialRequestStatus() { | ||
} | ||
|
||
public List<String> getMessages() { | ||
return messages; | ||
} | ||
|
||
public String getRequestStatus() { | ||
return requestStatus; | ||
} | ||
|
||
public Instant getTimestamp() { | ||
return timestamp; | ||
} | ||
|
||
public String getRequestId() { | ||
return requestId; | ||
} | ||
|
||
@JsonPOJOBuilder(withPrefix = "") | ||
public static final class Builder { | ||
private final CredentialRequestStatus credentialRequestStatus; | ||
|
||
private Builder() { | ||
credentialRequestStatus = new CredentialRequestStatus(); | ||
} | ||
|
||
@JsonCreator | ||
public static Builder newInstance() { | ||
return new Builder(); | ||
} | ||
|
||
public Builder requestStatus(String requestStatus) { | ||
this.credentialRequestStatus.requestStatus = requestStatus; | ||
return this; | ||
} | ||
|
||
public Builder timestamp(Instant timestamp) { | ||
this.credentialRequestStatus.timestamp = timestamp; | ||
return this; | ||
} | ||
|
||
public Builder requestId(String requestId) { | ||
this.credentialRequestStatus.requestId = requestId; | ||
return this; | ||
} | ||
|
||
public Builder messages(List<String> messages) { | ||
this.credentialRequestStatus.messages = messages; | ||
return this; | ||
} | ||
|
||
public Builder message(String message) { | ||
this.credentialRequestStatus.messages.add(message); | ||
return this; | ||
} | ||
|
||
public CredentialRequestStatus build() { | ||
Objects.requireNonNull(credentialRequestStatus.requestId, "requestId"); | ||
Objects.requireNonNull(credentialRequestStatus.timestamp, "timestamp"); | ||
Objects.requireNonNull(credentialRequestStatus.requestStatus, "requestStatus"); | ||
return credentialRequestStatus; | ||
} | ||
} | ||
} |
Oops, something went wrong.