Skip to content

Commit

Permalink
final clean up after update
Browse files Browse the repository at this point in the history
  • Loading branch information
daveotengo committed Nov 1, 2024
1 parent e393aad commit a58443b
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,43 +171,6 @@ public boolean isPropertyValueTrue(FeatureType featureType, FeatureTypeProperty
return result;
}

public String getStringPropertyValue(FeatureType featureType, FeatureTypeProperty property) {
if (!featureType.getSupportedProperties().contains(property)) {
throw new IllegalArgumentException("Feature type " + featureType + " does not support property " + property + ".");
}

if (!String.class.isAssignableFrom(property.getReturnType())) {
throw new IllegalArgumentException(
"Feature type property " + property + " does not have specified return type " + String.class.getSimpleName() + ".");
}

Map<FeatureTypeProperty, Object> propertyObjectMap;
try {
QueryBuilder builder = queryBuilder();
Where where = builder.where();
where.eq(FeatureConfiguration.FEATURE_TYPE, featureType);
builder.selectColumns(FeatureConfiguration.PROPERTIES);

FeatureConfiguration featureConfiguration = (FeatureConfiguration) builder.queryForFirst();

if (featureConfiguration != null && featureConfiguration.getPropertiesJson() != null) {
propertyObjectMap = featureConfiguration.getPropertiesMap();
} else {
return (String) featureType.getSupportedPropertyDefaults().get(property);
}

} catch (SQLException e) {
Log.e(getTableName(), "Could not perform getStringPropertyValue");
throw new RuntimeException(e);
}

if (propertyObjectMap != null && propertyObjectMap.containsKey(property)) {
return (String) propertyObjectMap.get(property);
} else {
return null;
}
}

public boolean isAnySurveillanceEnabled() {
return !isFeatureDisabled(FeatureType.CASE_SURVEILANCE)
|| !isFeatureDisabled(FeatureType.EVENT_SURVEILLANCE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ public static UserReferenceDto toReferenceDto(User ado) {
}

public static Call<String> saveNewPassword(String uuid, String newPassword) throws NoConnectionException {
System.out.println(uuid+" pw: "+newPassword);
return RetroProvider.getUserFacade().saveNewPassword(new UserPasswordChangeDto(uuid,newPassword));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import java.util.List;

import de.symeda.sormas.api.Language;
import de.symeda.sormas.api.feature.FeatureTypeProperty;
import de.symeda.sormas.api.i18n.I18nProperties;
import de.symeda.sormas.api.utils.InfoProvider;
import de.symeda.sormas.app.BaseLandingFragment;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
import de.symeda.sormas.backend.user.event.SyncUsersFromProviderEvent;
import de.symeda.sormas.backend.user.event.UserCreateEvent;
import de.symeda.sormas.backend.user.event.UserUpdateEvent;
import de.symeda.sormas.backend.user.event.PasswordChangeEvent;

/**
* @author Alex Vidrean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import java.util.Date;
import java.util.List;

import javax.validation.Valid;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -595,5 +595,4 @@ public CommitDiscardWrapperComponent<UpdatePasswordForm> getUpdatePasswordCompon

return component;
}

}

0 comments on commit a58443b

Please sign in to comment.