identity.checkPermission("modify-translation", this.localeServiceImpl
.getByLocaleId(locale),
this.getSecuredIteration(projectSlug, iterationSlug)
.getProject());
MergeType mergeType;
try {
mergeType = MergeType.valueOf(merge.toUpperCase());
} catch (Exception e) {
ProcessStatus status = new ProcessStatus();
status.setStatusCode(ProcessStatusCode.Failed);
status.getMessages().add("bad merge type " + merge);
return status;
}
final String id = URIHelper.convertFromDocumentURIId(idNoSlash);
final MergeType finalMergeType = mergeType;
String name = "TranslatedDocCreationOrUpdate: "+projectSlug+"-"+iterationSlug+"-"+idNoSlash+"-"+locale;
AsyncTaskHandle<HDocument> handle = new AsyncTaskHandle<HDocument>();
Serializable taskId = asyncTaskHandleManager.registerTaskHandle(handle);
translationServiceImpl.translateAllInDocAsync(projectSlug,