All Downloads are FREE. Search and download functionalities are using the official Maven repository.

rapture.common.dp.Workflow Maven / Gradle / Ivy

/**
 * The MIT License (MIT)
 *
 * Copyright (C) 2011-2016 Incapture Technologies LLC
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

/**
 * This file is autogenerated and any changes will be overwritten.
 */

package rapture.common.dp;

import rapture.common.*;
import rapture.object.Searchable;
import rapture.object.Storable;
import rapture.object.Debugable;
import rapture.common.version.ApiVersion;
import rapture.common.impl.jackson.JacksonUtil;
import java.util.List;
import java.util.Map;
import rapture.common.Scheme;
import rapture.object.Addressable;
import java.util.ArrayList;
import rapture.common.model.IndexConfig;
import java.util.HashMap;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* 
**/
@SuppressWarnings("all")
public class Workflow  implements RaptureTransferObject, Debugable ,Storable , Addressable {
    /*
    *  Start of field 'workflowURI' (String) 
    */
    private String workflowURI;

    @JsonProperty("workflowURI")
    public String getWorkflowURI() {
       return workflowURI;
    }

    @JsonProperty("workflowURI")
    public void setWorkflowURI(String workflowURI) {
       this.workflowURI =  new RaptureURI(workflowURI, Scheme.WORKFLOW).toString() /* TODO remove toString */  ;
    }
    /*
    *  end of field 'workflowURI' (String) 
    */


    /*
    *  Start of field 'semaphoreType' (SemaphoreType) 
    */
    private SemaphoreType semaphoreType = SemaphoreType.UNLIMITED;

    @JsonProperty("semaphoreType")
    public SemaphoreType getSemaphoreType() {
       return semaphoreType;
    }

    @JsonProperty("semaphoreType")
    public void setSemaphoreType(SemaphoreType semaphoreType) {
       this.semaphoreType =  semaphoreType ;
    }
    /*
    *  end of field 'semaphoreType' (SemaphoreType) 
    */


    /*
    *  Start of field 'semaphoreConfig' (String) 
    */
    private String semaphoreConfig;

    @JsonProperty("semaphoreConfig")
    public String getSemaphoreConfig() {
       return semaphoreConfig;
    }

    @JsonProperty("semaphoreConfig")
    public void setSemaphoreConfig(String semaphoreConfig) {
       this.semaphoreConfig =  semaphoreConfig ;
    }
    /*
    *  end of field 'semaphoreConfig' (String) 
    */


    /*
    *  Start of field 'description' (String) 
    */
    private String description;

    @JsonProperty("description")
    public String getDescription() {
       return description;
    }

    @JsonProperty("description")
    public void setDescription(String description) {
       this.description =  description ;
    }
    /*
    *  end of field 'description' (String) 
    */


    /*
    *  Start of field 'steps' (List) 
    */
    private List steps = new ArrayList();

    @JsonProperty("steps")
    public List getSteps() {
       return steps;
    }

    @JsonProperty("steps")
    public void setSteps(List steps) {
       this.steps =  steps ;
    }
    /*
    *  end of field 'steps' (List) 
    */


    /*
    *  Start of field 'startStep' (String) 
    */
    private String startStep;

    @JsonProperty("startStep")
    public String getStartStep() {
       return startStep;
    }

    @JsonProperty("startStep")
    public void setStartStep(String startStep) {
       this.startStep =  startStep ;
    }
    /*
    *  end of field 'startStep' (String) 
    */


    /*
    *  Start of field 'category' (String) 
    */
    private String category = "alpha";

    @JsonProperty("category")
    public String getCategory() {
       return category;
    }

    @JsonProperty("category")
    public void setCategory(String category) {
       this.category =  category ;
    }
    /*
    *  end of field 'category' (String) 
    */


    /*
    *  Start of field 'view' (Map) 
    */
    private Map view = new HashMap();

    @JsonProperty("view")
    public Map getView() {
       return view;
    }

    @JsonProperty("view")
    public void setView(Map view) {
       this.view =  view ;
    }
    /*
    *  end of field 'view' (Map) 
    */


    /*
    *  Start of field 'expectedArguments' (List) 
    */
    private List expectedArguments = new ArrayList();

    @JsonProperty("expectedArguments")
    public List getExpectedArguments() {
       return expectedArguments;
    }

