@Override public IEventBus get() { return ApplicationContext.getServiceForClass(IEventBus.class); } };
private ISnomedBrowserAxiomService getAxiomService() { if (axiomService == null) { axiomService = ApplicationContext.getServiceForClass(ISnomedBrowserAxiomService.class); } return axiomService; }
private static Notifications getNotifications() { return ApplicationContext.getServiceForClass(Notifications.class); }
private static ICDOConnectionManager getConnectionManager() { return ApplicationContext.getServiceForClass(ICDOConnectionManager.class); }
private static SnomedReasonerService getReasonerService(boolean isExternalClassificationRequest) { if (isExternalClassificationRequest) { return ApplicationContext.getServiceForClass(SnomedExternalReasonerService.class); } return ApplicationContext.getServiceForClass(SnomedInternalReasonerService.class); }
private IDatastoreOperationLockManager getLockManager() { return ApplicationContext.getServiceForClass(IDatastoreOperationLockManager.class); } }
protected IEventBus getBus() { return ApplicationContext.getServiceForClass(IEventBus.class); } }
public ValidationRelationshipService(String branchPath) { this.branchPath = branchPath; this.bus = ApplicationContext.getServiceForClass(IEventBus.class); }
public ValidationConceptService(String branchPath) { this.branchPath = branchPath; this.bus = ApplicationContext.getServiceForClass(IEventBus.class); }
public ValidationDescriptionService(String branchPath, Set<String> caseSignificantWords, Multimap<String, String> refsetToLanguageSpecificWordsMap) { this.branchPath = branchPath; this.bus = ApplicationContext.getServiceForClass(IEventBus.class); this.descriptionService = new DescriptionService(bus, branchPath); this.caseSignificantWords = caseSignificantWords; this.refsetToLanguageSpecificWordsMap = refsetToLanguageSpecificWordsMap; this.topLevelConceptIds = getTopLevelConceptIds(); }
@Override public Collection<Role> authenticate(final String userId, final String password) throws LoginException { authenticator.login(userId, password); final Collection<Role> roles = collectRoles(ApplicationContext.getServiceForClass(IAuthorizationService.class), userId); return roles; }
public AxiomRelationshipConversionService getConversionService() { if (conversionService == null) { conversionService = ApplicationContext.getServiceForClass(ISnomedBrowserAxiomService.class).getConversionService(getBranch().path()); } return conversionService; }
public SnomedTraceabilityChangeProcessor(final IBranchPath branchPath, ObjectWriter objectWriter) { this.branchPath = checkNotNull(branchPath); this.objectWriter = checkNotNull(objectWriter); this.index = ApplicationContext.getServiceForClass(RepositoryManager.class).get(SnomedDatastoreActivator.REPOSITORY_UUID).service(RevisionIndex.class); this.collectSystemChanges = collectSystemChanges(branchPath.getPath()); this.descriptionLookupService = new SnomedDescriptionLookupService(); }
private boolean collectSystemChanges(String branch) { if (isDeltaImportInProgress(branch) || isClassificationInProgress(branch)) { return true; } return ApplicationContext.getServiceForClass(SnomedCoreConfiguration.class).isCollectSystemChanges(); }
private boolean isExternalServiceConfigPresent() { SnomedCoreConfiguration snomedConfig = ApplicationContext.getServiceForClass(SnomedCoreConfiguration.class); return snomedConfig.getClassificationConfig() != null && snomedConfig.getClassificationConfig().isExternalClassificationServiceConfigured(); }
private SnomedDescription getPt(String id) { return SnomedRequests.prepareGetConcept(id) .setExpand("pt()") .setLocales(ApplicationContext.getServiceForClass(LanguageSetting.class).getLanguagePreference()) .build(SnomedDatastoreActivator.REPOSITORY_UUID, branch) .execute(ApplicationContext.getServiceForClass(IEventBus.class)) .getSync().getPt(); } }
private Collection<ICodeSystemVersion> getAllTags(final String repositoryId, final boolean decorateWithPatched) { final CodeSystemVersions versions = CodeSystemRequests.prepareSearchCodeSystemVersion() .all() .build(repositoryId) .execute(ApplicationContext.getServiceForClass(IEventBus.class)) .getSync(); return Collections.<ICodeSystemVersion>unmodifiableCollection(newHashSet(decorateWithPatched ? decorateWithPatchedFlag(repositoryId, versions.getItems()) : versions)); }
private CDOView openView(final HistoryInfoConfiguration configuration) { final long cdoId = configuration.getStorageKey(); final ICDOConnection connection = getServiceForClass(ICDOConnectionManager.class).get(cdoId); final CDOBranch branch = connection.getBranch(configuration.getBranchPath()); return connection.createView(branch, UNSPECIFIED_DATE, false); }
OperationLockRunner.with(lockManager).run(new Runnable() { @Override public void run() { final IEventBus bus = ApplicationContext.getServiceForClass(IEventBus.class); RepositoryRequests .branching() .prepareCreate() .setParent(branchPath.getPath()) .setName(versionId) .build(repositoryId) .execute(bus).getSync(); }}, lockContext, IOperationLockManager.IMMEDIATE, lockTarget); } catch (final OperationLockException | InterruptedException e) {
@Override protected boolean isApplicable(String repositoryId, IBranchPath taskBranchPath) throws Throwable { if (!super.isApplicable(repositoryId, taskBranchPath)) { return false; } final IEventBus eventBus = ApplicationContext.getServiceForClass(IEventBus.class); final Branch branch = RepositoryRequests.branching() .prepareGet(taskBranchPath.getPath()) .build(repositoryId) .execute(eventBus) .getSync(); return branch.canRebase(); }