/** * Checks if Jira is setup or not * * @return true if jira is not setup, false if is not */ private boolean isFirstRun() { return !JiraUtils.isSetup(); }
public boolean isApplicationSetUp() { return JiraUtils.isSetup(); }
public boolean isApplicationSetUp() { return JiraUtils.isSetup(); }
protected void doUpgradesIfSetup() { //only perform upgrades if JIRA is setup if (JiraUtils.isSetup()) { doUpgrades(); } }
@Override public void start() { if (!JiraStartupChecklist.startupOK()) { LOGGER.debug("Skipping, JIRA is locked."); return; } // Fire a JiraStarted Event to the plugin framework. // This allows SAL to give a better LifecycleAware onStart() time, and the JIRA SAL implementation can fire start() on Startable OSGi components. // See http://jira.atlassian.com/browse/JRA-23876 if(JiraUtils.isSetup()) { getPluginEventManager().broadcast(new JiraStartedEvent()); } }
public void obtainUserDirectoyInfo() { if (JiraUtils.isSetup()) { CrowdDirectoryService crowdDirectoryService = ComponentAccessor.getComponent(CrowdDirectoryService.class); logMsg.outputHeader("User Directories (Ordered)"); List<Directory> directories = crowdDirectoryService.findAllDirectories(); for (Directory directory : directories) { logMsg.outputProperty(directory.getType().name(), directory.getName()); logMsg.outputProperty("Implementing Class", directory.getImplementationClass(), 2); logMsg.outputProperty("Allowed Operations", StringUtils.join(directory.getAllowedOperations(), ","), ",", 2); logMsg.outputProperty("Encryption Type", directory.getEncryptionType(), 2); logMsg.outputProperty("Active", String.valueOf(directory.isActive()), 2); logMsg.outputProperty("Attributes", "", 2); Map<String, String> attributes = directory.getAttributes(); ArrayList<String> keys = new ArrayList<>(attributes.keySet()); Collections.sort(keys); for (String key : keys) { String value = key.toLowerCase().contains("password") ? "xxxxxx" : attributes.get(key); logMsg.outputProperty(key, value, 3); } } } }
/** * Checks that the index path exists, and the IndexingListener exists */ private void checkIndexingSetup() throws Exception { final String indexPath = ComponentAccessor.getIndexPathManager().getIndexRootPath(); if (!directoryExists(indexPath)) { log.error("Indexing is turned on, but index path [" + indexPath + "] invalid - disabling indexing"); removeListeners(IssueIndexListener.class); // Mark the index as disabled ComponentAccessor.getComponent(IndexingConfiguration.class).disableIndex(); if (JiraUtils.isSetup()) { final Event event = new Event(EventType.get("reindex"), "The JIRA search index is missing.", EventLevel.get(EventLevel.ERROR)); addJohnsonEvent(event); } return; } // ensure the indexing listener is there ensureSingleListener(IssueIndexListener.class, "Issue Index Listener"); }