Skip to content

Commit 54d924c

Browse files
authored
Add deprecation warnings to Steps from Apps components (#1319)
1 parent 8e63663 commit 54d924c

30 files changed

+86
-4
lines changed

bolt/src/main/java/com/slack/api/bolt/App.java

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -772,14 +772,26 @@ public App viewClosed(Pattern callbackId, ViewClosedHandler handler) {
772772
// Workflows: Steps from Apps
773773
// https://api.slack.com/workflows/steps
774774

775+
/**
776+
* @deprecated Use new custom steps: https://api.slack.com/automation/functions/custom-bolt
777+
*/
778+
@Deprecated
775779
public App step(WorkflowStep step) {
776780
return this.use(step);
777781
}
778782

783+
/**
784+
* @deprecated Use new custom steps: https://api.slack.com/automation/functions/custom-bolt
785+
*/
786+
@Deprecated
779787
public App workflowStepEdit(String callbackId, WorkflowStepEditHandler handler) {
780788
return workflowStepEdit(Pattern.compile("^" + Pattern.quote(callbackId) + "$"), handler);
781789
}
782790

791+
/**
792+
* @deprecated Use new custom steps: https://api.slack.com/automation/functions/custom-bolt
793+
*/
794+
@Deprecated
783795
public App workflowStepEdit(Pattern callbackId, WorkflowStepEditHandler handler) {
784796
if (workflowStepEditHandlers.get(callbackId) != null) {
785797
log.warn("Replaced the handler for {}", callbackId);
@@ -788,10 +800,18 @@ public App workflowStepEdit(Pattern callbackId, WorkflowStepEditHandler handler)
788800
return this;
789801
}
790802

803+
/**
804+
* @deprecated Use new custom steps: https://api.slack.com/automation/functions/custom-bolt
805+
*/
806+
@Deprecated
791807
public App workflowStepSave(String callbackId, WorkflowStepSaveHandler handler) {
792808
return workflowStepSave(Pattern.compile("^" + Pattern.quote(callbackId) + "$"), handler);
793809
}
794810

811+
/**
812+
* @deprecated Use new custom steps: https://api.slack.com/automation/functions/custom-bolt
813+
*/
814+
@Deprecated
795815
public App workflowStepSave(Pattern callbackId, WorkflowStepSaveHandler handler) {
796816
if (workflowStepSaveHandlers.get(callbackId) != null) {
797817
log.warn("Replaced the handler for {}", callbackId);
@@ -800,10 +820,18 @@ public App workflowStepSave(Pattern callbackId, WorkflowStepSaveHandler handler)
800820
return this;
801821
}
802822

823+
/**
824+
* @deprecated Use new custom steps: https://api.slack.com/automation/functions/custom-bolt
825+
*/
826+
@Deprecated
803827
public App workflowStepExecute(String pattern, WorkflowStepExecuteHandler handler) {
804828
return workflowStepExecute(Pattern.compile("^.*" + Pattern.quote(pattern) + ".*$"), handler);
805829
}
806830

831+
/**
832+
* @deprecated Use new custom steps: https://api.slack.com/automation/functions/custom-bolt
833+
*/
834+
@Deprecated
807835
public App workflowStepExecute(Pattern pattern, WorkflowStepExecuteHandler handler) {
808836
if (workflowStepExecuteHandlers.get(pattern) != null) {
809837
log.warn("Replaced the handler for {}", pattern);

bolt/src/main/java/com/slack/api/bolt/context/WorkflowCompleteUtility.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@
33
import com.slack.api.methods.MethodsClient;
44
import com.slack.api.methods.SlackApiException;
55
import com.slack.api.methods.response.workflows.WorkflowsStepCompletedResponse;
6-
import com.slack.api.model.workflow.WorkflowStepOutput;
76

87
import java.io.IOException;
9-
import java.util.List;
108
import java.util.Map;
119

10+
/**
11+
* @deprecated Use new custom steps: https://api.slack.com/automation/functions/custom-bolt
12+
*/
13+
@Deprecated
1214
public interface WorkflowCompleteUtility {
1315

1416
String getWorkflowStepExecuteId();

bolt/src/main/java/com/slack/api/bolt/context/WorkflowConfigureUtility.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010

1111
import static com.slack.api.model.view.Views.view;
1212

13+
/**
14+
* @deprecated Use new custom steps: https://api.slack.com/automation/functions/custom-bolt
15+
*/
16+
@Deprecated
1317
public interface WorkflowConfigureUtility {
1418

1519
String getTriggerId();

bolt/src/main/java/com/slack/api/bolt/context/WorkflowFailUtility.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@
22

33
import com.slack.api.methods.MethodsClient;
44
import com.slack.api.methods.SlackApiException;
5-
import com.slack.api.methods.response.workflows.WorkflowsStepCompletedResponse;
65
import com.slack.api.methods.response.workflows.WorkflowsStepFailedResponse;
76

87
import java.io.IOException;
98
import java.util.Map;
109

10+
/**
11+
* @deprecated Use new custom steps: https://api.slack.com/automation/functions/custom-bolt
12+
*/
13+
@Deprecated
1114
public interface WorkflowFailUtility {
1215

1316
String getWorkflowStepExecuteId();

bolt/src/main/java/com/slack/api/bolt/context/WorkflowUpdateUtility.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
import java.util.List;
1111
import java.util.Map;
1212

13+
/**
14+
* @deprecated Use new custom steps: https://api.slack.com/automation/functions/custom-bolt
15+
*/
16+
@Deprecated
1317
public interface WorkflowUpdateUtility {
1418

1519
String getWorkflowStepEditId();

bolt/src/main/java/com/slack/api/bolt/context/builtin/WorkflowStepEditContext.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
/**
88
* workflow_step_edit type request's context.
9+
* @deprecated Use new custom steps: https://api.slack.com/automation/functions/custom-bolt
910
*/
1011
@Getter
1112
@Setter
@@ -14,6 +15,7 @@
1415
@AllArgsConstructor
1516
@ToString(callSuper = true)
1617
@EqualsAndHashCode(callSuper = false)
18+
@Deprecated
1719
public class WorkflowStepEditContext extends Context implements WorkflowConfigureUtility {
1820

1921
private String triggerId;

bolt/src/main/java/com/slack/api/bolt/context/builtin/WorkflowStepExecuteContext.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
import lombok.*;
77

88
/**
9-
* workflow_step_edit type request's context.
9+
* workflow_step_execute type request's context.
10+
* @deprecated Use new custom steps: https://api.slack.com/automation/functions/custom-bolt
1011
*/
1112
@Getter
1213
@Setter
@@ -15,6 +16,7 @@
1516
@AllArgsConstructor
1617
@ToString(callSuper = true)
1718
@EqualsAndHashCode(callSuper = false)
19+
@Deprecated
1820
public class WorkflowStepExecuteContext extends Context
1921
implements WorkflowCompleteUtility, WorkflowFailUtility {
2022
private String callbackId;

bolt/src/main/java/com/slack/api/bolt/context/builtin/WorkflowStepSaveContext.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,18 @@
1010

1111
import java.util.Map;
1212

13+
/**
14+
* workflow_step_save type request's context.
15+
* @deprecated Use new custom steps: https://api.slack.com/automation/functions/custom-bolt
16+
*/
1317
@Getter
1418
@Setter
1519
@Builder
1620
@NoArgsConstructor
1721
@AllArgsConstructor
1822
@ToString(callSuper = true)
1923
@EqualsAndHashCode(callSuper = false)
24+
@Deprecated
2025
public class WorkflowStepSaveContext extends Context implements WorkflowUpdateUtility {
2126

2227
private String workflowStepEditId;

bolt/src/main/java/com/slack/api/bolt/handler/builtin/WorkflowStepEditHandler.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@
66
import com.slack.api.bolt.response.Response;
77

88
@FunctionalInterface
9+
@Deprecated
910
public interface WorkflowStepEditHandler extends Handler<WorkflowStepEditContext, WorkflowStepEditRequest, Response> {
1011
}

bolt/src/main/java/com/slack/api/bolt/handler/builtin/WorkflowStepExecuteHandler.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@
66
import com.slack.api.bolt.response.Response;
77

88
@FunctionalInterface
9+
@Deprecated
910
public interface WorkflowStepExecuteHandler extends Handler<WorkflowStepExecuteContext, WorkflowStepExecuteRequest, Response> {
1011
}

0 commit comments

Comments
 (0)