Commit 6c717f55 authored by dietricf's avatar dietricf
Browse files

Merge branch 'DEVELOP' of...

Merge branch 'DEVELOP' of ssh://git.eclipse.org:29418/openk-usermodules/org.eclipse.openk-usermodules.gridFailureInformation.backend into SIT-66_Logout
parents 0c5f7c46 1b7f8822
......@@ -3,11 +3,13 @@ package org.eclipse.openk.gridfailureinformation;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
@SpringBootApplication
@EnableSwagger2
@EnableFeignClients
@EnableJpaAuditing(modifyOnCreate=true, auditorAwareRef="auditProvider")
public class GridFailureInformationApplication {
......
package org.eclipse.openk.gridfailureinformation.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.domain.AuditorAware;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContext;
import org.springframework.security.core.context.SecurityContextHolder;
import java.util.Optional;
@Configuration
public class JpaAuditConfig {
@Bean
public AuditorAware<String> auditProvider() {
return () -> Optional.ofNullable(SecurityContextHolder.getContext())
.map(SecurityContext::getAuthentication)
.filter(Authentication::isAuthenticated)
.map(Authentication::getName);
}
}
\ No newline at end of file
......@@ -76,7 +76,7 @@ public class JwtAuthenticationTokenFilter extends OncePerRequestFilter {
token.getRealmAccess().getRoles().stream()
.forEach( x -> authorities.add(new SimpleGrantedAuthority("ROLE_"+x.toUpperCase())));
UsernamePasswordAuthenticationToken auth = new UsernamePasswordAuthenticationToken(token.getName(), null, authorities);
UsernamePasswordAuthenticationToken auth = new UsernamePasswordAuthenticationToken(token.getPreferredUsername(), null, authorities);
auth.setDetails(bearerTkn);
context.setAuthentication(auth);
......
......@@ -15,6 +15,11 @@
package org.eclipse.openk.gridfailureinformation.model;
import lombok.Data;
import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedBy;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import javax.persistence.*;
import java.util.Date;
......@@ -22,6 +27,7 @@ import java.util.UUID;
@Data
@Entity
@EntityListeners(AuditingEntityListener.class)
public class TblFailureInformation {
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "tbl_failure_information_id_seq")
......@@ -47,6 +53,22 @@ public class TblFailureInformation {
private String stationCoords;
private String radius;
@CreatedDate
@Column(name = "create_date")
private Date createDate;
@CreatedBy
@Column(name = "create_user")
private String createUser;
@LastModifiedDate
@Column(name = "mod_date")
private Date modDate;
@LastModifiedBy
@Column(name = "mod_user")
private String modUser;
@ManyToOne
@JoinColumn( name = "fk_ref_failure_classification")
private RefFailureClassification refFailureClassification;
......
......@@ -50,9 +50,6 @@ public class FailureInformationService {
@Autowired
private StatusRepository statusRepository;
@Autowired
private FailureInformationMapper gridFailureInformationMapper;
public FailureInformationDto findFailureInformation( UUID uuid ) {
return failureInformationMapper.toFailureInformationDto(
failureInformationRepository.findByUuid( uuid )
......@@ -64,10 +61,10 @@ public class FailureInformationService {
}
public FailureInformationDto insertFailureInfo(FailureInformationDto failureInfoDto){
TblFailureInformation tblFailureInformationToSave = gridFailureInformationMapper.toTblFailureInformation(failureInfoDto);
TblFailureInformation tblFailureInformationToSave = failureInformationMapper.toTblFailureInformation(failureInfoDto);
tblFailureInformationToSave.setUuid(UUID.randomUUID());
setFromGridFailureInformationDto(tblFailureInformationToSave, failureInfoDto);
return gridFailureInformationMapper.toFailureInformationDto(failureInformationRepository.save(tblFailureInformationToSave));
return failureInformationMapper.toFailureInformationDto(failureInformationRepository.save(tblFailureInformationToSave));
}
......@@ -76,12 +73,12 @@ public class FailureInformationService {
TblFailureInformation tblFailureInformation = failureInformationRepository.findByUuid(failureInfoDto.getUuid())
.orElseThrow(() -> new NotFoundException("failure.info.uuid.not.existing"));
TblFailureInformation tblFailureInformationToSave = gridFailureInformationMapper.toTblFailureInformation(failureInfoDto);
TblFailureInformation tblFailureInformationToSave = failureInformationMapper.toTblFailureInformation(failureInfoDto);
tblFailureInformationToSave.setId(tblFailureInformation.getId());
setFromGridFailureInformationDto(tblFailureInformationToSave, failureInfoDto);
TblFailureInformation savedFailureInformation = failureInformationRepository.save(tblFailureInformationToSave);
return gridFailureInformationMapper.toFailureInformationDto(savedFailureInformation);
return failureInformationMapper.toFailureInformationDto(savedFailureInformation);
}
private void setFromGridFailureInformationDto( TblFailureInformation destTblFailureInformation, FailureInformationDto sourceDto ) {
......
......@@ -51,6 +51,14 @@ public class FailureInformationDto implements Serializable {
private String stationCoords;
private String radius;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
private Date createDate;
private String createUser;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
private Date modDate;
private String modUser;
private UUID failureClassificationId;
private String failureClassification;
......
-----------------------------------------------------------------------------------
-- *******************************************************************************
-- * Copyright (c) 2019 Contributors to the Eclipse Foundation
-- *
-- * See the NOTICE file(s) distributed with this work for additional
-- * information regarding copyright ownership.
-- *
-- * This program and the accompanying materials are made available under the
-- * terms of the Eclipse Public License v. 2.0 which is available at
-- * http://www.eclipse.org/legal/epl-2.0.
-- *
-- * SPDX-License-Identifier: EPL-2.0
-- *******************************************************************************
-----------------------------------------------------------------------------------
-- CREATE ROLE GFI_SERVICE LOGIN
-- NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION;
-- ALTER ROLE GFI_SERVICE with password 'gfi_service';
DROP TABLE IF EXISTS public.VERSION CASCADE;
DROP TABLE IF EXISTS public.TBL_FAILURE_INFORMATION CASCADE;
DROP SEQUENCE IF EXISTS public.TBL_FAILURE_INFORMATION_ID_SEQ;
DROP TABLE IF EXISTS public.REF_STATUS CASCADE;
DROP SEQUENCE IF EXISTS public.REF_STATUS_ID_SEQ;
DROP TABLE IF EXISTS public.REF_BRANCH CASCADE;
DROP SEQUENCE IF EXISTS public.REF_BRANCH_ID_SEQ;
DROP TABLE IF EXISTS public.REF_FAILURE_CLASSIFICATION CASCADE;
DROP SEQUENCE IF EXISTS public.REF_FAILURE_CLASSIFICATION_ID_SEQ;
DROP TABLE IF EXISTS public.REF_FAILURE_TYPE CASCADE;
DROP SEQUENCE IF EXISTS public.REF_FAILURE_TYPE_ID_SEQ;
-- ---------------------------------------------
-- TABLE VERSION
-- ---------------------------------------------
CREATE TABLE public.VERSION
(
ID integer NOT NULL,
VERSION character varying(50) NOT NULL,
CONSTRAINT REF_VERSION_PKEY PRIMARY KEY (id)
);
ALTER TABLE public.VERSION
OWNER TO GFI_SERVICE;
GRANT ALL ON TABLE public.VERSION TO GFI_SERVICE;
INSERT INTO public.VERSION (ID, VERSION) VALUES ( 1, '00-DEV' );
-- ---------------------------------------------
-- TABLE REF_STATUS
-- ---------------------------------------------
CREATE SEQUENCE public.ref_status_id_seq
INCREMENT 1
MINVALUE 1
MAXVALUE 9223372036854775807
START 1
CACHE 1;
ALTER TABLE public.ref_status_id_seq
OWNER TO GFI_SERVICE;
CREATE TABLE public.REF_STATUS
(
ID integer NOT NULL DEFAULT nextval('REF_STATUS_ID_SEQ'::regclass),
UUID uuid NOT NULL,
STATUS character varying(50) NOT NULL,
IS_INTERNAL boolean NOT NULL,
IS_EXTERNAL boolean NOT NULL,
CONSTRAINT REF_STATUS_PKEY PRIMARY KEY (id)
);
ALTER TABLE public.REF_STATUS
OWNER TO GFI_SERVICE;
GRANT ALL ON TABLE public.REF_STATUS TO GFI_SERVICE;
INSERT INTO public.REF_STATUS (UUID, STATUS, IS_INTERNAL, IS_EXTERNAL) VALUES ( 'acabc8f6-2cf3-485a-a4f8-68d178c7df45', 'neu', TRUE, TRUE );
INSERT INTO public.REF_STATUS (UUID, STATUS, IS_INTERNAL, IS_EXTERNAL) VALUES ( 'a6cda99d-9f41-4637-9d9b-04f95ea352ec', 'bestätigt', TRUE, TRUE );
INSERT INTO public.REF_STATUS (UUID, STATUS, IS_INTERNAL, IS_EXTERNAL) VALUES ( '23fc0254-cc3d-4371-97ad-54ef733008ae', 'aktiv', TRUE, FALSE );
INSERT INTO public.REF_STATUS (UUID, STATUS, IS_INTERNAL, IS_EXTERNAL) VALUES ( '9374219a-7419-4b72-899d-cd0576d85cdb', 'geschlossen', TRUE, TRUE );
-- ---------------------------------------------
-- TABLE REF_FAILURE_CLASSIFICATION
-- ---------------------------------------------
CREATE SEQUENCE public.ref_failure_classification_id_seq
INCREMENT 1
MINVALUE 1
MAXVALUE 9223372036854775807
START 1
CACHE 1;
ALTER TABLE public.ref_failure_classification_id_seq
OWNER TO GFI_SERVICE;
CREATE TABLE public.REF_FAILURE_CLASSIFICATION
(
ID integer NOT NULL DEFAULT nextval('REF_FAILURE_CLASSIFICATION_ID_SEQ'::regclass),
UUID uuid NOT NULL,
CLASSIFICATION character varying(50) NOT NULL,
DESCRIPTION character varying(255) NULL,
CONSTRAINT REF_FAILURE_CLASSIFICATION_PKEY PRIMARY KEY (id)
);
ALTER TABLE public.REF_FAILURE_CLASSIFICATION
OWNER TO GFI_SERVICE;
GRANT ALL ON TABLE public.REF_FAILURE_CLASSIFICATION TO GFI_SERVICE;
INSERT INTO public.REF_FAILURE_CLASSIFICATION (UUID, CLASSIFICATION, DESCRIPTION) VALUES ( '9255fb79-c57a-4448-a69c-5d57994f0c91', 'Störung', NULL );
INSERT INTO public.REF_FAILURE_CLASSIFICATION (UUID, CLASSIFICATION, DESCRIPTION) VALUES ( '8db5a71b-9676-45ca-ae1d-161c6a2dc305', 'Ereignis', NULL );
INSERT INTO public.REF_FAILURE_CLASSIFICATION (UUID, CLASSIFICATION, DESCRIPTION) VALUES ( '8ec1e144-5230-4d43-a3df-f62dd64bb855', 'geplante Maßnahme', NULL );
-- ---------------------------------------------
-- TABLE REF_FAILURE_TYPE
-- ---------------------------------------------
CREATE SEQUENCE public.ref_failure_type_id_seq
INCREMENT 1
MINVALUE 1
MAXVALUE 9223372036854775807
START 1
CACHE 1;
ALTER TABLE public.ref_failure_type_id_seq
OWNER TO GFI_SERVICE;
CREATE TABLE public.REF_FAILURE_TYPE
(
ID integer NOT NULL DEFAULT nextval('REF_FAILURE_TYPE_ID_SEQ'::regclass),
UUID uuid NOT NULL,
TYPE character varying(50) NOT NULL,
DESCRIPTION character varying(255) NULL,
CONSTRAINT REF_FAILURE_TYPE_PKEY PRIMARY KEY (id)
);
ALTER TABLE public.REF_FAILURE_TYPE
OWNER TO GFI_SERVICE;
GRANT ALL ON TABLE public.REF_FAILURE_TYPE TO GFI_SERVICE;
INSERT INTO public.REF_FAILURE_TYPE (UUID, TYPE, DESCRIPTION) VALUES ( '44a2aaed-8910-4116-b0c4-0855f8d3c28d', 'Information', NULL );
INSERT INTO public.REF_FAILURE_TYPE (UUID, TYPE, DESCRIPTION) VALUES ( '94e880c4-3127-47d5-aaee-5f778462ab0c', 'zu veröffentliche Meldung', 'Standardwert' );
INSERT INTO public.REF_FAILURE_TYPE (UUID, TYPE, DESCRIPTION) VALUES ( '658245bd-bdc4-47dd-bc90-0336f9471410', 'unterlagerte Störung', 'Nicht zu veröffentlichen' );
-- ---------------------------------------------
-- TABLE REF_BRANCH
-- ---------------------------------------------
CREATE SEQUENCE public.ref_branch_id_seq
INCREMENT 1
MINVALUE 1
MAXVALUE 9223372036854775807
START 1
CACHE 1;
ALTER TABLE public.ref_branch_id_seq
OWNER TO GFI_SERVICE;
CREATE TABLE public.REF_BRANCH
(
ID integer NOT NULL DEFAULT nextval('REF_BRANCH_ID_SEQ'::regclass),
UUID uuid NOT NULL,
NAME character varying(50) NOT NULL,
DESCRIPTION character varying(255),
COLOR_CODE character varying(20),
CONSTRAINT REF_BRANCH_PKEY PRIMARY KEY (id)
);
ALTER TABLE public.REF_BRANCH
OWNER TO GFI_SERVICE;
GRANT ALL ON TABLE public.REF_BRANCH TO GFI_SERVICE;
INSERT INTO public.ref_branch(uuid, name, description, color_code) VALUES ('535b4beb-9b17-4247-bb8b-26bd01b48f9a', 'S', 'Strom', '#fc6042');
INSERT INTO public.ref_branch(uuid, name, description, color_code) VALUES ('d41f54e5-c4df-440e-b334-40e8f3a6854a', 'G', 'Gas', '#fdea64');
INSERT INTO public.ref_branch(uuid, name, description, color_code) VALUES ('62c6d361-96a0-41cc-bda1-4e58ad16f21a', 'F', 'Fernwärme', '#2cc990');
INSERT INTO public.ref_branch(uuid, name, description, color_code) VALUES ('d8d93e0e-5c8c-4ab8-9625-f820de55ee7c', 'W', 'Wasser', '#2c82c9');
-- ---------------------------------------------
-- TABLE TBL_FAILURE_INFORMATION
-- ---------------------------------------------
CREATE SEQUENCE public.tbl_failure_information_id_seq
INCREMENT 1
MINVALUE 1
MAXVALUE 9223372036854775807
START 1
CACHE 1;
ALTER TABLE public.tbl_failure_information_id_seq
OWNER TO GFI_SERVICE;
CREATE TABLE public.TBL_FAILURE_INFORMATION
(
ID integer NOT NULL DEFAULT nextval('TBL_FAILURE_INFORMATION_ID_SEQ'::regclass),
UUID uuid NOT NULL,
FK_REF_FAILURE_CLASSIFICATION integer,
FK_REF_FAILURE_TYPE integer,
RESPONSIBILITY character varying(255),
INTERN_EXTERN character varying(1),
FK_REF_STATUS_INTERN integer NOT NULL,
FK_REF_STATUS_EXTERN integer NOT NULL,
FK_REF_BRANCH integer NOT NULL,
VOLTAGE_LEVEL character varying(2),
PRESSURE_LEVEL character varying(2),
FAILURE_BEGIN timestamp NOT NULL,
FAILURE_END_PLANNED timestamp,
FAILURE_END_RESUPPLIED timestamp,
PROBABLE_REASON character varying(1024),
INTERNAL_REMARK character varying(1024),
POSTCODE character varying(30),
CITY character varying(255),
DISTRICT character varying(255),
STREET character varying(255),
HOUSENUMBER character varying(30),
STATION_DESCRIPTION character varying(255),
STATION_COORDS character varying(255),
RADIUS character varying(100),
CREATE_DATE timestamp without time zone NOT NULL,
CREATE_USER character varying(100) NOT NULL,
MOD_DATE timestamp without time zone NOT NULL,
MOD_USER character varying(100),
CONSTRAINT TBL_FAILURE_INFORMATION_PKEY PRIMARY KEY (id)
);
ALTER TABLE public.TBL_FAILURE_INFORMATION
OWNER TO GFI_SERVICE;
GRANT ALL ON TABLE public.TBL_FAILURE_INFORMATION TO GFI_SERVICE;
INSERT INTO public.tbl_failure_information(UUID, FK_REF_FAILURE_CLASSIFICATION, FK_REF_FAILURE_TYPE, RESPONSIBILITY, INTERN_EXTERN, FK_REF_STATUS_INTERN, FK_REF_STATUS_EXTERN, FK_REF_BRANCH, VOLTAGE_LEVEL, PRESSURE_LEVEL, FAILURE_BEGIN, FAILURE_END_PLANNED, FAILURE_END_RESUPPLIED, PROBABLE_REASON, INTERNAL_REMARK, POSTCODE, CITY, DISTRICT, STREET, HOUSENUMBER, STATION_DESCRIPTION, STATION_COORDS, RADIUS, CREATE_DATE, CREATE_USER, MOD_DATE, MOD_USER)
VALUES ('6432a9c9-0384-44af-9bb8-34f2878d7b49', 1, 1, 'Rolf Rudis', 'I', 1, 1, 1, 'NS', null, '2021-01-19 00:00:00', '2021-01-22 00:00:00', '2021-01-22 12:00:00', 'Stromausfall durch Bagger', 'Der Bagger grub zu tief', '77654', 'Buddelbrugg', 'Westbezirk', 'Hauptstraße', '5a', 'Trafo 1', '124,2323', '2km', '2020-01-22 15:32:15', 'schmidth', '2020-01-24 08:02:44', 'meyers');
INSERT INTO public.tbl_failure_information(UUID, FK_REF_FAILURE_CLASSIFICATION, FK_REF_FAILURE_TYPE, RESPONSIBILITY, INTERN_EXTERN, FK_REF_STATUS_INTERN, FK_REF_STATUS_EXTERN, FK_REF_BRANCH, VOLTAGE_LEVEL, PRESSURE_LEVEL, FAILURE_BEGIN, FAILURE_END_PLANNED, FAILURE_END_RESUPPLIED, PROBABLE_REASON, INTERNAL_REMARK, POSTCODE, CITY, DISTRICT, STREET, HOUSENUMBER, STATION_DESCRIPTION, STATION_COORDS, RADIUS, CREATE_DATE, CREATE_USER, MOD_DATE, MOD_USER)
VALUES ('37aef635-d0d4-4c47-ac25-c0d16c29e35c', 3, 2, 'Bernd Britzel', 'E', 2, 2, 3, null, 'HD', '2021-05-19 00:00:00', '2021-05-22 00:00:00', '2021-05-22 12:00:00', 'Leck in Gasleitung', 'HD betroffen', '77344', 'Hitzingen', null, 'Ostring', '104', 'ertf', '124,2323', '6km', '2020-02-03 15:15:15', 'schulzek', '2020-02-24 20:08:41', 'muellert');
......@@ -78,6 +78,11 @@ public class MockDataHelper {
dto.setBranch("G");
dto.setBranchColorCode("#fdea64");
dto.setCreateDate(Date.valueOf("2020-05-08"));
dto.setCreateUser("weizenkeimk");
dto.setModDate(Date.valueOf("2020-05-23"));
dto.setModUser("schlonzh");
return dto;
}
......@@ -93,6 +98,11 @@ public class MockDataHelper {
obj.setFailureEndResupplied(Date.valueOf("2022-12-03"));
obj.setProbableReason("Über Kabel gestolpert");
obj.setCreateDate(Date.valueOf("2020-05-08"));
obj.setCreateUser("weizenkeimk");
obj.setModDate(Date.valueOf("2020-05-23"));
obj.setModUser("schlonzh");
obj.setRefStatusIntern(mockRefStatus());
obj.setRefStatusExtern(mockRefStatus());
obj.setRefFailureType(mockRefFailureType());
......@@ -171,179 +181,6 @@ public class MockDataHelper {
return refBranchList;
}
public static FailureTypeDto failureTypeDto() {
FailureTypeDto failureTypeDto1 = new FailureTypeDto();
failureTypeDto1.setUuid(UUID.fromString("44a2aaed-8910-4116-b0c4-0855f8d3c28d"));
failureTypeDto1.setType("Information");
failureTypeDto1.setDescription(null);
return failureTypeDto1;
}
public static FailureTypeDto failureTypeDto2() {
FailureTypeDto failureTypeDto2 = new FailureTypeDto();
failureTypeDto2.setUuid(UUID.fromString("94e880c4-3127-47d5-aaee-5f778462ab0c"));
failureTypeDto2.setType("unterlagerte Störung");
failureTypeDto2.setDescription("Nicht zu veröffentlichen");
return failureTypeDto2;
}
public static List<FailureTypeDto> mockFailureTypeDtoList() {
FailureTypeDto failureTypeDto1 = failureTypeDto();
FailureTypeDto failureTypeDto2 = failureTypeDto2();
List<FailureTypeDto> failureTypeDtoList = new ArrayList<>();
failureTypeDtoList.add(failureTypeDto1);
failureTypeDtoList.add(failureTypeDto2);
return failureTypeDtoList;
}
public static RefFailureType refFailureType() {
RefFailureType refFailureType1 = new RefFailureType();
refFailureType1.setUuid(UUID.fromString("44a2aaed-8910-4116-b0c4-0855f8d3c28d"));
refFailureType1.setType("Andere Information");
refFailureType1.setDescription(null);
return refFailureType1;
}
public static RefFailureType refFailureType2() {
RefFailureType refFailureType2 = new RefFailureType();
refFailureType2.setUuid(UUID.fromString("94e880c4-3127-47d5-aaee-5f778462ab0c"));
refFailureType2.setType("unterlagerte Störung");
refFailureType2.setDescription("Nicht zu veröffentlichen");
return refFailureType2;
}
/*
public static List<RefFailureType> mockRefFailureTypeList() {
RefFailureType refFailureType1 = refFailureType();
RefFailureType refFailureType2 = refFailureType2();
List<RefFailureType> refFailureTypeList = new ArrayList<>();
refFailureTypeList.add(refFailureType1);
refFailureTypeList.add(refFailureType2);
return refFailureTypeList;
}
*/
public static FailureClassificationDto failureClassificationDto() {
FailureClassificationDto failureClassificationDto1 = new FailureClassificationDto();
failureClassificationDto1.setUuid(UUID.fromString("9992aaed-8910-4116-b0c4-0855f8d3c28d"));
failureClassificationDto1.setClassification("Störung");
failureClassificationDto1.setDescription("Störungsbeschreibung");
return failureClassificationDto1;
}
public static FailureClassificationDto failureClassificationDto2() {
FailureClassificationDto failureClassificationDto2 = new FailureClassificationDto();
failureClassificationDto2.setUuid(UUID.fromString("999880c4-3127-47d5-aaee-5f778462ab0c"));
failureClassificationDto2.setClassification("geplante Maßnahme");
failureClassificationDto2.setDescription("Maßnahme, die geplant ist");
return failureClassificationDto2;
}
/*
public static List<FailureClassificationDto> mockFailureClassificationDtoList() {
FailureClassificationDto failureClassificationDto1 = failureClassificationDto();
FailureClassificationDto failureClassificationDto2 = failureClassificationDto2();
List<FailureClassificationDto> failureClassificationDtoList = new ArrayList<>();
failureClassificationDtoList.add(failureClassificationDto1);
failureClassificationDtoList.add(failureClassificationDto2);
return failureClassificationDtoList;
}
*/
public static RefFailureClassification refFailureClassification() {
RefFailureClassification refFailureClassification1 = new RefFailureClassification();
refFailureClassification1.setUuid(UUID.fromString("8882aaed-8910-4116-b0c4-0855f8d3c28d"));
refFailureClassification1.setClassification("Störung");
refFailureClassification1.setDescription(null);
return refFailureClassification1;
}
public static RefFailureClassification refFailureClassification2() {
RefFailureClassification refFailureClassification2 = new RefFailureClassification();
refFailureClassification2.setUuid(UUID.fromString("888880c4-3127-47d5-aaee-5f778462ab0c"));
refFailureClassification2.setClassification("Ereignis");
refFailureClassification2.setDescription("Ereignisbeschreibung");
return refFailureClassification2;
}
/*
public static List<RefFailureClassification> mockRefFailureClassificationList() {
RefFailureClassification refFailureClassification1 = refFailureClassification();
RefFailureClassification refFailureClassification2 = refFailureClassification2();
List<RefFailureClassification> refFailureClassificationList = new ArrayList<>();
refFailureClassificationList.add(refFailureClassification1);
refFailureClassificationList.add(refFailureClassification2);
return refFailureClassificationList;
}
public static StatusDto mockStatusDto() {
StatusDto statusDto = new StatusDto();
statusDto.setUuid(UUID.fromString("51d4327c-594b-11ea-82b4-0242ac130003"));
statusDto.setStatus("neu");
statusDto.setExternal(true);
statusDto.setInternal(true);
return statusDto;
}
public static List<StatusDto> mockStatusDtoList() {
List<StatusDto> statusDtoList = new ArrayList<>();
StatusDto statusDto1 = mockStatusDto();
StatusDto statusDto2 = new StatusDto();
statusDto2.setUuid(UUID.fromString("51d3c6d4-594b-11ea-8e2d-0242ac130003"));
statusDto2.setStatus("aktiv");
statusDto2.setExternal(false);
statusDto2.setInternal(true);
statusDtoList.add(statusDto1);
statusDtoList.add(statusDto2);
return statusDtoList;
}
public static RefStatus mockRefStatus() {
RefStatus refStatus = new RefStatus();
refStatus.setUuid(UUID.fromString("119fe7ae-594e-11ea-82b4-0242ac130003"));
refStatus.setStatus("bestätigt");
refStatus.setExternal(true);
refStatus.setInternal(true);