import org.w3c.dom.NamedNodeMap;
import org.apache.log4j.Logger;
-import org.splat.kernel.User;
+import org.splat.dal.bo.kernel.User;
import org.splat.manox.XDOM;
-import org.splat.som.Document;
+import org.splat.dal.bo.som.Document;
import org.splat.som.DocumentRights;
-import org.splat.som.DocumentType;
-import org.splat.som.KnowledgeElement;
-import org.splat.som.ProgressState;
-import org.splat.som.ProjectSettings;
-import org.splat.som.SimulationContext;
+import org.splat.dal.bo.som.DocumentType;
+import org.splat.dal.bo.som.KnowledgeElement;
+import org.splat.dal.bo.som.ProgressState;
+import org.splat.service.technical.ProjectSettingsService;
+import org.splat.dal.bo.som.SimulationContext;
import org.splat.som.Step;
import org.splat.som.StudyRights;
import org.splat.wapp.MenuItem;
private static ApplicationSettings my = null; // Singleton instance
protected final static Logger logger = Logger.getLogger(ApplicationSettings.class);
+ private ProjectSettingsService _projectSettingsService;
+
+ /**
+ * Get the projectSettingsService.
+ * @return the projectSettingsService
+ */
+ public ProjectSettingsService getProjectSettings() {
+ return _projectSettingsService;
+ }
+ /**
+ * Set the projectSettingsService.
+ * @param projectSettingsService the projectSettingsService to set
+ */
+ public void setProjectSettings(
+ ProjectSettingsService projectSettingsService) {
+ _projectSettingsService = projectSettingsService;
+ }
private static class NewMenu extends SimpleMenu {
// -----------------------------------------------------------------
// ------------------------------------------
return my; // The application is supposed being previously created below
}
- protected ApplicationSettings (String wappurl, Locale lang) throws IOException {
-// -----------------------------------------------------------
+ /**
+ * @param wappurl
+ * @param lang
+ * @return
+ */
+ public ApplicationSettings init(String wappurl, Locale lang) throws IOException {
ClassLoader cloader = getClass().getClassLoader();
String[] wurl = wappurl.split("/"); // [0]="http:", [1]="", [2]="{server}:{port}", [3]="name"
logger.info("Application root set to " + wapprops.getProperty("wapp.root"));
my = this;
+ return this;
}
// ==============================================================================================================================
// Settings based on the customization
bars = new HashMap<Integer, ToolBar>(); // May be empty if no module installed
- List<ProjectSettings.Step> steps = ProjectSettings.getAllSteps();
- for (Iterator<ProjectSettings.Step> i=steps.iterator(); i.hasNext();) {
- ProjectSettings.Step step = i.next();
+ List<ProjectSettingsService.Step> steps = getProjectSettings().getAllSteps();
+ for (Iterator<ProjectSettingsService.Step> i=steps.iterator(); i.hasNext();) {
+ ProjectSettingsService.Step step = i.next();
List<String> formats = getDefaultFormats(step);
if (formats.size() == 0) continue;
// Private services
// ==============================================================================================================================
- private List<String> getDefaultFormats (ProjectSettings.Step step) {
+ private List<String> getDefaultFormats (ProjectSettingsService.Step step) {
// ------------------------------------------------------------------
Set<String> keys = defdoctype.keySet();
int number = step.getNumber();