View Javadoc
1   package com.atlassian.plugin.spring.scanner.test.product.stash;
2   
3   import com.atlassian.plugin.spring.scanner.annotation.component.StashComponent;
4   import com.atlassian.plugin.spring.scanner.annotation.imports.StashImport;
5   import com.atlassian.stash.repository.RepositoryService;
6   import org.springframework.beans.factory.annotation.Autowired;
7   
8   /**
9    * A component that's only instantiated when running in Stash
10   */
11  @SuppressWarnings({"FieldCanBeLocal", "UnusedDeclaration"})
12  @StashComponent
13  public class StashOnlyComponent {
14      private final RepositoryService stashRepositoryService;
15  
16      @Autowired
17      public StashOnlyComponent(@StashImport RepositoryService stashRepositoryService) {
18          this.stashRepositoryService = stashRepositoryService;
19      }
20  }