1 11 package org.eclipse.help.internal.webapp.servlet; 12 13 import java.io.*; 14 15 import javax.servlet.http.*; 16 17 import org.eclipse.help.internal.base.*; 18 import org.eclipse.help.internal.workingset.*; 19 20 25 public class WebappWorkingSetManager implements IHelpWorkingSetManager { 26 IHelpWorkingSetManager wSetManager; 27 31 36 public WebappWorkingSetManager(HttpServletRequest request, 37 HttpServletResponse response, String locale) { 38 if (BaseHelpSystem.getMode() == BaseHelpSystem.MODE_INFOCENTER) { 39 wSetManager = new InfocenterWorkingSetManager(request, response, 40 locale); 41 } else { 42 wSetManager = BaseHelpSystem.getWorkingSetManager(); 43 } 44 } 45 46 public AdaptableTocsArray getRoot() { 47 return wSetManager.getRoot(); 48 } 49 52 public void addWorkingSet(WorkingSet workingSet) throws IOException { 53 wSetManager.addWorkingSet(workingSet); 54 } 55 56 59 public WorkingSet createWorkingSet(String name, 60 AdaptableHelpResource[] elements) { 61 return wSetManager.createWorkingSet(name, elements); 62 } 63 64 68 public WorkingSet getWorkingSet(String name) { 69 return wSetManager.getWorkingSet(name); 70 } 71 76 public WorkingSet[] getWorkingSets() { 77 return wSetManager.getWorkingSets(); 78 } 79 82 public void removeWorkingSet(WorkingSet workingSet) { 83 wSetManager.removeWorkingSet(workingSet); 84 } 85 86 93 public void workingSetChanged(WorkingSet changedWorkingSet) 94 throws IOException { 95 wSetManager.workingSetChanged(changedWorkingSet); 96 } 97 98 public AdaptableToc getAdaptableToc(String href) { 99 return wSetManager.getAdaptableToc(href); 100 } 101 102 public AdaptableTopic getAdaptableTopic(String id) { 103 return wSetManager.getAdaptableTopic(id); 104 } 105 106 public String getCurrentWorkingSet() { 107 return wSetManager.getCurrentWorkingSet(); 108 } 109 110 public void setCurrentWorkingSet(String scope) { 111 wSetManager.setCurrentWorkingSet(scope); 112 } 113 114 } 115 | Popular Tags |