Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
   * 
   * Licensed under the Apache License, Version 2.0 (the "License").
   * You may not use this file except in compliance with the License.
   * A copy of the License is located at
   * 
   *  http://aws.amazon.com/apache2.0
   * 
  * or in the "license" file accompanying this file. This file 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.amazonaws.services.simpleworkflow.model;
 

Contains information about a workflow execution.

 
 public class WorkflowExecutionInfo implements SerializableCloneable {

    
The workflow execution this information is about.
 
     private WorkflowExecution execution;

    
The type of the workflow execution.
 
     private WorkflowType workflowType;

    
The time when the execution was started.
 
     private java.util.Date startTimestamp;

    
The time when the workflow execution was closed. Set only if the execution status is CLOSED.
 
     private java.util.Date closeTimestamp;

    
The current status of the execution.

Constraints:
Allowed Values: OPEN, CLOSED

 
     private String executionStatus;

    
If the execution status is closed then this specifies how the execution was closed:
  • COMPLETED: the execution was successfully completed.
  • CANCELED: the execution was canceled.Cancellation allows the implementation to gracefully clean up before the execution is closed.
  • TERMINATED: the execution was force terminated.
  • FAILED: the execution failed to complete.
  • TIMED_OUT: the execution did not complete in the alloted time and was automatically timed out.
  • CONTINUED_AS_NEW: the execution is logically continued. This means the current execution was completed and a new execution was started to carry on the workflow.

Constraints:
Allowed Values: COMPLETED, FAILED, CANCELED, TERMINATED, CONTINUED_AS_NEW, TIMED_OUT

 
     private String closeStatus;

    
If this workflow execution is a child of another execution then contains the workflow execution that started this execution.
 
     private WorkflowExecution parent;

    
The list of tags associated with the workflow execution. Tags can be used to identify and list workflow executions of interest through the visibility APIs. A workflow execution can have a maximum of 5 tags.

Constraints:
Length: 0 - 5

 
Set to true if a cancellation is requested for this workflow execution.
 
     private Boolean cancelRequested;

    
The workflow execution this information is about.

Returns:
The workflow execution this information is about.
    public WorkflowExecution getExecution() {
        return ;
    }
    
    
The workflow execution this information is about.

Parameters:
execution The workflow execution this information is about.
    public void setExecution(WorkflowExecution execution) {
        this. = execution;
    }
    
    
The workflow execution this information is about.

Returns a reference to this object so that method calls can be chained together.

Parameters:
execution The workflow execution this information is about.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = execution;
        return this;
    }

    
The type of the workflow execution.

Returns:
The type of the workflow execution.
    public WorkflowType getWorkflowType() {
        return ;
    }
    
    
The type of the workflow execution.

Parameters:
workflowType The type of the workflow execution.
    public void setWorkflowType(WorkflowType workflowType) {
        this. = workflowType;
    }
    
    
The type of the workflow execution.

Returns a reference to this object so that method calls can be chained together.

Parameters:
workflowType The type of the workflow execution.
Returns:
A reference to this updated object so that method calls can be chained together.
    public WorkflowExecutionInfo withWorkflowType(WorkflowType workflowType) {
        this. = workflowType;
        return this;
    }

    
The time when the execution was started.

Returns:
The time when the execution was started.
    public java.util.Date getStartTimestamp() {
        return ;
    }
    
    
The time when the execution was started.

Parameters:
startTimestamp The time when the execution was started.
    public void setStartTimestamp(java.util.Date startTimestamp) {
        this. = startTimestamp;
    }
    
    
The time when the execution was started.

Returns a reference to this object so that method calls can be chained together.

Parameters:
startTimestamp The time when the execution was started.
Returns:
A reference to this updated object so that method calls can be chained together.
    public WorkflowExecutionInfo withStartTimestamp(java.util.Date startTimestamp) {
        this. = startTimestamp;
        return this;
    }

    
The time when the workflow execution was closed. Set only if the execution status is CLOSED.

Returns:
The time when the workflow execution was closed. Set only if the execution status is CLOSED.
    public java.util.Date getCloseTimestamp() {
        return ;
    }
    
    
The time when the workflow execution was closed. Set only if the execution status is CLOSED.

