private static InternalWhitelistManager getWhitelistManager() { InternalWhitelistManager whitelistManager = ComponentAccessor.getOSGiComponentInstanceOfType(InternalWhitelistManager.class); return whitelistManager != null ? whitelistManager : FALLBACK_WHITELIST_MANAGER; }
@Override public T get() { return getOSGiComponentInstanceOfType(componentClass); } }
@Override public SoyTemplateRenderer getRenderer() { return ComponentAccessor.getOSGiComponentInstanceOfType(SoyTemplateRenderer.class); } }
private BlobStoreService getBlobStore() { final BlobStoreService bss = ComponentAccessor.getOSGiComponentInstanceOfType(BlobStoreService.class); return bss != null ? bss : FailingBlobStoreService.INSTANCE; }
protected SoyTemplateRenderer getSoyRenderer() { return ComponentAccessor.getOSGiComponentInstanceOfType(SoyTemplateRenderer.class); } }
public EditDefaultDashboard(final PortalPageService portalPageService, final DashboardPermissionService permissionService, final ApplicationProperties applicationProperties) { this.applicationProperties = applicationProperties; this.dashboardTabViewFactory = ComponentAccessor.getOSGiComponentInstanceOfType(DashboardTabViewFactory.class); this.dashboardService = ComponentAccessor.getOSGiComponentInstanceOfType(DashboardService.class); this.gadgetRequestContextFactory = ComponentAccessor.getOSGiComponentInstanceOfType(GadgetRequestContextFactory.class); this.portalPageService = portalPageService; this.permissionService = permissionService; }
protected SoyTemplateRenderer getSoyRenderer() { return ComponentAccessor.getOSGiComponentInstanceOfType(SoyTemplateRenderer.class); } }
private GadgetLocationTranslator getGadgetLocationTranslator() { return getOSGiComponentInstanceOfType(GadgetLocationTranslator.class); }
protected Backup getActiveObjectsBackup() { return ComponentAccessor.getOSGiComponentInstanceOfType(Backup.class); }
/** * @return the registered PerforceManager implementation - we can't inject here due to OSGi component context * limitations (this class is instantiated by a JIRA listener manager). We don't cache here as ComponenetManager * provides a decent level of caching internally. */ protected PerforceManager getPerforceManager() { return getOSGiComponentInstanceOfType(PerforceManager.class); } }
Backup getAOBackup() { return ComponentAccessor.getOSGiComponentInstanceOfType(Backup.class); }
PluginUpgradeManager getPluginUpgradeManager() { return ComponentAccessor.getOSGiComponentInstanceOfType(PluginUpgradeManager.class); }
@VisibleForTesting protected ChangeSetManager getChangeSetManager() { return getOSGiComponentInstanceOfType(ChangeSetManager.class); } }
@Nonnull private MyJiraHomePreference retrieveDelegate() { final MyJiraHomePreference delegate = ComponentAccessor.getOSGiComponentInstanceOfType(MyJiraHomePreference.class); return delegate != null ? delegate : fallBack; }
@VisibleForTesting protected ChangeSetManager getChangeSetManager() { return getOSGiComponentInstanceOfType(ChangeSetManager.class); } }
@VisibleForTesting protected ReviewManager getReviewManager() { return getOSGiComponentInstanceOfType(ReviewManager.class); } }
@VisibleForTesting protected ReviewManager getReviewManager() { return getOSGiComponentInstanceOfType(ReviewManager.class); }
public SoyTemplateRenderer getSoyRenderer() { return ComponentAccessor.getOSGiComponentInstanceOfType(SoyTemplateRendererProvider.class).getRenderer(); }
/** * We only display this is both the Activity Stream Plugin and Gadget Plugin are installed * * @param profileUser The user whose profile the current user is looking at * @param currentUser The current user * @return true if both the Activity Stream Plugin and Gadget Plugin are installed, otherwise false * @since v4.3 */ public boolean showFragment(ApplicationUser profileUser, ApplicationUser currentUser) { //need to both have the gadget plugin as well as the activity stream gadget available! final GadgetViewFactory viewFactory = ComponentAccessor.getOSGiComponentInstanceOfType(GadgetViewFactory.class); return viewFactory != null && pluginAccessor.isPluginModuleEnabled(ACTIVTY_STREAM_GADGET_MODULE_KEY); }
private void clearConsumerTokens(final String username) { // Delete any OAuth Consumer tokens for this user final ConsumerTokenService consumerTokenService = ComponentAccessor.getOSGiComponentInstanceOfType(ConsumerTokenService.class); if (consumerTokenService != null) { consumerTokenService.removeAllTokensForUsername(username); } else if (log.isDebugEnabled()) { log.debug("Unable to clear consumer tokens for '" + username + "' because the service could not be located. Maybe applinks is offline?"); } }