Skip to content

Commit a35161a

Browse files
committed
java doc generated
1 parent 3cb2d41 commit a35161a

File tree

187 files changed

+18545
-14
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

187 files changed

+18545
-14
lines changed

government-service/pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,12 @@
9797
<version>10.1.7</version>
9898
</dependency>
9999

100+
<dependency>
101+
<groupId>javax.annotation</groupId>
102+
<artifactId>javax.annotation-api</artifactId>
103+
<version>1.3.2</version>
104+
<scope>provided</scope>
105+
</dependency>
100106
</dependencies>
101107

102108
<build>

government-service/src/main/java/com/csaba79coder/bestprotocol/model/government/service/GovernmentService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public class GovernmentService {
3030
@return a list of GovernmentTranslationModel objects
3131
*/
3232
public List<GovernmentTranslationModel> findAllGovernmentsByLangAndGovernmentId(String lang) {
33-
// TODO from Translation creating immediately the Model!
33+
// from Translation creating immediately the Model!
3434
return governmentTranslationRepository.findGovernmentTranslationByLanguageShortName(lang)
3535
.stream()
3636
.map(Mapper::mapGovernmentTranslationToGovernmentAdminModel)

government-service/src/main/java/com/csaba79coder/bestprotocol/util/mapper/Mapper.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ public class Mapper {
2525

2626
private static final ModelMapper modelMapper = new ModelMapper();
2727

28-
// TODO write test!
29-
// TODO implement function for creating new Representative entity from the incoming fields!
30-
// TODO update the api.yaml (e.g. name is prefix, firstname, midname, lastname, suffix) -> so can created English format from it!
28+
// write test!
29+
// implement function for creating new Representative entity from the incoming fields!
30+
// update the api.yaml (e.g. name is prefix, firstname, midname, lastname, suffix) -> so can created English format from it!
3131
// English or Hebrew name can be only created after we have id
3232
// (so when entity saved to db) -> so we need to update the entity after saving it to db regarding the languageShortName!
3333
/*public static Representative mapFieldIntoEntity(String languageShortName, String name, String jobTitle, String government, String secretairat, String address, String phoneNumber, String email, MultipartFile image, String note) {
@@ -79,14 +79,14 @@ public static RepresentativeAdminModel mapRepresentativeEntityToAdminModel(Repre
7979
.availability(Availability.valueOf(entity.getAvailability().name()));
8080
}
8181

82-
// TODO it is not used yet! it will be needed when adding new Representative is implemented
82+
// it is not used yet! it will be needed when adding new Representative is implemented
8383
/*public static Representative mapNewRepresentativeAdminModelToEntity(NewRepresentativeAdminModel model) {
8484
Representative entity = new Representative();
8585
modelMapper.map(model, entity);
8686
return entity;
8787
}*/
8888

89-
// TODO it is not used yet! it will be needed when adding new Government function is implemented
89+
// it is not used yet! it will be needed when adding new Government function is implemented
9090
/*public static GovernmentAdminModel mapGovernmentEntityToAdminModel(Government entity) {
9191
GovernmentAdminModel model = new GovernmentAdminModel();
9292
modelMapper.map(entity, model);

government-service/src/test/java/com/csaba79coder/bestprotocol/util/mapper/MapperTest.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,19 +77,19 @@ void shouldMapGovernmentTranslationToAdminModel(){
7777
void shouldMapGovernmentTranslationToGovernmentTranslationModel(){
7878
// Given
7979
GovernmentTranslation translation = new GovernmentTranslation();
80-
translation.setLanguageShortName("il");
81-
translation.setName("מִשְׂרָד רֹאשׁ הַמֶּמְשָׁלָה");
80+
translation.setLanguageShortName("en");
81+
translation.setName("Ministry of Finance");
8282
GovernmentTranslationModel expectedModel = new GovernmentTranslationModel()
83-
.languageShortName("il")
84-
.name("מִשְׂרָד רֹאשׁ הַמֶּמְשָׁלָה");
83+
.languageShortName("en")
84+
.name("Ministry of Finance");
8585

8686

8787
// When
8888
GovernmentTranslationModel model = Mapper.mapGovernmentTranslationToGovernmentAdminModel(translation);
8989

9090
// Then
91-
then(model.getLanguageShortName()).isEqualTo("il");
92-
then(model.getName()).isEqualTo("מִשְׂרָד רֹאשׁ הַמֶּמְשָׁלָה");
91+
then(model.getLanguageShortName()).isEqualTo("en");
92+
then(model.getName()).isEqualTo("Ministry of Finance");
9393
then(model)
9494
.isNotNull()
9595
.isEqualTo(expectedModel);
@@ -103,12 +103,12 @@ void testMapMenuTranslationEntityToModel(){
103103
MenuTranslation entity = new MenuTranslation();
104104
entity.setLanguageShortName("hu");
105105
entity.setTranslationValue("all");
106-
entity.setTranslationValue("Összes");
106+
entity.setTranslationValue("All");
107107

108108
MenuTranslationModel expectedModel = new MenuTranslationModel()
109109
.languageShortName("hu")
110110
.translationKey("all")
111-
.translationValue("Összes");
111+
.translationValue("All");
112112

113113
// When
114114
MenuTranslationModel model = Mapper.mapMenuTranslationEntityToModel(entity);

0 commit comments

Comments
 (0)