    @JsonProperty("expectedArguments")
    public void setExpectedArguments(List expectedArguments) {
       this.expectedArguments =  expectedArguments ;
    }
    /*
    *  end of field 'expectedArguments' (List) 
    */


    /*
    *  Start of field 'jarUriDependencies' (List) 
    */
    private List jarUriDependencies = new ArrayList<>();

    @JsonProperty("jarUriDependencies")
    public List getJarUriDependencies() {
       return jarUriDependencies;
    }

    @JsonProperty("jarUriDependencies")
    public void setJarUriDependencies(List jarUriDependencies) {
       this.jarUriDependencies =  jarUriDependencies ;
    }
    /*
    *  end of field 'jarUriDependencies' (List) 
    */


    /*
    *  Start of field 'useParentFirstClassLoader' (Boolean) 
    */
    private Boolean useParentFirstClassLoader = false;

    @JsonProperty("useParentFirstClassLoader")
    public Boolean getUseParentFirstClassLoader() {
       return useParentFirstClassLoader;
    }

    @JsonProperty("useParentFirstClassLoader")
    public void setUseParentFirstClassLoader(Boolean useParentFirstClassLoader) {
       this.useParentFirstClassLoader =  useParentFirstClassLoader ;
    }
    /*
    *  end of field 'useParentFirstClassLoader' (Boolean) 
    */


    /*
    *  Start of field 'defaultAppStatusNamePattern' (String) 
    */
    private String defaultAppStatusNamePattern;

    @JsonProperty("defaultAppStatusNamePattern")
    public String getDefaultAppStatusNamePattern() {
       return defaultAppStatusNamePattern;
    }

    @JsonProperty("defaultAppStatusNamePattern")
    public void setDefaultAppStatusNamePattern(String defaultAppStatusNamePattern) {
       this.defaultAppStatusNamePattern =  defaultAppStatusNamePattern ;
    }
    /*
    *  end of field 'defaultAppStatusNamePattern' (String) 
    */


   
    //@Override
    public RaptureURI getAddressURI() {
        return new RaptureURI(getStoragePath(), Scheme.WORKFLOW);
    	// return new WORKFLOWURI(getStoragePath());
    	
    }

