Interface ComponentEvent

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      java.lang.Object coerceContext​(int index, java.lang.String desiredTypeName)
      Coerces a context value to a particular type.
      java.lang.Object[] getContext()
      Returns the underlying EventContext as a (possibly empty) array.
      EventContext getEventContext()
      Returns the underlying event context.
      boolean matches​(java.lang.String eventType, java.lang.String componentId, int parameterCount)
      Returns true if the event matches the provided criteria and the event has not yet been aborted.
      default boolean matches​(java.lang.String eventType, java.lang.String componentId, int parameterCount, java.lang.String[] staticActivationContextValues)
      Returns true if the event matches the provided criteria and the event has not yet been aborted.
    • Method Detail

      • matches

        boolean matches​(java.lang.String eventType,
                        java.lang.String componentId,
                        int parameterCount)
        Returns true if the event matches the provided criteria and the event has not yet been aborted.
        Parameters:
        eventType - the type of event (case insensitive match)
        componentId - component is to match against (case insensitive), or the empty string
        parameterCount - minimum number of context values
        Returns:
        true if the event matches (and has not yet been aborted)
      • matches

        default boolean matches​(java.lang.String eventType,
                                java.lang.String componentId,
                                int parameterCount,
                                java.lang.String[] staticActivationContextValues)
        Returns true if the event matches the provided criteria and the event has not yet been aborted.
        Parameters:
        eventType - the type of event (case insensitive match)
        componentId - component is to match against (case insensitive), or the empty string
        parameterCount - minimum number of context values
        staticActivationContextValues - a String array. If null, there are no static activation context values. If any value in the array is null, it's considered dynamic and ignored. I any value in the arra isn't null, it's compared to the corresponding activation context value. If it doesn't match, this method will return null.
        Returns:
        true if the event matches (and has not yet been aborted)
        Since:
        5.8.0
      • coerceContext

        java.lang.Object coerceContext​(int index,
                                       java.lang.String desiredTypeName)
        Coerces a context value to a particular type. The context is an array of objects; typically it is an array of strings of extra path information encoded into the action URL.
        Parameters:
        index - the index of the context value
        desiredTypeName - the desired type
        Returns:
        the coerced value (a wrapper type if the desired type is a primitive)
      • getContext

        java.lang.Object[] getContext()
        Returns the underlying EventContext as a (possibly empty) array.