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 booleanequalRoleType(String type)The same type can be represented as several differentStringso it's recommended to use this method when you want to compare a type name with this extension component type.booleanequals(Object obj)StringgetRoleHint()StringgetRoleType()inthashCode()static StringtoCanonicalComponentHint(String componentHint)static StringtoCanonicalComponentType(String componentType)StringtoString()
-
-
-
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:
getRoleTypein interfaceExtensionComponent- Returns:
- the class of the component role as String
-
getRoleHint
public String getRoleHint()
- Specified by:
getRoleHintin interfaceExtensionComponent- Returns:
- the hint of the component role
-
equalRoleType
public boolean equalRoleType(String type)
Description copied from interface:ExtensionComponentThe same type can be represented as several differentStringso it's recommended to use this method when you want to compare a type name with this extension component type.- Specified by:
equalRoleTypein interfaceExtensionComponent- Parameters:
type- the type name to compare- Returns:
- true of the passed type name is equals to the component one
-
-