Search in sources :

Example 1 with OperationException

use of jetbrains.buildServer.server.rest.errors.OperationException in project teamcity-rest by JetBrains.

the class Group method setGroupParents.

public static void setGroupParents(@NotNull final SUserGroup group, @NotNull final Set<SUserGroup> newParents, final boolean revertOnError, @NotNull final ServiceLocator serviceLocator) {
    // workaround for TW-52253
    serviceLocator.getSingletonService(PermissionChecker.class).getServerActionChecker().checkCanEditUserGroup(group);
    Set<SUserGroup> currentParents = group.getParentGroups().stream().map(userGroup -> (SUserGroup) userGroup).collect(Collectors.toSet());
    currentParents.stream().filter(userGroup -> !newParents.contains(userGroup)).forEach(userGroup -> userGroup.removeSubgroup(group));
    try {
        newParents.stream().filter(userGroup -> !currentParents.contains(userGroup)).forEach(userGroup -> userGroup.addSubgroup(group));
    } catch (CycleDetectedException e) {
        if (revertOnError)
            setGroupParents(group, currentParents, false, serviceLocator);
        throw new BadRequestException("Error encountered while trying to set new parent groups", e);
    } catch (AccessDeniedException e) {
        if (revertOnError)
            setGroupParents(group, currentParents, false, serviceLocator);
        throw e;
    } catch (Exception e) {
        if (revertOnError)
            setGroupParents(group, currentParents, false, serviceLocator);
        throw new OperationException("Error encountered while trying to set new parent groups", e);
    }
}
Also used : Fields(jetbrains.buildServer.server.rest.model.Fields) HashMap(java.util.HashMap) PagedSearchResult(jetbrains.buildServer.server.rest.data.PagedSearchResult) SUserGroup(jetbrains.buildServer.groups.SUserGroup) BadRequestException(jetbrains.buildServer.server.rest.errors.BadRequestException) RoleAssignment(jetbrains.buildServer.server.rest.model.user.RoleAssignment) OperationException(jetbrains.buildServer.server.rest.errors.OperationException) XmlType(javax.xml.bind.annotation.XmlType) AccessDeniedException(jetbrains.buildServer.serverSide.auth.AccessDeniedException) Map(java.util.Map) UserGroupManager(jetbrains.buildServer.groups.UserGroupManager) ModelDescription(jetbrains.buildServer.server.rest.swagger.annotations.ModelDescription) XmlAttribute(javax.xml.bind.annotation.XmlAttribute) PermissionChecker(jetbrains.buildServer.server.rest.data.PermissionChecker) RoleAssignments(jetbrains.buildServer.server.rest.model.user.RoleAssignments) Properties(jetbrains.buildServer.server.rest.model.Properties) ServiceLocator(jetbrains.buildServer.ServiceLocator) StringUtil(com.intellij.openapi.util.text.StringUtil) Set(java.util.Set) Users(jetbrains.buildServer.server.rest.model.user.Users) RoleEntry(jetbrains.buildServer.serverSide.auth.RoleEntry) XmlRootElement(javax.xml.bind.annotation.XmlRootElement) ApiUrlBuilder(jetbrains.buildServer.server.rest.ApiUrlBuilder) Locator(jetbrains.buildServer.server.rest.data.Locator) ValueWithDefault(jetbrains.buildServer.server.rest.util.ValueWithDefault) Collectors(java.util.stream.Collectors) NotFoundException(jetbrains.buildServer.server.rest.errors.NotFoundException) GroupRequest(jetbrains.buildServer.server.rest.request.GroupRequest) UserFinder(jetbrains.buildServer.server.rest.data.UserFinder) BeanContext(jetbrains.buildServer.server.rest.util.BeanContext) NotNull(org.jetbrains.annotations.NotNull) CycleDetectedException(jetbrains.buildServer.groups.CycleDetectedException) PropertyKey(jetbrains.buildServer.users.PropertyKey) SUser(jetbrains.buildServer.users.SUser) XmlElement(javax.xml.bind.annotation.XmlElement) AccessDeniedException(jetbrains.buildServer.serverSide.auth.AccessDeniedException) CycleDetectedException(jetbrains.buildServer.groups.CycleDetectedException) BadRequestException(jetbrains.buildServer.server.rest.errors.BadRequestException) SUserGroup(jetbrains.buildServer.groups.SUserGroup) BadRequestException(jetbrains.buildServer.server.rest.errors.BadRequestException) OperationException(jetbrains.buildServer.server.rest.errors.OperationException) AccessDeniedException(jetbrains.buildServer.serverSide.auth.AccessDeniedException) NotFoundException(jetbrains.buildServer.server.rest.errors.NotFoundException) CycleDetectedException(jetbrains.buildServer.groups.CycleDetectedException) OperationException(jetbrains.buildServer.server.rest.errors.OperationException)

Example 2 with OperationException

use of jetbrains.buildServer.server.rest.errors.OperationException in project teamcity-rest by JetBrains.

the class FilesSubResource method getStreamingOutput.

private static StreamingOutput getStreamingOutput(@NotNull final Element element, @Nullable final Long startOffset, @Nullable final Long length) {
    return new StreamingOutput() {

        @Override
        public void write(final OutputStream output) throws WebApplicationException {
            InputStream inputStream = null;
            Stopwatch action = Stopwatch.createStarted();
            try {
                inputStream = element.getInputStream();
                if (startOffset != null || length != null) {
                    TCStreamUtil.skip(inputStream, startOffset != null ? startOffset : 0);
                    TCStreamUtil.writeBinary(inputStream, length != null ? length : element.getSize(), output);
                } else {
                    TCStreamUtil.writeBinary(inputStream, output);
                }
            } catch (IOException e) {
                // todo add better processing
                throw new OperationException("Error while processing file '" + element.getFullName() + "': " + e.toString(), e);
            } finally {
                FileUtil.close(inputStream);
                if (LOG.isDebugEnabled()) {
                    LOG.debug("Finished processing download of file \"" + element.getFullName() + "\" (" + StringUtil.formatFileSize(element.getSize()) + ")" + " in " + TimePrinter.createMillisecondsFormatter().formatTime(action.elapsed(TimeUnit.MILLISECONDS)) + " for a REST request");
                }
            }
        }
    };
}
Also used : InputStream(java.io.InputStream) OutputStream(java.io.OutputStream) Stopwatch(com.google.common.base.Stopwatch) IOException(java.io.IOException) OperationException(jetbrains.buildServer.server.rest.errors.OperationException)

Example 3 with OperationException

use of jetbrains.buildServer.server.rest.errors.OperationException in project teamcity-rest by JetBrains.

the class Build method getBuildToTrigger.

private BuildPromotion getBuildToTrigger(@Nullable final SUser user, @NotNull final ServiceLocator serviceLocator, @NotNull final Map<Long, Long> buildPromotionIdReplacements) {
    SVcsModification changeToUse = null;
    SVcsModification personalChangeToUse = null;
    if (submittedLastChanges != null) {
        List<SVcsModification> lastChanges = submittedLastChanges.getChangesFromPosted(serviceLocator.getSingletonService(ChangeFinder.class));
        if (lastChanges.size() > 0) {
            boolean changeProcessed = false;
            boolean personalChangeProcessed = false;
            for (SVcsModification change : lastChanges) {
                if (!change.isPersonal()) {
                    if (!changeProcessed) {
                        changeToUse = change;
                        changeProcessed = true;
                    } else {
                        throw new BadRequestException("Several non-personal changes are submitted, only one can be present");
                    }
                } else {
                    if (!personalChangeProcessed) {
                        personalChangeToUse = change;
                        personalChangeProcessed = true;
                    } else {
                        throw new BadRequestException("Several personal changes are submitted, only one can be present");
                    }
                }
            }
        }
    }
    final SBuildType submittedBuildType = getSubmittedBuildType(serviceLocator, personalChangeToUse, user);
    final BuildCustomizer customizer = serviceLocator.getSingletonService(BuildCustomizerFactory.class).createBuildCustomizer(submittedBuildType, user);
    if (changeToUse != null) {
        // might need to rework after comparison to code in jetbrains.buildServer.controllers.RunBuildBean.setupBuildCustomizer: customizer.setNodeRevisions, etc.
        customizer.setChangesUpTo(changeToUse);
    }
    if (submittedComment != null) {
        if (submittedComment.text != null) {
            customizer.setBuildComment(submittedComment.text);
        } else {
            throw new BadRequestException("Submitted comment does not have 'text' set.");
        }
    }
    if (submittedProperties != null) {
        customizer.setParameters(submittedProperties.getMap());
    }
    // this should ideally be used only when defaultBranc flag is not set. If set to false, should use customizer.setDesiredBranchName(submittedBranchName, false)
    if (submittedBranchName != null)
        customizer.setDesiredBranchName(submittedBranchName);
    if (submittedPersonal != null)
        customizer.setPersonal(submittedPersonal);
    if (submittedBuildDependencies != null) {
        try {
            customizer.setSnapshotDependencyNodes(submittedBuildDependencies.getFromPosted(serviceLocator, buildPromotionIdReplacements));
        } catch (IllegalArgumentException e) {
            throw new BadRequestException("Error trying to use specified snapshot dependencies" + getRelatedBuildDescription() + ":" + e.getMessage());
        } catch (NotFoundException e) {
            throw new BadRequestException("Error searching for snapshot dependency" + getRelatedBuildDescription() + ": " + e.getMessage(), e);
        }
    }
    if (submittedTriggeringOptions != null) {
        if (submittedTriggeringOptions.cleanSources != null) {
            customizer.setCleanSources(submittedTriggeringOptions.cleanSources);
        }
        if (submittedTriggeringOptions.cleanSourcesInAllDependencies != null) {
            ((BuildCustomizerEx) customizer).setApplyCleanSourcesToDependencies(submittedTriggeringOptions.cleanSourcesInAllDependencies);
        }
        if (submittedTriggeringOptions.freezeSettings != null) {
            ((BuildCustomizerEx) customizer).setFreezeSettings(submittedTriggeringOptions.freezeSettings);
        }
        if (submittedTriggeringOptions.tagDependencies != null) {
            ((BuildCustomizerEx) customizer).setApplyTagsToDependencies(submittedTriggeringOptions.tagDependencies);
        }
        if (submittedTriggeringOptions.rebuildAllDependencies != null) {
            customizer.setRebuildDependencies(submittedTriggeringOptions.rebuildAllDependencies);
        }
        if (submittedTriggeringOptions.rebuildFailedOrIncompleteDependencies != null && submittedTriggeringOptions.rebuildFailedOrIncompleteDependencies) {
            ((BuildCustomizerEx) customizer).setRebuildDependencies(BuildCustomizerEx.RebuildDependenciesMode.FAILED_OR_INCOMPLETE);
        }
        if (submittedTriggeringOptions.rebuildDependencies != null) {
            customizer.setRebuildDependencies(CollectionsUtil.convertCollection(submittedTriggeringOptions.rebuildDependencies.getFromPosted(serviceLocator.getSingletonService(BuildTypeFinder.class)), new Converter<String, BuildTypeOrTemplate>() {

                public String createFrom(@NotNull final BuildTypeOrTemplate source) {
                    if (source.getBuildType() == null) {
                        // noinspection ConstantConditions
                        throw new BadRequestException("Template is specified instead of a build type. Template id: '" + source.getTemplate().getExternalId() + "'");
                    }
                    return source.getBuildType().getInternalId();
                }
            }));
        }
    }
    List<BuildPromotion> artifactDepsBuildsPosted = null;
    try {
        artifactDepsBuildsPosted = submittedBuildArtifactDependencies == null ? null : submittedBuildArtifactDependencies.getFromPosted(serviceLocator, buildPromotionIdReplacements);
    } catch (NotFoundException e) {
        throw new BadRequestException("Error searching for artifact dependency" + getRelatedBuildDescription() + ": " + e.getMessage(), e);
    }
    if (submittedCustomBuildArtifactDependencies != null) {
        // todo: investigate if OK: here new dependencies are created and set into the build. Custom run build dialog onthe contrary, sets artifact deps with the same IDs into the build
        final List<SArtifactDependency> customDeps = submittedCustomBuildArtifactDependencies.getFromPosted(submittedBuildType.getArtifactDependencies(), serviceLocator);
        if (artifactDepsBuildsPosted == null) {
            setDepsWithNullCheck(customizer, customDeps);
        } else {
            // patch with "artifact-dependencies"
            setDepsWithNullCheck(customizer, getBuildPatchedDeps(customDeps, true, serviceLocator, artifactDepsBuildsPosted));
        }
    } else {
        if (artifactDepsBuildsPosted != null) {
            // use "artifact-dependencies" as the only dependencies as this allows to repeat a build
            setDepsWithNullCheck(customizer, getBuildPatchedDeps(submittedBuildType.getArtifactDependencies(), false, serviceLocator, artifactDepsBuildsPosted));
        } else {
        // no artifact dependencies customizations necessary
        }
    }
    if (submittedTags != null) {
        customizer.setTagDatas(new HashSet<TagData>(submittedTags.getFromPosted(serviceLocator.getSingletonService(UserFinder.class))));
    }
    if (submittedAttributes != null) {
        customizer.setAttributes(submittedAttributes.getMap());
    }
    final BuildPromotion result;
    try {
        result = customizer.createPromotion();
    } catch (IllegalStateException e) {
        // IllegalStateException is thrown e.g. when we try to create a personal build in a build type which does not allow this
        throw new BadRequestException("Cannot trigger build: " + e.getMessage());
    } catch (RevisionsNotFoundException e) {
        throw new BadRequestException("Cannot trigger build, if the changes are specified, they should be visible on the build configuration Change Log under the requested branch. Original error: " + e.getMessage());
    }
    BuildTypeEx modifiedBuildType = getCustomizedSubmittedBuildType(serviceLocator);
    if (modifiedBuildType != null) {
        // it's core's responsibility to check permissions here
        try {
            ((BuildPromotionEx) result).freezeSettings(modifiedBuildType, "rest");
        } catch (IOException e) {
            // include nested erorr or it can expose too much data?
            throw new OperationException("Error while freezing promotion settings", e);
        }
    }
    return result;
}
Also used : RevisionsNotFoundException(jetbrains.buildServer.vcs.impl.RevisionsNotFoundException) NotFoundException(jetbrains.buildServer.server.rest.errors.NotFoundException) NotNull(org.jetbrains.annotations.NotNull) SVcsModification(jetbrains.buildServer.vcs.SVcsModification) RevisionsNotFoundException(jetbrains.buildServer.vcs.impl.RevisionsNotFoundException) Converter(jetbrains.buildServer.util.Converter) OperationException(jetbrains.buildServer.server.rest.errors.OperationException) BuildTypeOrTemplate(jetbrains.buildServer.server.rest.util.BuildTypeOrTemplate) IOException(java.io.IOException) SArtifactDependency(jetbrains.buildServer.serverSide.artifacts.SArtifactDependency) BadRequestException(jetbrains.buildServer.server.rest.errors.BadRequestException)

Example 4 with OperationException

use of jetbrains.buildServer.server.rest.errors.OperationException in project teamcity-rest by JetBrains.

the class PropEntityAgentRequirement method addToMain.

@NotNull
public Requirement addToMain(@NotNull final BuildTypeSettingsEx buildType, @NotNull final ServiceLocator serviceLocator) {
    final Map<String, String> propertiesMap = properties == null ? Collections.emptyMap() : properties.getMap();
    String propertyName = propertiesMap.get(NAME_PROPERTY_NAME);
    if (StringUtil.isEmpty(propertyName)) {
        throw new BadRequestException("No name is specified. Make sure '" + NAME_PROPERTY_NAME + "' property is present and has not empty value");
    }
    Requirement similar = getInheritedOrSameIdSimilar(buildType, serviceLocator);
    if (inherited != null && inherited && similar != null) {
        return similar;
    }
    if (similar != null && id != null && id.equals(similar.getId())) {
        // todo
        return similar;
    }
    @NotNull final RequirementFactory factory = serviceLocator.getSingletonService(RequirementFactory.class);
    String forcedId = null;
    // special case for "overriden" entities
    if (id != null) {
        for (Requirement item : buildType.getRequirements()) {
            if (id.equals(item.getId())) {
                forcedId = id;
                break;
            }
        }
    }
    Requirement requirementToAdd;
    if (forcedId != null) {
        requirementToAdd = factory.createRequirement(forcedId, propertyName, propertiesMap.get(NAME_PROPERTY_VALUE), getSubmittedType());
    } else {
        requirementToAdd = factory.createRequirement(propertyName, propertiesMap.get(NAME_PROPERTY_VALUE), getSubmittedType());
    }
    String requirementId = requirementToAdd.getId();
    if (requirementId == null && disabled != null) {
        // throw exception before adding requirement to the model
        throw new OperationException("Cannot set disabled state for an entity without id");
    }
    buildType.addRequirement(requirementToAdd);
    if (disabled != null) {
        buildType.setEnabled(requirementId, !disabled);
    }
    return requirementToAdd;
}
Also used : Requirement(jetbrains.buildServer.requirements.Requirement) BadRequestException(jetbrains.buildServer.server.rest.errors.BadRequestException) RequirementFactory(jetbrains.buildServer.serverSide.RequirementFactory) NotNull(org.jetbrains.annotations.NotNull) OperationException(jetbrains.buildServer.server.rest.errors.OperationException) NotNull(org.jetbrains.annotations.NotNull)

Example 5 with OperationException

use of jetbrains.buildServer.server.rest.errors.OperationException in project teamcity-rest by JetBrains.

the class Build method getArtifactDependencyChanges.

@NotNull
private static List<BuildChangeData> getArtifactDependencyChanges(@NotNull final BuildPromotion build, @NotNull final ServiceLocator serviceLocator) {
    // see also jetbrains.buildServer.server.rest.data.ChangeFinder.getBuildChanges
    ArtifactDependencyChangesProvider changesProvider = new ArtifactDependencyChangesProvider(build, ChangeFinder.getBuildChangesPolicy(), serviceLocator.getSingletonService(BuildsManager.class), serviceLocator.getSingletonService(DownloadedArtifactsLoggerImpl.class));
    List<ChangeDescriptor> detectedChanges = changesProvider.getDetectedChanges();
    if (detectedChanges.isEmpty()) {
        return Collections.emptyList();
    }
    if (detectedChanges.size() > 1) {
        throw new OperationException("Unexpected state: more than one (" + detectedChanges.size() + ") artifact changes found");
    }
    ChangeDescriptor changeDescriptor = detectedChanges.get(0);
    if (!ChangeDescriptorConstants.ARTIFACT_DEPENDENCY_CHANGE.equals(changeDescriptor.getType())) {
        throw new OperationException("Unexpected state: unknown type of artifact dependency change: '" + changeDescriptor.getType() + "'");
    }
    try {
        Object o = changeDescriptor.getAssociatedData().get(ArtifactDependencyChangesProvider.CHANGED_DEPENDENCIES_ATTR);
        // Actually result is List<ArtifactDependencyChangesProvider.ArtifactsChangeDescriptor>
        if (o == null) {
            return Collections.emptyList();
        } else {
            // noinspection unchecked
            return ((List<ChangeDescriptor>) o).stream().map(descr -> {
                Map<String, Object> associatedData = descr.getAssociatedData();
                SBuild prevBuild = (SBuild) associatedData.get(ArtifactDependencyChangesProvider.OLD_BUILD_ATTR);
                SBuild nextBuild = (SBuild) associatedData.get(ArtifactDependencyChangesProvider.NEW_BUILD_ATTR);
                if (prevBuild == null && nextBuild == null)
                    return null;
                return new BuildChangeData(Util.resolveNull(prevBuild, (b) -> b.getBuildPromotion()), Util.resolveNull(nextBuild, (b) -> b.getBuildPromotion()));
            }).filter(Objects::nonNull).collect(Collectors.toList());
        }
    } catch (Exception e) {
        throw new OperationException("Unexpected state while getting artifact dependency details: " + e.toString(), e);
    }
}
Also used : MetadataStorageEx(jetbrains.buildServer.serverSide.metadata.impl.MetadataStorageEx) BuildProblem(jetbrains.buildServer.serverSide.problems.BuildProblem) Files(jetbrains.buildServer.server.rest.model.files.Files) VcsModificationHistory(jetbrains.buildServer.vcs.VcsModificationHistory) Agent(jetbrains.buildServer.server.rest.model.agent.Agent) AuthorityHolder(jetbrains.buildServer.serverSide.auth.AuthorityHolder) BuildDependency(jetbrains.buildServer.serverSide.dependency.BuildDependency) PasswordReplacer(jetbrains.buildServer.util.PasswordReplacer) BuildTypeOrTemplate(jetbrains.buildServer.server.rest.util.BuildTypeOrTemplate) ActionTypesFilter(jetbrains.buildServer.serverSide.impl.audit.filters.ActionTypesFilter) jetbrains.buildServer.server.rest.data(jetbrains.buildServer.server.rest.data) BadRequestException(jetbrains.buildServer.server.rest.errors.BadRequestException) BuildType(jetbrains.buildServer.server.rest.model.buildType.BuildType) BigDecimal(java.math.BigDecimal) OperationException(jetbrains.buildServer.server.rest.errors.OperationException) ActionType(jetbrains.buildServer.serverSide.audit.ActionType) TestOccurrenceFinder(jetbrains.buildServer.server.rest.data.problem.TestOccurrenceFinder) AccessDeniedException(jetbrains.buildServer.serverSide.auth.AccessDeniedException) RevisionsNotFoundException(jetbrains.buildServer.vcs.impl.RevisionsNotFoundException) SArtifactDependency(jetbrains.buildServer.serverSide.artifacts.SArtifactDependency) StringUtil(jetbrains.buildServer.util.StringUtil) LogUtil(jetbrains.buildServer.serverSide.impl.LogUtil) Logger(com.intellij.openapi.diagnostic.Logger) CollectionsUtil(jetbrains.buildServer.util.CollectionsUtil) ModelDescription(jetbrains.buildServer.server.rest.swagger.annotations.ModelDescription) AuditLogAction(jetbrains.buildServer.serverSide.audit.AuditLogAction) CanceledInfo(jetbrains.buildServer.serverSide.userChanges.CanceledInfo) SelectPrevBuildPolicy(jetbrains.buildServer.vcs.SelectPrevBuildPolicy) WaitReason(jetbrains.buildServer.serverSide.buildDistribution.WaitReason) AgentTypeFinder(jetbrains.buildServer.serverSide.agentTypes.AgentTypeFinder) AgentRestrictor(jetbrains.buildServer.AgentRestrictor) ServiceLocator(jetbrains.buildServer.ServiceLocator) BaseBuild(jetbrains.buildServer.serverSide.impl.BaseBuild) UserModel(jetbrains.buildServer.users.UserModel) jetbrains.buildServer.serverSide(jetbrains.buildServer.serverSide) Changes(jetbrains.buildServer.server.rest.model.change.Changes) BuildProblemImpl(jetbrains.buildServer.serverSide.impl.problems.BuildProblemImpl) TagFinder(jetbrains.buildServer.server.rest.data.build.TagFinder) Revisions(jetbrains.buildServer.server.rest.model.change.Revisions) Collectors(java.util.stream.Collectors) ChangesBean(jetbrains.buildServer.controllers.changes.ChangesBean) ProblemOccurrenceFinder(jetbrains.buildServer.server.rest.data.problem.ProblemOccurrenceFinder) Nullable(org.jetbrains.annotations.Nullable) TestOccurrences(jetbrains.buildServer.server.rest.model.problem.TestOccurrences) InvalidStateException(jetbrains.buildServer.server.rest.errors.InvalidStateException) BuildAgent(jetbrains.buildServer.BuildAgent) RevisionRule(jetbrains.buildServer.artifacts.RevisionRule) PasswordParametersFilterCore(jetbrains.buildServer.parameters.PasswordParametersFilterCore) NotFoundException(jetbrains.buildServer.server.rest.errors.NotFoundException) AgentRestrictorType(jetbrains.buildServer.AgentRestrictorType) Branch(jetbrains.buildServer.serverSide.Branch) BuildChangeData(jetbrains.buildServer.server.rest.data.change.BuildChangeData) BeanContext(jetbrains.buildServer.server.rest.util.BeanContext) NotNull(org.jetbrains.annotations.NotNull) SVcsModification(jetbrains.buildServer.vcs.SVcsModification) ChangesPopupUtil(jetbrains.buildServer.controllers.changes.ChangesPopupUtil) java.util(java.util) SVcsModificationOrChangeDescriptor(jetbrains.buildServer.server.rest.data.change.SVcsModificationOrChangeDescriptor) User(jetbrains.buildServer.server.rest.model.user.User) Converter(jetbrains.buildServer.util.Converter) IssueUsages(jetbrains.buildServer.server.rest.model.issue.IssueUsages) Hex(org.apache.commons.codec.binary.Hex) Function(java.util.function.Function) Supplier(java.util.function.Supplier) ParametersProvider(jetbrains.buildServer.parameters.ParametersProvider) jetbrains.buildServer.server.rest.model(jetbrains.buildServer.server.rest.model) Agents(jetbrains.buildServer.server.rest.model.agent.Agents) AgentPool(jetbrains.buildServer.serverSide.agentPools.AgentPool) Element(jetbrains.buildServer.util.browser.Element) PropEntitiesArtifactDep(jetbrains.buildServer.server.rest.model.buildType.PropEntitiesArtifactDep) XmlType(javax.xml.bind.annotation.XmlType) PasswordsSearcher(jetbrains.buildServer.serverSide.parameters.types.PasswordsSearcher) SAgentType(jetbrains.buildServer.serverSide.agentTypes.SAgentType) RevisionRules(jetbrains.buildServer.artifacts.RevisionRules) Revision(jetbrains.buildServer.server.rest.model.change.Revision) ProblemOccurrences(jetbrains.buildServer.server.rest.model.problem.ProblemOccurrences) XmlAttribute(javax.xml.bind.annotation.XmlAttribute) BuildChanges(jetbrains.buildServer.server.rest.model.change.BuildChanges) Properties(jetbrains.buildServer.server.rest.model.Properties) CachingValue(jetbrains.buildServer.server.rest.util.CachingValue) IOException(java.io.IOException) ArtifactDependencyChangesProvider(jetbrains.buildServer.serverSide.impl.changeProviders.ArtifactDependencyChangesProvider) XmlRootElement(javax.xml.bind.annotation.XmlRootElement) ValueWithDefault(jetbrains.buildServer.server.rest.util.ValueWithDefault) DownloadedArtifacts(jetbrains.buildServer.server.rest.model.build.downloadedArtifacts.DownloadedArtifacts) DownloadedArtifactsLoggerImpl(jetbrains.buildServer.serverSide.impl.DownloadedArtifactsLoggerImpl) jetbrains.buildServer.server.rest.request(jetbrains.buildServer.server.rest.request) MapParametersProviderImpl(jetbrains.buildServer.parameters.impl.MapParametersProviderImpl) VcsLabelManager(jetbrains.buildServer.serverSide.vcs.VcsLabelManager) FileApiUrlBuilder(jetbrains.buildServer.server.rest.model.files.FileApiUrlBuilder) Permission(jetbrains.buildServer.serverSide.auth.Permission) BuildMetadataEntry(jetbrains.buildServer.serverSide.metadata.BuildMetadataEntry) SUser(jetbrains.buildServer.users.SUser) XmlElement(javax.xml.bind.annotation.XmlElement) DownloadedArtifactsLoggerImpl(jetbrains.buildServer.serverSide.impl.DownloadedArtifactsLoggerImpl) BuildChangeData(jetbrains.buildServer.server.rest.data.change.BuildChangeData) SVcsModificationOrChangeDescriptor(jetbrains.buildServer.server.rest.data.change.SVcsModificationOrChangeDescriptor) BadRequestException(jetbrains.buildServer.server.rest.errors.BadRequestException) OperationException(jetbrains.buildServer.server.rest.errors.OperationException) AccessDeniedException(jetbrains.buildServer.serverSide.auth.AccessDeniedException) RevisionsNotFoundException(jetbrains.buildServer.vcs.impl.RevisionsNotFoundException) InvalidStateException(jetbrains.buildServer.server.rest.errors.InvalidStateException) NotFoundException(jetbrains.buildServer.server.rest.errors.NotFoundException) IOException(java.io.IOException) ArtifactDependencyChangesProvider(jetbrains.buildServer.serverSide.impl.changeProviders.ArtifactDependencyChangesProvider) OperationException(jetbrains.buildServer.server.rest.errors.OperationException) NotNull(org.jetbrains.annotations.NotNull)

Aggregations

OperationException (jetbrains.buildServer.server.rest.errors.OperationException)14 NotNull (org.jetbrains.annotations.NotNull)9 IOException (java.io.IOException)7 BadRequestException (jetbrains.buildServer.server.rest.errors.BadRequestException)7 NotFoundException (jetbrains.buildServer.server.rest.errors.NotFoundException)5 InputStream (java.io.InputStream)2 UnknownHostException (java.net.UnknownHostException)2 SQLException (java.sql.SQLException)2 ArrayList (java.util.ArrayList)2 Collectors (java.util.stream.Collectors)2 XmlAttribute (javax.xml.bind.annotation.XmlAttribute)2 XmlElement (javax.xml.bind.annotation.XmlElement)2 XmlRootElement (javax.xml.bind.annotation.XmlRootElement)2 XmlType (javax.xml.bind.annotation.XmlType)2 ServiceLocator (jetbrains.buildServer.ServiceLocator)2 AuthorizationFailedException (jetbrains.buildServer.server.rest.errors.AuthorizationFailedException)2 SUser (jetbrains.buildServer.users.SUser)2 Stopwatch (com.google.common.base.Stopwatch)1 Logger (com.intellij.openapi.diagnostic.Logger)1 StringUtil (com.intellij.openapi.util.text.StringUtil)1