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 Object
implements ComponentDescriptorEvent

Base class for events about components descriptors.

Since:
2.6RC2
Version:
$Id: a1b7a28485392aae81d75beb8df3e866190424db $

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

Constructor Detail

AbstractComponentDescriptorEvent

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


AbstractComponentDescriptorEvent

@Deprecated
public AbstractComponentDescriptorEvent(Class<?> role)
Deprecated. since 4.4RC1 use AbstractComponentDescriptorEvent(Type) instead

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

@Deprecated
public AbstractComponentDescriptorEvent(Class<?> role,
                                                   String roleHint)
Deprecated. since 4.4RC1 use AbstractComponentDescriptorEvent(Type, String) instead

Parameters:
role - the component role to watch
roleHint - the component rolehint to watch

AbstractComponentDescriptorEvent

public AbstractComponentDescriptorEvent(Type roleType,
                                        String roleHint)
Parameters:
roleType - the component role to watch
roleHint - the component rolehint to watch
Since:
4.4RC1
Method Detail

getRole

public Class<?> getRole()
Specified by:
getRole in interface ComponentDescriptorEvent
Returns:
the role of the component

getRoleType

public Type getRoleType()
Specified by:
getRoleType in interface ComponentDescriptorEvent
Returns:
the role type of the component

getRoleHint

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

matches

public boolean matches(Object otherEvent)
Specified by:
matches in interface Event

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


Copyright © 2004-2013 XWiki. All Rights Reserved.