]> SALOME platform Git repositories - tools/siman.git/commitdiff
Salome HOME
File naming strategy is set to "asis" and generated number is in the prefix now inste...
authorrkv <rkv@opencascade.com>
Tue, 15 Jan 2013 13:01:40 +0000 (13:01 +0000)
committerrkv <rkv@opencascade.com>
Tue, 15 Jan 2013 13:01:40 +0000 (13:01 +0000)
Workspace/Siman-Common/src/org/splat/service/DocumentServiceImpl.java
Workspace/Siman-Common/src/test/som.xml
Workspace/Siman/WebContent/conf/som.xml

index 61cda0b46ee7e5c8ccfa885e202e0548e3f7b13c..c8494b13e70cf1fcd931b082cd3b4ca9ba3152ab 100644 (file)
@@ -126,7 +126,7 @@ public class DocumentServiceImpl implements DocumentService {
                Study owner = dprop.getOwner().getOwnerStudy();
 
                // Synchronize the object with the current Hibernate session.
-               //owner = getStudyDAO().merge(owner);
+               // owner = getStudyDAO().merge(owner);
 
                SimpleDateFormat tostring = new SimpleDateFormat("yyyy"); // RKV: NOPMD: TODO: Use locale here?
                String year = tostring.format(owner.getDate());
@@ -144,7 +144,7 @@ public class DocumentServiceImpl implements DocumentService {
                                .toString();
                aDoc.getFile().changePath(path);
                owner = getStudyDAO().merge(owner);
-//             getStudyDAO().update(owner);
+               // getStudyDAO().update(owner);
        }
 
        /**
@@ -167,8 +167,8 @@ public class DocumentServiceImpl implements DocumentService {
                        encoding.append(scope.getReference()).append("_").append(
                                        tostring.format(number));
                } else { // title and (temporarily) asis
-                       encoding.append(aDoc.getTitle()).append("_").append(
-                                       tostring.format(number));
+                       encoding.append("_").append(tostring.format(number)).append(
+                                       aDoc.getFile().getName());
                }
                return encoding.toString();
        }
@@ -318,7 +318,7 @@ public class DocumentServiceImpl implements DocumentService {
 
                aDoc.getAllRelations().add(attach);
                getDocumentDAO().merge(aDoc);
-               
+
                return attach;
        }
 
@@ -745,6 +745,7 @@ public class DocumentServiceImpl implements DocumentService {
 
        /**
         * Get the relationDAO.
+        * 
         * @return the relationDAO
         */
        public RelationDAO getRelationDAO() {
@@ -753,7 +754,9 @@ public class DocumentServiceImpl implements DocumentService {
 
        /**
         * Set the relationDAO.
-        * @param relationDAO the relationDAO to set
+        * 
+        * @param relationDAO
+        *            the relationDAO to set
         */
        public void setRelationDAO(final RelationDAO relationDAO) {
                _relationDAO = relationDAO;
index d6a34ef1cf01e8941139a527e5ed1da9a32e04f5..0d54cadf1fb1dcaaa58328ce3ec57769e9783a04 100644 (file)
@@ -42,7 +42,7 @@
      - Whatever is the naming scheme used, in order to avoid name clashes, file names are anyway suffixed by an index
        unique in the scope of the owner study.
      -->
-        <files name="encoded"/>
+        <files name="asis"/>
 
 <!-- 2.3 Document versions format
      -->
index fb349b79bfa91f34d90b642038cf2af57ffaa867..8316a292bdd3375af163740784e45c05805b8414 100644 (file)
@@ -42,7 +42,7 @@
      - Whatever is the naming scheme used, in order to avoid name clashes, file names are anyway suffixed by an index
        unique in the scope of the owner study.
      -->
-        <files name="encoded"/>
+        <files name="asis"/>
 
 <!-- 2.3 Document versions format
      -->