org.xwiki.component.event
Class AbstractComponentDescriptorEvent

java.lang.Object
  extended by org.xwiki.component.event.AbstractComponentDescriptorEvent
All Implemented Interfaces:
ComponentDescriptorEvent, Event
Direct Known Subclasses:
ComponentDescriptorAddedEvent, ComponentDescriptorRemovedEvent

public abstract class AbstractComponentDescriptorEvent
extends java.lang.Object
implements ComponentDescriptorEvent

Base class for events about components descriptors.

Since:
2.6RC2
Version:
$Id: AbstractComponentDescriptorEvent.java 32680 2010-11-09 16:32:48Z vmassol $

Constructor Summary
AbstractComponentDescriptorEvent()
          Watches all roles (whenever a component is added it'll trigger this event).
AbstractComponentDescriptorEvent(java.lang.Class<?> role)
           
AbstractComponentDescriptorEvent(java.lang.Class<?> role, java.lang.String roleHint)
           
 
Method Summary
 java.lang.Class<?> getRole()
           
 java.lang.String getRoleHint()
           
 boolean matches(java.lang.Object otherEvent)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractComponentDescriptorEvent

public AbstractComponentDescriptorEvent()
Watches all roles (whenever a component is added it'll trigger this event).


AbstractComponentDescriptorEvent

public AbstractComponentDescriptorEvent(java.lang.Class<?> role)
Parameters:
role - the component role to watch (all components matching this role will trigger this event)

AbstractComponentDescriptorEvent

public AbstractComponentDescriptorEvent(java.lang.Class<?> role,
                                        java.lang.String roleHint)
Parameters:
role - the component role to watch
roleHint - the component rolehint to watch
Method Detail

getRole

public java.lang.Class<?> getRole()
Specified by:
getRole in interface ComponentDescriptorEvent
Returns:
the component's role being watched or null if all components registrations are watched

getRoleHint

public java.lang.String getRoleHint()
Specified by:
getRoleHint in interface ComponentDescriptorEvent
Returns:
the component's role hint being watched or null if all role's components registrations are watched

matches

public boolean matches(java.lang.Object otherEvent)

Specified by:
matches in interface Event
See Also:
Event.matches(java.lang.Object)


Copyright © 2004-2011 XWiki. All Rights Reserved.