From: rkv Date: Tue, 15 Jan 2013 13:01:40 +0000 (+0000) Subject: File naming strategy is set to "asis" and generated number is in the prefix now inste... X-Git-Tag: Root_Delivery2_2013_04_22~186 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6a2367e3294bdbfeb52db913235e0942898f6586;p=tools%2Fsiman.git File naming strategy is set to "asis" and generated number is in the prefix now instead of suffix. --- diff --git a/Workspace/Siman-Common/src/org/splat/service/DocumentServiceImpl.java b/Workspace/Siman-Common/src/org/splat/service/DocumentServiceImpl.java index 61cda0b..c8494b1 100644 --- a/Workspace/Siman-Common/src/org/splat/service/DocumentServiceImpl.java +++ b/Workspace/Siman-Common/src/org/splat/service/DocumentServiceImpl.java @@ -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; diff --git a/Workspace/Siman-Common/src/test/som.xml b/Workspace/Siman-Common/src/test/som.xml index d6a34ef..0d54cad 100644 --- a/Workspace/Siman-Common/src/test/som.xml +++ b/Workspace/Siman-Common/src/test/som.xml @@ -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. --> - + diff --git a/Workspace/Siman/WebContent/conf/som.xml b/Workspace/Siman/WebContent/conf/som.xml index fb349b7..8316a29 100644 --- a/Workspace/Siman/WebContent/conf/som.xml +++ b/Workspace/Siman/WebContent/conf/som.xml @@ -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. --> - +