org.sonar.api.resources
Class ResourceType.Builder

java.lang.Object
  extended by org.sonar.api.resources.ResourceType.Builder
Enclosing class:
ResourceType

public static class ResourceType.Builder
extends Object

Builder used to create ResourceType objects.


Constructor Summary
ResourceType.Builder(String qualifier)
          Creates a new ResourceType.Builder
 
Method Summary
 ResourceType.Builder availableForFilters()
          Deprecated. since 3.0. Use setProperty(String, String) with "supportsMeasureFilters" set to "true".
 ResourceType build()
          Creates an instance of ResourceType based on all information given to the builder.
 ResourceType.Builder hasSourceCode()
          Tells that the resources of this type will have source code.
 ResourceType.Builder setIconPath(String iconPath)
          Relative path of the icon used to represent the resource type.
 ResourceType.Builder setProperty(String key, boolean value)
           
 ResourceType.Builder setProperty(String key, String value)
          Sets a property on the resource type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceType.Builder

public ResourceType.Builder(String qualifier)
Creates a new ResourceType.Builder

Parameters:
qualifier -
Method Detail

setIconPath

public ResourceType.Builder setIconPath(@Nullable
                                        String iconPath)
Relative path of the icon used to represent the resource type.

Parameters:
iconPath - path to icon, relative to context of web-application (e.g. "/images/q/DIR.png")

availableForFilters

@Deprecated
public ResourceType.Builder availableForFilters()
Deprecated. since 3.0. Use setProperty(String, String) with "supportsMeasureFilters" set to "true".


hasSourceCode

public ResourceType.Builder hasSourceCode()
Tells that the resources of this type will have source code.


setProperty

public ResourceType.Builder setProperty(String key,
                                        String value)
Sets a property on the resource type. See the description of ResourceType class for more information.

Since:
3.0

setProperty

public ResourceType.Builder setProperty(String key,
                                        boolean value)
Since:
3.2

build

public ResourceType build()
Creates an instance of ResourceType based on all information given to the builder.



Copyright © 2009-2013 SonarSource. All Rights Reserved.