Salome HOME
Default document types mappings are moved from application settings (my.xml) to proje...
[tools/siman.git] / Workspace / Siman-Common / src / org / splat / service / technical / ProjectSettingsService.java
index 576fd67ff3f102cd817d936cd34c1c440f328491..16a446c1579e72bebfc7fe26f5623e65df8bd9c4 100644 (file)
@@ -15,6 +15,7 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
 
+import org.splat.dal.bo.som.DocumentType;
 import org.splat.dal.bo.som.ProjectElement;
 import org.splat.service.technical.ProjectSettingsServiceImpl.FileNaming;
 import org.splat.service.technical.ProjectSettingsServiceImpl.ProjectSettingsValidationCycle;
@@ -27,7 +28,7 @@ public interface ProjectSettingsService {
        /**
         * Transient study step data.
         */
-    class Step {
+       class Step {
                /**
                 * The sequential number of the step.
                 */
@@ -149,6 +150,7 @@ public interface ProjectSettingsService {
 
                /**
                 * Get the module.
+                * 
                 * @return the module
                 */
                public String getModule() {
@@ -157,7 +159,9 @@ public interface ProjectSettingsService {
 
                /**
                 * Set the module.
-                * @param module the module to set
+                * 
+                * @param module
+                *            the module to set
                 */
                public void setModule(final String module) {
                        _module = module;
@@ -165,6 +169,7 @@ public interface ProjectSettingsService {
 
                /**
                 * Get the key.
+                * 
                 * @return the key
                 */
                public String getKey() {
@@ -173,7 +178,9 @@ public interface ProjectSettingsService {
 
                /**
                 * Set the key.
-                * @param key the key to set
+                * 
+                * @param key
+                *            the key to set
                 */
                public void setKey(final String key) {
                        _key = key;
@@ -247,7 +254,7 @@ public interface ProjectSettingsService {
         */
        List<ProjectSettingsService.Step> getStepsOf(
                        Class<? extends ProjectElement> level);
-       
+
        /**
         * Check if a file of the given format should be imported during check-in of a document of the given type.
         * 
@@ -257,5 +264,25 @@ public interface ProjectSettingsService {
         *            file format
         * @return true if file should be imported
         */
-       public boolean doImport(final String type, final String format);
+       boolean doImport(final String type, final String format);
+
+       /**
+        * Get default document type for the given file format on the given study step.
+        * 
+        * @param step
+        *            the study step
+        * @param format
+        *            the file format (extension)
+        * @return document type
+        */
+       DocumentType getDefaultDocumentType(final Step step, final String format);
+
+       /**
+        * Get the list of default formats for the given study step.
+        * 
+        * @param step
+        *            the study step
+        * @return list of formats (file extensions)
+        */
+       List<String> getDefaultFormats(final Step step);
 }