diff options
Diffstat (limited to 'it/it-plugins/required-measures-widgets-plugin/src/main')
19 files changed, 0 insertions, 343 deletions
diff --git a/it/it-plugins/required-measures-widgets-plugin/src/main/java/org/sonar/samples/AbstractWidget.java b/it/it-plugins/required-measures-widgets-plugin/src/main/java/org/sonar/samples/AbstractWidget.java deleted file mode 100644 index e142c133358..00000000000 --- a/it/it-plugins/required-measures-widgets-plugin/src/main/java/org/sonar/samples/AbstractWidget.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2016 SonarSource SA - * mailto:contact AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package org.sonar.samples; - -import org.sonar.api.web.AbstractRubyTemplate; -import org.sonar.api.web.RubyRailsWidget; - -public abstract class AbstractWidget extends AbstractRubyTemplate implements RubyRailsWidget { - - public String getId() { - return this.getClass().getSimpleName(); - } - - public String getTitle() { - return getId(); - } - - @Override - protected String getTemplatePath() { - return "/" + getId() + ".html.erb"; - } -} diff --git a/it/it-plugins/required-measures-widgets-plugin/src/main/java/org/sonar/samples/RequiredMeasuresWidgetsDashboard.java b/it/it-plugins/required-measures-widgets-plugin/src/main/java/org/sonar/samples/RequiredMeasuresWidgetsDashboard.java deleted file mode 100644 index 5799449a7b3..00000000000 --- a/it/it-plugins/required-measures-widgets-plugin/src/main/java/org/sonar/samples/RequiredMeasuresWidgetsDashboard.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2016 SonarSource SA - * mailto:contact AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package org.sonar.samples; - -import org.sonar.api.web.Dashboard; -import org.sonar.api.web.DashboardLayout; -import org.sonar.api.web.DashboardTemplate; - -public final class RequiredMeasuresWidgetsDashboard extends DashboardTemplate { - - @Override - public String getName() { - return "RequiredMeasuresWidgetsDashboard"; - } - - @Override - public Dashboard createDashboard() { - Dashboard dashboard = Dashboard.create(); - dashboard.setLayout(DashboardLayout.TWO_COLUMNS); - dashboard.addWidget("WidgetMandatoryAndOneOfSatisfied", 1); - dashboard.addWidget("WidgetMandatoryNotSatisfied", 1); - dashboard.addWidget("WidgetMandatorySatisfied", 1); - dashboard.addWidget("WidgetMandatorySatisfiedButNotOneOf", 1); - dashboard.addWidget("WidgetNoConstraints", 1); - dashboard.addWidget("WidgetOneOfNotSatisfied", 1); - dashboard.addWidget("WidgetOneOfSatisfied", 1); - dashboard.addWidget("WidgetOneOfSatisfiedButNotMandatory", 1); - return dashboard; - } - -} diff --git a/it/it-plugins/required-measures-widgets-plugin/src/main/java/org/sonar/samples/RequiredMeasuresWidgetsPlugin.java b/it/it-plugins/required-measures-widgets-plugin/src/main/java/org/sonar/samples/RequiredMeasuresWidgetsPlugin.java deleted file mode 100644 index b4286630fff..00000000000 --- a/it/it-plugins/required-measures-widgets-plugin/src/main/java/org/sonar/samples/RequiredMeasuresWidgetsPlugin.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2016 SonarSource SA - * mailto:contact AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package org.sonar.samples; - -import java.util.Arrays; -import java.util.List; -import org.sonar.api.SonarPlugin; - -public final class RequiredMeasuresWidgetsPlugin extends SonarPlugin { - @SuppressWarnings({"unchecked", "rawtypes"}) - public List getExtensions() { - return Arrays.asList(RequiredMeasuresWidgetsDashboard.class, - WidgetMandatoryAndOneOfSatisfied.class, WidgetMandatoryNotSatisfied.class, - WidgetMandatorySatisfied.class, WidgetMandatorySatisfiedButNotOneOf.class, - WidgetNoConstraints.class, WidgetOneOfNotSatisfied.class, - WidgetOneOfSatisfied.class, WidgetOneOfSatisfiedButNotMandatory.class); - } -} diff --git a/it/it-plugins/required-measures-widgets-plugin/src/main/java/org/sonar/samples/WidgetMandatoryAndOneOfSatisfied.java b/it/it-plugins/required-measures-widgets-plugin/src/main/java/org/sonar/samples/WidgetMandatoryAndOneOfSatisfied.java deleted file mode 100644 index fcda9010a29..00000000000 --- a/it/it-plugins/required-measures-widgets-plugin/src/main/java/org/sonar/samples/WidgetMandatoryAndOneOfSatisfied.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2016 SonarSource SA - * mailto:contact AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package org.sonar.samples; - -import org.sonar.api.web.RequiredMeasures; - -@RequiredMeasures(allOf = {"lines", "complexity"}, anyOf = {"non-core-metric", "lines", "complexity"}) -public class WidgetMandatoryAndOneOfSatisfied extends AbstractWidget { -} diff --git a/it/it-plugins/required-measures-widgets-plugin/src/main/java/org/sonar/samples/WidgetMandatoryNotSatisfied.java b/it/it-plugins/required-measures-widgets-plugin/src/main/java/org/sonar/samples/WidgetMandatoryNotSatisfied.java deleted file mode 100644 index 07bc2678809..00000000000 --- a/it/it-plugins/required-measures-widgets-plugin/src/main/java/org/sonar/samples/WidgetMandatoryNotSatisfied.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2016 SonarSource SA - * mailto:contact AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package org.sonar.samples; - -import org.sonar.api.web.RequiredMeasures; - -@RequiredMeasures(allOf = {"lines", "non-core-metric"}) -public class WidgetMandatoryNotSatisfied extends AbstractWidget { -} diff --git a/it/it-plugins/required-measures-widgets-plugin/src/main/java/org/sonar/samples/WidgetMandatorySatisfied.java b/it/it-plugins/required-measures-widgets-plugin/src/main/java/org/sonar/samples/WidgetMandatorySatisfied.java deleted file mode 100644 index 83931b81ca0..00000000000 --- a/it/it-plugins/required-measures-widgets-plugin/src/main/java/org/sonar/samples/WidgetMandatorySatisfied.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2016 SonarSource SA - * mailto:contact AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package org.sonar.samples; - -import org.sonar.api.web.RequiredMeasures; - -@RequiredMeasures(allOf={"lines", "complexity"}) -public class WidgetMandatorySatisfied extends AbstractWidget { -} diff --git a/it/it-plugins/required-measures-widgets-plugin/src/main/java/org/sonar/samples/WidgetMandatorySatisfiedButNotOneOf.java b/it/it-plugins/required-measures-widgets-plugin/src/main/java/org/sonar/samples/WidgetMandatorySatisfiedButNotOneOf.java deleted file mode 100644 index 938490fcfb3..00000000000 --- a/it/it-plugins/required-measures-widgets-plugin/src/main/java/org/sonar/samples/WidgetMandatorySatisfiedButNotOneOf.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2016 SonarSource SA - * mailto:contact AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package org.sonar.samples; - -import org.sonar.api.web.RequiredMeasures; - -@RequiredMeasures(allOf={"lines", "complexity"}, anyOf={"non-core-metric1", "non-core-metric2", "non-core-metric3"}) -public class WidgetMandatorySatisfiedButNotOneOf extends AbstractWidget { -} diff --git a/it/it-plugins/required-measures-widgets-plugin/src/main/java/org/sonar/samples/WidgetNoConstraints.java b/it/it-plugins/required-measures-widgets-plugin/src/main/java/org/sonar/samples/WidgetNoConstraints.java deleted file mode 100644 index ae2cc6171c3..00000000000 --- a/it/it-plugins/required-measures-widgets-plugin/src/main/java/org/sonar/samples/WidgetNoConstraints.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2016 SonarSource SA - * mailto:contact AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package org.sonar.samples; - - -/** - * Widget without @RequiredMeasures annotation => should always be displayed - */ -public class WidgetNoConstraints extends AbstractWidget { -} diff --git a/it/it-plugins/required-measures-widgets-plugin/src/main/java/org/sonar/samples/WidgetOneOfNotSatisfied.java b/it/it-plugins/required-measures-widgets-plugin/src/main/java/org/sonar/samples/WidgetOneOfNotSatisfied.java deleted file mode 100644 index 9322e596425..00000000000 --- a/it/it-plugins/required-measures-widgets-plugin/src/main/java/org/sonar/samples/WidgetOneOfNotSatisfied.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2016 SonarSource SA - * mailto:contact AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package org.sonar.samples; - -import org.sonar.api.web.RequiredMeasures; - -@RequiredMeasures(anyOf={"non-core-metric1", "non-core-metric2", "non-core-metric3"}) -public class WidgetOneOfNotSatisfied extends AbstractWidget { -} diff --git a/it/it-plugins/required-measures-widgets-plugin/src/main/java/org/sonar/samples/WidgetOneOfSatisfied.java b/it/it-plugins/required-measures-widgets-plugin/src/main/java/org/sonar/samples/WidgetOneOfSatisfied.java deleted file mode 100644 index fa22bd152cb..00000000000 --- a/it/it-plugins/required-measures-widgets-plugin/src/main/java/org/sonar/samples/WidgetOneOfSatisfied.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2016 SonarSource SA - * mailto:contact AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package org.sonar.samples; - -import org.sonar.api.web.RequiredMeasures; - -@RequiredMeasures(anyOf={"non-core-metric", "lines", "complexity"}) -public class WidgetOneOfSatisfied extends AbstractWidget { -} diff --git a/it/it-plugins/required-measures-widgets-plugin/src/main/java/org/sonar/samples/WidgetOneOfSatisfiedButNotMandatory.java b/it/it-plugins/required-measures-widgets-plugin/src/main/java/org/sonar/samples/WidgetOneOfSatisfiedButNotMandatory.java deleted file mode 100644 index 27916c137bb..00000000000 --- a/it/it-plugins/required-measures-widgets-plugin/src/main/java/org/sonar/samples/WidgetOneOfSatisfiedButNotMandatory.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2016 SonarSource SA - * mailto:contact AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package org.sonar.samples; - -import org.sonar.api.web.RequiredMeasures; - -@RequiredMeasures(allOf={"non-core-metric", "complexity"}, anyOf={"lines", "ncloc"}) -public class WidgetOneOfSatisfiedButNotMandatory extends AbstractWidget { -} diff --git a/it/it-plugins/required-measures-widgets-plugin/src/main/resources/WidgetMandatoryAndOneOfSatisfied.html.erb b/it/it-plugins/required-measures-widgets-plugin/src/main/resources/WidgetMandatoryAndOneOfSatisfied.html.erb deleted file mode 100644 index 95741e88577..00000000000 --- a/it/it-plugins/required-measures-widgets-plugin/src/main/resources/WidgetMandatoryAndOneOfSatisfied.html.erb +++ /dev/null @@ -1 +0,0 @@ -<b>WidgetMandatoryAndOneOfSatisfied</b>
\ No newline at end of file diff --git a/it/it-plugins/required-measures-widgets-plugin/src/main/resources/WidgetMandatoryNotSatisfied.html.erb b/it/it-plugins/required-measures-widgets-plugin/src/main/resources/WidgetMandatoryNotSatisfied.html.erb deleted file mode 100644 index a1120143002..00000000000 --- a/it/it-plugins/required-measures-widgets-plugin/src/main/resources/WidgetMandatoryNotSatisfied.html.erb +++ /dev/null @@ -1,2 +0,0 @@ -<b>WidgetMandatoryNotSatisfied</b> -<b>SHOULD NOT BE DISPLAYED</b>
\ No newline at end of file diff --git a/it/it-plugins/required-measures-widgets-plugin/src/main/resources/WidgetMandatorySatisfied.html.erb b/it/it-plugins/required-measures-widgets-plugin/src/main/resources/WidgetMandatorySatisfied.html.erb deleted file mode 100644 index 3d363b6dd6a..00000000000 --- a/it/it-plugins/required-measures-widgets-plugin/src/main/resources/WidgetMandatorySatisfied.html.erb +++ /dev/null @@ -1 +0,0 @@ -<b>WidgetMandatorySatisfied</b>
\ No newline at end of file diff --git a/it/it-plugins/required-measures-widgets-plugin/src/main/resources/WidgetMandatorySatisfiedButNotOneOf.html.erb b/it/it-plugins/required-measures-widgets-plugin/src/main/resources/WidgetMandatorySatisfiedButNotOneOf.html.erb deleted file mode 100644 index 69e734e3639..00000000000 --- a/it/it-plugins/required-measures-widgets-plugin/src/main/resources/WidgetMandatorySatisfiedButNotOneOf.html.erb +++ /dev/null @@ -1,2 +0,0 @@ -<b>WidgetMandatorySatisfiedButNotOneOf</b> -<b>SHOULD NOT BE DISPLAYED</b>
\ No newline at end of file diff --git a/it/it-plugins/required-measures-widgets-plugin/src/main/resources/WidgetNoConstraints.html.erb b/it/it-plugins/required-measures-widgets-plugin/src/main/resources/WidgetNoConstraints.html.erb deleted file mode 100644 index 62797756a25..00000000000 --- a/it/it-plugins/required-measures-widgets-plugin/src/main/resources/WidgetNoConstraints.html.erb +++ /dev/null @@ -1 +0,0 @@ -<b>WidgetNoConstraints</b>
\ No newline at end of file diff --git a/it/it-plugins/required-measures-widgets-plugin/src/main/resources/WidgetOneOfNotSatisfied.html.erb b/it/it-plugins/required-measures-widgets-plugin/src/main/resources/WidgetOneOfNotSatisfied.html.erb deleted file mode 100644 index 583581fcf94..00000000000 --- a/it/it-plugins/required-measures-widgets-plugin/src/main/resources/WidgetOneOfNotSatisfied.html.erb +++ /dev/null @@ -1,2 +0,0 @@ -<b>WidgetOneOfNotSatisfied</b> -<b>SHOULD NOT BE DISPLAYED</b>
\ No newline at end of file diff --git a/it/it-plugins/required-measures-widgets-plugin/src/main/resources/WidgetOneOfSatisfied.html.erb b/it/it-plugins/required-measures-widgets-plugin/src/main/resources/WidgetOneOfSatisfied.html.erb deleted file mode 100644 index 0bdb6139a09..00000000000 --- a/it/it-plugins/required-measures-widgets-plugin/src/main/resources/WidgetOneOfSatisfied.html.erb +++ /dev/null @@ -1 +0,0 @@ -<b>WidgetOneOfSatisfied</b>
\ No newline at end of file diff --git a/it/it-plugins/required-measures-widgets-plugin/src/main/resources/WidgetOneOfSatisfiedButNotMandatory.html.erb b/it/it-plugins/required-measures-widgets-plugin/src/main/resources/WidgetOneOfSatisfiedButNotMandatory.html.erb deleted file mode 100644 index 3769dd8d42a..00000000000 --- a/it/it-plugins/required-measures-widgets-plugin/src/main/resources/WidgetOneOfSatisfiedButNotMandatory.html.erb +++ /dev/null @@ -1,2 +0,0 @@ -<b>WidgetOneOfSatisfiedButNotMandatory</b> -<b>SHOULD NOT BE DISPLAYED</b>
\ No newline at end of file |