Debug.logError(e, "Error running serviceName persistContentAndAssoc", module);
return ServiceUtil.returnError(UtilProperties.getMessage(CoreEvents.err_resource, "ContentNoContentFound", UtilMisc.toMap("contentId", contentId), locale));
}
}
ModelService modelService = null;
try {
modelService = dispatcher.getDispatchContext().getModelService("persistContentAndAssoc");
} catch (GenericServiceException e) {
Debug.logError("Error getting model service for serviceName, 'persistContentAndAssoc'. " + e.toString(), module);
return ServiceUtil.returnError(UtilProperties.getMessage(CoreEvents.err_resource, "coreEvents.error_modelservice_for_srv_name", locale));
}
Map<String, Object> persistMap = modelService.makeValid(context, ModelService.IN_PARAM);
persistMap.put("userLogin", userLogin);
try {
Map<String, Object> persistContentResult = dispatcher.runSync("persistContentAndAssoc", persistMap);
if (ServiceUtil.isError(persistContentResult)) {
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ContentContentCreatingError", UtilMisc.toMap("serviceName", "persistContentAndAssoc"), locale), null, null, persistContentResult);