Parameters:
closeTimestamp The time when the workflow execution was closed. Set only if the execution status is CLOSED.
    public void setCloseTimestamp(java.util.Date closeTimestamp) {
        this. = closeTimestamp;
    }
    
    
The time when the workflow execution was closed. Set only if the execution status is CLOSED.

Returns a reference to this object so that method calls can be chained together.

Parameters:
closeTimestamp The time when the workflow execution was closed. Set only if the execution status is CLOSED.
Returns:
A reference to this updated object so that method calls can be chained together.
    public WorkflowExecutionInfo withCloseTimestamp(java.util.Date closeTimestamp) {
        this. = closeTimestamp;
        return this;
    }

    
The current status of the execution.

Constraints:
Allowed Values: OPEN, CLOSED

Returns:
The current status of the execution.
See also:
ExecutionStatus
    public String getExecutionStatus() {
        return ;
    }
    
    
The current status of the execution.

Constraints:
Allowed Values: OPEN, CLOSED

Parameters:
executionStatus The current status of the execution.
See also:
ExecutionStatus
    public void setExecutionStatus(String executionStatus) {
        this. = executionStatus;
    }
    
    
The current status of the execution.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: OPEN, CLOSED

Parameters:
executionStatus The current status of the execution.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
ExecutionStatus
    public WorkflowExecutionInfo withExecutionStatus(String executionStatus) {
        this. = executionStatus;
        return this;
    }

    
The current status of the execution.

Constraints:
Allowed Values: OPEN, CLOSED

Parameters:
executionStatus The current status of the execution.
See also:
ExecutionStatus
    public void setExecutionStatus(ExecutionStatus executionStatus) {
        this. = executionStatus.toString();
    }
    
    
The current status of the execution.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: OPEN, CLOSED

Parameters:
executionStatus The current status of the execution.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
ExecutionStatus
    public WorkflowExecutionInfo withExecutionStatus(ExecutionStatus executionStatus) {
        this. = executionStatus.toString();
        return this;
    }

    
If the execution status is closed then this specifies how the execution was closed:
  • COMPLETED: the execution was successfully completed.
  • CANCELED: the execution was canceled.Cancellation allows the implementation to gracefully clean up before the execution is closed.
  • TERMINATED: the execution was force terminated.
  • FAILED: the execution failed to complete.
  • TIMED_OUT: the execution did not complete in the alloted time and was automatically timed out.
  • CONTINUED_AS_NEW: the execution is logically continued. This means the current execution was completed and a new execution was started to carry on the workflow.

Constraints:
Allowed Values: COMPLETED, FAILED, CANCELED, TERMINATED, CONTINUED_AS_NEW, TIMED_OUT

Returns:
If the execution status is closed then this specifies how the execution was closed:
  • COMPLETED: the execution was successfully completed.
  • CANCELED: the execution was canceled.Cancellation allows the implementation to gracefully clean up before the execution is closed.
  • TERMINATED: the execution was force terminated.
  • FAILED: the execution failed to complete.
  • TIMED_OUT: the execution did not complete in the alloted time and was automatically timed out.
  • CONTINUED_AS_NEW: the execution is logically continued. This means the current execution was completed and a new execution was started to carry on the workflow.
See also:
CloseStatus
    public String getCloseStatus() {
        return ;
    }
    
    
If the execution status is closed then this specifies how the execution was closed:
  • COMPLETED: the execution was successfully completed.
  • CANCELED: the execution was canceled.Cancellation allows the implementation to gracefully clean up before the execution is closed.
  • TERMINATED: the execution was force terminated.
  • FAILED: the execution failed to complete.
  • TIMED_OUT: the execution did not complete in the alloted time and was automatically timed out.
  • CONTINUED_AS_NEW: the execution is logically continued. This means the current execution was completed and a new execution was started to carry on the workflow.

Constraints:
Allowed Values: COMPLETED, FAILED, CANCELED, TERMINATED, CONTINUED_AS_NEW, TIMED_OUT

Parameters:
closeStatus If the execution status is closed then this specifies how the execution was closed:
  • COMPLETED: the execution was successfully completed.
  • CANCELED: the execution was canceled.Cancellation allows the implementation to gracefully clean up before the execution is closed.
  • TERMINATED: the execution was force terminated.
  • FAILED: the execution failed to complete.
  • TIMED_OUT: the execution did not complete in the alloted time and was automatically timed out.
  • CONTINUED_AS_NEW: the execution is logically continued. This means the current execution was completed and a new execution was started to carry on the workflow.
See also:
CloseStatus
    public void setCloseStatus(String closeStatus) {
        this. = closeStatus;
    }
    
    
If the execution status is closed then this specifies how the execution was closed:
  • COMPLETED: the execution was successfully completed.
  • CANCELED: the execution was canceled.Cancellation allows the implementation to gracefully clean up before the execution is closed.
  • TERMINATED: the execution was force terminated.
  • FAILED: the execution failed to complete.
  • TIMED_OUT: the execution did not complete in the alloted time and was automatically timed out.
  • CONTINUED_AS_NEW: the execution is logically continued. This means the current execution was completed and a new execution was started to carry on the workflow.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: COMPLETED, FAILED, CANCELED, TERMINATED, CONTINUED_AS_NEW, TIMED_OUT

Parameters:
closeStatus If the execution status is closed then this specifies how the execution was closed:
  • COMPLETED: the execution was successfully completed.
  • CANCELED: the execution was canceled.Cancellation allows the implementation to gracefully clean up before the execution is closed.
  • TERMINATED: the execution was force terminated.
  • FAILED: the execution failed to complete.
  • TIMED_OUT: the execution did not complete in the alloted time and was automatically timed out.
  • CONTINUED_AS_NEW: the execution is logically continued. This means the current execution was completed and a new execution was started to carry on the workflow.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
CloseStatus
    public WorkflowExecutionInfo withCloseStatus(String closeStatus) {
        this. = closeStatus;
        return this;
    }

    
If the execution status is closed then this specifies how the execution was closed:
  • COMPLETED: the execution was successfully completed.
  • CANCELED: the execution was canceled.Cancellation allows the implementation to gracefully clean up before the execution is closed.
  • TERMINATED: the execution was force terminated.
  • FAILED: the execution failed to complete.
  • TIMED_OUT: the execution did not complete in the alloted time and was automatically timed out.
  • CONTINUED_AS_NEW: the execution is logically continued. This means the current execution was completed and a new execution was started to carry on the workflow.

Constraints:
Allowed Values: COMPLETED, FAILED, CANCELED, TERMINATED, CONTINUED_AS_NEW, TIMED_OUT

Parameters:
closeStatus If the execution status is closed then this specifies how the execution was closed:
  • COMPLETED: the execution was successfully completed.
  • CANCELED: the execution was canceled.Cancellation allows the implementation to gracefully clean up before the execution is closed.
  • TERMINATED: the execution was force terminated.
  • FAILED: the execution failed to complete.
  • TIMED_OUT: the execution did not complete in the alloted time and was automatically timed out.
  • CONTINUED_AS_NEW: the execution is logically continued. This means the current execution was completed and a new execution was started to carry on the workflow.
See also:
CloseStatus
    public void setCloseStatus(CloseStatus closeStatus) {
        this. = closeStatus.toString();
    }
    
    
If the execution status is closed then this specifies how the execution was closed:
  • COMPLETED: the execution was successfully completed.
  • CANCELED: the execution was canceled.Cancellation allows the implementation to gracefully clean up before the execution is closed.
  • TERMINATED: the execution was force terminated.
  • FAILED: the execution failed to complete.
  • TIMED_OUT: the execution did not complete in the alloted time and was automatically timed out.
  • CONTINUED_AS_NEW: the execution is logically continued. This means the current execution was completed and a new execution was started to carry on the workflow.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: COMPLETED, FAILED, CANCELED, TERMINATED, CONTINUED_AS_NEW, TIMED_OUT

Parameters:
closeStatus If the execution status is closed then this specifies how the execution was closed:
  • COMPLETED: the execution was successfully completed.
  • CANCELED: the execution was canceled.Cancellation allows the implementation to gracefully clean up before the execution is closed.
  • TERMINATED: the execution was force terminated.
  • FAILED: the execution failed to complete.
  • TIMED_OUT: the execution did not complete in the alloted time and was automatically timed out.
  • CONTINUED_AS_NEW: the execution is logically continued. This means the current execution was completed and a new execution was started to carry on the workflow.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
