Search in sources :

Example 11 with RepositoryContext

use of com.b2international.snowowl.core.domain.RepositoryContext in project snow-owl by b2ihealthcare.

the class ClassificationSaveRequest method execute.

@Override
public String execute(final RepositoryContext context) {
    final Request<RepositoryContext, ClassificationTask> classificationRequest = ClassificationRequests.prepareGetClassification(classificationId).build();
    final ClassificationTask classification = classificationRequest.execute(context);
    final String branchPath = classification.getBranch();
    final Request<RepositoryContext, Branch> branchRequest = RepositoryRequests.branching().prepareGet(branchPath).build();
    final Branch branch = branchRequest.execute(context);
    if (!SAVEABLE_STATUSES.contains(classification.getStatus())) {
        throw new BadRequestException("Classification '%s' is not in the expected state to start saving changes.", classificationId);
    }
    if (classification.getTimestamp() < branch.headTimestamp()) {
        throw new BadRequestException("Classification '%s' on branch '%s' is stale (classification timestamp: %s, head timestamp: %s).", classificationId, branchPath, classification.getTimestamp(), branch.headTimestamp());
    }
    final String user = !Strings.isNullOrEmpty(userId) ? userId : context.service(User.class).getUsername();
    final AsyncRequest<?> saveRequest = new SaveJobRequestBuilder().setClassificationId(classificationId).setUserId(user).setParentLockContext(parentLockContext).setCommitComment(commitComment).setModuleId(moduleId).setNamespace(namespace).setAssignerType(assignerType).setFixEquivalences(fixEquivalences).setHandleConcreteDomains(handleConcreteDomains).build(branchPath);
    return JobRequests.prepareSchedule().setUser(userId).setRequest(saveRequest).setDescription(String.format("Saving classification changes on %s", branch.path())).buildAsync().get(context, SCHEDULE_TIMEOUT_MILLIS);
}
Also used : RepositoryContext(com.b2international.snowowl.core.domain.RepositoryContext) ClassificationTask(com.b2international.snowowl.snomed.reasoner.domain.ClassificationTask) Branch(com.b2international.snowowl.core.branch.Branch) BadRequestException(com.b2international.commons.exceptions.BadRequestException)

Example 12 with RepositoryContext

use of com.b2international.snowowl.core.domain.RepositoryContext in project snow-owl by b2ihealthcare.

the class SnomedComponentRevisionConflictProcessor method filterConflicts.

/**
 * Detects SNOMED CT specific donation patterns reported as conflicts during merge/upgrade. This works between any two branches, not just during upgrades so custom branch management is also supported (although not recommended).
 * <p>
 * {@inheritDoc}
 * </p>
 */
@Override
public List<Conflict> filterConflicts(StagingArea staging, List<Conflict> conflicts) {
    // skip if not merging content and if there is no conflicts
    if (!staging.isMerge() || CompareUtils.isEmpty(conflicts)) {
        return conflicts;
    }
    RepositoryContext context = (RepositoryContext) staging.getContext();
    // detect if we are merging content between two CodeSystems, if not skip donation check
    // get the two CodeSystems
    String extensionBranch = staging.getMergeFromBranchPath();
    String donationBranch = staging.getBranchPath();
    CodeSystem extensionCodeSystem = context.service(PathTerminologyResourceResolver.class).resolve(context, context.info().id(), extensionBranch);
    CodeSystem donationCodeSystem = context.service(PathTerminologyResourceResolver.class).resolve(context, context.info().id(), donationBranch);
    // extensionOf is a required property for Code Systems that would like to participate in content donation
    if (extensionCodeSystem.getExtensionOf() == null || !extensionCodeSystem.getExtensionOf().getResourceId().equals(donationCodeSystem.getId())) {
        return conflicts;
    }
    final Multimap<Class<?>, String> donatedComponentsByType = HashMultimap.create();
    // collect components from known donation conflicts
    for (Conflict conflict : conflicts) {
        ObjectId objectId = conflict.getObjectId();
        // - components that have been added on both paths are potential donation candidates (due to centralized ID management (CIS), ID collision should not happen under normal circumstances, so this is certainly a donated content)
        if (conflict instanceof AddedInSourceAndTargetConflict) {
            donatedComponentsByType.put(staging.mappings().getClass(objectId.type()), objectId.id());
        } else if (conflict instanceof ChangedInSourceAndTargetConflict) {
            // always ignore effective time and module differences
            ChangedInSourceAndTargetConflict changedInSourceAndTarget = (ChangedInSourceAndTargetConflict) conflict;
            if (SnomedRf2Headers.FIELD_EFFECTIVE_TIME.equals(changedInSourceAndTarget.getSourceChange().getProperty()) || SnomedRf2Headers.FIELD_MODULE_ID.equals(changedInSourceAndTarget.getSourceChange().getProperty())) {
                donatedComponentsByType.put(staging.mappings().getClass(objectId.type()), objectId.id());
            }
        }
    }
    // collect donations
    final Set<String> donatedComponentIds = Sets.newHashSet();
    donatedComponentIds.addAll(collectDonatedComponents(staging, donatedComponentsByType, SnomedConceptDocument.class, CONCEPT_FIELDS_TO_LOAD));
    donatedComponentIds.addAll(collectDonatedComponents(staging, donatedComponentsByType, SnomedDescriptionIndexEntry.class, DESCRIPTION_FIELDS_TO_LOAD));
    donatedComponentIds.addAll(collectDonatedComponents(staging, donatedComponentsByType, SnomedRelationshipIndexEntry.class, RELATIONSHIP_FIELDS_TO_LOAD));
    donatedComponentIds.addAll(collectDonatedComponents(staging, donatedComponentsByType, SnomedRefSetMemberIndexEntry.class, MEMBER_FIELDS_TO_LOAD));
    return conflicts.stream().filter(conflict -> {
        ObjectId objectId = conflict.getObjectId();
        if (donatedComponentIds.contains(objectId.id())) {
            // filter out all conflicts reported around donated content
            // revise all donated content on merge source, so new parent revision will take place instead
            staging.reviseOnMergeSource(staging.mappings().getClass(objectId.type()), objectId.id());
            return false;
        } else {
            return true;
        }
    }).collect(Collectors.toList());
}
Also used : CodeSystem(com.b2international.snowowl.core.codesystem.CodeSystem) EffectiveTimes(com.b2international.snowowl.core.date.EffectiveTimes) java.util(java.util) Query(com.b2international.index.query.Query) DateFormats(com.b2international.snowowl.core.date.DateFormats) RepositoryContext(com.b2international.snowowl.core.domain.RepositoryContext) RevisionDocument(com.b2international.snowowl.core.repository.RevisionDocument) com.b2international.index.revision(com.b2international.index.revision) Dates(com.b2international.snowowl.core.date.Dates) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) Collectors(java.util.stream.Collectors) DocumentMapping(com.b2international.index.mapping.DocumentMapping) IMergeConflictRule(com.b2international.snowowl.core.merge.IMergeConflictRule) LocalDate(java.time.LocalDate) ComponentRevisionConflictProcessor(com.b2international.snowowl.core.merge.ComponentRevisionConflictProcessor) com.b2international.snowowl.snomed.datastore.index.entry(com.b2international.snowowl.snomed.datastore.index.entry) SnomedRf2Headers(com.b2international.snowowl.snomed.common.SnomedRf2Headers) CompareUtils(com.b2international.commons.CompareUtils) RevisionPropertyDiff(com.b2international.index.revision.StagingArea.RevisionPropertyDiff) com.google.common.collect(com.google.common.collect) PathTerminologyResourceResolver(com.b2international.snowowl.core.repository.PathTerminologyResourceResolver) RepositoryContext(com.b2international.snowowl.core.domain.RepositoryContext) CodeSystem(com.b2international.snowowl.core.codesystem.CodeSystem) PathTerminologyResourceResolver(com.b2international.snowowl.core.repository.PathTerminologyResourceResolver)

Example 13 with RepositoryContext

use of com.b2international.snowowl.core.domain.RepositoryContext in project snow-owl by b2ihealthcare.

the class SnomedRf2ExportRequest method collectExportableCodeSystemVersions.

private void collectExportableCodeSystemVersions(final RepositoryContext context, final Set<Version> versionsToExport, final TerminologyResource codeSystem, final String referenceBranch) {
    final List<Version> candidateVersions = newArrayList(getCodeSystemVersions(context, codeSystem.getResourceURI()));
    if (candidateVersions.isEmpty()) {
        return;
    }
    final Set<String> versionPaths = candidateVersions.stream().map(Version::getBranchPath).collect(Collectors.toSet());
    final Branches versionBranches = getBranches(context, versionPaths);
    final Map<String, Branch> versionBranchesByPath = Maps.uniqueIndex(versionBranches, Branch::path);
    // cutoff timestamp represents the timestamp on the current referenceBranch segments, cutting off any versions created after this timestamp
    final Branch cutoffBranch = getBranch(context, referenceBranch);
    final String latestVersionParentBranch = candidateVersions.stream().findFirst().map(v -> BranchPathUtils.createPath(v.getBranchPath()).getParentPath()).get();
    final long cutoffBaseTimestamp = getCutoffBaseTimestamp(context, cutoffBranch, latestVersionParentBranch);
    // Remove all code system versions which were created after the cut-off date, or don't have a corresponding branch
    candidateVersions.removeIf(v -> false || !versionBranchesByPath.containsKey(v.getBranchPath()) || versionBranchesByPath.get(v.getBranchPath()).baseTimestamp() > cutoffBaseTimestamp);
    versionsToExport.addAll(candidateVersions);
    // Exit early if only an extension code system should be exported, or we are already at the "base" code system
    final ResourceURI extensionOfUri = codeSystem.getExtensionOf();
    if (extensionOnly || extensionOfUri == null) {
        return;
    }
    // Otherwise, collect applicable versions using this code system's working path
    final CodeSystem extensionOfCodeSystem = CodeSystemRequests.prepareGetCodeSystem(extensionOfUri.getResourceId()).buildAsync().execute(context);
    collectExportableCodeSystemVersions(context, versionsToExport, extensionOfCodeSystem, codeSystem.getBranchPath());
}
Also used : JsonProperty(com.fasterxml.jackson.annotation.JsonProperty) SnomedConceptSearchRequestBuilder(com.b2international.snowowl.snomed.datastore.request.SnomedConceptSearchRequestBuilder) SnomedRelationshipIndexEntry(com.b2international.snowowl.snomed.datastore.index.entry.SnomedRelationshipIndexEntry) SnomedReferenceSets(com.b2international.snowowl.snomed.core.domain.refset.SnomedReferenceSets) RepositoryRequests(com.b2international.snowowl.core.repository.RepositoryRequests) Sets.newTreeSet(com.google.common.collect.Sets.newTreeSet) Collections.singleton(java.util.Collections.singleton) AccessControl(com.b2international.snowowl.core.authorization.AccessControl) LocalTime(java.time.LocalTime) RevisionIndex(com.b2international.index.revision.RevisionIndex) Sets.newHashSet(com.google.common.collect.Sets.newHashSet) AttachmentRegistry(com.b2international.snowowl.core.attachments.AttachmentRegistry) Branches(com.b2international.snowowl.core.branch.Branches) Permission(com.b2international.snowowl.core.identity.Permission) CompareUtils(com.b2international.commons.CompareUtils) Path(java.nio.file.Path) com.google.common.collect(com.google.common.collect) Collectors.toSet(java.util.stream.Collectors.toSet) ResourceURI(com.b2international.snowowl.core.ResourceURI) com.b2international.snowowl.core.request(com.b2international.snowowl.core.request) Version(com.b2international.snowowl.core.version.Version) RepositoryContext(com.b2international.snowowl.core.domain.RepositoryContext) SnowowlRuntimeException(com.b2international.snowowl.core.api.SnowowlRuntimeException) Request(com.b2international.snowowl.core.events.Request) IEventBus(com.b2international.snowowl.eventbus.IEventBus) Instant(java.time.Instant) NotNull(javax.validation.constraints.NotNull) Collectors(java.util.stream.Collectors) Lists.newArrayList(com.google.common.collect.Lists.newArrayList) Stream(java.util.stream.Stream) VersionDocument(com.b2international.snowowl.core.version.VersionDocument) LocalDate(java.time.LocalDate) Sort(com.b2international.snowowl.core.request.SearchResourceRequest.Sort) Entry(java.util.Map.Entry) CodeSystemRequests(com.b2international.snowowl.core.codesystem.CodeSystemRequests) SnomedDescriptionIndexEntry(com.b2international.snowowl.snomed.datastore.index.entry.SnomedDescriptionIndexEntry) BranchContext(com.b2international.snowowl.core.domain.BranchContext) Builder(com.google.common.collect.ImmutableList.Builder) FileUtils(com.b2international.commons.FileUtils) CodeSystem(com.b2international.snowowl.core.codesystem.CodeSystem) EffectiveTimes(com.b2international.snowowl.core.date.EffectiveTimes) java.util(java.util) TerminologyResource(com.b2international.snowowl.core.TerminologyResource) LocalDateTime(java.time.LocalDateTime) com.b2international.snowowl.snomed.datastore.request.rf2.exporter(com.b2international.snowowl.snomed.datastore.request.rf2.exporter) com.b2international.snowowl.snomed.core.domain(com.b2international.snowowl.snomed.core.domain) Branch(com.b2international.snowowl.core.branch.Branch) Concepts(com.b2international.snowowl.snomed.common.SnomedConstants.Concepts) Strings(com.google.common.base.Strings) SnomedRequests(com.b2international.snowowl.snomed.datastore.request.SnomedRequests) Attachment(com.b2international.snowowl.core.attachments.Attachment) SnomedRefSetMemberSearchRequestBuilder(com.b2international.snowowl.snomed.datastore.request.SnomedRefSetMemberSearchRequestBuilder) BadRequestException(com.b2international.commons.exceptions.BadRequestException) BranchPathUtils(com.b2international.snowowl.core.branch.BranchPathUtils) DateFormats(com.b2international.snowowl.core.date.DateFormats) Files(java.nio.file.Files) IOException(java.io.IOException) FileInputStream(java.io.FileInputStream) SnomedTerminologyComponentConstants(com.b2international.snowowl.snomed.common.SnomedTerminologyComponentConstants) File(java.io.File) TimeUnit(java.util.concurrent.TimeUnit) ChronoUnit(java.time.temporal.ChronoUnit) SnomedReferenceSetMember(com.b2international.snowowl.snomed.core.domain.refset.SnomedReferenceSetMember) NotEmpty(org.hibernate.validator.constraints.NotEmpty) DateTimeFormatter(java.time.format.DateTimeFormatter) IComponent(com.b2international.snowowl.core.domain.IComponent) SnomedRf2Headers(com.b2international.snowowl.snomed.common.SnomedRf2Headers) Versions(com.b2international.snowowl.core.version.Versions) SnomedRefSetType(com.b2international.snowowl.snomed.core.domain.refset.SnomedRefSetType) ResourceURI(com.b2international.snowowl.core.ResourceURI) Version(com.b2international.snowowl.core.version.Version) Branches(com.b2international.snowowl.core.branch.Branches) Branch(com.b2international.snowowl.core.branch.Branch) CodeSystem(com.b2international.snowowl.core.codesystem.CodeSystem)

Example 14 with RepositoryContext

use of com.b2international.snowowl.core.domain.RepositoryContext in project snow-owl by b2ihealthcare.

the class Rf2Exporter method exportBranch.

public final void exportBranch(final Path releaseDirectory, final RepositoryContext context, final String branch, final long effectiveTimeStart, final long effectiveTimeEnd, final Set<String> visitedComponentEffectiveTimes) throws IOException {
    LOG.info("Exporting {} branch to '{}'", branch, getFileName());
    // Ensure that the path leading to the export file exists
    final Path exportFileDirectory = releaseDirectory.resolve(getRelativeDirectory());
    Files.createDirectories(exportFileDirectory);
    final Path exportFile = exportFileDirectory.resolve(getFileName());
    try (RandomAccessFile randomAccessFile = new RandomAccessFile(exportFile.toFile(), "rw")) {
        try (FileChannel fileChannel = randomAccessFile.getChannel()) {
            // Add a header if the file is empty
            if (randomAccessFile.length() == 0L) {
                fileChannel.write(toByteBuffer(TAB_JOINER.join(getHeader())));
                fileChannel.write(toByteBuffer(CR_LF));
            }
            // We want to append rows, if the file already exists, so jump to the end
            fileChannel.position(fileChannel.size());
            /*
				 * XXX: createSearchRequestBuilder() should handle namespace/language code
				 * filtering, if applicable; we will only handle the effective time and module
				 * filters here.
				 * 
				 * An effective time filter is always set, even if not in delta mode, to prevent
				 * exporting unpublished content twice.
				 */
            new BranchRequest<R>(branch, new RevisionIndexReadRequest<>(inner -> {
                createSearchRequestBuilder().filterByModules(// null value will be ignored
                modules).filterByEffectiveTime(effectiveTimeStart, effectiveTimeEnd).setLimit(BATCH_SIZE).setFields(Arrays.asList(getHeader())).stream(inner).flatMap(hits -> getMappedStream(hits, context, branch)).forEachOrdered(row -> {
                    String id = row.get(0);
                    String effectiveTime = row.get(1);
                    if (!visitedComponentEffectiveTimes.add(String.join("_", id, effectiveTime))) {
                        return;
                    }
                    try {
                        fileChannel.write(toByteBuffer(TAB_JOINER.join(row)));
                        fileChannel.write(toByteBuffer(CR_LF));
                    } catch (final IOException e) {
                        throw new SnowowlRuntimeException("Failed to write contents for file '" + exportFile.getFileName() + "'.");
                    }
                });
                return null;
            })).execute(context);
        }
    }
}
Also used : Path(java.nio.file.Path) EffectiveTimes(com.b2international.snowowl.core.date.EffectiveTimes) RandomAccessFile(java.io.RandomAccessFile) BranchRequest(com.b2international.snowowl.core.request.BranchRequest) Arrays(java.util.Arrays) LoggerFactory(org.slf4j.LoggerFactory) SnomedSearchRequestBuilder(com.b2international.snowowl.snomed.datastore.request.SnomedSearchRequestBuilder) ByteBuffer(java.nio.ByteBuffer) BooleanUtils(com.b2international.commons.BooleanUtils) Path(java.nio.file.Path) Rf2ReleaseType(com.b2international.snowowl.snomed.core.domain.Rf2ReleaseType) Charsets(com.google.common.base.Charsets) Logger(org.slf4j.Logger) DateFormats(com.b2international.snowowl.core.date.DateFormats) RepositoryContext(com.b2international.snowowl.core.domain.RepositoryContext) Files(java.nio.file.Files) SnowowlRuntimeException(com.b2international.snowowl.core.api.SnowowlRuntimeException) Collection(java.util.Collection) Set(java.util.Set) IOException(java.io.IOException) RevisionIndexReadRequest(com.b2international.snowowl.core.request.RevisionIndexReadRequest) PageableCollectionResource(com.b2international.snowowl.core.domain.PageableCollectionResource) List(java.util.List) Stream(java.util.stream.Stream) LocalDate(java.time.LocalDate) FileChannel(java.nio.channels.FileChannel) SnomedComponent(com.b2international.snowowl.snomed.core.domain.SnomedComponent) Joiner(com.google.common.base.Joiner) RandomAccessFile(java.io.RandomAccessFile) FileChannel(java.nio.channels.FileChannel) RevisionIndexReadRequest(com.b2international.snowowl.core.request.RevisionIndexReadRequest) IOException(java.io.IOException) SnowowlRuntimeException(com.b2international.snowowl.core.api.SnowowlRuntimeException)

Example 15 with RepositoryContext

use of com.b2international.snowowl.core.domain.RepositoryContext in project snow-owl by b2ihealthcare.

the class VersionCreateRequest method execute.

@Override
public Boolean execute(RepositoryContext context) {
    final String user = context.service(User.class).getUsername();
    if (!resource.isHead()) {
        throw new BadRequestException("Version '%s' cannot be created on unassigned branch '%s'.", version, resource).withDeveloperMessage("Did you mean to version '%s'?", resource.withoutPath());
    }
    if (resourcesById == null) {
        resourcesById = fetchResources(context);
    }
    if (!resourcesById.containsKey(resource)) {
        context.log().warn("Resource cannot be found during versioning: " + resourcesById + ", uri: " + resource);
        throw new NotFoundException("Resource", resource.getResourceId());
    }
    // validate new path
    RevisionBranch.BranchNameValidator.DEFAULT.checkName(version);
    TerminologyResource resourceToVersion = resourcesById.get(resource);
    // TODO resurrect or eliminate tooling dependencies
    final List<TerminologyResource> resourcesToVersion = List.of(resourcesById.get(resource));
    // final List<CodeSystem> resourcesToVersion = codeSystem.getDependenciesAndSelf()
    // .stream()
    // .map(resourcesById::get)
    // .collect(Collectors.toList());
    resourcesToVersion.stream().filter(cs -> cs.getUpgradeOf() != null).findAny().ifPresent(cs -> {
        throw new BadRequestException("Upgrade resource '%s' can not be versioned.", cs.getResourceURI());
    });
    for (TerminologyResource terminologyResource : resourcesToVersion) {
        // check that the new versionId does not conflict with any other currently available branch
        final String newVersionPath = String.join(Branch.SEPARATOR, terminologyResource.getBranchPath(), version);
        final String repositoryId = terminologyResource.getToolingId();
        if (!force) {
            // branch needs checking in the non-force cases only
            try {
                Branch branch = RepositoryRequests.branching().prepareGet(newVersionPath).build(repositoryId).execute(context);
                if (!branch.isDeleted()) {
                    throw new ConflictException("An existing version or branch with path '%s' conflicts with the specified version identifier.", newVersionPath);
                }
            } catch (NotFoundException e) {
            // branch does not exist, ignore
            }
        } else {
            // if there is no conflict, delete the branch (the request also ignores non-existent branches)
            deleteBranch(context, newVersionPath, repositoryId);
        }
    }
    acquireLocks(context, user, resourcesToVersion);
    final IProgressMonitor monitor = SubMonitor.convert(context.service(IProgressMonitor.class), TASK_WORK_STEP);
    try {
        // resourcesToVersion.forEach(resourceToVersion -> {
        // check that the specified effective time is valid in this code system
        validateVersion(context, resourceToVersion);
        // version components in the given repository
        new RepositoryRequest<>(resourceToVersion.getToolingId(), new BranchRequest<>(resourceToVersion.getBranchPath(), new RevisionIndexReadRequest<CommitResult>(context.service(RepositoryManager.class).get(resourceToVersion.getToolingId()).service(VersioningRequestBuilder.class).build(new VersioningConfiguration(user, resourceToVersion.getResourceURI(), version, description, effectiveTime, force))))).execute(context);
        // tag the repository
        doTag(context, resourceToVersion, monitor);
        // create a version for the resource
        return new BranchRequest<>(Branch.MAIN_PATH, new ResourceRepositoryCommitRequestBuilder().setBody(tx -> {
            tx.add(VersionDocument.builder().id(resource.withPath(version).withoutResourceType()).version(version).description(description).effectiveTime(EffectiveTimes.getEffectiveTime(effectiveTime)).resource(resource).branchPath(resourceToVersion.getRelativeBranchPath(version)).author(user).createdAt(Instant.now().toEpochMilli()).updatedAt(Instant.now().toEpochMilli()).toolingId(resourceToVersion.getToolingId()).url(buildVersionUrl(context, resourceToVersion)).build());
            return Boolean.TRUE;
        }).setCommitComment(CompareUtils.isEmpty(commitComment) ? String.format("Version '%s' as of '%s'", resource, version) : commitComment).build()).execute(context).getResultAs(Boolean.class);
    } finally {
        releaseLocks(context);
        if (null != monitor) {
            monitor.done();
        }
    }
}
Also used : EffectiveTimes(com.b2international.snowowl.core.date.EffectiveTimes) JsonProperty(com.fasterxml.jackson.annotation.JsonProperty) java.util(java.util) SubMonitor(org.eclipse.core.runtime.SubMonitor) RevisionBranch(com.b2international.index.revision.RevisionBranch) Multimap(com.google.common.collect.Multimap) Branch(com.b2international.snowowl.core.branch.Branch) RepositoryRequests(com.b2international.snowowl.core.repository.RepositoryRequests) CREATE_VERSION(com.b2international.snowowl.core.internal.locks.DatastoreLockContextDescriptions.CREATE_VERSION) HashMultimap(com.google.common.collect.HashMultimap) AccessControl(com.b2international.snowowl.core.authorization.AccessControl) DatastoreLockTarget(com.b2international.snowowl.core.internal.locks.DatastoreLockTarget) Permission(com.b2international.snowowl.core.identity.Permission) DatastoreLockContext(com.b2international.snowowl.core.internal.locks.DatastoreLockContext) CompareUtils(com.b2international.commons.CompareUtils) com.b2international.snowowl.core(com.b2international.snowowl.core) NotFoundException(com.b2international.commons.exceptions.NotFoundException) com.b2international.snowowl.core.request(com.b2international.snowowl.core.request) Version(com.b2international.snowowl.core.version.Version) BadRequestException(com.b2international.commons.exceptions.BadRequestException) ConflictException(com.b2international.commons.exceptions.ConflictException) RepositoryContext(com.b2international.snowowl.core.domain.RepositoryContext) Request(com.b2international.snowowl.core.events.Request) JsonFormat(com.fasterxml.jackson.annotation.JsonFormat) Instant(java.time.Instant) NotNull(javax.validation.constraints.NotNull) Collectors(java.util.stream.Collectors) TerminologyRegistry(com.b2international.snowowl.core.terminology.TerminologyRegistry) IProgressMonitor(org.eclipse.core.runtime.IProgressMonitor) VersionDocument(com.b2international.snowowl.core.version.VersionDocument) NotEmpty(org.hibernate.validator.constraints.NotEmpty) LocalDate(java.time.LocalDate) Sort(com.b2international.snowowl.core.request.SearchResourceRequest.Sort) Entry(java.util.Map.Entry) IOperationLockManager(com.b2international.snowowl.core.locks.IOperationLockManager) ResourceURLSchemaSupport(com.b2international.snowowl.core.uri.ResourceURLSchemaSupport) ResourceRepositoryCommitRequestBuilder(com.b2international.snowowl.core.context.ResourceRepositoryCommitRequestBuilder) User(com.b2international.snowowl.core.identity.User) User(com.b2international.snowowl.core.identity.User) ConflictException(com.b2international.commons.exceptions.ConflictException) NotFoundException(com.b2international.commons.exceptions.NotFoundException) IProgressMonitor(org.eclipse.core.runtime.IProgressMonitor) RevisionBranch(com.b2international.index.revision.RevisionBranch) Branch(com.b2international.snowowl.core.branch.Branch) BadRequestException(com.b2international.commons.exceptions.BadRequestException) ResourceRepositoryCommitRequestBuilder(com.b2international.snowowl.core.context.ResourceRepositoryCommitRequestBuilder)

