/** * data initialization; set space by spaceUrl to work with * * @throws Exception */ public void initData() throws Exception { String spaceUrl = Utils.getSpaceUrlByContext(); Space space = spaceSrc.getSpaceByUrl(spaceUrl); if (space != null) { uiSpaceSetting.setValues(space); } }
public void reloadTreeData() throws Exception { UserPortal userPortal = Util.getUIPortalApplication().getUserPortalConfig().getUserPortal(); SpaceService spaceService = getApplicationComponent(SpaceService.class); String spaceUrl = Utils.getSpaceUrlByContext(); Space space = spaceService.getSpaceByUrl(spaceUrl); UserNavigation groupNav = SpaceUtils.getGroupNavigation(space.getGroupId()); setOwner(groupNav.getKey().getName()); setOwnerType(groupNav.getKey().getTypeName()); UISpaceNavigationNodeSelector selector = getChild(UISpaceNavigationNodeSelector.class); selector.setEdittedNavigation(groupNav); selector.setUserPortal(userPortal); selector.initTreeData(); }
/** * gets space, space identified by the url. * * @return space * @throws SpaceException */ public Space getSpace() throws SpaceException { String spaceUrl = Utils.getSpaceUrlByContext(); SpaceService spaceService = getApplicationComponent(SpaceService.class); return spaceService.getSpaceByUrl(spaceUrl); }