1 /*** 2 * 3 */ 4 package org.telscenter.pas.authortool.context; 5 6 import java.io.IOException; 7 8 import net.sf.sail.core.curnit.Curnit; 9 10 /*** 11 * @author turadg 12 * 13 */ 14 public interface IAuthoringSessionManager { 15 16 /*** 17 * Start the authoring session. 18 * 19 */ 20 public void startAuthoringSession(); 21 22 /*** 23 * 24 * @throw IllegalStateException if the session hasn't been started 25 * @return the curnit to be edited in the session 26 */ 27 public Curnit getCurnit(); 28 29 /*** 30 * Request a longer lock on the curnit to edit 31 * 32 * @param minutes 33 * @return whether it was granted 34 */ 35 public boolean requestExtension(int minutes); 36 37 /*** 38 * Save the curnit to the current working location 39 * 40 * @throws IOException 41 * if there is IO error saving 42 * @throws IllegalStateException 43 * if the session hasn't been started 44 */ 45 public void save(Curnit curnit) throws IOException; 46 47 /*** 48 * Save the curnit to the a new location and make that the current working 49 * location 50 * 51 * @throws IOException 52 * if there is IO error saving 53 * @throws IllegalStateException 54 * if the session hasn't been started 55 */ 56 public void saveAs(Curnit curnit) throws IOException; 57 58 /*** 59 * 60 * @throw IllegalStateException if the session hasn't been started 61 */ 62 public void endAuthoringSession(); 63 64 }