/** {@inheritDoc} */ public void deleteSpace(Space space) { try { // remove memberships of users with deleted space. SpaceUtils.removeMembershipFromGroup(space); spaceStorage.deleteSpace(space.getId()); OrganizationService orgService = getOrgService(); UserACL acl = getUserACL(); GroupHandler groupHandler = orgService.getGroupHandler(); Group deletedGroup = groupHandler.findGroupById(space.getGroupId()); List<String> mandatories = acl.getMandatoryGroups(); if (deletedGroup != null) { if (!isMandatory(groupHandler, deletedGroup, mandatories)) { SpaceUtils.removeGroup(space); } } else { LOG.warn("deletedGroup is null"); } // remove pages and group navigation of space SpaceUtils.removePagesAndGroupNavigation(space); } catch (Exception e) { LOG.error("Unable delete space", e); } spaceLifeCycle.spaceRemoved(space, null); }
/** {@inheritDoc} */ public void renameSpace(Space space, String newDisplayName) { spaceStorage.renameSpace(space, newDisplayName); }
/** {@inheritDoc} */ public Space getSpaceByUrl(String url) { return spaceStorage.getSpaceByUrl(url); }
/** {@inheritDoc} */ public void saveSpace(Space space, boolean isNew) { spaceStorage.saveSpace(space, isNew); }
/** {@inheritDoc} */ public Space getSpaceById(String id) { return spaceStorage.getSpaceById(id); }
/** {@inheritDoc} */ public Space getSpaceByGroupId(String groupId) { return spaceStorage.getSpaceByGroupId(groupId); }
/** {@inheritDoc} */ public Space getSpaceByPrettyName(String spacePrettyName) { return spaceStorage.getSpaceByPrettyName(spacePrettyName); }
/** {@inheritDoc} */ public Space getSpaceByDisplayName(String spaceDisplayName) { return spaceStorage.getSpaceByDisplayName(spaceDisplayName); }
/** {@inheritDoc} */ public Space updateSpace(Space existingSpace) { spaceStorage.saveSpace(existingSpace, false); return existingSpace; }