Package org.xwiki.component.event
Class AbstractComponentDescriptorEvent
- java.lang.Object
-
- org.xwiki.component.event.AbstractComponentDescriptorEvent
-
- All Implemented Interfaces:
ComponentDescriptorEvent
,Event
- Direct Known Subclasses:
ComponentDescriptorAddedEvent
,ComponentDescriptorRemovedEvent
public abstract class AbstractComponentDescriptorEvent extends Object implements ComponentDescriptorEvent
Base class for events about components descriptors.- Since:
- 2.6RC2
- Version:
- $Id: 8e9a39490da8f42700549301bd630d71ee7bc7b0 $
-
-
Constructor Summary
Constructors Constructor Description AbstractComponentDescriptorEvent()
Watches all roles (whenever a component is added it'll trigger this event).AbstractComponentDescriptorEvent(Class<?> role)
AbstractComponentDescriptorEvent(Class<?> role, String roleHint)
AbstractComponentDescriptorEvent(Type roleType)
AbstractComponentDescriptorEvent(Type roleType, String roleHint)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
Class<?>
getRole()
String
getRoleHint()
Type
getRoleType()
int
hashCode()
boolean
matches(Object otherEvent)
String
toString()
-
-
-
Constructor Detail
-
AbstractComponentDescriptorEvent
public AbstractComponentDescriptorEvent()
Watches all roles (whenever a component is added it'll trigger this event).
-
AbstractComponentDescriptorEvent
public AbstractComponentDescriptorEvent(Class<?> role)
- Parameters:
role
- the component role to watch (all components matching this role will trigger this event)
-
AbstractComponentDescriptorEvent
public AbstractComponentDescriptorEvent(Type roleType)
- Parameters:
roleType
- the component role type to watch (all components matching this role will trigger this event)- Since:
- 4.4RC1
-
AbstractComponentDescriptorEvent
public AbstractComponentDescriptorEvent(Class<?> role, String roleHint)
- Parameters:
role
- the component role to watchroleHint
- the component rolehint to watch
-
-
Method Detail
-
getRole
public Class<?> getRole()
- Specified by:
getRole
in interfaceComponentDescriptorEvent
- Returns:
- the role of the component
-
getRoleType
public Type getRoleType()
- Specified by:
getRoleType
in interfaceComponentDescriptorEvent
- Returns:
- the role type of the component
-
getRoleHint
public String getRoleHint()
- Specified by:
getRoleHint
in interfaceComponentDescriptorEvent
- Returns:
- the role hint of the component
-
-