1 /*****************************************************************************
5 * Creation date 05.10.2012
8 *****************************************************************************/
10 package org.splat.service.technical;
12 import java.io.IOException;
13 import java.sql.SQLException;
14 import java.util.HashSet;
15 import java.util.List;
18 import org.splat.dal.bo.som.ProjectElement;
19 import org.splat.service.technical.ProjectSettingsService.Step;
20 import org.splat.service.technical.ProjectSettingsServiceImpl.FileNaming;
26 public interface ProjectSettingsService {
28 public static class Step {
29 // ------------------------
31 private Class<? extends ProjectElement> level; // Study or Scenario
32 Set<Class<?>> contents; // Set of Document and/or Knowledge
35 Step(int number, Class<? extends ProjectElement> level, String path) {
36 this.initialize(number, level, path);
39 private Step(int number, Class<? extends ProjectElement> level,
40 Class<?> contents, String path) {
41 this.initialize(number, level, path);
42 this.contents.add(contents);
45 private void initialize(int number,
46 Class<? extends ProjectElement> level, String path) {
49 this.path = path + "/";
50 this.contents = new HashSet<Class<?>>();
53 public boolean appliesTo(Class<? extends ProjectElement> level) {
54 return (level == this.level);
57 public boolean mayContain(Class<?> type) {
58 return contents.contains(type);
61 public int getNumber() {
65 public String getPath() {
70 public FileNaming getFileNamingScheme();
72 public List<ProjectSettingsService.Step> getAllSteps();
74 public String getReferencePattern();
76 public String getRevisionPattern();
78 public void configure(String filename) throws IOException, SQLException;
80 public List<ProjectSettingsService.Step> getStepsOf(
81 Class<? extends ProjectElement> level);