use of jetbrains.buildServer.server.rest.data.problem.MuteData in project teamcity-rest by JetBrains.
the class MuteRequest method deleteInstance.
/**
* Comment is read from the body as an experimental approach
*/
@DELETE
@Path("/{muteLocator}")
@Produces({ "application/xml", "application/json" })
@ApiOperation(value = "Unmute the matching test.", nickname = "unmuteTest")
public void deleteInstance(@ApiParam(format = LocatorName.MUTE) @PathParam("muteLocator") String locatorText, String comment) {
MuteInfo item = myMuteFinder.getItem(locatorText);
MuteData muteData = new MuteData(item.getScope(), StringUtil.isEmpty(comment) ? null : comment, item.getTests(), item.getBuildProblemIds().stream().map(i -> i.longValue()).collect(Collectors.toList()), myServiceLocator);
muteData.unmute();
}
use of jetbrains.buildServer.server.rest.data.problem.MuteData in project teamcity-rest by JetBrains.
the class MuteRequest method createInstances.
/**
* Experimental use only!
*/
@POST
@Path("/multiple")
@Consumes({ "application/xml", "application/json" })
@Produces({ "application/xml", "application/json" })
@ApiOperation(value = "Mute multiple tests.", nickname = "muteMultipleTests")
public Mutes createInstances(Mutes mutes, @QueryParam("fields") String fields) {
List<MuteData> postedEntities = mutes.getFromPosted(myServiceLocator);
// muting after getting objects to report any deserialize errors before
List<MuteInfo> results = postedEntities.stream().map(muteData -> muteData.mute()).collect(Collectors.toList());
return new Mutes(results, null, new Fields(fields), myBeanContext);
}
Aggregations