public String getSiteURL() { return AppConfig.getsConfig().getSiteURL(); }
private com.cenqua.fisheye.user.UserManager getUserManager() { return AppConfig.getsConfig().getUserManager(); }
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); } }
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; }
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 Set<String> getLocalProjectKeys() { Set<String> repoData = new HashSet<String>(); for (RepositoryHandle h : AppConfig.getsConfig().getRepositoryManager().getHandles()) { repoData.add(h.getName()); } return repoData; }
public boolean repositoryExists(final String repName) { final RootConfig rootConfig = AppConfig.getsConfig(); final RepositoryHandle handle = rootConfig.getRepositoryManager().getRepository(repName); return handle != null; }
@Override public boolean isMailServerConfigured() { return AppConfig.getsConfig().getConfig().getSmtp() != null; }
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; }
private int getRepositoryId(final String repositoryName) { final RepositoryType[] repositoryArray = AppConfig.getsConfig().getConfig().getRepositoryArray(); for (int i = 0; i < repositoryArray.length; i++) { final RepositoryType repositoryType = repositoryArray[i]; if (repositoryName.equals(repositoryType.getName())) { return i; } } return -1; }
@Override public String getDefaultFromAddress() { return AppConfig.getsConfig().getConfig().getSmtp().getFrom(); }
@Override public ApplicationLicenseInfo getLicenseInfo() { ProductLicense license = AppConfig.getsConfig().getLicense().getFisheyeLicense(); return new ProductLicenseInfo(license); }
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 RepositoryType getRepositoryType(final String repositoryName) { final RepositoryType[] repositories = AppConfig.getsConfig().getConfigDocument().getConfig().getRepositoryArray(); for (final RepositoryType repository : repositories) { if (repository.getName().equals(repositoryName)) { return repository; } } return null; }
public String getRemoteUsername() { UserLogin user = AppConfig.getsConfig().getUserManager().getCurrentUser(CrucibleFilter.getRequest()); if(user != null) { return user.getUserName(); } return null; }
public String getBaseUrl() { RootConfig getsConfig = AppConfig.getsConfig(); String siteURL = getsConfig.getSiteURL(); WebServerType ws = getsConfig.getConfig().getWebServer(); return removeTrailingSlash(siteURL); }
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 boolean currentUserCanView(RepositoryHandle repository) { Principal user = getCurrentUser(); return userManager.hasPermissionToAccess(user, repository) || (isAnon(user) && AppConfig.getsConfig().isCruAnonAccessAllowed() && repository.getCfg().isAnonAccessAllowed()); }
@Override public String getApplicationServerID() { LicenseInfo productLicense = AppConfig.getsConfig().getLicense(); if (productLicense.isFishEye()) { return productLicense.getFisheyeLicense().getServerId(); } else { return productLicense.getCrucibleLicense().getServerId(); } }
@Override public String getApplicationSEN() { LicenseInfo productLicense = AppConfig.getsConfig().getLicense(); if (productLicense.isFishEye()) { return productLicense.getFisheyeLicense().getSupportEntitlementNumber(); } else { return productLicense.getCrucibleLicense().getSupportEntitlementNumber(); } }