private static void toUIContainer(UIContainer uiContainer, Container model, boolean dashboard) throws Exception { uiContainer.setStorageId(model.getStorageId()); uiContainer.setId(model.getId()); uiContainer.setWidth(model.getWidth()); uiContainer.setHeight(model.getHeight()); uiContainer.setTitle(model.getTitle()); uiContainer.setIcon(model.getIcon()); uiContainer.setDescription(model.getDescription()); uiContainer.setFactoryId(model.getFactoryId()); uiContainer.setName(model.getName()); uiContainer.setTemplate(model.getTemplate()); if (model.getAccessPermissions() != null) { uiContainer.setAccessPermissions(model.getAccessPermissions()); } uiContainer.setMoveAppsPermissions(model.getMoveAppsPermissions()); uiContainer.setMoveContainersPermissions(model.getMoveContainersPermissions()); List<ModelObject> children = model.getChildren(); if (children == null) return; for (Object child : children) { buildUIContainer(uiContainer, child, dashboard); } }