View Javadoc

1   package com.atlassian.sal.core.search;
2   
3   import com.atlassian.sal.api.ApplicationProperties;
4   import com.atlassian.sal.api.UrlMode;
5   import com.atlassian.sal.api.search.ResourceType;
6   
7   /**
8    */
9   public class BasicResourceType implements ResourceType
10  {
11      private String name;
12      private String url;
13      private String type;
14  
15      public BasicResourceType(ApplicationProperties applicationProperties, String type)
16      {
17          this.name = applicationProperties.getDisplayName();
18          this.url = applicationProperties.getBaseUrl(UrlMode.AUTO);
19          this.type = type;
20      }
21  
22      public String getName()
23      {
24          return name;
25      }
26  
27      public String getUrl()
28      {
29          return url;
30      }
31  
32      public String getType()
33      {
34          return type;
35      }
36  }