001/* 002 * SonarQube 003 * Copyright (C) 2009-2017 SonarSource SA 004 * mailto:info AT sonarsource DOT com 005 * 006 * This program 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 * This program 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 */ 020package org.sonar.api.batch; 021 022/** 023 * Barriers are used to define the order of execution of Decorators. Decorators must be annotated with the following : 024 * <br> 025 * <ul> 026 * <li>{@code @DependsUpon(BARRIER)} in order to be executed after BARRIER</li> 027 * <li>{@code @DependedUpon(BARRIER)} in order to be executed before BARRIER</li> 028 * </ul> 029 * 030 * @since 2.3 031 * @deprecated since 5.6 as {@link Decorator} is deprecated 032 */ 033@Deprecated 034public interface DecoratorBarriers { 035 036 /** 037 * This barrier is before {@link #ISSUES_TRACKED}. The decorators that register issues must be declared before this 038 * barrier : {@code @DependedUpon(value=DecoratorBarriers.ISSUES_ADDED)} 039 * 040 * @since 3.6 041 */ 042 String ISSUES_ADDED = "END_OF_VIOLATIONS_GENERATION"; 043 044 /** 045 * This barrier is after {@link #ISSUES_ADDED}. The decorators that need to list all issues must be declared 046 * after this barrier : {@code @DependsUpon(value=DecoratorBarriers.ISSUES_TRACKED)} 047 * 048 * @since 3.6 049 */ 050 String ISSUES_TRACKED = "END_OF_VIOLATION_TRACKING"; 051 052 /** 053 * @deprecated in 3.6. Not required anymore. 054 */ 055 @Deprecated 056 String START_VIOLATIONS_GENERATION = "START_VIOLATIONS_GENERATION"; 057 058 /** 059 * This barrier is used by a decorator in order to : 060 * <ul> 061 * <li>be executed after all the decorators which generate violations : 062 * {@code @DependsUpon(value=DecoratorBarriers.END_OF_VIOLATIONS_GENERATION}</li> 063 * <li>declare that it generates violations : {@code @DependedUpon(value=DecoratorBarriers.END_OF_VIOLATIONS_GENERATION}</li> 064 * </ul> 065 * 066 * @deprecated in 3.6. Replaced by {@link #ISSUES_ADDED} 067 */ 068 @Deprecated 069 String END_OF_VIOLATIONS_GENERATION = "END_OF_VIOLATIONS_GENERATION"; 070 071 /** 072 * Extensions which call the method {@code Violation#setSwitchedOff} must be executed before this barrier 073 * ({@code @DependedUpon(value=DecoratorBarriers.VIOLATION_TRACKING}) 074 * <br> 075 * This barrier is after {@code END_OF_VIOLATIONS_GENERATION} 076 * 077 * @since 2.8 078 * @deprecated in 3.6. Not required anymore. 079 */ 080 @Deprecated 081 String START_VIOLATION_TRACKING = "START_VIOLATION_TRACKING"; 082 083 /** 084 * This barrier is after {@code END_OF_VIOLATIONS_GENERATION} and {@code START_VIOLATION_TRACKING}. 085 * Decorators executed after this barrier ({@code @DependsUpon(value=DecoratorBarriers.END_OF_VIOLATION_TRACKING}) 086 * can benefit from all the features of violation tracking : 087 * <ul> 088 * <li>{@code Violation#getCreatedAt()}</li> 089 * <li>{@code Violation#isSwitchedOff()}, usually to know if a violation has been flagged as false-positives in UI</li> 090 * </ul> 091 * 092 * @since 2.8 093 * @deprecated in 3.6. Replaced by {@link #ISSUES_TRACKED} 094 */ 095 @Deprecated 096 String END_OF_VIOLATION_TRACKING = "END_OF_VIOLATION_TRACKING"; 097 098 /** 099 * @since 2.13 100 * @deprecated in 3.6. Issues are persisted at the end of analysis. 101 */ 102 @Deprecated 103 String START_VIOLATION_PERSISTENCE = "START_VIOLATION_PERSISTENCE"; 104 105 /** 106 * @since 2.13 107 * @deprecated in 3.6. Issues are persisted at the end of analysis 108 */ 109 @Deprecated 110 String END_OF_VIOLATION_PERSISTENCE = "END_OF_VIOLATION_PERSISTENCE"; 111 112 /** 113 * Any kinds of time machine data are calculated before this barrier. Decorators executed after this barrier can use 114 * Measure#getVariationValue() method. 115 * 116 * @since 2.5 117 */ 118 String END_OF_TIME_MACHINE = "END_OF_TIME_MACHINE"; 119}