public boolean isValidKey(String key) { return repositoryManager.getRepository(key) != null; } }
public boolean repositoryExists(final String repName) { final RootConfig rootConfig = AppConfig.getsConfig(); final RepositoryHandle handle = rootConfig.getRepositoryManager().getRepository(repName); return handle != null; }
private void storeConfig() { try { rootConfig.saveConfig(); // todo: should we call AppConfig.updateLastModified()? See FE-123. } catch (IOException e) { throw new RuntimeException(e); } }
public Collection<String> getRepositoryNames() { // Get FishEye projects final Collection<String> results = new ArrayList<String>(); final List<RepositoryHandle> handles = AppConfig.getsConfig().getRepositoryManager().getHandles(); for (final RepositoryHandle handle : handles) { results.add(handle.getName()); } return results; }
public String getBaseUrl() { RootConfig getsConfig = AppConfig.getsConfig(); String siteURL = getsConfig.getSiteURL(); WebServerType ws = getsConfig.getConfig().getWebServer(); return removeTrailingSlash(siteURL); }
@Override public String getDefaultFromAddress() { return AppConfig.getsConfig().getConfig().getSmtp().getFrom(); }
private com.cenqua.fisheye.user.UserManager getUserManager() { return AppConfig.getsConfig().getUserManager(); }
@Override public boolean isMailServerConfigured() { return AppConfig.getsConfig().getConfig().getSmtp() != null; }
public Iterable<StreamsKey> get() { return transform(repositoryManager.getHandles(), handlesToStreamsKey); }
public boolean isApplicationSetUp() { // this code is copied from TotalityFilter.requresSetup() method final RootConfig rootConfig = AppConfig.getsConfig(); final AdminConfig acfg = rootConfig.getAdminConfig(); final boolean requiresSetup = !acfg.haveDoneInitialSetup() || (rootConfig.getLicense() == null) || rootConfig.getLicense().isTerminated(); return !requiresSetup; }
public String getSiteURL() { return AppConfig.getsConfig().getSiteURL(); }
@Override public ApplicationLicenseInfo getLicenseInfo() { ProductLicense license = AppConfig.getsConfig().getLicense().getFisheyeLicense(); return new ProductLicenseInfo(license); }
private Set<String> getLocalProjectKeys() { final Set<String> repoData = new HashSet<String>(); for (final RepositoryHandle h : AppConfig.getsConfig().getRepositoryManager().getHandles()) { repoData.add(h.getName()); } return repoData; }
public RepositoryHandle apply(String key) { return repositoryManager.getRepository(key); } }
public void run() { // For now, we don't care what changed, we'll just expire it all // CachingManagerFactory.getCacheExpiryManagerInstance().flush(); try { AppConfig.getsConfig().getUserManager().resyncAuth(true); } catch (final Exception e) { log.warn("Unable to resync auth.", e); } }
private void storeConfig() { try { rootConfig.saveConfig(); // todo: should we call AppConfig.updateLastModified()? See FE-123. } catch (IOException e) { throw new RuntimeException(e); } }
public Set<String> getLocalProjectKeys() { Set<String> repoData = new HashSet<String>(); for (RepositoryHandle h : AppConfig.getsConfig().getRepositoryManager().getHandles()) { repoData.add(h.getName()); } return repoData; }
public Option<Object> apply(String key) { return Option.<Object>option(repositoryManager.getRepository(key)); } }
public Collection<String> getUsersInGroup(final String groupname) throws FisheyeAccessorException { try { return AppConfig.getsConfig().getUserManager().getUsersInGroup(groupname); } catch (final DbException e) { throw new FisheyeAccessorException("Exception occured while retrieving users for group: " + groupname, e); } } }
private Set<String> getLocalProjectKeys() { final Set<String> repoData = new HashSet<String>(); for (final RepositoryHandle h : AppConfig.getsConfig().getRepositoryManager().getHandles()) { repoData.add(h.getName()); } return repoData; }