@Test public void removeSite_NonExisting() { assertFalse(portal.removeSite(new SiteId("test1"))); }
@Override public boolean removeSite(SiteId siteId) { Site site = getSite(siteId); if (site == null) { return false; } SiteKey siteKey = Util.from(Parameters.requireNonNull(siteId, "siteId")); PortalConfig data = new PortalConfig(siteKey.getTypeName(), siteKey.getName()); try { dataStorage.remove(data); return true; } catch (Throwable t) { throw new ApiException("Failed to remove site " + siteId, t); } }
PortalImpl implements Portal { @Override public boolean removeSite(SiteId siteId) { Site site = getSite(siteId); if (site == null) { return false; } SiteKey siteKey = Util.from(Parameters.requireNonNull(siteId, "siteId")); PortalConfig data = new PortalConfig(siteKey.getTypeName(), siteKey.getName()); try { dataStorage.remove(data); return true; } catch (Throwable t) { throw new ApiException("Failed to remove site " + siteId, t); } } }
PortalImpl implements Portal { @Override public boolean removeSite(SiteId siteId) { Site site = getSite(siteId); if (site == null) { return false; } SiteKey siteKey = Util.from(Parameters.requireNonNull(siteId, "siteId")); PortalConfig data = new PortalConfig(siteKey.getTypeName(), siteKey.getName()); try { dataStorage.remove(data); return true; } catch (Throwable t) { throw new ApiException("Failed to remove site " + siteId, t); } } PortalImpl(DataStorage dataStorage, PageService pageService, NavigationService navigationService,
                      DescriptionService descriptionService, ResourceBundleManager bundleManager, Authenticator authenticator,
                      IdentityRegistry identityRegistry, UserACL acl, UserPortalConfigService userPortalConfigService,
                      OAuthProviderAccessor oauthProviderAccessor); }
PortalImpl implements Portal { @Override public boolean removeSite(SiteId siteId) { Site site = getSite(siteId); if (site == null) { return false; } SiteKey siteKey = Util.from(Parameters.requireNonNull(siteId, "siteId")); PortalConfig data = new PortalConfig(siteKey.getTypeName(), siteKey.getName()); try { dataStorage.remove(data); return true; } catch (Throwable t) { throw new ApiException("Failed to remove site " + siteId, t); } } PortalImpl(DataStorage dataStorage, PageService pageService, NavigationService navigationService,
                      DescriptionService descriptionService, ResourceBundleManager bundleManager, Authenticator authenticator,
                      IdentityRegistry identityRegistry, UserACL acl, UserPortalConfigService userPortalConfigService,
                      OAuthProviderAccessor oauthProviderAccessor); @Override Site getSite(SiteId siteId); @Override Site createSite(SiteId siteId); @Override Site createSite(SiteId siteId, String templateName); @Override List<Site> findSites(SiteQuery query); @Override void saveSite(Site site); @Override boolean removeSite(SiteId siteId); @Override Navigation getNavigation(SiteId siteId); @Override PageBuilder newPageBuilder(); @Override ApplicationRegistry getApplicationRegistry(); @Override Page getPage(PageId pageId); List<ContainerItem> getPageRootContainer(PageContext pageContext); @Override Page createPage(PageId pageId); @Override List<Page> findPages(PageQuery query); @Override void savePage(Page page); @Override boolean removePage(PageId pageId); @Override boolean hasPermission(User user, Permission permission); @Override OAuthProvider getOAuthProvider(String oauthProviderKey); }
PortalImpl implements Portal { @Override public boolean removeSite(SiteId siteId) { Site site = getSite(siteId); if (site == null) { return false; } SiteKey siteKey = Util.from(Parameters.requireNonNull(siteId, "siteId")); PortalConfig data = new PortalConfig(siteKey.getTypeName(), siteKey.getName()); try { dataStorage.remove(data); return true; } catch (Throwable t) { throw new ApiException("Failed to remove site " + siteId, t); } } PortalImpl(DataStorage dataStorage, PageService pageService, NavigationService navigationService,
                      DescriptionService descriptionService, ResourceBundleManager bundleManager, Authenticator authenticator,
                      IdentityRegistry identityRegistry, UserACL acl, UserPortalConfigService userPortalConfigService,
                      OAuthProviderAccessor oauthProviderAccessor); @Override Site getSite(SiteId siteId); @Override Site createSite(SiteId siteId); @Override Site createSite(SiteId siteId, String templateName); @Override List<Site> findSites(SiteQuery query); @Override void saveSite(Site site); @Override boolean removeSite(SiteId siteId); @Override Navigation getNavigation(SiteId siteId); @Override PageBuilder newPageBuilder(); @Override ApplicationRegistry getApplicationRegistry(); @Override Page getPage(PageId pageId); List<ContainerItem> getPageRootContainer(PageContext pageContext); @Override Page createPage(PageId pageId); @Override List<Page> findPages(PageQuery query); @Override void savePage(Page page); @Override boolean removePage(PageId pageId); @Override boolean hasPermission(User user, Permission permission); @Override OAuthProvider getOAuthProvider(String oauthProviderKey);  }