Class PermissionEvent

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable

    public class PermissionEvent
    extends Event
    A Event for use with user Permission objects.
    Since:
    1.4.0
    See Also:
    Serialized Form
    • Constructor Detail

      • PermissionEvent

        public PermissionEvent​(EventTarget<? extends Event> target,
                               EventType<? extends Event> eventType,
                               java.util.List<java.lang.Object> args)
        Construct a new Event with the specified event target, type and args.
        Parameters:
        target - the event target to associate with the event
        eventType - the event type
        args - arguments to make available to the EventHandler
    • Method Detail

      • getPermission

        public Permission getPermission()
      • getEventType

        public EventType<? extends PermissionEvent> getEventType()
        Description copied from class: Event
        Gets the event type of this event. Objects of the same Event class can have different event types. These event types further specify what kind of event occurred.
        Overrides:
        getEventType in class Event
        Returns:
        the event type
      • copyFor

        public PermissionEvent copyFor​(java.lang.Object newSource,
                                       EventTarget<? extends Event> newTarget)
        Description copied from class: Event
        Creates and returns a copy of this event with the specified event source and target.
        Overrides:
        copyFor in class Event
        Parameters:
        newSource - the new source of the copied event
        newTarget - the new target of the copied event
        Returns:
        the event copy with the new source and target
      • fireEvent

        public void fireEvent​(java.lang.Object source,
                              Permission permission)
        Fires the event with the specified source and permission.
        Parameters:
        source - the event source which sent the event
        permission - the permission object to pass to the EventHandler