1 /* 2 * Copyright (c) 2005, London e-Science Centre, Imperial College London, UK 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 6 * 7 * - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 8 * - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 9 * - Neither the name of the London e-Science Centre nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 10 * 11 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 12 */ 13 package org.icenigrid.gridsam.core; 14 15 import java.util.Map; 16 import org.icenigrid.schema.jsdl.y2005.m11.JobDefinitionDocument; 17 18 /** 19 * Interface extending JobInstance providing mutable access to job status and 20 * other information 21 * 22 * @author wwhl 23 */ 24 public interface MutableJobInstance extends JobInstance { 25 26 /** 27 * set the job description 28 * 29 * @param pDescription 30 * the job description as a string 31 */ 32 public void setJobDefinition(JobDefinitionDocument pDescription); 33 34 /** 35 * set the properties associated with the job 36 * 37 * @param pProps 38 * properties associated with the job 39 */ 40 public void setProperties(Map pProps); 41 42 /** 43 * advance the state of this job to pState 44 * 45 * @param pState 46 * the new state 47 * @param pDescription 48 * description associated with the state 49 * @throws StateTransitionException 50 * if the new state cannot be reached from the current state 51 */ 52 public void advanceJobState(JobState pState, String pDescription) 53 throws StateTransitionException; 54 55 }