Package org.xwiki.extension
Class DefaultExtensionComponent
- java.lang.Object
-
- org.xwiki.extension.DefaultExtensionComponent
-
- All Implemented Interfaces:
ExtensionComponent
public class DefaultExtensionComponent extends Object implements ExtensionComponent
Default implementation ofExtensionComponent
.- Since:
- 13.3RC1
- Version:
- $Id: 457d9cb1804361f2734990a6ae02d775ae0627dc $
-
-
Constructor Summary
Constructors Constructor Description DefaultExtensionComponent(String roleType, String roleHint)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equalRoleType(String type)
The same type can be represented as several differentString
so it's recommended to use this method when you want to compare a type name with this extension component type.boolean
equals(Object obj)
String
getRoleHint()
String
getRoleType()
int
hashCode()
static String
toCanonicalComponentHint(String componentHint)
static String
toCanonicalComponentType(String componentType)
String
toString()
-
-
-
Method Detail
-
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 interfaceExtensionComponent
- Returns:
- the class of the component role as String
-
getRoleHint
public String getRoleHint()
- Specified by:
getRoleHint
in interfaceExtensionComponent
- 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 differentString
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 interfaceExtensionComponent
- Parameters:
type
- the type name to compare- Returns:
- true of the passed type name is equals to the component one
-
-