Aggregations

RepositoryContext (com.b2international.snowowl.core.domain.RepositoryContext)18 Request (com.b2international.snowowl.core.events.Request)8 Collectors (java.util.stream.Collectors)8 CompareUtils (com.b2international.commons.CompareUtils)5 BadRequestException (com.b2international.commons.exceptions.BadRequestException)5 Branch (com.b2international.snowowl.core.branch.Branch)5 EffectiveTimes (com.b2international.snowowl.core.date.EffectiveTimes)5 Permission (com.b2international.snowowl.core.identity.Permission)5 IOException (java.io.IOException)5 ResourceURI (com.b2international.snowowl.core.ResourceURI)4 TerminologyResource (com.b2international.snowowl.core.TerminologyResource)4 AccessControl (com.b2international.snowowl.core.authorization.AccessControl)4 RepositoryRequests (com.b2international.snowowl.core.repository.RepositoryRequests)4 SnomedRf2Headers (com.b2international.snowowl.snomed.common.SnomedRf2Headers)4 JsonProperty (com.fasterxml.jackson.annotation.JsonProperty)4 LocalDate (java.time.LocalDate)4 java.util (java.util)4 List (java.util.List)4 Stream (java.util.stream.Stream)4 NotNull (javax.validation.constraints.NotNull)4