forked from Netflix/conductor
-
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.
Removed unused startWorkflow overloaded methods and introduced StartW…
…orkflowInput
- Loading branch information
1 parent
12636bc
commit 1d81d27
Showing
14 changed files
with
410 additions
and
707 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
171 changes: 171 additions & 0 deletions
171
core/src/main/java/com/netflix/conductor/core/execution/StartWorkflowInput.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,171 @@ | ||
/* | ||
* Copyright 2022 Netflix, Inc. | ||
* <p> | ||
* Licensed 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 | ||
* <p> | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* <p> | ||
* 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 com.netflix.conductor.core.execution; | ||
|
||
import java.util.Map; | ||
import java.util.Objects; | ||
|
||
import com.netflix.conductor.common.metadata.workflow.StartWorkflowRequest; | ||
import com.netflix.conductor.common.metadata.workflow.WorkflowDef; | ||
|
||
public class StartWorkflowInput { | ||
|
||
private String name; | ||
private Integer version; | ||
private WorkflowDef workflowDefinition; | ||
private Map<String, Object> workflowInput; | ||
private String externalInputPayloadStoragePath; | ||
private String correlationId; | ||
private Integer priority; | ||
private String parentWorkflowId; | ||
private String parentWorkflowTaskId; | ||
private String event; | ||
private Map<String, String> taskToDomain; | ||
|
||
public StartWorkflowInput() {} | ||
|
||
public StartWorkflowInput(StartWorkflowRequest startWorkflowRequest) { | ||
this.name = startWorkflowRequest.getName(); | ||
this.version = startWorkflowRequest.getVersion(); | ||
this.workflowDefinition = startWorkflowRequest.getWorkflowDef(); | ||
this.correlationId = startWorkflowRequest.getCorrelationId(); | ||
this.priority = startWorkflowRequest.getPriority(); | ||
this.workflowInput = startWorkflowRequest.getInput(); | ||
this.externalInputPayloadStoragePath = | ||
startWorkflowRequest.getExternalInputPayloadStoragePath(); | ||
this.taskToDomain = startWorkflowRequest.getTaskToDomain(); | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
|
||
public Integer getVersion() { | ||
return version; | ||
} | ||
|
||
public void setVersion(Integer version) { | ||
this.version = version; | ||
} | ||
|
||
public WorkflowDef getWorkflowDefinition() { | ||
return workflowDefinition; | ||
} | ||
|
||
public void setWorkflowDefinition(WorkflowDef workflowDefinition) { | ||
this.workflowDefinition = workflowDefinition; | ||
} | ||
|
||
public Map<String, Object> getWorkflowInput() { | ||
return workflowInput; | ||
} | ||
|
||
public void setWorkflowInput(Map<String, Object> workflowInput) { | ||
this.workflowInput = workflowInput; | ||
} | ||
|
||
public String getExternalInputPayloadStoragePath() { | ||
return externalInputPayloadStoragePath; | ||
} | ||
|
||
public void setExternalInputPayloadStoragePath(String externalInputPayloadStoragePath) { | ||
this.externalInputPayloadStoragePath = externalInputPayloadStoragePath; | ||
} | ||
|
||
public String getCorrelationId() { | ||
return correlationId; | ||
} | ||
|
||
public void setCorrelationId(String correlationId) { | ||
this.correlationId = correlationId; | ||
} | ||
|
||
public Integer getPriority() { | ||
return priority; | ||
} | ||
|
||
public void setPriority(Integer priority) { | ||
this.priority = priority; | ||
} | ||
|
||
public String getParentWorkflowId() { | ||
return parentWorkflowId; | ||
} | ||
|
||
public void setParentWorkflowId(String parentWorkflowId) { | ||
this.parentWorkflowId = parentWorkflowId; | ||
} | ||
|
||
public String getParentWorkflowTaskId() { | ||
return parentWorkflowTaskId; | ||
} | ||
|
||
public void setParentWorkflowTaskId(String parentWorkflowTaskId) { | ||
this.parentWorkflowTaskId = parentWorkflowTaskId; | ||
} | ||
|
||
public String getEvent() { | ||
return event; | ||
} | ||
|
||
public void setEvent(String event) { | ||
this.event = event; | ||
} | ||
|
||
public Map<String, String> getTaskToDomain() { | ||
return taskToDomain; | ||
} | ||
|
||
public void setTaskToDomain(Map<String, String> taskToDomain) { | ||
this.taskToDomain = taskToDomain; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) return true; | ||
if (o == null || getClass() != o.getClass()) return false; | ||
StartWorkflowInput that = (StartWorkflowInput) o; | ||
return Objects.equals(name, that.name) | ||
&& Objects.equals(version, that.version) | ||
&& Objects.equals(workflowDefinition, that.workflowDefinition) | ||
&& Objects.equals(workflowInput, that.workflowInput) | ||
&& Objects.equals( | ||
externalInputPayloadStoragePath, that.externalInputPayloadStoragePath) | ||
&& Objects.equals(correlationId, that.correlationId) | ||
&& Objects.equals(priority, that.priority) | ||
&& Objects.equals(parentWorkflowId, that.parentWorkflowId) | ||
&& Objects.equals(parentWorkflowTaskId, that.parentWorkflowTaskId) | ||
&& Objects.equals(event, that.event) | ||
&& Objects.equals(taskToDomain, that.taskToDomain); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash( | ||
name, | ||
version, | ||
workflowDefinition, | ||
workflowInput, | ||
externalInputPayloadStoragePath, | ||
correlationId, | ||
priority, | ||
parentWorkflowId, | ||
parentWorkflowTaskId, | ||
event, | ||
taskToDomain); | ||
} | ||
} |
Oops, something went wrong.