View Javadoc
1   package com.atlassian.plugin.spring.scanner.test.product.confluence;
2   
3   import com.atlassian.confluence.api.service.content.ContentService;
4   import com.atlassian.plugin.spring.scanner.annotation.component.ConfluenceComponent;
5   import com.atlassian.plugin.spring.scanner.annotation.imports.ConfluenceImport;
6   import org.springframework.beans.factory.annotation.Autowired;
7   
8   /**
9    * A component that's only instantiated when running in Confluence
10   */
11  @SuppressWarnings({"FieldCanBeLocal", "UnusedDeclaration"})
12  @ConfluenceComponent
13  public class ConfluenceOnlyComponent {
14  
15      private final ContentService contentService;
16  
17      @Autowired
18      public ConfluenceOnlyComponent(@ConfluenceImport ContentService contentService) {
19          this.contentService = contentService;
20      }
21  }