CloseStatus
    public WorkflowExecutionInfo withCloseStatus(CloseStatus closeStatus) {
        this. = closeStatus.toString();
        return this;
    }

    
If this workflow execution is a child of another execution then contains the workflow execution that started this execution.

Returns:
If this workflow execution is a child of another execution then contains the workflow execution that started this execution.
    public WorkflowExecution getParent() {
        return ;
    }
    
    
If this workflow execution is a child of another execution then contains the workflow execution that started this execution.

Parameters:
parent If this workflow execution is a child of another execution then contains the workflow execution that started this execution.
    public void setParent(WorkflowExecution parent) {
        this. = parent;
    }
    
    
If this workflow execution is a child of another execution then contains the workflow execution that started this execution.

Returns a reference to this object so that method calls can be chained together.

Parameters:
parent If this workflow execution is a child of another execution then contains the workflow execution that started this execution.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = parent;
        return this;
    }

    
The list of tags associated with the workflow execution. Tags can be used to identify and list workflow executions of interest through the visibility APIs. A workflow execution can have a maximum of 5 tags.

Constraints:
Length: 0 - 5

Returns:
The list of tags associated with the workflow execution. Tags can be used to identify and list workflow executions of interest through the visibility APIs. A workflow execution can have a maximum of 5 tags.
    public java.util.List<StringgetTagList() {
        return ;
    }
    
    
The list of tags associated with the workflow execution. Tags can be used to identify and list workflow executions of interest through the visibility APIs. A workflow execution can have a maximum of 5 tags.

Constraints:
Length: 0 - 5

Parameters:
tagList The list of tags associated with the workflow execution. Tags can be used to identify and list workflow executions of interest through the visibility APIs. A workflow execution can have a maximum of 5 tags.
    public void setTagList(java.util.Collection<StringtagList) {
        if (tagList == null) {
            this. = null;
            return;
        }
        tagListCopy.addAll(tagList);
        this. = tagListCopy;
    }
    
    
The list of tags associated with the workflow execution. Tags can be used to identify and list workflow executions of interest through the visibility APIs. A workflow execution can have a maximum of 5 tags.

NOTE: This method appends the values to the existing list (if any). Use setTagList(java.util.Collection) or withTagList(java.util.Collection) if you want to override the existing values.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 0 - 5

Parameters:
tagList The list of tags associated with the workflow execution. Tags can be used to identify and list workflow executions of interest through the visibility APIs. A workflow execution can have a maximum of 5 tags.
Returns:
A reference to this updated object so that method calls can be chained together.
    public WorkflowExecutionInfo withTagList(String... tagList) {
        if (getTagList() == nullsetTagList(new java.util.ArrayList<String>(tagList.length));
        for (String value : tagList) {
            getTagList().add(value);
        }
        return this;
    }
    
    
The list of tags associated with the workflow execution. Tags can be used to identify and list workflow executions of interest through the visibility APIs. A workflow execution can have a maximum of 5 tags.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 0 - 5

Parameters:
tagList The list of tags associated with the workflow execution. Tags can be used to identify and list workflow executions of interest through the visibility APIs. A workflow execution can have a maximum of 5 tags.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (tagList == null) {
            this. = null;
        } else {
            tagListCopy.addAll(tagList);
            this. = tagListCopy;
        }
        return this;
    }

    
Set to true if a cancellation is requested for this workflow execution.

Returns:
Set to true if a cancellation is requested for this workflow execution.
    public Boolean isCancelRequested() {
        return ;
    }
    
    
Set to true if a cancellation is requested for this workflow execution.

Parameters:
cancelRequested Set to true if a cancellation is requested for this workflow execution.
    public void setCancelRequested(Boolean cancelRequested) {
        this. = cancelRequested;
    }
    
    
Set to true if a cancellation is requested for this workflow execution.

Returns a reference to this object so that method calls can be chained together.

Parameters:
cancelRequested Set to true if a cancellation is requested for this workflow execution.
Returns:
A reference to this updated object so that method calls can be chained together.
    public WorkflowExecutionInfo withCancelRequested(Boolean cancelRequested) {
        this. = cancelRequested;
        return this;
    }

    
Set to true if a cancellation is requested for this workflow execution.

