001 /* 002 * SonarQube, open source software quality management tool. 003 * Copyright (C) 2008-2013 SonarSource 004 * mailto:contact AT sonarsource DOT com 005 * 006 * SonarQube 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 * SonarQube 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 License 017 * along with this program; if not, write to the Free Software Foundation, 018 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 019 */ 020 package org.sonar.wsclient.services; 021 022 import javax.annotation.CheckForNull; 023 import javax.annotation.Nullable; 024 025 import java.util.List; 026 027 /** 028 * @since 2.5 029 */ 030 public class Rule extends Model { 031 032 private String title = null; 033 private String key = null; 034 private String configKey = null; 035 private String repository = null; 036 private String description = null; 037 private String severity = null; 038 private List<RuleParam> params; 039 private boolean active; 040 041 @CheckForNull 042 public String getTitle() { 043 return title; 044 } 045 046 public Rule setTitle(@Nullable String title) { 047 this.title = title; 048 return this; 049 } 050 051 @CheckForNull 052 public String getKey() { 053 return key; 054 } 055 056 public Rule setKey(@Nullable String key) { 057 this.key = key; 058 return this; 059 } 060 061 /** 062 * @since 2.7 063 */ 064 @CheckForNull 065 public String getConfigKey() { 066 return configKey; 067 } 068 069 /** 070 * @since 2.7 071 */ 072 073 public Rule setConfigKey(@Nullable String s) { 074 this.configKey = s; 075 return this; 076 } 077 078 @CheckForNull 079 public String getRepository() { 080 return repository; 081 } 082 083 public Rule setRepository(@Nullable String s) { 084 this.repository = s; 085 return this; 086 } 087 088 @CheckForNull 089 public String getDescription() { 090 return description; 091 } 092 093 public Rule setDescription(@Nullable String description) { 094 this.description = description; 095 return this; 096 } 097 098 @CheckForNull 099 public String getSeverity() { 100 return severity; 101 } 102 103 public Rule setSeverity(@Nullable String severity) { 104 this.severity = severity; 105 return this; 106 } 107 108 public void setActive(boolean active) { 109 this.active = active; 110 } 111 112 public boolean isActive() { 113 return active; 114 } 115 116 public List<RuleParam> getParams() { 117 return params; 118 } 119 120 public void setParams(List<RuleParam> params) { 121 this.params = params; 122 } 123 124 }