Commit b47d4833 authored by Enriko Käsper's avatar Enriko Käsper
Browse files

Merge branch 'develop' into 'master'

Release: merge 'develop' into 'master' created by Enriko Käsper

See merge request teis/files-service!14
parents c19a7cbe cc049a44
theGroup=ee.sm.ti.teis
theVersion=0.7.0
theVersion=1.0.0
pluginVersion=1.0.0
commonsVersion=1.0.0
commonApiGatewayVersion=0.25.0
commonsVersion=1.1.0
commonApiGatewayVersion=1.0.0
mapstructVersion=1.3.0.Final
querydslVersion=4.1.3
......@@ -60,6 +60,11 @@ public class FileReferenceBusinessService {
return composeService.toDtoList(entities, requestMetaDTO);
}
public List<FileReferenceDto> getFilesTestMetadata(UUID objectId, RequestMetaDTO requestMetaDTO) {
List<FileReferenceEntity> entities = dataService.getByObjectId(objectId);
return composeService.toDtoList(entities, requestMetaDTO);
}
public List<FileReferenceDto> getFilesMetadataByObjectIdAndObjectType(UUID objectId, String objectType, RequestMetaDTO requestMetaDTO) {
List<FileReferenceEntity> entities = dataService.getCurrentByObjectTypeAndObjectId(objectId, objectType);
return composeService.toDtoList(entities, requestMetaDTO);
......
......@@ -64,6 +64,10 @@ public class FileReferenceDataService {
return repository.findCurrentByObjectId(objectId);
}
public List<FileReferenceEntity> getByObjectId(UUID objectId) {
return repository.findByObjectId(objectId);
}
public List<FileReferenceEntity> getActiveAndPendingByObjectId(UUID objectId) {
return repository.findPendingAndActiveByObjectId(objectId);
}
......
......@@ -24,6 +24,8 @@ public interface FileReferenceRepository extends JpaRepository<FileReferenceEnti
List<FileReferenceEntity> findByObjectIdAndObjectStatusAndFileStatus(UUID objectId, ObjectStatus objectStatus,
FileStatusType fileStatusType);
List<FileReferenceEntity> findByObjectId(UUID objectId);
List<FileReferenceEntity> findByObjectIdAndObjectStatusAndObjectType(UUID objectId, ObjectStatus objectStatus,
String objectType);
......
spring:
datasource:
#TODO: after template is done, remove values
url: jdbc:postgresql://localhost:5432/files_service
username: teisdb_owner
password: teisdb_owner_pwd
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment