Commit 0abc95ca22a4807207ec9471c393b0a934698dbe

Authored by Carlos Alberto
1 parent 5ab2b0d7
Exists in master

Alteração do tratamento de diretórios na classe GedFileService para funcionar em Linux

cit-core/src/main/java/br/com/centralit/framework/service/arquitetura/GedFileServiceImpl.java
@@ -98,8 +98,8 @@ public class GedFileServiceImpl implements GedFileService { @@ -98,8 +98,8 @@ public class GedFileServiceImpl implements GedFileService {
98 // CRIA A INSTANCIA DE FILEENCRYPTION 98 // CRIA A INSTANCIA DE FILEENCRYPTION
99 this.getFileEncryption(); 99 this.getFileEncryption();
100 100
101 - File encryptedFile = new File(dirOutput + "\\" + documento.getDirectoryKey() + "\\" + documento.getEntityKey()  
102 - + "\\" + documento.getDocumentKey() + "-" + documento.getVersionKey()); 101 + File encryptedFile = new File(dirOutput + "/" + documento.getDirectoryKey() + "/" + documento.getEntityKey()
  102 + + "/" + documento.getDocumentKey() + "-" + documento.getVersionKey());
103 103
104 File file = convertMultiPartToFile(documento); 104 File file = convertMultiPartToFile(documento);
105 105
@@ -123,10 +123,10 @@ public class GedFileServiceImpl implements GedFileService { @@ -123,10 +123,10 @@ public class GedFileServiceImpl implements GedFileService {
123 // CRIA A INSTANCIA DE FILEENCRYPTION 123 // CRIA A INSTANCIA DE FILEENCRYPTION
124 this.getFileEncryption(); 124 this.getFileEncryption();
125 125
126 - File encryptedFile = new File(dirOutput + "\\" + documento.getDirectoryKey() + "\\" + documento.getEntityKey()  
127 - + "\\" + documento.getDocumentKey() + "-" + documento.getVersionKey());  
128 - File unencryptedFile = new File(dirOutput + "\\" + documento.getDirectoryKey() + "\\" + documento.getEntityKey()  
129 - + "\\unencryptedFile.tmp"); 126 + File encryptedFile = new File(dirOutput + "/" + documento.getDirectoryKey() + "/" + documento.getEntityKey()
  127 + + "/" + documento.getDocumentKey() + "-" + documento.getVersionKey());
  128 + File unencryptedFile = new File(dirOutput + "/" + documento.getDirectoryKey() + "/" + documento.getEntityKey()
  129 + + "/unencryptedFile.tmp");
130 130
131 fileEncryption.loadKey(encryptedKeyFile, privateKeyFile); 131 fileEncryption.loadKey(encryptedKeyFile, privateKeyFile);
132 fileEncryption.decrypt(encryptedFile, unencryptedFile); 132 fileEncryption.decrypt(encryptedFile, unencryptedFile);
@@ -166,7 +166,7 @@ public class GedFileServiceImpl implements GedFileService { @@ -166,7 +166,7 @@ public class GedFileServiceImpl implements GedFileService {
166 @Override 166 @Override
167 public void remove(DocumentoGedInterface documento) throws Exception { 167 public void remove(DocumentoGedInterface documento) throws Exception {
168 168
169 - File file = new File(dirOutput + "\\" + documento.getDirectoryKey() + "\\" + documento.getEntityKey() + "\\" + documento.getDocumentKey() + "-" + documento.getVersionKey()); 169 + File file = new File(dirOutput + "/" + documento.getDirectoryKey() + "/" + documento.getEntityKey() + "/" + documento.getDocumentKey() + "-" + documento.getVersionKey());
170 file.delete(); 170 file.delete();
171 } 171 }
172 } 172 }