001/*
002 * Sonar, open source software quality management tool.
003 * Copyright (C) 2008-2012 SonarSource
004 * mailto:contact AT sonarsource DOT com
005 *
006 * Sonar is free software; you can redistribute it and/or
007 * modify it under the terms of the GNU Lesser General Public
008 * License as published by the Free Software Foundation; either
009 * version 3 of the License, or (at your option) any later version.
010 *
011 * Sonar is distributed in the hope that it will be useful,
012 * but WITHOUT ANY WARRANTY; without even the implied warranty of
013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
014 * Lesser General Public License for more details.
015 *
016 * You should have received a copy of the GNU Lesser General Public
017 * License along with Sonar; if not, write to the Free Software
018 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
019 */
020package org.sonar.api.workflow;
021
022import com.google.common.annotations.Beta;
023
024import java.util.Map;
025
026/**
027 * @since 3.1
028 */
029@Beta
030public interface Review {
031
032  /**
033   * This method will probably be removed in order to decrease
034   * coupling with database.
035   *
036   * @return not-null review id (primary key of the table REVIEWS).
037   */
038  Long getReviewId();
039
040  /**
041   * @return not-null rule repository, for example "checkstyle"
042   */
043  String getRuleRepositoryKey();
044
045  /**
046   * @return not-null rule key
047   */
048  String getRuleKey();
049
050  /**
051   * @return not-null rule name, in English.
052   */
053  String getRuleName();
054
055  boolean isSwitchedOff();
056
057  String getMessage();
058
059  /**
060   * @return not-null properties
061   */
062  Map<String, String> getProperties();
063
064  String getStatus();
065
066  String getResolution();
067
068  /**
069   * @return not-null severity, from INFO to BLOCKER
070   */
071  String getSeverity();
072
073  /**
074   * @return optional line, starting from 1
075   */
076  Long getLine();
077
078  /**
079   * @return true if the violation has been created by an automated rule engine,
080   *         false if created by an end-user.
081   */
082  boolean isManual();
083}