com.ibm.events.access

Interface EventAccessLocal

  • All Superinterfaces:
    javax.ejb.EJBLocalObject


    public interface EventAccessLocal
    extends javax.ejb.EJBLocalObject
    Local interface for the event access enterprise bean.

    This interface uses the following security roles:

    • eventUpdater
    • eventConsumer
    • eventAdministrator
    Since:
    5.1.0
    Version:
    1.2 7/15/16
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static int DEFAULT_PURGE_TRANSACTION_SIZE
      Default transaction size to use when purging events.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      boolean eventExists(java.lang.String eventGroup, java.lang.String eventSelector)
      Determines if events exist that belong to the specified event group.
      ComponentMetaData getDataStoreMetaData()
      Returns the component metadata of the data store enterprise bean.
      ComponentMetaData getMetaData()
      Returns the component metadata of the event access enterprise bean.
      int purgeEvents(java.lang.String eventGroup, java.lang.String eventSelector, int transactionSize)
      Removes a group of events from the data store.
      org.eclipse.hyades.logging.events.cbe.CommonBaseEvent queryEventByGlobalInstanceId(java.lang.String globalInstanceId)
      Retrieves an event by the global Instance ID.
      org.eclipse.hyades.logging.events.cbe.CommonBaseEvent[] queryEventsByAssociation(java.lang.String associationType, java.lang.String globalInstanceId)
      Retrieves events that are related to the specified global Instance ID.
      org.eclipse.hyades.logging.events.cbe.CommonBaseEvent[] queryEventsByEventGroup(java.lang.String eventGroup, java.lang.String eventSelector, boolean ascendingOrder)
      Retrieves events that belong to the specified event group.
      org.eclipse.hyades.logging.events.cbe.CommonBaseEvent[] queryEventsByEventGroup(java.lang.String eventGroup, java.lang.String eventSelector, boolean ascendingOrder, int maximumNumber)
      Retrieves events that belong to the specified event group.
      void updateEvents(EventChangeRequest[] eventChangeRequests)
      Updates events that are persisted in the event infrastructure repository.
      • Methods inherited from interface javax.ejb.EJBLocalObject

        getEJBLocalHome, getPrimaryKey, isIdentical, remove
    • Field Detail

      • DEFAULT_PURGE_TRANSACTION_SIZE

        static final int DEFAULT_PURGE_TRANSACTION_SIZE
        Default transaction size to use when purging events.
        See Also:
        Constant Field Values
    • Method Detail

      • getDataStoreMetaData

        ComponentMetaData getDataStoreMetaData()
                                               throws EventsException
        Returns the component metadata of the data store enterprise bean.
        Returns:
        The component metadata for the data store.
        Throws:
        DataStoreConnectionFailureException - If the configured data store cannot be connected to.
        DataStoreNotEnabledException - If the event service is configured to not use persistence.
        EventsException - If the Common Event Infrastructure fails due to an error.
      • getMetaData

        ComponentMetaData getMetaData()
        Returns the component metadata of the event access enterprise bean.
        Returns:
        The component metadata for the event access enterprise bean.
      • eventExists

        boolean eventExists(java.lang.String eventGroup,
                          java.lang.String eventSelector)
                            throws EventsException
        Determines if events exist that belong to the specified event group.

        The eventConsumer, eventUpdater, or the eventAdministrator security role is required for this method.

        Parameters:
        eventGroup - The name of the event group to query. This value cannot be null.
        eventSelector - An additional XPath expression that is appended to the event group selector. This value can be null if an additional event selector is not needed.
        Returns:
        true if an event exists that matches the event group and the event selector. false otherwise.
        Throws:
        DataStoreException - If the data store fails to perform the requested action.
        DataStoreConnectionFailureException - If the configured data store cannot be connected to.
        CbeVersionNotSupportedException - If the data store does not support the same version of the event that the event service supports.
        DataStoreNotEnabledException - If the event service is configured to not use persistence.
        EventGroupNotDefinedException - If the passed event group name is not defined.
        InvalidEventSelectorException - If either the passed event selector or the event group selector is not valid.
        EventsException - If the Common Event Infrastructure fails due to an error.
      • purgeEvents

        int purgeEvents(java.lang.String eventGroup,
                      java.lang.String eventSelector,
                      int transactionSize)
                        throws EventsException
        Removes a group of events from the data store.

        If both the eventGroupSelector and the eventSelector parameters are null, then all events are purged.

        The eventAdministrator security role is required for this method.

        Parameters:
        eventGroup - The name of the event group that the events being purged belong to. This can be null if a specific event group is not being used.
        eventSelector - An additional event filter that is used to select the events that will be purged from the database. This value can be null if an additional selector is not needed.
        transactionSize - The number of events to delete in a single database transaction. This value must be greater than 0.
        Returns:
        The number of events that were purged
        Throws:
        DataStoreException - If the data store fails to perform the requested action.
        DataStoreConnectionFailureException - If the configured data store cannot be connected to.
        CbeVersionNotSupportedException - If the data store does not support the same version of the event that the event service supports.
        DataStoreNotEnabledException - If the event service is configured to not use persistence.
        EventGroupNotDefinedException - If the passed event group name is not defined.
        InvalidEventSelectorException - If either the passed event selector or the event group selector is not valid.
        EventsException - If the Common Event Infrastructure fails due to an error.
      • queryEventByGlobalInstanceId

        org.eclipse.hyades.logging.events.cbe.CommonBaseEvent queryEventByGlobalInstanceId(java.lang.String globalInstanceId)
                                                                                           throws EventsException
        Retrieves an event by the global Instance ID.

        The eventConsumer, eventUpdater, or the eventAdministrator security role is required for this method.

        Parameters:
        globalInstanceId - The global Instance ID of the event that is to be returned. This value cannot be null.
        Returns:
        An event instance or null if there is not an event that contains the specified global Instance ID.
        Throws:
        DataStoreException - If the data store fails to perform the requested action.
        DataStoreConnectionFailureException - If the configured data store cannot be connected to.
        CbeVersionNotSupportedException - If the data store does not support the same version of the event that the event service supports.
        DataStoreNotEnabledException - If the event service is configured to not use persistence.
        EventsException - If the Common Event Infrastructure fails due to an error.
      • queryEventsByAssociation

        org.eclipse.hyades.logging.events.cbe.CommonBaseEvent[] queryEventsByAssociation(java.lang.String associationType,
                                                                                       java.lang.String globalInstanceId)
                                                                                         throws EventsException
        Retrieves events that are related to the specified global Instance ID.

        The eventConsumer, eventUpdater, or the eventAdministrator security role is required for this method.

        Parameters:
        associationType - The type of the association. This value cannot be null.
        globalInstanceId - The global Instance ID of the event to which other events are associated. This value cannot be null.
        Returns:
        An array of all events that match the query. If no events match the query, an empty array is returned.
        Throws:
        DataStoreException - If the data store fails to perform the requested action.
        DataStoreConnectionFailureException - If the configured data store cannot be connected to.
        CbeVersionNotSupportedException - If the data store does not support the same version of the event that the event service supports.
        DataStoreNotEnabledException - If the event service is configured to not use persistence.
        EventsException - If the Common Event Infrastructure fails due to an error.
      • queryEventsByEventGroup

        org.eclipse.hyades.logging.events.cbe.CommonBaseEvent[] queryEventsByEventGroup(java.lang.String eventGroup,
                                                                                      java.lang.String eventSelector,
                                                                                      boolean ascendingOrder)
                                                                                        throws EventsException
        Retrieves events that belong to the specified event group.

        The caller passes the event group, an event selector and specifies whether the events are arranged in ascending or descending order according to the creation time of the event.

        The eventConsumer, eventUpdater, or the eventAdministrator security role is required for this method.

        Parameters:
        eventGroup - The name of the event group to query. This value cannot be null.
        eventSelector - An additional XPath expression that is appended to the event group selector. This value can be null if an additional event selector is not needed.
        ascendingOrder - Whether events are ordered in ascending or descending order according to creation time.
        Returns:
        An array of all events that match the query. If no events match the query, an empty array is returned.
        Throws:
        DataStoreException - If the data store fails to perform the requested action.
        DataStoreConnectionFailureException - If the configured data store cannot be connected to.
        CbeVersionNotSupportedException - If the data store does not support the same version of the event that the event service supports.
        DataStoreNotEnabledException - If the event service is configured to not use persistence.
        EventGroupNotDefinedException - If the passed event group name is not defined.
        InvalidEventSelectorException - If either the passed event selector or the event group selector is not valid.
        EventsException - If the Common Event Infrastructure fails due to an error.
      • queryEventsByEventGroup

        org.eclipse.hyades.logging.events.cbe.CommonBaseEvent[] queryEventsByEventGroup(java.lang.String eventGroup,
                                                                                      java.lang.String eventSelector,
                                                                                      boolean ascendingOrder,
                                                                                      int maximumNumber)
                                                                                        throws EventsException
        Retrieves events that belong to the specified event group.

        The caller passes the event group, an additional event selector, the number of events to return and specifies whether the events are arranged in ascending or descending order according to the creation time of the event.

        The eventConsumer, eventUpdater, or the eventAdministrator security role is required for this method.

        Parameters:
        eventGroup - The name of the event group to query. This value cannot be null.
        eventSelector - An additional XPath expression that is appended to the event group selector. This value can be null if an additional event selector is not needed.
        ascendingOrder - Whether events are ordered in ascending or descending order according to creation time.
        maximumNumber - The maximum number of events to be returned from the event query.
        Returns:
        An array of all events that match the query. If no events match the query, an empty array is returned.
        Throws:
        DataStoreException - If the data store fails to perform the requested action.
        DataStoreConnectionFailureException - If the configured data store cannot be connected to.
        CbeVersionNotSupportedException - If the data store does not support the same version of the event that the event service supports.
        DataStoreNotEnabledException - If the event service is configured to not use persistence.
        EventGroupNotDefinedException - If the passed event group name is not defined.
        InvalidEventSelectorException - If either the passed event selector or the event group selector is not valid.
        EventsException - If the Common Event Infrastructure fails due to an error.
      • updateEvents

        void updateEvents(EventChangeRequest[] eventChangeRequests)
                          throws EventsException
        Updates events that are persisted in the event infrastructure repository.

        If any of the change requests fail then the current transaction will be marked for roll back.

        The eventUpdater or the eventAdministrator security role is required for this method.

        Parameters:
        eventChangeRequests - An array of change requests that can span multiple events.
        Throws:
        DataStoreException - If the data store fails to perform the requested action.
        DataStoreConnectionFailureException - If a connection to the configured data store cannot be made.
        CbeVersionNotSupportedException - If the data store does not support the same version of the event that the event service supports.
        DataStoreNotEnabledException - If event service is not configured to use persistence.
        EventDoesNotExistException - If event specified in one of the change requests does not exist.
        SeverityAlreadySetException - If one of the change requests tries to modify the value of severity. It is only valid to set an unset severity.
        ExtendedDataElementUpdateException - If the parent extended data element does not exist
        EventUpdatesNotSupportedException - If the configured data store does not support event updates.
        EventDistributionException - If event distribution fails to publish the event notifications to any event groups.
        EventsException - If the Common Event Infrastructure fails due to an error.
        java.lang.IllegalArgumentException - If any of the required parameters are not specified.
IBM Business Process ManagerTM
Release 8