Commit fbf47ce6 authored by Matija Obreza's avatar Matija Obreza

Merge branch 'merge-catalog-tests' into 'master'

Merge catalog tests

See merge request genesys-pgr/genesys-server!165
parents 65e83758 a878520e
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
<querydsl.version>4.1.4</querydsl.version> <querydsl.version>4.1.4</querydsl.version>
<hibernate.version>4.3.11.Final</hibernate.version> <hibernate.version>4.3.11.Final</hibernate.version>
<hsqldb.version>2.3.3</hsqldb.version> <hsqldb.version>2.3.6</hsqldb.version>
<ehcache.version>2.7.4</ehcache.version> <ehcache.version>2.7.4</ehcache.version>
<slf4j.version>1.7.21</slf4j.version> <slf4j.version>1.7.21</slf4j.version>
...@@ -268,6 +268,13 @@ ...@@ -268,6 +268,13 @@
<version>${spring-data-jpa.version}</version> <version>${spring-data-jpa.version}</version>
</dependency> </dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-test</artifactId>
<version>${spring.security.version}</version>
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>com.querydsl</groupId> <groupId>com.querydsl</groupId>
<artifactId>querydsl-jpa</artifactId> <artifactId>querydsl-jpa</artifactId>
...@@ -646,12 +653,8 @@ ...@@ -646,12 +653,8 @@
<version>2.19.1</version> <version>2.19.1</version>
<configuration> <configuration>
<forkMode>once</forkMode> <forkMode>once</forkMode>
<argLine>-Xms512m -Xmx1024m</argLine> <argLine>-Xms512m -Xmx1024m -server</argLine>
<testFailureIgnore>false</testFailureIgnore> <testFailureIgnore>false</testFailureIgnore>
<includes>
<!-- Only API documentation -->
<include>*.docs.*Test.java</include>
</includes>
</configuration> </configuration>
</plugin> </plugin>
<plugin> <plugin>
...@@ -864,6 +867,10 @@ ...@@ -864,6 +867,10 @@
</includes> </includes>
<filtering>true</filtering> <filtering>true</filtering>
</resource> </resource>
<resource>
<directory>src/test/resources</directory>
<filtering>true</filtering>
</resource>
<resource> <resource>
<directory>${project.build.directory}/generated-resources</directory> <directory>${project.build.directory}/generated-resources</directory>
<filtering>false</filtering> <filtering>false</filtering>
......
...@@ -61,7 +61,7 @@ import io.swagger.annotations.Api; ...@@ -61,7 +61,7 @@ import io.swagger.annotations.Api;
public class DatasetController { public class DatasetController {
// Rest controller base URL // Rest controller base URL
protected static final String CONTROLLER_URL = ApiBaseController.APIv0_BASE + "/dataset"; public static final String CONTROLLER_URL = ApiBaseController.APIv0_BASE + "/dataset";
private static final Logger LOG = LoggerFactory.getLogger(DatasetController.class); private static final Logger LOG = LoggerFactory.getLogger(DatasetController.class);
......
...@@ -49,7 +49,7 @@ import java.util.UUID; ...@@ -49,7 +49,7 @@ import java.util.UUID;
public class DatasetCreatorController { public class DatasetCreatorController {
/** The Constant API_BASE. */ /** The Constant API_BASE. */
protected static final String CONTROLLER_URL = DatasetController.CONTROLLER_URL + "/{UUID}/datasetcreator"; public static final String CONTROLLER_URL = DatasetController.CONTROLLER_URL + "/{UUID}/datasetcreator";
/** The dataset service. */ /** The dataset service. */
@Autowired @Autowired
......
...@@ -116,7 +116,7 @@ public class DescriptorController { ...@@ -116,7 +116,7 @@ public class DescriptorController {
* @throws IOException * @throws IOException
*/ */
@PostMapping(value = "/list") @PostMapping(value = "/list")
public FilteredPage<Descriptor> listDescriptorsByFilter(@RequestParam(name = "p", required = false, defaultValue = "0") final int page, public FilteredPage<Descriptor> listDescriptors(@RequestParam(name = "p", required = false, defaultValue = "0") final int page,
@RequestParam(name = "l", required = false, defaultValue = "50") final int pageSize, @RequestParam(name = "l", required = false, defaultValue = "50") final int pageSize,
@RequestParam(name = "d", required = false, defaultValue = "ASC") final Sort.Direction direction, @RequestParam(name = "d", required = false, defaultValue = "ASC") final Sort.Direction direction,
@RequestParam(name = "s", required = false, defaultValue = "id") final String[] sort, @RequestParam(name = "s", required = false, defaultValue = "id") final String[] sort,
...@@ -141,7 +141,7 @@ public class DescriptorController { ...@@ -141,7 +141,7 @@ public class DescriptorController {
* @param filterCode the filter code * @param filterCode the filter code
* @return the filtered page * @return the filtered page
* @throws IOException Signals that an I/O exception has occurred. * @throws IOException Signals that an I/O exception has occurred.
* @deprecated Use {@link #listDescriptorsByFilter(int, int, org.springframework.data.domain.Sort.Direction, String[], DescriptorFilter)} * @deprecated Use {@link #listDescriptors(int, int, org.springframework.data.domain.Sort.Direction, String[], DescriptorFilter)}
*/ */
@PostMapping(value = "/list/{filterCode}") @PostMapping(value = "/list/{filterCode}")
public FilteredPage<Descriptor> listDescriptorsByShort(@RequestParam(name = "p", required = false, defaultValue = "0") final int page, public FilteredPage<Descriptor> listDescriptorsByShort(@RequestParam(name = "p", required = false, defaultValue = "0") final int page,
......
...@@ -41,7 +41,7 @@ import java.util.Map; ...@@ -41,7 +41,7 @@ import java.util.Map;
public class DescriptorListExporter { public class DescriptorListExporter {
@Autowired @Autowired
private FreemarkerTemplating freemarker; private FreemarkerTemplating freemarkerTemplating;
/** The Constant OPTIONS. */ /** The Constant OPTIONS. */
/*@formatter:off*/ /*@formatter:off*/
...@@ -75,7 +75,7 @@ public class DescriptorListExporter { ...@@ -75,7 +75,7 @@ public class DescriptorListExporter {
public String markdownDescriptorList(final DescriptorList descriptorList) throws FreemarkerException { public String markdownDescriptorList(final DescriptorList descriptorList) throws FreemarkerException {
final Map<String, Object> root = new HashMap<>(); final Map<String, Object> root = new HashMap<>();
root.put("descriptorList", descriptorList); root.put("descriptorList", descriptorList);
return freemarker.processTemplateResource("descriptorlist/booklet.ftl", root); return freemarkerTemplating.processTemplateResource("descriptorlist/booklet.ftl", root);
} }
/** /**
...@@ -88,7 +88,7 @@ public class DescriptorListExporter { ...@@ -88,7 +88,7 @@ public class DescriptorListExporter {
public String htmlDescriptorList(final DescriptorList descriptorList) throws FreemarkerException { public String htmlDescriptorList(final DescriptorList descriptorList) throws FreemarkerException {
final Map<String, Object> root = new HashMap<>(); final Map<String, Object> root = new HashMap<>();
root.put("descriptorList", descriptorList); root.put("descriptorList", descriptorList);
final String markdown = freemarker.processTemplateResource("descriptorlist/booklet.ftl", root); final String markdown = freemarkerTemplating.processTemplateResource("descriptorlist/booklet.ftl", root);
// System.err.println(markdown); // System.err.println(markdown);
final Parser parser = Parser.builder(OPTIONS).build(); final Parser parser = Parser.builder(OPTIONS).build();
...@@ -103,7 +103,7 @@ public class DescriptorListExporter { ...@@ -103,7 +103,7 @@ public class DescriptorListExporter {
root.put("author", StringUtils.defaultIfEmpty(descriptorList.getPublisher(), descriptorList.getOwner().getName())); root.put("author", StringUtils.defaultIfEmpty(descriptorList.getPublisher(), descriptorList.getOwner().getName()));
root.put("html", html); root.put("html", html);
return freemarker.processTemplateResource("html.ftl", root); return freemarkerTemplating.processTemplateResource("html.ftl", root);
} }
} }
...@@ -79,7 +79,7 @@ public class DatasetServiceImpl implements DatasetService { ...@@ -79,7 +79,7 @@ public class DatasetServiceImpl implements DatasetService {
/** The file repo service. */ /** The file repo service. */
@Autowired @Autowired
private RepositoryService fileRepoService; private RepositoryService repositoryService;
@Autowired @Autowired
private CustomAclService aclService; private CustomAclService aclService;
...@@ -304,7 +304,7 @@ public class DatasetServiceImpl implements DatasetService { ...@@ -304,7 +304,7 @@ public class DatasetServiceImpl implements DatasetService {
InvalidRepositoryFileDataException { InvalidRepositoryFileDataException {
dataset = datasetRepository.findByUuidAndVersion(dataset.getUuid(), dataset.getVersion()); dataset = datasetRepository.findByUuidAndVersion(dataset.getUuid(), dataset.getVersion());
final RepositoryFile repositoryFile = fileRepoService.addFile(Paths.get(datasetRepositoryPath, dataset.getUuid().toString()).toAbsolutePath().toString(), file final RepositoryFile repositoryFile = repositoryService.addFile(Paths.get(datasetRepositoryPath, dataset.getUuid().toString()).toAbsolutePath().toString(), file
.getOriginalFilename(), file.getContentType(), file.getBytes(), null); .getOriginalFilename(), file.getContentType(), file.getBytes(), null);
dataset.getRepositoryFiles().add(repositoryFile); dataset.getRepositoryFiles().add(repositoryFile);
return lazyLoad(datasetRepository.save(dataset)); return lazyLoad(datasetRepository.save(dataset));
...@@ -320,7 +320,7 @@ public class DatasetServiceImpl implements DatasetService { ...@@ -320,7 +320,7 @@ public class DatasetServiceImpl implements DatasetService {
if (datasetFile == null) { if (datasetFile == null) {
throw new NotFoundElement("No such dataset file"); throw new NotFoundElement("No such dataset file");
} }
final RepositoryFile updated = fileRepoService.updateMetadata(metadata); final RepositoryFile updated = repositoryService.updateMetadata(metadata);
// replace it // replace it
dataset.getRepositoryFiles().replaceAll(df -> df.getUuid().equals(datasetFile.getUuid()) ? updated : df); dataset.getRepositoryFiles().replaceAll(df -> df.getUuid().equals(datasetFile.getUuid()) ? updated : df);
return lazyLoad(dataset); return lazyLoad(dataset);
...@@ -335,9 +335,9 @@ public class DatasetServiceImpl implements DatasetService { ...@@ -335,9 +335,9 @@ public class DatasetServiceImpl implements DatasetService {
public Dataset removeDatasetFile(Dataset dataset, final UUID fileUuid) throws NotFoundElement, NoSuchRepositoryFileException, IOException { public Dataset removeDatasetFile(Dataset dataset, final UUID fileUuid) throws NotFoundElement, NoSuchRepositoryFileException, IOException {
dataset = datasetRepository.findByUuidAndVersion(dataset.getUuid(), dataset.getVersion()); dataset = datasetRepository.findByUuidAndVersion(dataset.getUuid(), dataset.getVersion());
final RepositoryFile repositoryFile = fileRepoService.getFile(fileUuid); final RepositoryFile repositoryFile = repositoryService.getFile(fileUuid);
dataset.getRepositoryFiles().remove(repositoryFile); dataset.getRepositoryFiles().remove(repositoryFile);
fileRepoService.removeFile(repositoryFile); repositoryService.removeFile(repositoryFile);
return lazyLoad(datasetRepository.save(dataset)); return lazyLoad(datasetRepository.save(dataset));
} }
......
...@@ -43,10 +43,12 @@ import io.swagger.annotations.Api; ...@@ -43,10 +43,12 @@ import io.swagger.annotations.Api;
@Controller("adminCacheApi0") @Controller("adminCacheApi0")
@PreAuthorize("isAuthenticated()") @PreAuthorize("isAuthenticated()")
@RequestMapping(value = { "/api/v0/admin/cache", "/json/v0/cache" }) @RequestMapping(value = { CacheController.API_URL, "/json/v0/cache" })
@Api(tags = { "admin" }) @Api(tags = { "admin" })
public class CacheController extends ApiBaseController { public class CacheController extends ApiBaseController {
public final static String API_URL = ApiBaseController.APIv0_ADMIN_BASE + "/cache";
@Autowired @Autowired
private MappingService mappingService; private MappingService mappingService;
......
...@@ -56,7 +56,7 @@ import net.sf.oval.Validator; ...@@ -56,7 +56,7 @@ import net.sf.oval.Validator;
@Api(tags = { "crop" }) @Api(tags = { "crop" })
public class CropsController extends ApiBaseController { public class CropsController extends ApiBaseController {
protected static final String CONTROLLER_URL = ApiBaseController.APIv0_BASE + "/crops"; public static final String CONTROLLER_URL = ApiBaseController.APIv0_BASE + "/crops";
@Autowired @Autowired
GenesysService genesysService; GenesysService genesysService;
......
...@@ -62,7 +62,7 @@ public class PermissionController extends ApiBaseController { ...@@ -62,7 +62,7 @@ public class PermissionController extends ApiBaseController {
@RequestMapping(value = "/add", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) @RequestMapping(value = "/add", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
public ApiResult addPermission(@RequestBody PermissionJson permissionJson) { public ApiResult addPermission(@RequestBody PermissionJson permissionJson) {
LOG.info("Adding permission {}", permissionJson); LOG.info("Adding permission {}", permissionJson);
final AclObjectIdentity oid = aclService.getObjectIdentity(permissionJson.getOid(), permissionJson.getClazz()); final AclObjectIdentity oid = aclService.ensureObjectIdentity(permissionJson.getOid(), permissionJson.getClazz());
if (permissionJson.getAuthority() != null) { if (permissionJson.getAuthority() != null) {
final AclSid sid = aclService.getAuthoritySid(permissionJson.getAuthority()); final AclSid sid = aclService.getAuthoritySid(permissionJson.getAuthority());
......
...@@ -80,7 +80,7 @@ public class AccessionId extends AuditedVersionedModel implements IdUUID { ...@@ -80,7 +80,7 @@ public class AccessionId extends AuditedVersionedModel implements IdUUID {
@OneToOne(fetch = FetchType.LAZY, cascade = { CascadeType.ALL }, optional = true, orphanRemoval = true) @OneToOne(fetch = FetchType.LAZY, cascade = { CascadeType.ALL }, optional = true, orphanRemoval = true)
@JoinColumn(name = "pdciId", unique = true) @JoinColumn(name = "pdciId", unique = true)
@JsonIgnoreProperties({ "accession" }) @JsonIgnoreProperties({ "accession" })
@JsonView({ JsonViews.Root.class }) @JsonView({ JsonViews.Internal.class })
private PDCI pdci; private PDCI pdci;
@Column(name = "storage", nullable = false) @Column(name = "storage", nullable = false)
......
...@@ -49,7 +49,7 @@ public class AccessionListServiceImpl implements AccessionListService { ...@@ -49,7 +49,7 @@ public class AccessionListServiceImpl implements AccessionListService {
@Autowired @Autowired
AccessionListRepository accessionListRepository; AccessionListRepository accessionListRepository;
@Autowired @Autowired(required = false)
ElasticUpdater elasticUpdater; ElasticUpdater elasticUpdater;
@Override @Override
...@@ -95,9 +95,10 @@ public class AccessionListServiceImpl implements AccessionListService { ...@@ -95,9 +95,10 @@ public class AccessionListServiceImpl implements AccessionListService {
@PreAuthorize("hasRole('ADMINISTRATOR') or hasPermission(#accessionList, 'WRITE')") @PreAuthorize("hasRole('ADMINISTRATOR') or hasPermission(#accessionList, 'WRITE')")
@Transactional @Transactional
public void removeAll(AccessionList accessionList) { public void removeAll(AccessionList accessionList) {
// Re-index if (elasticUpdater!=null) {
elasticUpdater.updateAll(Accession.class, accessionListRepository.getAccessionIds(accessionList).toArray(ArrayUtils.EMPTY_LONG_OBJECT_ARRAY)); // Re-index
elasticUpdater.updateAll(Accession.class, accessionListRepository.getAccessionIds(accessionList).toArray(ArrayUtils.EMPTY_LONG_OBJECT_ARRAY));
}
accessionListRepository.removeAll(accessionList); accessionListRepository.removeAll(accessionList);
} }
...@@ -105,9 +106,10 @@ public class AccessionListServiceImpl implements AccessionListService { ...@@ -105,9 +106,10 @@ public class AccessionListServiceImpl implements AccessionListService {
@PreAuthorize("hasRole('ADMINISTRATOR') or hasPermission(#accessionList, 'WRITE')") @PreAuthorize("hasRole('ADMINISTRATOR') or hasPermission(#accessionList, 'WRITE')")
@Transactional @Transactional
public void addToList(AccessionList list, AccessionData accession) { public void addToList(AccessionList list, AccessionData accession) {
// Re-index if (elasticUpdater!=null) {
elasticUpdater.update(Accession.class, accession.getId()); // Re-index
elasticUpdater.update(Accession.class, accession.getId());
}
accessionListRepository.addOne(list, accession.getAccessionId()); accessionListRepository.addOne(list, accession.getAccessionId());
} }
...@@ -120,22 +122,28 @@ public class AccessionListServiceImpl implements AccessionListService { ...@@ -120,22 +122,28 @@ public class AccessionListServiceImpl implements AccessionListService {
accessionListRepository.addAll(acceList, accessionIds); accessionListRepository.addAll(acceList, accessionIds);
// Re-index if (elasticUpdater!=null) {
elasticUpdater.updateAll(Accession.class, accessionIds.toArray(ArrayUtils.EMPTY_LONG_OBJECT_ARRAY)); // Re-index
elasticUpdater.updateAll(Accession.class, accessionIds.toArray(ArrayUtils.EMPTY_LONG_OBJECT_ARRAY));
}
} }
@Override @Override
@PreAuthorize("hasRole('ADMINISTRATOR') or hasPermission(#accessionList, 'WRITE')") @PreAuthorize("hasRole('ADMINISTRATOR') or hasPermission(#accessionList, 'WRITE')")
@Transactional @Transactional
public void setList(AccessionList accessionList, Collection<Long> accessionIds) { public void setList(AccessionList accessionList, Collection<Long> accessionIds) {
// Re-index if (elasticUpdater!=null) {
elasticUpdater.updateAll(Accession.class, accessionListRepository.getAccessionIds(accessionList).toArray(ArrayUtils.EMPTY_LONG_OBJECT_ARRAY)); // Re-index
elasticUpdater.updateAll(Accession.class, accessionListRepository.getAccessionIds(accessionList).toArray(ArrayUtils.EMPTY_LONG_OBJECT_ARRAY));
}
accessionListRepository.removeAll(accessionList); accessionListRepository.removeAll(accessionList);
accessionListRepository.addAll(accessionList, accessionIds); accessionListRepository.addAll(accessionList, accessionIds);
// Re-index if (elasticUpdater!=null) {
elasticUpdater.updateAll(Accession.class, accessionIds.toArray(ArrayUtils.EMPTY_LONG_OBJECT_ARRAY)); // Re-index
elasticUpdater.updateAll(Accession.class, accessionIds.toArray(ArrayUtils.EMPTY_LONG_OBJECT_ARRAY));
}
} }
@Override @Override
...@@ -144,17 +152,20 @@ public class AccessionListServiceImpl implements AccessionListService { ...@@ -144,17 +152,20 @@ public class AccessionListServiceImpl implements AccessionListService {
public void addToList(AccessionList accessionList, AppliedFilters filters) { public void addToList(AccessionList accessionList, AppliedFilters filters) {
accessionListRepository.addAll(accessionList, filters); accessionListRepository.addAll(accessionList, filters);
// Re-index if (elasticUpdater!=null) {
elasticUpdater.updateAll(Accession.class, accessionListRepository.getAccessionIds(accessionList).toArray(ArrayUtils.EMPTY_LONG_OBJECT_ARRAY)); // Re-index
elasticUpdater.updateAll(Accession.class, accessionListRepository.getAccessionIds(accessionList).toArray(ArrayUtils.EMPTY_LONG_OBJECT_ARRAY));
}
} }
@Override @Override
@PreAuthorize("hasRole('ADMINISTRATOR') or hasPermission(#accessionList, 'DELETE')") @PreAuthorize("hasRole('ADMINISTRATOR') or hasPermission(#accessionList, 'DELETE')")
@Transactional @Transactional
public void delete(AccessionList accessionList) { public void delete(AccessionList accessionList) {
// Re-index if (elasticUpdater!=null) {
elasticUpdater.updateAll(Accession.class, accessionListRepository.getAccessionIds(accessionList).toArray(ArrayUtils.EMPTY_LONG_OBJECT_ARRAY)); // Re-index
elasticUpdater.updateAll(Accession.class, accessionListRepository.getAccessionIds(accessionList).toArray(ArrayUtils.EMPTY_LONG_OBJECT_ARRAY));
}
accessionListRepository.delete(accessionList); accessionListRepository.delete(accessionList);
} }
......
...@@ -25,6 +25,7 @@ import java.util.List; ...@@ -25,6 +25,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.Lock;
import javax.annotation.Resource; import javax.annotation.Resource;
...@@ -58,8 +59,6 @@ import org.springframework.jdbc.core.RowCallbackHandler; ...@@ -58,8 +59,6 @@ import org.springframework.jdbc.core.RowCallbackHandler;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.hazelcast.core.ILock;
@Service @Service
public class ElasticSearchManagementServiceImpl implements ElasticSearchManagementService { public class ElasticSearchManagementServiceImpl implements ElasticSearchManagementService {
...@@ -81,7 +80,7 @@ public class ElasticSearchManagementServiceImpl implements ElasticSearchManageme ...@@ -81,7 +80,7 @@ public class ElasticSearchManagementServiceImpl implements ElasticSearchManageme
private GenesysLowlevelRepository genesysLowlevelRepository; private GenesysLowlevelRepository genesysLowlevelRepository;
@Resource @Resource
private ILock elasticsearchAdminLock; private Lock elasticsearchAdminLock;
private final Map<String, Class<?>> clazzMap; private final Map<String, Class<?>> clazzMap;
......
...@@ -15,10 +15,7 @@ ...@@ -15,10 +15,7 @@
**/ **/
package org.genesys2.server.service.impl; package org.genesys2.server.service.impl;
import static org.elasticsearch.index.query.QueryBuilders.boolQuery; import static org.elasticsearch.index.query.QueryBuilders.*;
import static org.elasticsearch.index.query.QueryBuilders.functionScoreQuery;
import static org.elasticsearch.index.query.QueryBuilders.matchQuery;
import static org.elasticsearch.index.query.QueryBuilders.queryStringQuery;
import static org.elasticsearch.index.query.functionscore.ScoreFunctionBuilders.fieldValueFactorFunction; import static org.elasticsearch.index.query.functionscore.ScoreFunctionBuilders.fieldValueFactorFunction;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -35,7 +32,6 @@ import org.genesys2.server.model.impl.ActivityPost; ...@@ -35,7 +32,6 @@ import org.genesys2.server.model.impl.ActivityPost;
import org.genesys2.server.model.impl.Article; import org.genesys2.server.model.impl.Article;
import org.genesys2.server.model.impl.Country; import org.genesys2.server.model.impl.Country;
import org.genesys2.server.model.impl.FaoInstitute; import org.genesys2.server.model.impl.FaoInstitute;
import org.genesys2.server.mvc.JspHelper;
import org.genesys2.server.persistence.ActivityPostRepository; import org.genesys2.server.persistence.ActivityPostRepository;
import org.genesys2.server.persistence.ArticleRepository; import org.genesys2.server.persistence.ArticleRepository;
import org.genesys2.server.persistence.CountryRepository; import org.genesys2.server.persistence.CountryRepository;
...@@ -86,9 +82,6 @@ public class FullTextSearchServiceImpl implements FullTextSearchService, Initial ...@@ -86,9 +82,6 @@ public class FullTextSearchServiceImpl implements FullTextSearchService, Initial
@Autowired @Autowired
private FaoInstituteRepository instituteRepository; private FaoInstituteRepository instituteRepository;
@Autowired
private JspHelper jspHelper;
@Autowired @Autowired
private ContentService contentService; private ContentService contentService;
...@@ -326,7 +319,7 @@ public class FullTextSearchServiceImpl implements FullTextSearchService, Initial ...@@ -326,7 +319,7 @@ public class FullTextSearchServiceImpl implements FullTextSearchService, Initial
document.setSummary(activityPost.getTitle()); document.setSummary(activityPost.getTitle());
document.setCreatedDate(activityPost.getCreatedDate()); document.setCreatedDate(activit