Commit 47cb4535 authored by Marco Balestri's avatar Marco Balestri
Browse files

[KNOWAGE-6708] Adds support for different type of documents

parent aa5cd2b1
......@@ -794,12 +794,26 @@ public class MenuListJSONSerializerForREST implements Serializer {
private String getDocumentLink(BIObject document) {
String documentLabel = document.getLabel();
String engineLabel = document.getEngineLabel();
String enginePath;
if (document.getEngineLabel() != null && document.getEngineLabel().equals("knowageolapengine"))
enginePath = "olap";
else
switch (engineLabel) {
case "knowagedossierengine":
enginePath = "dossier";
break;
case "knowagegisengine":
enginePath = "map";
break;
case "knowagekpiengine":
enginePath = "kpi";
break;
case "knowageofficeengine":
enginePath = "office-doc";
break;
default:
enginePath = "document-composite";
return "/document-browser/" + enginePath + "/" + documentLabel;
break;
}
return String.format("/%s/%s", enginePath, documentLabel);
}
private void setPropertiesForAdminWithUrlMenu(Menu childElem, Locale locale, JSONObject temp2, String path) throws JSONException {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment