restore pretty printing support, fix client update due to detect changes error.
This commit is contained in:
+2
-3
@@ -3,7 +3,6 @@ package org.mifosplatform.commands.service;
|
||||
import org.mifosplatform.infrastructure.core.api.PortfolioApiDataConversionService;
|
||||
import org.mifosplatform.infrastructure.core.serialization.CommandSerializer;
|
||||
import org.mifosplatform.infrastructure.core.serialization.DefaultToApiJsonSerializer;
|
||||
import org.mifosplatform.infrastructure.dataqueries.service.ReadWriteNonCoreDataServiceImpl;
|
||||
import org.mifosplatform.portfolio.client.command.ClientCommand;
|
||||
import org.mifosplatform.portfolio.client.data.ClientData;
|
||||
import org.mifosplatform.portfolio.client.service.ClientReadPlatformService;
|
||||
@@ -16,7 +15,7 @@ import org.springframework.stereotype.Service;
|
||||
public class ChangeDetectionServiceJdbc implements ChangeDetectionService {
|
||||
|
||||
private final static Logger logger = LoggerFactory.getLogger(ChangeDetectionServiceJdbc.class);
|
||||
|
||||
|
||||
private final PortfolioApiDataConversionService apiDataConversionService;
|
||||
private final ClientReadPlatformService clientReadPlatformService;
|
||||
private final CommandSerializer commandSerializerService;
|
||||
@@ -34,7 +33,7 @@ public class ChangeDetectionServiceJdbc implements ChangeDetectionService {
|
||||
|
||||
@Override
|
||||
public String detectChangesOnUpdate(final String resourceName, final Long resourceId, final String commandSerializedAsJson) {
|
||||
logger.info(resourceName + ": ID: " + resourceId + " JSON: " + commandSerializedAsJson);
|
||||
logger.info(resourceName + ": ID: " + resourceId + " JSON: " + commandSerializedAsJson);
|
||||
String changesOnlyJson = "";
|
||||
|
||||
if ("clients".equalsIgnoreCase(resourceName)) {
|
||||
|
||||
+1
-1
@@ -171,7 +171,7 @@ public class PortfolioApiDataConversionServiceImpl implements PortfolioApiDataCo
|
||||
final String baseExternalId = helper.extractStringNamed(externalIdParamName, baseElement, ignoreParameters);
|
||||
final String workingExternalId = helper.extractStringNamed(externalIdParamName, workingElement, ignoreParameters);
|
||||
if (differenceExists(baseExternalId, workingExternalId)) {
|
||||
firstname = workingExternalId;
|
||||
externalId = workingExternalId;
|
||||
parametersPassedInRequest.add(externalIdParamName);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -16,13 +16,13 @@ import com.google.gson.Gson;
|
||||
public final class DefaultToApiJsonSerializer<T> implements ToApiJsonSerializer<T> {
|
||||
|
||||
private final ExcludeNothingWithPrettyPrintingOffJsonSerializerGoogleGson excludeNothingWithPrettyPrintingOff;
|
||||
private final ExcludeNothingWithPrettyPrintingOffJsonSerializerGoogleGson excludeNothingWithPrettyPrintingOn;
|
||||
private final ExcludeNothingWithPrettyPrintingOnJsonSerializerGoogleGson excludeNothingWithPrettyPrintingOn;
|
||||
private final GoogleGsonSerializerHelper helper;
|
||||
|
||||
@Autowired
|
||||
public DefaultToApiJsonSerializer(
|
||||
final ExcludeNothingWithPrettyPrintingOffJsonSerializerGoogleGson excludeNothingWithPrettyPrintingOff,
|
||||
final ExcludeNothingWithPrettyPrintingOffJsonSerializerGoogleGson excludeNothingWithPrettyPrintingOn,
|
||||
final ExcludeNothingWithPrettyPrintingOnJsonSerializerGoogleGson excludeNothingWithPrettyPrintingOn,
|
||||
final GoogleGsonSerializerHelper helper) {
|
||||
this.excludeNothingWithPrettyPrintingOff = excludeNothingWithPrettyPrintingOff;
|
||||
this.excludeNothingWithPrettyPrintingOn = excludeNothingWithPrettyPrintingOn;
|
||||
|
||||
Reference in New Issue
Block a user