forked from wso2/carbon-identity-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
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
b242fe4
commit 1d4b9c8
Showing
13 changed files
with
449 additions
and
20 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
96 changes: 96 additions & 0 deletions
96
...a/org/wso2/carbon/identity/action/execution/model/ActionInvocationIncompleteResponse.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,96 @@ | ||
/* | ||
* Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com). | ||
* | ||
* WSO2 LLC. licenses this file to you under the Apache License, | ||
* Version 2.0 (the "License"); you may not use this file except | ||
* in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
package org.wso2.carbon.identity.action.execution.model; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize; | ||
import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* This class is used to represent the incomplete response of an action invocation. | ||
* This response will contain the list of operations that need to be performed. | ||
*/ | ||
@JsonDeserialize(builder = ActionInvocationIncompleteResponse.Builder.class) | ||
public class ActionInvocationIncompleteResponse implements ActionInvocationResponse.APIResponse { | ||
|
||
private final ActionInvocationResponse.Status actionStatus; | ||
|
||
private final List<PerformableOperation> operations; | ||
|
||
private ActionInvocationIncompleteResponse(Builder builder) { | ||
|
||
this.actionStatus = builder.actionStatus; | ||
this.operations = builder.operations; | ||
} | ||
|
||
@Override | ||
public ActionInvocationResponse.Status getActionStatus() { | ||
|
||
return actionStatus; | ||
} | ||
|
||
public List<PerformableOperation> getOperations() { | ||
|
||
return operations; | ||
} | ||
|
||
/** | ||
* This class is used to build the {@link ActionInvocationIncompleteResponse}. | ||
*/ | ||
@JsonPOJOBuilder(withPrefix = "") | ||
public static class Builder { | ||
|
||
private ActionInvocationResponse.Status actionStatus; | ||
private List<PerformableOperation> operations; | ||
|
||
@JsonProperty("actionStatus") | ||
public Builder actionStatus(ActionInvocationResponse.Status actionStatus) { | ||
|
||
this.actionStatus = actionStatus; | ||
return this; | ||
} | ||
|
||
@JsonProperty("operations") | ||
public Builder operations(@JsonProperty("operations") List<PerformableOperation> operations) { | ||
|
||
this.operations = operations; | ||
return this; | ||
} | ||
|
||
public ActionInvocationIncompleteResponse build() { | ||
|
||
if (this.actionStatus == null) { | ||
throw new IllegalArgumentException("actionStatus must not be null."); | ||
} | ||
|
||
if (!ActionInvocationResponse.Status.INCOMPLETE.equals(actionStatus)) { | ||
throw new IllegalArgumentException("actionStatus must be INCOMPLETE."); | ||
} | ||
|
||
if (this.operations == null) { | ||
throw new IllegalArgumentException("operations must not be null."); | ||
} | ||
|
||
return new ActionInvocationIncompleteResponse(this); | ||
} | ||
} | ||
} | ||
|
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
28 changes: 28 additions & 0 deletions
28
...n.execution/src/main/java/org/wso2/carbon/identity/action/execution/model/Incomplete.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,28 @@ | ||
/* | ||
* Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com). | ||
* | ||
* WSO2 LLC. licenses this file to you under the Apache License, | ||
* Version 2.0 (the "License"); you may not use this file except | ||
* in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
package org.wso2.carbon.identity.action.execution.model; | ||
|
||
/** | ||
* This interface models the Incomplete status. | ||
* If the downstream extension needs to compose the responses with INCOMPLETE status and communicate it back, | ||
* this class can be used by consumers to implement the model for that incomplete response. | ||
*/ | ||
public interface Incomplete { | ||
|
||
} |
Oops, something went wrong.