private final String getDescription(NameSpaceContainer container) { String description = null; switch (container.getType()) { case SOURCE: description = container.getSource().getDescription(); break; case SPACE: description = container.getSpace().getDescription(); break; case HOME: // for home space we should pre populate wiki with default text description = "# Wikis & Tags\n" + "\n" + "![Gnarly Catalog](https://d33wubrfki0l68.cloudfront.net/c1a54376c45a9276c080f3d10ed25ce61c17bcd2/2b946/img/home/open-source-for-everyone.svg)\n" + "\n" + "Starting with Dremio 3.0, you can now:\n" + "* Add wikis to datasets, spaces and sources.\n" + "* Tag datasets and search using tags.\n" + "\n" + "\n" + "You are reading the wiki for your home space! This sidebar always shows the wiki for the current source, space or folder you are browsing.\n" + "\n" + "When previewing datasets, click on the `Catalog` tab to create a wiki or add tags to that dataset.\n" + "\n" + "**Tip:** You can hide the wiki by clicking on the sidebar icon on upper right hand side."; break; default: break; } return description; }
public static Space newInstance(SpaceConfig spaceConfig, NamespaceTree contents, int datasetCount) { String id = spaceConfig.getId() != null ? spaceConfig.getId().getId() : null; return new Space(id, spaceConfig.getName(), spaceConfig.getDescription(), spaceConfig.getTag(), contents, datasetCount, spaceConfig.getCtime()); } }