Skip to content

Commit 8a02305

Browse files
committed
removing white spaces and redundant changes on existing classes
1 parent 7dd5372 commit 8a02305

File tree

19 files changed

+231
-207
lines changed

19 files changed

+231
-207
lines changed

sormas-api/src/main/java/de/symeda/sormas/api/user/UserDto.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public class UserDto extends EntityDto {
6464
public static final String ASSOCIATED_OFFICER = "associatedOfficer";
6565
public static final String LABORATORY = "laboratory";
6666
public static final String POINT_OF_ENTRY = "pointOfEntry";
67-
public static final String LIMITED_DISEASES = "limitedDiseases";
67+
public static final String LIMITED_DISEASES = "limitedDiseases";
6868
public static final String LANGUAGE = "language";
6969
public static final String HAS_CONSENTED_TO_GDPR = "hasConsentedToGdpr";
7070
public static final String EXTERNAL_ID = "externalId";

sormas-api/src/main/java/de/symeda/sormas/api/user/UserFacade.java

Lines changed: 89 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,15 @@
4242
@Remote
4343
public interface UserFacade {
4444

45-
UserDto getByUuid(String uuid);
45+
UserDto getByUuid(String uuid);
4646

47-
UserDto saveUser(@Valid UserDto dto, boolean isUserSettingsUpdate);
47+
UserDto saveUser(@Valid UserDto dto, boolean isUserSettingsUpdate);
4848

49-
UserDto saveUserRolesAndRestrictions(UserDto user, Set<UserRoleReferenceDto> userRoles);
49+
UserDto saveUserRolesAndRestrictions(UserDto user, Set<UserRoleReferenceDto> userRoles);
5050

51-
boolean isLoginUnique(String uuid, String userName);
51+
boolean isLoginUnique(String uuid, String userName);
5252

53-
String resetPassword(String uuid);
53+
String resetPassword(String uuid);
5454

5555
String updateUserPassword(String uuid, String newPassword, String currentPassword);
5656

@@ -62,109 +62,122 @@ public interface UserFacade {
6262

6363
String generatePassword();
6464

65-
List<UserDto> getAllAfter(Date date);
65+
List<UserDto> getAllAfter(Date date);
6666

67-
UserDto getByUserName(String userName);
67+
UserDto getByUserName(String userName);
6868

69-
/**
70-
* @param regionRef reference of the region to be filtered for. When this region is null, it is not filtered in this regard.
71-
* NOTE: some users don't have a region (often users with NATIONAL_USER role, for example). They will
72-
* not be included when a region is specified, but otherwise they will.
73-
* @param limitedDisease can be used to remove users from the return value that are limited to diseases other that limitedDisease.
74-
* @param userRights user rights to be filtered for.
75-
* @return
76-
*/
77-
List<UserReferenceDto> getUsersByRegionAndRights(RegionReferenceDto regionRef, Disease limitedDisease, UserRight... userRights);
69+
/**
70+
*
71+
* @param regionRef
72+
* reference of the region to be filtered for. When this region is null, it is not filtered in this regard.
73+
* NOTE: some users don't have a region (often users with NATIONAL_USER role, for example). They will
74+
* not be included when a region is specified, but otherwise they will.
75+
* @param limitedDisease
76+
* can be used to remove users from the return value that are limited to diseases other that limitedDisease.
77+
* @param userRights
78+
* user rights to be filtered for.
79+
* @return
80+
*/
81+
List<UserReferenceDto> getUsersByRegionAndRights(RegionReferenceDto regionRef, Disease limitedDisease, UserRight... userRights);
7882

79-
List<UserReferenceDto> getUsersWithSuperiorJurisdiction(UserDto user);
83+
List<UserReferenceDto> getUsersWithSuperiorJurisdiction(UserDto user);
8084

81-
List<UserDto> getIndexList(UserCriteria userCriteria, Integer first, Integer max, List<SortProperty> sortProperties);
85+
List<UserDto> getIndexList(UserCriteria userCriteria, Integer first, Integer max, List<SortProperty> sortProperties);
8286

83-
Page<UserDto> getIndexPage(UserCriteria userCriteria, int offset, int size, List<SortProperty> sortProperties);
87+
Page<UserDto> getIndexPage(UserCriteria userCriteria, int offset, int size, List<SortProperty> sortProperties);
8488

85-
long count(UserCriteria userCriteria);
89+
long count(UserCriteria userCriteria);
8690

87-
/**
88-
* @param district reference of the district to be filtered for. When this district is null, it is not filtered in this regard.
89-
* NOTE: some users don't have a district (often users with NATIONAL_USER role, for example). They will
90-
* not be included when a district is specified, but otherwise they will.
91-
* @param limitedDisease can be used to remove users from the return value that are limited to diseases other that limitedDisease.
92-
* @param userRights user rights to be filtered for.
93-
* @return
94-
*/
95-
List<UserReferenceDto> getUserRefsByDistrict(DistrictReferenceDto district, Disease limitedDisease, UserRight... userRights);
91+
/**
92+
*
93+
* @param district
94+
* reference of the district to be filtered for. When this district is null, it is not filtered in this regard.
95+
* NOTE: some users don't have a district (often users with NATIONAL_USER role, for example). They will
96+
* not be included when a district is specified, but otherwise they will.
97+
* @param limitedDisease
98+
* can be used to remove users from the return value that are limited to diseases other that limitedDisease.
99+
* @param userRights
100+
* user rights to be filtered for.
101+
* @return
102+
*/
103+
List<UserReferenceDto> getUserRefsByDistrict(DistrictReferenceDto district, Disease limitedDisease, UserRight... userRights);
96104

97-
/**
98-
* @param district reference of the district to be filtered for. When this district is null, it is not filtered in this regard.
99-
* NOTE: some users don't have a district (often users with NATIONAL_USER role, for example). They will
100-
* * not be included when a district is specified, but otherwise they will.
101-
* @param excludeLimitedDiseaseUsers if true, all users limited to diseases are excluded from the return value.
102-
* @param userRights user rights to be filtered for.
103-
* @return
104-
*/
105-
List<UserReferenceDto> getUserRefsByDistrict(DistrictReferenceDto district, boolean excludeLimitedDiseaseUsers, UserRight... userRights);
105+
/**
106+
*
107+
* @param district
108+
* reference of the district to be filtered for. When this district is null, it is not filtered in this regard.
109+
* NOTE: some users don't have a district (often users with NATIONAL_USER role, for example). They will
110+
* * not be included when a district is specified, but otherwise they will.
111+
* @param excludeLimitedDiseaseUsers
112+
* if true, all users limited to diseases are excluded from the return value.
113+
* @param userRights
114+
* user rights to be filtered for.
115+
* @return
116+
*/
117+
List<UserReferenceDto> getUserRefsByDistrict(DistrictReferenceDto district, boolean excludeLimitedDiseaseUsers, UserRight... userRights);
106118

107-
List<UserReferenceDto> getUserRefsByDistricts(List<DistrictReferenceDto> districts, Disease limitedDisease, UserRight... userRights);
119+
List<UserReferenceDto> getUserRefsByDistricts(List<DistrictReferenceDto> districts, Disease limitedDisease, UserRight... userRights);
108120

109-
List<UserReferenceDto> getUserRefsByInfrastructure(
110-
InfrastructureDataReferenceDto infrastructure,
111-
JurisdictionLevel jurisdictionLevel,
112-
JurisdictionLevel allowedJurisdictionLevel,
113-
Disease limitedDisease,
114-
UserRight... userRights);
121+
List<UserReferenceDto> getUserRefsByInfrastructure(
122+
InfrastructureDataReferenceDto infrastructure,
123+
JurisdictionLevel jurisdictionLevel,
124+
JurisdictionLevel allowedJurisdictionLevel,
125+
Disease limitedDisease,
126+
UserRight... userRights);
115127

116-
List<UserReferenceDto> getAllUserRefs(boolean includeInactive);
128+
List<UserReferenceDto> getAllUserRefs(boolean includeInactive);
117129

118-
List<UserDto> getUsersByAssociatedOfficer(UserReferenceDto associatedOfficer, UserRight... userRights);
130+
List<UserDto> getUsersByAssociatedOfficer(UserReferenceDto associatedOfficer, UserRight... userRights);
119131

120-
List<String> getAllUuids();
132+
List<String> getAllUuids();
121133

122-
List<UserDto> getByUuids(List<String> uuids);
134+
List<UserDto> getByUuids(List<String> uuids);
123135

124-
UserDto getCurrentUser();
136+
UserDto getCurrentUser();
125137

126-
UserReferenceDto getCurrentUserAsReference();
138+
UserReferenceDto getCurrentUserAsReference();
127139

128-
Set<UserRight> getValidLoginRights(String userName, String password);
140+
Set<UserRight> getValidLoginRights(String userName, String password);
129141

130-
void removeUserAsSurveillanceAndContactOfficer(String userUuid);
142+
void removeUserAsSurveillanceAndContactOfficer(String userUuid);
131143

132-
UserSyncResult syncUser(String userUuid);
144+
UserSyncResult syncUser(String userUuid);
133145

134-
List<UserDto> getUsersWithDefaultPassword();
146+
List<UserDto> getUsersWithDefaultPassword();
135147

136-
List<ProcessedEntity> enableUsers(List<String> userUuids);
148+
List<ProcessedEntity> enableUsers(List<String> userUuids);
137149

138-
List<ProcessedEntity> disableUsers(List<String> userUuids);
150+
List<ProcessedEntity> disableUsers(List<String> userUuids);
139151

140-
List<UserReferenceDto> getUsersHavingCaseInJurisdiction(CaseReferenceDto caseReferenceDto);
152+
List<UserReferenceDto> getUsersHavingCaseInJurisdiction(CaseReferenceDto caseReferenceDto);
141153

142-
List<UserReferenceDto> getUsersHavingContactInJurisdiction(ContactReferenceDto contactReferenceDto);
154+
List<UserReferenceDto> getUsersHavingContactInJurisdiction(ContactReferenceDto contactReferenceDto);
143155

144-
List<UserReferenceDto> getUsersHavingEventInJurisdiction(EventReferenceDto event);
156+
List<UserReferenceDto> getUsersHavingEventInJurisdiction(EventReferenceDto event);
145157

146-
List<UserReferenceDto> getUsersHavingTravelEntryInJurisdiction(TravelEntryReferenceDto travelEntryReferenceDto);
158+
List<UserReferenceDto> getUsersHavingTravelEntryInJurisdiction(TravelEntryReferenceDto travelEntryReferenceDto);
147159

148-
List<UserReferenceDto> getUsersHavingEnvironmentInJurisdiction(EnvironmentReferenceDto environmentReferenceDto);
160+
List<UserReferenceDto> getUsersHavingEnvironmentInJurisdiction(EnvironmentReferenceDto environmentReferenceDto);
149161

150-
List<UserReferenceWithTaskNumbersDto> getAssignableUsersWithTaskNumbers(@NotNull TaskContextIndexCriteria taskContextIndexCriteria);
162+
List<UserReferenceWithTaskNumbersDto> getAssignableUsersWithTaskNumbers(@NotNull TaskContextIndexCriteria taskContextIndexCriteria);
151163

152-
Set<UserRoleDto> getUserRoles(UserDto user);
164+
Set<UserRoleDto> getUserRoles(UserDto user);
153165

154-
long getUserCountHavingRole(UserRoleReferenceDto userRoleRef);
166+
long getUserCountHavingRole(UserRoleReferenceDto userRoleRef);
155167

156-
List<UserReferenceDto> getUsersHavingOnlyRole(UserRoleReferenceDto userRoleRef);
168+
List<UserReferenceDto> getUsersHavingOnlyRole(UserRoleReferenceDto userRoleRef);
157169

158-
/**
159-
* Retrieves the user rights of the user specified by the passed UUID, or those of the current user if no UUID is specified.
160-
* Requesting the user rights of another user without the rights to view users and user roles results in an AccessDeniedException.
161-
*
162-
* @param userUuid The UUID of the user to request the user rights for
163-
* @return A set containing the user rights associated to all user roles assigned to the user
164-
*/
165-
List<UserRight> getUserRights(String userUuid);
170+
/**
171+
* Retrieves the user rights of the user specified by the passed UUID, or those of the current user if no UUID is specified.
172+
* Requesting the user rights of another user without the rights to view users and user roles results in an AccessDeniedException.
173+
*
174+
* @param userUuid
175+
* The UUID of the user to request the user rights for
176+
* @return A set containing the user rights associated to all user roles assigned to the user
177+
*/
178+
List<UserRight> getUserRights(String userUuid);
166179

167-
void syncUsersFromAuthenticationProvider();
180+
void syncUsersFromAuthenticationProvider();
168181

169-
boolean isSyncEnabled();
182+
boolean isSyncEnabled();
170183
}

0 commit comments

Comments
 (0)