Skip to content

Commit 7d5d441

Browse files
committed
FINERACT-2421: Refractor - If Else simplification and Lombok usage(Phase 9)
1 parent 6269cbb commit 7d5d441

File tree

12 files changed

+88
-454
lines changed

12 files changed

+88
-454
lines changed

fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/api/ImagesApiResource.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public Response retrieveImage(@PathParam("entity") final String entityName, @Pat
138138
// Else return response with Base64 encoded
139139
// TODO: Need a better way of determining image type
140140
String imageDataURISuffix = ContentRepositoryUtils.ImageDataURIsuffix.JPEG.getValue();
141-
if (StringUtils.endsWith(imageData.name(), ContentRepositoryUtils.ImageFileExtension.GIF.getValue())) {
141+
if (StringUtils.endsWith(imageData.name(), ImageFileExtension.GIF.getValue())) {
142142
imageDataURISuffix = ContentRepositoryUtils.ImageDataURIsuffix.GIF.getValue();
143143
} else if (StringUtils.endsWith(imageData.name(), ContentRepositoryUtils.ImageFileExtension.PNG.getValue())) {
144144
imageDataURISuffix = ContentRepositoryUtils.ImageDataURIsuffix.PNG.getValue();

fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/command/DocumentCommand.java

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
package org.apache.fineract.infrastructure.documentmanagement.command;
2020

2121
import java.util.Set;
22+
import lombok.Setter;
2223

2324
/**
2425
* Immutable command for creating or updating details of a client identifier.
@@ -31,10 +32,15 @@ public class DocumentCommand {
3132
private final String name;
3233
private final String description;
3334

35+
@Setter
3436
private String fileName;
37+
@Setter
3538
private Long size;
39+
@Setter
3640
private String type;
41+
@Setter
3742
private String location;
43+
@Setter
3844
private Integer storageType;
3945

4046
private final Set<String> modifiedParameters;
@@ -93,30 +99,10 @@ public Set<String> getModifiedParameters() {
9399
return this.modifiedParameters;
94100
}
95101

96-
public void setFileName(final String fileName) {
97-
this.fileName = fileName;
98-
}
99-
100-
public void setSize(final Long size) {
101-
this.size = size;
102-
}
103-
104-
public void setType(final String type) {
105-
this.type = type;
106-
}
107-
108-
public void setLocation(final String location) {
109-
this.location = location;
110-
}
111-
112102
public Integer getStorageType() {
113103
return this.storageType;
114104
}
115105

116-
public void setStorageType(final Integer storageType) {
117-
this.storageType = storageType;
118-
}
119-
120106
public boolean isNameChanged() {
121107
return this.modifiedParameters.contains("name");
122108
}

0 commit comments

Comments
 (0)