getEntity(activity.getLastTargetType(),
activity.getLastTargetId());
if (isTranslationUpdateActivity(activity.getActivityType())) {
HProjectIteration version = (HProjectIteration) context;
HTextFlowTarget tft = (HTextFlowTarget) lastTarget;
return urlUtil.editorTransUnitUrl(version.getProject().getSlug(),
version.getSlug(), tft.getLocaleId(), tft.getTextFlow()
.getLocale(), tft.getTextFlow().getDocument()
.getDocId(), tft.getTextFlow().getId());
} else if (activity.getActivityType() == ActivityType.UPLOAD_SOURCE_DOCUMENT) {
// not supported for upload source action
} else if (activity.getActivityType() == ActivityType.UPLOAD_TRANSLATION_DOCUMENT) {
HProjectIteration version = (HProjectIteration) context;
HDocument document = (HDocument) lastTarget;
HTextFlowTarget tft =
documentDAO.getLastTranslatedTargetOrNull(document.getId());
if (tft != null) {
return urlUtil.editorTransUnitUrl(version.getProject()
.getSlug(), version.getSlug(), tft.getLocaleId(),
document.getSourceLocaleId(), tft.getTextFlow()
.getDocument().getDocId(), tft.getTextFlow()
.getId());
}
}
return "";
}