<commit_before>/*
 * Copyright 2012-2016, the original author or authors.
 * 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
 * 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 com.flipkart.flux.domain;

import java.util.List;

/**
 * @understands Represents a state machine submitted for execution
 * This class maintains the meta data that can be used to store & show information about the current state of execution of a state machine
 */
public class StateMachine {

    /* provided */
    private Long version;
    private String name;
    private String description;
    private List<State> states;
    private State startState;

    /* maintained */
    private Status status;
    private Status rollbackStatus;
    private Context context;

}<commit_msg>Added current State reference and removed redundant statuses<commit_after>/*
 * Copyright 2012-2016, the original author or authors.
 * 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
 * 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 com.flipkart.flux.domain;

import java.util.List;

/**
 * <code>StateMachine</code> represents a state machine submitted for execution in Flux.
 * Maintains meta data about the current state of execution of a state machine
 * 
 * @author Yogesh
 * @author regunath.balasubramanian
 */
public class StateMachine {

    /* provided */
	/** The version identifier*/
    private Long version;
    /** Name for this state machine*/
    private String name;
    /** Description of the state machine*/
    private String description;
    /** List of states that this machine has*/
    private List<State> states;
    /** The start state for this machine */
    private State startState;

    /* maintained */
    /** Current state of this state machine*/
    private State currentState;
    /** The Context for interacting with the Flux runtime*/
    private Context context;
    
    /** Constructor*/
	public StateMachine(Long version, String name, String description, List<State> states, State startState) {
		super();
		this.version = version;
		this.name = name;
		this.description = description;
		this.states = states;
		this.startState = startState;
	}

	/** Accessor/Mutator methods */
	public Context getContext() {
		return context;
	}
	public void setContext(Context context) {
		this.context = context;
	}
	public State getCurrentState() {
		return currentState;
	}
	public void setCurrentState(State currentState) {
		this.currentState = currentState;
	}
	public Long getVersion() {
		return version;
	}
	public String getName() {
		return name;
	}
	public String getDescription() {
		return description;
	}
	public List<State> getStates() {
		return states;
	}
	public State getStartState() {
		return startState;
	}

}
{'fraction_non_alphanumeric': 0.08088033012379642, 'fraction_numerical': 0.006602475928473178, 'mean_word_length': 3.6318471337579616, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3226602', 'n_tokens_mistral': 974, 'n_tokens_neox': 925, 'n_words': 413}