    public static final Scheme scheme = Scheme.WORKFLOW;
    //@Override
    public Scheme getScheme() {
    	return scheme;
    }	



    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((defaultAppStatusNamePattern == null) ? 0 : defaultAppStatusNamePattern.hashCode());
        result = prime * result + ((view == null) ? 0 : view.hashCode());
        result = prime * result + ((workflowURI == null) ? 0 : workflowURI.hashCode());
        result = prime * result + ((useParentFirstClassLoader == null) ? 0 : useParentFirstClassLoader.hashCode());
        result = prime * result + ((description == null) ? 0 : description.hashCode());
        result = prime * result + ((expectedArguments == null) ? 0 : expectedArguments.hashCode());
        result = prime * result + ((semaphoreType == null) ? 0 : semaphoreType.hashCode());
        result = prime * result + ((startStep == null) ? 0 : startStep.hashCode());
        result = prime * result + ((semaphoreConfig == null) ? 0 : semaphoreConfig.hashCode());
        result = prime * result + ((category == null) ? 0 : category.hashCode());
        result = prime * result + ((steps == null) ? 0 : steps.hashCode());
        result = prime * result + ((jarUriDependencies == null) ? 0 : jarUriDependencies.hashCode());
        return result;
    }


    @Override
    public boolean equals(Object obj) {
        if (this == obj) return true;
        if (obj == null) return false;
        if (getClass() != obj.getClass()) return false;
        
        Workflow other = (Workflow) obj;

        if (defaultAppStatusNamePattern == null) {
            if (other.defaultAppStatusNamePattern != null) {
                return false;
            }
        } else if (!defaultAppStatusNamePattern.equals(other.defaultAppStatusNamePattern)) {
            return false;
        }

        if (view == null) {
            if (other.view != null) {
                return false;
            }
        } else if (!view.equals(other.view)) {
            return false;
        }

        if (workflowURI == null) {
            if (other.workflowURI != null) {
                return false;
            }
        } else if (!workflowURI.equals(other.workflowURI)) {
            return false;
        }

        if (useParentFirstClassLoader == null) {
            if (other.useParentFirstClassLoader != null) {
                return false;
            }
        } else if (!useParentFirstClassLoader.equals(other.useParentFirstClassLoader)) {
            return false;
        }

        if (description == null) {
            if (other.description != null) {
                return false;
            }
        } else if (!description.equals(other.description)) {
            return false;
        }

        if (expectedArguments == null) {
            if (other.expectedArguments != null) {
                return false;
            }
        } else if (!expectedArguments.equals(other.expectedArguments)) {
            return false;
        }

        if (semaphoreType == null) {
            if (other.semaphoreType != null) {
                return false;
            }
        } else if (!semaphoreType.equals(other.semaphoreType)) {
            return false;
        }

        if (startStep == null) {
            if (other.startStep != null) {
                return false;
            }
        } else if (!startStep.equals(other.startStep)) {
            return false;
        }

        if (semaphoreConfig == null) {
            if (other.semaphoreConfig != null) {
                return false;
            }
        } else if (!semaphoreConfig.equals(other.semaphoreConfig)) {
            return false;
        }

        if (category == null) {
            if (other.category != null) {
                return false;
            }
        } else if (!category.equals(other.category)) {
            return false;
        }

        if (steps == null) {
            if (other.steps != null) {
                return false;
            }
        } else if (!steps.equals(other.steps)) {
            return false;
        }

        if (jarUriDependencies == null) {
            if (other.jarUriDependencies != null) {
                return false;
            }
        } else if (!jarUriDependencies.equals(other.jarUriDependencies)) {
            return false;
        }

           
        return true;
    }


    /**/
    public String debug() {
        StringBuilder sb = new StringBuilder();
            {
                sb.append(" defaultAppStatusNamePattern= ");
                Object o = defaultAppStatusNamePattern;
                if (o != null) {
                    if (o instanceof java.util.Collection) {
                        sb.append("{ ");
                        for (Object oo : (java.util.Collection) o) {
                            if (oo == null) sb.append("null");
                            else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
                            else sb.append(oo.toString()).append(", ");
                        }
                        sb.append(" } ");
                    } else {
                        if (o instanceof Debugable) sb.append(((Debugable) o).debug());
                        else sb.append(o.toString());
                    }
                }
            }

            {
                sb.append(" view= ");
                Object o = view;
                if (o != null) {
                    if (o instanceof java.util.Collection) {
                        sb.append("{ ");
                        for (Object oo : (java.util.Collection) o) {
                            if (oo == null) sb.append("null");
                            else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
                            else sb.append(oo.toString()).append(", ");
                        }
                        sb.append(" } ");
                    } else {
                        if (o instanceof Debugable) sb.append(((Debugable) o).debug());
                        else sb.append(o.toString());
                    }
                }
            }

            {
                sb.append(" workflowURI= ");
                Object o = workflowURI;
                if (o != null) {
                    if (o instanceof java.util.Collection) {
                        sb.append("{ ");
                        for (Object oo : (java.util.Collection) o) {
                            if (oo == null) sb.append("null");
                            else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
                            else sb.append(oo.toString()).append(", ");
                        }
                        sb.append(" } ");
                    } else {
                        if (o instanceof Debugable) sb.append(((Debugable) o).debug());
                        else sb.append(o.toString());
                    }
                }
            }

            {
                sb.append(" useParentFirstClassLoader= ");
                Object o = useParentFirstClassLoader;
                if (o != null) {
                    if (o instanceof java.util.Collection) {
                        sb.append("{ ");
                        for (Object oo : (java.util.Collection) o) {
                            if (oo == null) sb.append("null");
                            else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
                            else sb.append(oo.toString()).append(", ");
                        }
                        sb.append(" } ");
                    } else {
                        if (o instanceof Debugable) sb.append(((Debugable) o).debug());
                        else sb.append(o.toString());
                    }
                }
            }

            {
                sb.append(" description= ");
                Object o = description;
                if (o != null) {
                    if (o instanceof java.util.Collection) {
                        sb.append("{ ");
                        for (Object oo : (java.util.Collection) o) {
                            if (oo == null) sb.append("null");
                            else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
                            else sb.append(oo.toString()).append(", ");
                        }
                        sb.append(" } ");
                    } else {
                        if (o instanceof Debugable) sb.append(((Debugable) o).debug());
                        else sb.append(o.toString());
                    }
                }
            }

            {
                sb.append(" expectedArguments= ");
                Object o = expectedArguments;
                if (o != null) {
                    if (o instanceof java.util.Collection) {
                        sb.append("{ ");
                        for (Object oo : (java.util.Collection) o) {
                            if (oo == null) sb.append("null");
                            else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
                            else sb.append(oo.toString()).append(", ");
                        }
                        sb.append(" } ");
                    } else {
                        if (o instanceof Debugable) sb.append(((Debugable) o).debug());
                        else sb.append(o.toString());
                    }
                }
            }

            {
                sb.append(" semaphoreType= ");
                Object o = semaphoreType;
                if (o != null) {
                    if (o instanceof java.util.Collection) {
                        sb.append("{ ");
                        for (Object oo : (java.util.Collection) o) {
                            if (oo == null) sb.append("null");
                            else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
                            else sb.append(oo.toString()).append(", ");
                        }
                        sb.append(" } ");
                    } else {
                        if (o instanceof Debugable) sb.append(((Debugable) o).debug());
                        else sb.append(o.toString());
                    }
                }
            }

            {
                sb.append(" startStep= ");
                Object o = startStep;
                if (o != null) {
                    if (o instanceof java.util.Collection) {
                        sb.append("{ ");
                        for (Object oo : (java.util.Collection) o) {
                            if (oo == null) sb.append("null");
                            else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
                            else sb.append(oo.toString()).append(", ");
                        }
                        sb.append(" } ");
                    } else {
                        if (o instanceof Debugable) sb.append(((Debugable) o).debug());
                        else sb.append(o.toString());
                    }
                }
            }

            {
                sb.append(" semaphoreConfig= ");
                Object o = semaphoreConfig;
                if (o != null) {
                    if (o instanceof java.util.Collection) {
                        sb.append("{ ");
                        for (Object oo : (java.util.Collection) o) {
                            if (oo == null) sb.append("null");
                            else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
                            else sb.append(oo.toString()).append(", ");
                        }
                        sb.append(" } ");
                    } else {
                        if (o instanceof Debugable) sb.append(((Debugable) o).debug());
                        else sb.append(o.toString());
                    }
                }
            }

            {
                sb.append(" category= ");
                Object o = category;
                if (o != null) {
                    if (o instanceof java.util.Collection) {
                        sb.append("{ ");
                        for (Object oo : (java.util.Collection) o) {
                            if (oo == null) sb.append("null");
                            else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
                            else sb.append(oo.toString()).append(", ");
                        }
                        sb.append(" } ");
                    } else {
                        if (o instanceof Debugable) sb.append(((Debugable) o).debug());
                        else sb.append(o.toString());
                    }
                }
            }

            {
                sb.append(" steps= ");
                Object o = steps;
                if (o != null) {
                    if (o instanceof java.util.Collection) {
                        sb.append("{ ");
                        for (Object oo : (java.util.Collection) o) {
                            if (oo == null) sb.append("null");
                            else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
                            else sb.append(oo.toString()).append(", ");
                        }
                        sb.append(" } ");
                    } else {
                        if (o instanceof Debugable) sb.append(((Debugable) o).debug());
                        else sb.append(o.toString());
                    }
                }
            }

            {
                sb.append(" jarUriDependencies= ");
                Object o = jarUriDependencies;
                if (o != null) {
                    if (o instanceof java.util.Collection) {
                        sb.append("{ ");
                        for (Object oo : (java.util.Collection) o) {
                            if (oo == null) sb.append("null");
                            else if (oo instanceof Debugable) sb.append(((Debugable) oo).debug());
                            else sb.append(oo.toString()).append(", ");
                        }
                        sb.append(" } ");
                    } else {
                        if (o instanceof Debugable) sb.append(((Debugable) o).debug());
                        else sb.append(o.toString());
                    }
                }
            }

        return sb.append("\n").toString();
    }


    @Override
    public String getStoragePath() {
     // Add key fields
      return new WorkflowPathBuilder()
        .workflowURI(getWorkflowURI())
        .buildStoragePath();
    }
    
    @Override
    public RaptureURI getStorageLocation() {
       return new WorkflowPathBuilder()
         .workflowURI(getWorkflowURI())
         .buildStorageLocation();
    }
    
    


    @Override
    public String toString() {
        return JacksonUtil.jsonFromObject(this);
    }

    private ApiVersion _raptureVersion;

    @JsonProperty("_raptureVersion")
    public ApiVersion get_raptureVersion() {
        return _raptureVersion;
    }

    @JsonProperty("_raptureVersion")
    public void set_raptureVersion(ApiVersion _raptureVersion) {
        this._raptureVersion = _raptureVersion;
    }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy