public ApplicationProperties get() { return ComponentAccessor.getApplicationProperties(); } });
/** * @deprecated Please use {@link #DefaultVelocityRequestContextFactory(com.atlassian.jira.config.properties.ApplicationProperties)} instead */ public DefaultVelocityRequestContextFactory() { this(ComponentAccessor.getApplicationProperties()); }
protected ApplicationProperties getApplicationProperties() { return ComponentAccessor.getApplicationProperties(); } protected ReindexRequestService getReindexRequestService()
@VisibleForTesting ApplicationProperties getApplicationProperties() { return ComponentAccessor.getApplicationProperties(); }
@Override public boolean isTimeTrackingOn() { return ComponentAccessor.getApplicationProperties().getOption(APKeys.JIRA_OPTION_TIMETRACKING); }
/** * The default charset used for string decoding and encoding. * * @return the default string charset. */ private static String getDefaultCharset() { ApplicationProperties appProps = ComponentAccessor.getApplicationProperties(); return appProps.getEncoding(); }
/** * Provides the application property for permitting issues to be unassigned. * @return the value of the application property. */ protected static boolean isAllowUnassigned() { return ComponentAccessor.getApplicationProperties().getOption(APKeys.JIRA_OPTION_ALLOWUNASSIGNED); } }
/** * Returns the configured Javascript date picker format. * <p> * ie the format stored in the "jira.date.picker.javascript.format" application property. * * @return the configured Javascript date picker format. */ public static String getDateFormat() { return ComponentAccessor.getApplicationProperties().getDefaultBackedString(APKeys.JIRA_DATE_PICKER_JAVASCRIPT_FORMAT); }
ProductionKeyMatcher() { // Retrieve project key regex from application properties file super(ComponentAccessor.getApplicationProperties().getDefaultBackedString(APKeys.JIRA_PROJECTKEY_PATTERN)); }
private Long getDefaultIssueTypeSchemeId() { final String s = ComponentAccessor.getApplicationProperties().getString(APKeys.DEFAULT_ISSUE_TYPE_SCHEME); return new Long(s); }
protected String getEncoding() { try { return ComponentAccessor.getApplicationProperties().getEncoding(); } catch (Exception e) { return "UTF-8"; } }
private boolean isJiraSetup() { final ApplicationProperties applicationProperties = ComponentAccessor.getApplicationProperties(); return "true".equals(applicationProperties.getString(APKeys.JIRA_SETUP)); }
private static boolean publicSignup() { final ApplicationProperties applicationProperties = ComponentAccessor.getApplicationProperties(); return ("public".equals(applicationProperties.getString(APKeys.JIRA_MODE)) && applicationProperties.getOption(APKeys.JIRA_OPTION_CAPTCHA_ON_SIGNUP)); }
private static void setJiraLocale(final String locale) { // Always get a fresh copy of the application properties because during the short life of some actions // (eg. SetupDatabase) the Pico container can be swapped out from underneath us. final ApplicationProperties applicationProperties = ComponentAccessor.getApplicationProperties(); if (isLocaleValid(locale)) { applicationProperties.setString(APKeys.JIRA_I18N_DEFAULT_LOCALE, locale); } }
/** * Set the indexing language for the selected (or default) locale. */ public void setIndexingLanguageForDefaultServerLocale() { // Always get a fresh copy of the application properties because during the short life of some actions // (eg. SetupDatabase) the Pico container can be swapped out from underneath us. final ApplicationProperties applicationProperties = ComponentAccessor.getApplicationProperties(); final IndexLanguageToLocaleMapper languageToLocaleMapper = ComponentAccessor.getComponent(IndexLanguageToLocaleMapper.class); applicationProperties.setString(APKeys.JIRA_I18N_LANGUAGE_INPUT, languageToLocaleMapper.getLanguageForLocale(getLocale().toString())); }
/** * Returns the base URL from VelocityRequestContext * * @return the base URL * @see VelocityRequestContext */ private String getBaseUrl() { final ApplicationProperties applicationProperties = ComponentAccessor.getApplicationProperties(); final VelocityRequestContext velocityRequestContext = new DefaultVelocityRequestContextFactory(applicationProperties).getJiraVelocityRequestContext(); return velocityRequestContext.getCanonicalBaseUrl(); }
public String getContextPath() { try { return super.getContextPath(); } catch (NullPointerException e) // Resin throws a NullPointerException in some cases - JRA-11038 { return new DefaultVelocityRequestContextFactory(ComponentAccessor.getApplicationProperties()).getJiraVelocityRequestContext().getBaseUrl(); } } };
public OSUserResolver() { UserNameTransformer.Factory factory = new UserNameTransformer.Factory( new UserNameTransformer.ApplicationPropertiesClassNameRetriever(ComponentAccessor.getApplicationProperties()) ); this.transformer = factory.get(); Null.not("transformer", transformer); }
public static void dispatchEvent(int type, ApplicationUser user, Map<String,Object> params) { final MapBuilder<String, Object> mapBuilder = MapBuilder.newBuilder(params); mapBuilder.add("baseurl", ComponentAccessor.getApplicationProperties().getString(APKeys.JIRA_BASEURL)); UserEvent event = new UserEvent(mapBuilder.toMap(), user, type); ComponentAccessor.getComponentOfType(EventPublisher.class).publish(event); } }
private synchronized MessageHandlerContext getContext() { if (context == null) { context = new DefaultMessageHandlerContext(ComponentAccessor.getCommentManager(), new Log4jMessageHandlerExecutionMonitor(), ComponentAccessor.getIssueManager(), ComponentAccessor.getAttachmentManager(), ComponentAccessor.getComponent(TextFieldCharacterLengthValidator.class), ComponentAccessor.getPermissionManager(), ComponentAccessor.getApplicationProperties(), ComponentAccessor.getComponent(ApplicationRoleManager.class), ComponentAccessor.getComponent(UserService.class)); } return context; }