Class ResourceType


  • @Deprecated(since="10.13",
                forRemoval=true)
    @Immutable
    public class ResourceType
    extends java.lang.Object
    Deprecated, for removal: This API element is subject to removal in a future version.
    since 10.13. We don't support custom resource types contributed by plugins anymore.

    Experimental extension to declare types of resources.

    Since 3.0, ResourceType object can declare properties that give information about the capabilities of the resource type. Those properties may be used, of instance, to adapt the Web UI according to the type of the resource being displayed.
    Currently, the following properties can be defined:

    • "deletable": if set to "true", then this resource can be deleted/purged.
    • "supportsMeasureFilters": if set to "true", then this resource can be displayed in measure filters
    • "modifiable_history": if set to "true", then the history of this resource may be modified (deletion of snapshots, modification of events, ...)
    • "updatable_key" (since 3.2): if set to "true", then it is possible to update the key of this resource
    • "supportsGlobalDashboards" (since 3.2): if true, this resource can be displayed in global dashboards
    • "hasRolePolicy" : if true, roles configuration is available in sidebar
    • "comparable" (since 3.4) : if true, the resource can be compared to other resources
    • "configurable" (since 3.6) : if true, the settings page can be displayed on the resource
    Since:
    2.14
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  ResourceType.Builder
      Deprecated, for removal: This API element is subject to removal in a future version.
      Builder used to create ResourceType objects.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static ResourceType.Builder builder​(java.lang.String qualifier)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates a new ResourceType.Builder
      boolean equals​(java.lang.Object o)
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      boolean getBooleanProperty​(java.lang.String key)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the value of the property for this resource type.
      java.lang.String getIconPath()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the relative path of the icon used to represent the resource type
      java.lang.String getQualifier()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Qualifier is the unique key.
      java.lang.String getStringProperty​(java.lang.String key)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the value of the property for this resource type.
      int hashCode()
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      boolean hasProperty​(java.lang.String key)
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      boolean hasSourceCode()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Tells whether resources of this type has source code or not.
      java.lang.String toString()
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Method Detail

      • getQualifier

        public java.lang.String getQualifier()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Qualifier is the unique key.
        Returns:
        the qualifier
      • getIconPath

        public java.lang.String getIconPath()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Returns the relative path of the icon used to represent the resource type
        Returns:
        the relative path.
      • hasSourceCode

        public boolean hasSourceCode()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Tells whether resources of this type has source code or not.
        Returns:
        true if the type has source code
      • hasProperty

        public boolean hasProperty​(java.lang.String key)
        Deprecated, for removal: This API element is subject to removal in a future version.
      • getStringProperty

        public java.lang.String getStringProperty​(java.lang.String key)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Returns the value of the property for this resource type.
        Returns:
        the String value of the property, or NULL if the property hasn't been set.
        Since:
        3.0
      • getBooleanProperty

        public boolean getBooleanProperty​(java.lang.String key)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Returns the value of the property for this resource type.
        Returns:
        the Boolean value of the property. If the property hasn't been set, False is returned.
        Since:
        3.0
      • equals

        public boolean equals​(java.lang.Object o)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Overrides:
        toString in class java.lang.Object
      • builder

        public static ResourceType.Builder builder​(java.lang.String qualifier)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Creates a new ResourceType.Builder