Commit 5834281c authored by Andrey Lugovskiy's avatar Andrey Lugovskiy Committed by Matija Obreza

Download repository metadata for an institute

- metadata files info
- Update WiewsController
- download files metadata
parent 1d509486
...@@ -792,7 +792,7 @@ ...@@ -792,7 +792,7 @@
</attributes> </attributes>
</configuration> </configuration>
</plugin> </plugin>
<!-- <plugin> <plugin>
<groupId>org.codehaus.mojo</groupId> <groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId> <artifactId>license-maven-plugin</artifactId>
<version>1.9</version> <version>1.9</version>
...@@ -815,7 +815,7 @@ ...@@ -815,7 +815,7 @@
<configuration> <configuration>
<sortArtifactByName>true</sortArtifactByName> <sortArtifactByName>true</sortArtifactByName>
</configuration> </configuration>
</plugin> --> </plugin>
<plugin> <plugin>
<groupId>org.liquibase</groupId> <groupId>org.liquibase</groupId>
<artifactId>liquibase-maven-plugin</artifactId> <artifactId>liquibase-maven-plugin</artifactId>
......
...@@ -55,6 +55,8 @@ import org.genesys2.server.service.impl.NonUniqueAccessionException; ...@@ -55,6 +55,8 @@ import org.genesys2.server.service.impl.NonUniqueAccessionException;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import javax.servlet.http.HttpServletResponse;
public interface GenesysService { public interface GenesysService {
/** /**
...@@ -290,4 +292,12 @@ public interface GenesysService { ...@@ -290,4 +292,12 @@ public interface GenesysService {
Page<AccessionDetails> listAccessionsDetails(Collection<Long> accessionIds, Pageable page); Page<AccessionDetails> listAccessionsDetails(Collection<Long> accessionIds, Pageable page);
/**
* Method for download files metadata
* @param response response
* @param repositoryPath repository path
* @throws IOException
*/
void downloadFilesMetadata(HttpServletResponse response, String repositoryPath) throws IOException;
} }
package org.genesys2.server.service.impl;
import org.genesys.filerepository.model.RepositoryFile;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
/**
* @author Andrey Lugovskoy.
*/
@Service("filesMetadataInfo")
public class FilesMetadataInfo extends MetadataInfo<RepositoryFile> {
@Value("#{'${files.metadata.fields}'.split(',')}") private List<String> filesMetadataHeader;
@Override
public void downloadMetadata(List<RepositoryFile> entities, HttpServletResponse response, char separator, char quoteChar, char escapeChar, String lineEnd) throws IOException {
super.downloadMetadata(filesMetadataHeader, entities, response, separator, quoteChar, escapeChar, lineEnd);
}
}
...@@ -16,37 +16,16 @@ ...@@ -16,37 +16,16 @@
package org.genesys2.server.service.impl; package org.genesys2.server.service.impl;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
import java.util.stream.Collectors;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
import javax.persistence.EntityManager;
import com.opencsv.CSVWriter; import com.opencsv.CSVWriter;
import com.opencsv.ResultSetHelper; import com.opencsv.ResultSetHelper;
import com.opencsv.ResultSetHelperService; import com.opencsv.ResultSetHelperService;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.Predicate; import org.apache.commons.collections4.Predicate;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.genesys.blocks.security.SecurityContextUtil; import org.genesys.blocks.security.SecurityContextUtil;
import org.genesys.blocks.security.service.CustomAclService; import org.genesys.blocks.security.service.CustomAclService;
import org.genesys.filerepository.model.RepositoryFile;
import org.genesys.filerepository.service.RepositoryService;
import org.genesys2.server.model.elastic.AccessionDetails; import org.genesys2.server.model.elastic.AccessionDetails;
import org.genesys2.server.model.genesys.Accession; import org.genesys2.server.model.genesys.Accession;
import org.genesys2.server.model.genesys.AccessionAlias; import org.genesys2.server.model.genesys.AccessionAlias;
...@@ -127,6 +106,28 @@ import org.springframework.transaction.annotation.Isolation; ...@@ -127,6 +106,28 @@ import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.persistence.EntityManager;
import javax.servlet.http.HttpServletResponse;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
import java.util.stream.Collectors;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
@Service @Service
@Transactional(readOnly = true) @Transactional(readOnly = true)
public class GenesysServiceImpl implements GenesysService, DatasetService { public class GenesysServiceImpl implements GenesysService, DatasetService {
...@@ -200,6 +201,12 @@ public class GenesysServiceImpl implements GenesysService, DatasetService { ...@@ -200,6 +201,12 @@ public class GenesysServiceImpl implements GenesysService, DatasetService {
@Autowired @Autowired
private GenesysFilterService filterService; private GenesysFilterService filterService;
@Autowired(required = false)
private RepositoryService repositoryService;
@Autowired(required = false)
private FilesMetadataInfo filesMetadataInfo;
private List<String> availableDisplayColumns; private List<String> availableDisplayColumns;
private List<String> defaultDisplayColumns; private List<String> defaultDisplayColumns;
...@@ -290,7 +297,8 @@ public class GenesysServiceImpl implements GenesysService, DatasetService { ...@@ -290,7 +297,8 @@ public class GenesysServiceImpl implements GenesysService, DatasetService {
public Page<AccessionDetails> listAccessionsDetails(Collection<Long> accessionIds, Pageable pageable) { public Page<AccessionDetails> listAccessionsDetails(Collection<Long> accessionIds, Pageable pageable) {
if (!accessionIds.isEmpty()) { if (!accessionIds.isEmpty()) {
Page<Accession> data = accessionRepository.findById(accessionIds, pageable); Page<Accession> data = accessionRepository.findById(accessionIds, pageable);
return new PageImpl<AccessionDetails>(getAccessionDetails(data.getContent().stream().map(a -> a.getId()).collect(Collectors.toList())), pageable, data.getTotalElements()); return new PageImpl<AccessionDetails>(getAccessionDetails(data.getContent().stream().map(a -> a.getId()).collect(Collectors.toList())), pageable,
data.getTotalElements());
} else { } else {
return null; return null;
} }
...@@ -299,7 +307,8 @@ public class GenesysServiceImpl implements GenesysService, DatasetService { ...@@ -299,7 +307,8 @@ public class GenesysServiceImpl implements GenesysService, DatasetService {
@Override @Override
public Accession getAccession(AccessionIdentifier3 aid3) throws NonUniqueAccessionException { public Accession getAccession(AccessionIdentifier3 aid3) throws NonUniqueAccessionException {
try { try {
Accession accession = accessionRepository.findOne(instituteRepository.findByCode(aid3.getHoldingInstitute()), aid3.getDoi(), aid3.getAccessionNumber(), aid3.getGenus()); Accession accession = accessionRepository
.findOne(instituteRepository.findByCode(aid3.getHoldingInstitute()), aid3.getDoi(), aid3.getAccessionNumber(), aid3.getGenus());
return lazyLoadAccession(accession); return lazyLoadAccession(accession);
} catch (IncorrectResultSizeDataAccessException e) { } catch (IncorrectResultSizeDataAccessException e) {
LOG.error("Duplicate accession name instCode={} acceNumb={} genus={}", aid3.getHoldingInstitute(), aid3.getAccessionNumber(), aid3.getGenus()); LOG.error("Duplicate accession name instCode={} acceNumb={} genus={}", aid3.getHoldingInstitute(), aid3.getAccessionNumber(), aid3.getGenus());
...@@ -881,10 +890,10 @@ public class GenesysServiceImpl implements GenesysService, DatasetService { ...@@ -881,10 +890,10 @@ public class GenesysServiceImpl implements GenesysService, DatasetService {
* Update {@link SvalbardDeposit} data and link with Genesys accessions. The * Update {@link SvalbardDeposit} data and link with Genesys accessions. The
* primary key for {@link SvalbardDeposit} is the <code>sgsv_id</code> as * primary key for {@link SvalbardDeposit} is the <code>sgsv_id</code> as
* provided by NordGen. * provided by NordGen.
* *
* Any existing SGSV records are first deleted. Inserted and linked with * Any existing SGSV records are first deleted. Inserted and linked with
* accessions in this method. * accessions in this method.
* *
* @param svalbardDeposits * @param svalbardDeposits
* @return * @return
*/ */
...@@ -1901,4 +1910,17 @@ public class GenesysServiceImpl implements GenesysService, DatasetService { ...@@ -1901,4 +1910,17 @@ public class GenesysServiceImpl implements GenesysService, DatasetService {
public List<Object[]> getLastUpdatedStatistics(FaoInstitute faoInstitute) { public List<Object[]> getLastUpdatedStatistics(FaoInstitute faoInstitute) {
return accessionRepository.lastUpdatedStatistics(faoInstitute); return accessionRepository.lastUpdatedStatistics(faoInstitute);
} }
/**
* {@inheritDoc}
*
* @param response
*/
@Override
public void downloadFilesMetadata(HttpServletResponse response, String repositoryPath) throws IOException {
List<RepositoryFile> files = repositoryService.getFiles(repositoryPath);
filesMetadataInfo.downloadMetadata(files, response, ' ', '"', '\\', "\r\n");
}
} }
package org.genesys2.server.service.impl;
import com.opencsv.CSVWriter;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import javax.servlet.http.HttpServletResponse;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;
/**
* @author Andrey Lugovskoy.
*/
public abstract class MetadataInfo<T> {
public static final Log LOG = LogFactory.getLog(MetadataInfo.class);
public abstract void downloadMetadata(List<T> entities, HttpServletResponse response, char separator, char quoteChar, char escapeChar, String lineEnd) throws IOException;
public void downloadMetadata(List<String> filesMetadataFields, List<T> entities, HttpServletResponse response, char separator, char quoteChar, char escapeChar, String lineEnd)
throws IOException {
try (CSVWriter writer = new CSVWriter(new BufferedWriter(new OutputStreamWriter(response.getOutputStream())), separator, quoteChar, escapeChar, lineEnd)) {
writer.writeNext(filesMetadataFields.toArray(ArrayUtils.EMPTY_STRING_ARRAY));
entities.stream().forEach(element -> {
List<Object> values = new ArrayList<>();
Class<?> aClass = element.getClass();
filesMetadataFields.stream().forEach(fieldName -> {
Field field;
Object value = " ";
try {
field = aClass.getField(fieldName);
value = field.get(element);
} catch (NoSuchFieldException e) {
try {
field = aClass.getSuperclass().getDeclaredField(fieldName);
field.setAccessible(true);
value = field.get(element);
value = value == null ? " " : value;
} catch (NoSuchFieldException | IllegalAccessException e1) {
LOG.error("Error getting value from field in " + element.getClass().getName());
}
} catch (IllegalAccessException e) {
LOG.error("Error getting value from field in " + element.getClass().getName());
}
values.add(value);
});
String[] stockArr = new String[values.size()];
stockArr = values.toArray(stockArr);
writer.writeNext(stockArr);
});
writer.flush();
}
}
}
...@@ -16,22 +16,6 @@ ...@@ -16,22 +16,6 @@
package org.genesys2.server.servlet.controller; package org.genesys2.server.servlet.controller;
import java.io.EOFException;
import java.io.IOException;
import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.genesys.filerepository.InvalidRepositoryFileDataException; import org.genesys.filerepository.InvalidRepositoryFileDataException;
import org.genesys.filerepository.InvalidRepositoryPathException; import org.genesys.filerepository.InvalidRepositoryPathException;
import org.genesys.filerepository.NoSuchRepositoryFileException; import org.genesys.filerepository.NoSuchRepositoryFileException;
...@@ -82,6 +66,21 @@ import org.springframework.web.servlet.HandlerMapping; ...@@ -82,6 +66,21 @@ import org.springframework.web.servlet.HandlerMapping;
import org.springframework.web.servlet.mvc.support.RedirectAttributes; import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import org.springframework.web.util.UriUtils; import org.springframework.web.util.UriUtils;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.EOFException;
import java.io.IOException;
import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
@Controller @Controller
@Scope("request") @Scope("request")
@RequestMapping("/wiews") @RequestMapping("/wiews")
...@@ -506,8 +505,6 @@ public class WiewsController extends BaseController { ...@@ -506,8 +505,6 @@ public class WiewsController extends BaseController {
public String uploadFile(@RequestParam MultipartFile file, @PathVariable String wiewsCode, @RequestParam String repositoryPath, public String uploadFile(@RequestParam MultipartFile file, @PathVariable String wiewsCode, @RequestParam String repositoryPath,
RedirectAttributes redirectAttributes) throws IOException { RedirectAttributes redirectAttributes) throws IOException {
//check user permissions
instituteService.getInstituteForEdit(wiewsCode);
final String mimeType = file.getContentType(); final String mimeType = file.getContentType();
try { try {
...@@ -610,7 +607,6 @@ public class WiewsController extends BaseController { ...@@ -610,7 +607,6 @@ public class WiewsController extends BaseController {
model.addAttribute("thumbnailFormat", "200x200"); model.addAttribute("thumbnailFormat", "200x200");
model.addAttribute("imageGallery", imageGallery); model.addAttribute("imageGallery", imageGallery);
model.addAttribute("wiewsCode", wiewsCode); model.addAttribute("wiewsCode", wiewsCode);
model.addAttribute("gallerySubPath", gallerySubPath);
return MANAGE_FILES_JSP_PATH + "/gallery/details"; return MANAGE_FILES_JSP_PATH + "/gallery/details";
} }
...@@ -644,19 +640,30 @@ public class WiewsController extends BaseController { ...@@ -644,19 +640,30 @@ public class WiewsController extends BaseController {
} }
redirectAttributes.addFlashAttribute("successMessage", "repository.gallery.successfully-updated"); redirectAttributes.addFlashAttribute("successMessage", "repository.gallery.successfully-updated");
return "redirect:/wiews/" + wiewsCode +"/files/gallery"; return "redirect:/wiews/" + wiewsCode + "/files/gallery";
} }
@PostMapping(value = "{wiewsCode}/files/gallery/delete") @PostMapping(value = "{wiewsCode}/files/gallery/delete")
public String deleteFile(@RequestParam String galleryPath, RedirectAttributes redirectAttributes, @PathVariable("wiewsCode") String wiewsCode) throws InvalidRepositoryPathException { public String deleteFile(@RequestParam String galleryPath, RedirectAttributes redirectAttributes, @PathVariable("wiewsCode") String wiewsCode) throws InvalidRepositoryPathException {
//check user permissions //check user permissions
instituteService.getInstituteForEdit(wiewsCode); instituteService.getInstituteForEdit(wiewsCode);
ImageGallery imageGallery = imageGalleryService.loadImageGallery(galleryPath); ImageGallery imageGallery = imageGalleryService.loadImageGallery(galleryPath);
imageGalleryService.removeGallery(imageGallery); imageGalleryService.removeGallery(imageGallery);
redirectAttributes.addFlashAttribute("successMessage", "repository.gallery.removed"); redirectAttributes.addFlashAttribute("successMessage", "repository.gallery.removed");
return "redirect:/wiews/" + wiewsCode +"/files/gallery"; return "redirect:/wiews/" + wiewsCode + "/files/gallery";
}
@RequestMapping(value = "{wiewsCode}/files/download/metadata")
public void downloadMetadata(@PathVariable("wiewsCode") String wiewsCode, HttpServletResponse response) throws IOException {
final String repositoryPath = "/wiews/" + wiewsCode;
response.setHeader("Content-Disposition", "attachment; filename=" + wiewsCode +"_files_metadata.csv ");
genesysService.downloadFilesMetadata(response, repositoryPath);
} }
@InitBinder @InitBinder
......
...@@ -63,6 +63,7 @@ public class ApplicationConfig { ...@@ -63,6 +63,7 @@ public class ApplicationConfig {
final List<Resource> locations = new ArrayList<>(); final List<Resource> locations = new ArrayList<>();
locations.add(new ClassPathResource("application.properties")); locations.add(new ClassPathResource("application.properties"));
locations.add(new ClassPathResource("files-metadata.properties"));
locations.add(new ClassPathResource("genesys.properties")); locations.add(new ClassPathResource("genesys.properties"));
final String extraConfigFile = System.getenv("config.file"); final String extraConfigFile = System.getenv("config.file");
......
...@@ -43,14 +43,6 @@ base.cookie-http-only=true ...@@ -43,14 +43,6 @@ base.cookie-http-only=true
# robots.txt # robots.txt
robots.allow=false robots.allow=false
db.url=jdbc:mysql://localhost/genesys?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
db.driverClassName=com.mysql.jdbc.Driver
db.username=root
db.password=
db.showSql=false
db.hbm2ddl=false
hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
google.api.key=AIzaSyBEvPuc8j5ps5GDQ3tdnTJaffKhfOdxFVc google.api.key=AIzaSyBEvPuc8j5ps5GDQ3tdnTJaffKhfOdxFVc
google.url.shortener=https://www.googleapis.com/urlshortener/v1/url google.url.shortener=https://www.googleapis.com/urlshortener/v1/url
news.menu.abbreviate.length=22 news.menu.abbreviate.length=22
......
...@@ -866,6 +866,7 @@ repository.file.dateSubmitted=Date of submission ...@@ -866,6 +866,7 @@ repository.file.dateSubmitted=Date of submission
repository.file.lastModifiedDate=Last modified date repository.file.lastModifiedDate=Last modified date
file.upload-file=Upload file file.upload-file=Upload file
file.download-metadata=Download metadata
file.upload-file.help=Select file for upload from local computer file.upload-file.help=Select file for upload from local computer
file.manage-files=Manage files file.manage-files=Manage files
......
...@@ -858,4 +858,6 @@ welcome.search-genesys=البحث في جينيسيس ...@@ -858,4 +858,6 @@ welcome.search-genesys=البحث في جينيسيس
welcome.networks=الشبكات welcome.networks=الشبكات
geo.country=الدولة: geo.country=الدولة:
file.download-metadata=تنزيل البيانات الوصفية
file.download-metadata=تنزيل البيانات الوصفية
article.is.template=هو القالب: article.is.template=هو القالب:
...@@ -858,4 +858,6 @@ welcome.search-genesys=Genesys durchsuchen ...@@ -858,4 +858,6 @@ welcome.search-genesys=Genesys durchsuchen
welcome.networks=Netzwerke welcome.networks=Netzwerke
geo.country=Land: geo.country=Land:
file.download-metadata=Metadaten herunterladen
file.download-metadata=Metadaten herunterladen
article.is.template=Ist Vorlage: article.is.template=Ist Vorlage:
...@@ -13,4 +13,4 @@ ...@@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
file.download-metadata=Download metadata
...@@ -858,4 +858,6 @@ welcome.search-genesys=Buscar en Genesys ...@@ -858,4 +858,6 @@ welcome.search-genesys=Buscar en Genesys
welcome.networks=Redes welcome.networks=Redes
geo.country=País: geo.country=País:
file.download-metadata=Descargar metadatos
file.download-metadata=Descargar metadatos
article.is.template=Es plantilla: article.is.template=Es plantilla:
...@@ -858,4 +858,6 @@ welcome.search-genesys=جستجو در Genesys ...@@ -858,4 +858,6 @@ welcome.search-genesys=جستجو در Genesys
welcome.networks=شبکه‌ها welcome.networks=شبکه‌ها
geo.country=کشور: geo.country=کشور:
file.download-metadata=دانلود ابرداده
file.download-metadata=دانلود ابرداده
article.is.template=الگو است: article.is.template=الگو است:
...@@ -858,4 +858,6 @@ welcome.search-genesys=Recherche sur Genesys ...@@ -858,4 +858,6 @@ welcome.search-genesys=Recherche sur Genesys
welcome.networks=Réseaux welcome.networks=Réseaux
geo.country=Pays : geo.country=Pays :
file.download-metadata=Télécharger les métadonnées
file.download-metadata=Télécharger les métadonnées
article.is.template=Est-ce que le modèle: article.is.template=Est-ce que le modèle:
...@@ -858,4 +858,6 @@ welcome.search-genesys=Pesquisar no Genesys ...@@ -858,4 +858,6 @@ welcome.search-genesys=Pesquisar no Genesys
welcome.networks=Redes welcome.networks=Redes
geo.country=País: geo.country=País:
file.download-metadata=Baixar metadados
file.download-metadata=Baixar metadados
article.is.template=É modelo: article.is.template=É modelo:
...@@ -858,4 +858,6 @@ welcome.search-genesys=Поиск по Genesys ...@@ -858,4 +858,6 @@ welcome.search-genesys=Поиск по Genesys
welcome.networks=Сети welcome.networks=Сети
geo.country=Страна: geo.country=Страна:
file.download-metadata=Загрузить метаданные
file.download-metadata=Загрузить метаданные
article.is.template=Шаблон: article.is.template=Шаблон:
...@@ -858,4 +858,6 @@ welcome.search-genesys=搜索Genesys ...@@ -858,4 +858,6 @@ welcome.search-genesys=搜索Genesys
welcome.networks=网站 welcome.networks=网站
geo.country=国家/地区: geo.country=国家/地区:
file.download-metadata=下載元數據
file.download-metadata=下載元數據
article.is.template=是模板 article.is.template=是模板
files.metadata.fields=originalFilename,extension,title,subject,description,creator,created,license,contentType
...@@ -82,6 +82,13 @@ ...@@ -82,6 +82,13 @@
</tbody> </tbody>
</table> </table>
<form style="padding-bottom: 5px;" action="<c:url value="/wiews/${wiewsCode}/files/download/metadata"><c:param name="${_csrf.parameterName}" value="${_csrf.token}" /></c:url>"
method="post" enctype="multipart/form-data" class="">
<input type="hidden" name="wiewsCode" value="${wiewsCode}"/>
<input type="hidden" name="repositoryPath" value="${currentPath}"/>
<button type="submit" class="btn btn-primary"><spring:message code="file.download-metadata"/></button>
</form>
<form action="<c:url value="/wiews/${wiewsCode}/upload-file"><c:param name="${_csrf.parameterName}" value="${_csrf.token}" /></c:url>" <form action="<c:url value="/wiews/${wiewsCode}/upload-file"><c:param name="${_csrf.parameterName}" value="${_csrf.token}" /></c:url>"
method="post" enctype="multipart/form-data" class=""> method="post" enctype="multipart/form-data" class="">
......
...@@ -282,6 +282,11 @@ public abstract class GenesysServicesTest extends BaseSpringTest { ...@@ -282,6 +282,11 @@ public abstract class GenesysServicesTest extends BaseSpringTest {
return new GenesysServiceImpl(); return new Gen