Package org.sonar.api.resources
Class ResourceType.Builder
- java.lang.Object
-
- org.sonar.api.resources.ResourceType.Builder
-
- Enclosing class:
- ResourceType
public static class ResourceType.Builder extends java.lang.Object
Builder used to createResourceType
objects.
-
-
Constructor Summary
Constructors Constructor Description Builder(java.lang.String qualifier)
Creates a newResourceType.Builder
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ResourceType.Builder
availableForFilters()
Deprecated.since 3.0.ResourceType
build()
Creates an instance ofResourceType
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(java.lang.String iconPath)
Relative path of the icon used to represent the resource type.ResourceType.Builder
setProperty(java.lang.String key, boolean value)
ResourceType.Builder
setProperty(java.lang.String key, java.lang.String value)
Sets a property on the resource type.
-
-
-
Constructor Detail
-
Builder
public Builder(java.lang.String qualifier)
Creates a newResourceType.Builder
-
-
Method Detail
-
setIconPath
public ResourceType.Builder setIconPath(@Nullable java.lang.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. UsesetProperty(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(java.lang.String key, java.lang.String value)
Sets a property on the resource type. See the description ofResourceType
class for more information.- Since:
- 3.0
-
setProperty
public ResourceType.Builder setProperty(java.lang.String key, boolean value)
- Since:
- 3.2
-
build
public ResourceType build()
Creates an instance ofResourceType
based on all information given to the builder.
-
-