Interface DataProcessor

    • Method Detail

      • getType

        @NotNull
        String getType()
        Get unique data processor id (type). i.e. 'FxCopInspections', 'IdeaInspections', 'JUnit' etc. The same string as passed through service message ##teamcity[importData type='<id>' path='<file>']
        Returns:
        data processor id (type)
      • validateArguments

        default void validateArguments​(@NotNull
                                       Map<String,​String> arguments)
                                throws IllegalArgumentException
        Validate arguments provided to the processor.
        Parameters:
        arguments - provided arguments
        Throws:
        IllegalArgumentException - implementation is expected to throw an IllegalArgumentException if a processor argument is invalid
      • processData

        void processData​(@NotNull
                         DataProcessorContext context)
                  throws Exception
        Process data from a given file. Meanwhile calling thread can be terminated by calling interrupt() on it. In case of processing big data you should check thread interruption state from time to time and exit or throw InterruptedException

        It is advised to use CurrentBuildTracker to get current build and build loggers, InspectionReporter to report inspections

        As your object will be created in a spring context, feel free to request other components through constructor parameters

        Parameters:
        context - processing context
        Throws:
        Exception - implementation is expected to throw some error that would be logged as build error message
        See Also:
        InspectionReporter