

package AOMCase;

import com.metamaxim.modelscope.callbacks.*;

public class MissionResourcingStatus extends Behaviour {

     public String getState() {
		Instance[] myResources = this.selectByRef("Internal Resource", "Mission");
		return (myResources.length == 0) ? "not resourced" : "resourced";
		}

	public String getResourcingStatus() {
		return this.getState("Mission Resourcing Status");
		}

	public String getResourcesAssigned() {
		//Create a list of all the Resources assigned to this Mission
		Instance[] myResources = this.selectByRef("Internal Resource", "Mission");
		String resourcesAssigned = "";
		String sep = "";
		for (int i = 0; i < myResources.length; i++) {
			resourcesAssigned = resourcesAssigned + sep + myResources[i].getString("Resource Name");
			sep = ", ";
			}
		return resourcesAssigned;
		}

}