Returns:
Set to true if a cancellation is requested for this workflow execution.
    public Boolean getCancelRequested() {
        return ;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getExecution() != nullsb.append("Execution: " + getExecution() + ",");
        if (getWorkflowType() != nullsb.append("WorkflowType: " + getWorkflowType() + ",");
        if (getStartTimestamp() != nullsb.append("StartTimestamp: " + getStartTimestamp() + ",");
        if (getCloseTimestamp() != nullsb.append("CloseTimestamp: " + getCloseTimestamp() + ",");
        if (getExecutionStatus() != nullsb.append("ExecutionStatus: " + getExecutionStatus() + ",");
        if (getCloseStatus() != nullsb.append("CloseStatus: " + getCloseStatus() + ",");
        if (getParent() != nullsb.append("Parent: " + getParent() + ",");
        if (getTagList() != nullsb.append("TagList: " + getTagList() + ",");
        if (isCancelRequested() != nullsb.append("CancelRequested: " + isCancelRequested() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getExecution() == null) ? 0 : getExecution().hashCode()); 
        hashCode = prime * hashCode + ((getWorkflowType() == null) ? 0 : getWorkflowType().hashCode()); 
        hashCode = prime * hashCode + ((getStartTimestamp() == null) ? 0 : getStartTimestamp().hashCode()); 
        hashCode = prime * hashCode + ((getCloseTimestamp() == null) ? 0 : getCloseTimestamp().hashCode()); 
        hashCode = prime * hashCode + ((getExecutionStatus() == null) ? 0 : getExecutionStatus().hashCode()); 
        hashCode = prime * hashCode + ((getCloseStatus() == null) ? 0 : getCloseStatus().hashCode()); 
        hashCode = prime * hashCode + ((getParent() == null) ? 0 : getParent().hashCode()); 
        hashCode = prime * hashCode + ((getTagList() == null) ? 0 : getTagList().hashCode()); 
        hashCode = prime * hashCode + ((isCancelRequested() == null) ? 0 : isCancelRequested().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof WorkflowExecutionInfo == falsereturn false;
        WorkflowExecutionInfo other = (WorkflowExecutionInfo)obj;
        
        if (other.getExecution() == null ^ this.getExecution() == nullreturn false;
        if (other.getExecution() != null && other.getExecution().equals(this.getExecution()) == falsereturn false
        if (other.getWorkflowType() == null ^ this.getWorkflowType() == nullreturn false;
        if (other.getWorkflowType() != null && other.getWorkflowType().equals(this.getWorkflowType()) == falsereturn false
        if (other.getStartTimestamp() == null ^ this.getStartTimestamp() == nullreturn false;
        if (other.getStartTimestamp() != null && other.getStartTimestamp().equals(this.getStartTimestamp()) == falsereturn false
        if (other.getCloseTimestamp() == null ^ this.getCloseTimestamp() == nullreturn false;
        if (other.getCloseTimestamp() != null && other.getCloseTimestamp().equals(this.getCloseTimestamp()) == falsereturn false
        if (other.getExecutionStatus() == null ^ this.getExecutionStatus() == nullreturn false;
        if (other.getExecutionStatus() != null && other.getExecutionStatus().equals(this.getExecutionStatus()) == falsereturn false
        if (other.getCloseStatus() == null ^ this.getCloseStatus() == nullreturn false;
        if (other.getCloseStatus() != null && other.getCloseStatus().equals(this.getCloseStatus()) == falsereturn false
        if (other.getParent() == null ^ this.getParent() == nullreturn false;
        if (other.getParent() != null && other.getParent().equals(this.getParent()) == falsereturn false
        if (other.getTagList() == null ^ this.getTagList() == nullreturn false;
        if (other.getTagList() != null && other.getTagList().equals(this.getTagList()) == falsereturn false
        if (other.isCancelRequested() == null ^ this.isCancelRequested() == nullreturn false;
        if (other.isCancelRequested() != null && other.isCancelRequested().equals(this.isCancelRequested()) == falsereturn false
        return true;
    }
    
    @Override
    public WorkflowExecutionInfo clone() {
        try {
            return (WorkflowExecutionInfosuper.clone();
        
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException(
                    "Got a CloneNotSupportedException from Object.clone() "
                    + "even though we're Cloneable!",
                    e);
        }
        
    }
}
    
New to GrepCode? Check out our FAQ X