Skip to content

Commit

Permalink
Merge pull request #169 from EsupPortail/test
Browse files Browse the repository at this point in the history
Fix fs test uri
  • Loading branch information
dlemaignent authored Oct 29, 2021
2 parents 4de87ef + fdb49dc commit 703b90c
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public Properties smbProperties(){
}

@Bean
@ConditionalOnProperty("fs.vfs-uri")
@ConditionalOnProperty("fs.vfs-test-uri")
public VfsAccessImpl vfsAccessImpl(){
VfsAccessImpl vfsAccessImpl = new VfsAccessImpl();
vfsAccessImpl.setDriveName("VFS");
Expand All @@ -57,7 +57,7 @@ public VfsAccessImpl vfsAccessImpl(){
}

@Bean
@ConditionalOnProperty("fs.cmis-uri")
@ConditionalOnProperty("fs.cmis-test-uri")
public CmisAccessImpl cmisAccessImpl(){
CmisAccessImpl cmisAccessImpl = new CmisAccessImpl();
cmisAccessImpl.setDriveName("CMIS");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,10 +316,10 @@ public int importFilesFromSource(Long workflowId, User user, User authUser) thro
nbImportedFiles++;
}
} else {
logger.info("aucun fichier à importer depuis : " + workflow.getDocumentsSourceUri());
logger.info("aucun fichier à importer depuis : " + workflow.getProtectedDocumentsSourceUri());
}
} catch (Exception e) {
logger.error("error on import from " + workflow.getDocumentsSourceUri(), e);
logger.error("error on import from " + workflow.getProtectedDocumentsSourceUri(), e);
}
fsAccessService.close();
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ public void setCmisAccessImpl(CmisAccessImpl cmisAccessImpl) {

public FsAccessService getFsAccessService(String uri) throws EsupSignatureFsException {
DocumentIOType type = getPathIOType(uri);
logger.info("search type for " + uri + " result " + type);
switch (type) {
case smb:
return smbAccessImpl;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ private FileObject open(String uri) {
fsManager = VFS.getManager();
return fsManager.resolveFile(uri, fsOptions);
} catch(FileSystemException e) {
logger.error("unable to open vfs", e);
logger.error("unable to open with vfs", e);
return null;
} catch (IllegalArgumentException e) {
logger.error("unable to open vfs " + e.getMessage());
logger.error("unable to open with vfs " + uri);
return null;
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ fs:
# smb-login: esup-signature
# smb-password: password
# smb-uri: smb://smb.univ-ville.fr
vfs-uri: /tmp
# cmis-uri: https://esup-signature.univ-ville.fr/nuxeo
vfs-test-uri: /tmp
# cmis-test-uri: https://esup-signature.univ-ville.fr/nuxeo
# cmis-login: Administrator
# cmis-password: Administrator
# cmis-respository-id: default
Expand Down

0 comments on commit 703b90c

Please sign in to comment.