Class DefaultExtensionComponent

java.lang.Object
org.xwiki.extension.DefaultExtensionComponent
All Implemented Interfaces:
ExtensionComponent

public class DefaultExtensionComponent extends Object implements ExtensionComponent
Default implementation of ExtensionComponent.
Since:
13.3RC1
Version:
$Id: 457d9cb1804361f2734990a6ae02d775ae0627dc $
  • Constructor Details

    • DefaultExtensionComponent

      public DefaultExtensionComponent(String roleType, String roleHint)
      Parameters:
      roleType - the class of the component role as String
      roleHint - the hint of the component role
  • Method Details

    • toCanonicalComponentType

      public static String toCanonicalComponentType(String componentType)
      Parameters:
      componentType - the component type to clean
      Returns:
      the canonical version of the component type name
    • toCanonicalComponentHint

      public static String toCanonicalComponentHint(String componentHint)
      Parameters:
      componentHint - the component hint to clean
      Returns:
      the canonical version of the component hint
      Since:
      13.3
    • getRoleType

      public String getRoleType()
      Specified by:
      getRoleType in interface ExtensionComponent
      Returns:
      the class of the component role as String
    • getRoleHint

      public String getRoleHint()
      Specified by:
      getRoleHint in interface ExtensionComponent
      Returns:
      the hint of the component role
    • equalRoleType

      public boolean equalRoleType(String type)
      Description copied from interface: ExtensionComponent
      The same type can be represented as several different String so it's recommended to use this method when you want to compare a type name with this extension component type.
      Specified by:
      equalRoleType in interface ExtensionComponent
      Parameters:
      type - the type name to compare
      Returns:
      true of the passed type name is equals to the component one
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object