Class IndexerEvent

  • All Implemented Interfaces:
    java.io.Serializable

    public class IndexerEvent
    extends java.util.EventObject
    A description of a change to a ProductIndex. IndexerEvents are created by the Indexer, and sent to IndexerListeners.
    See Also:
    Serialized Form
    • Constructor Detail

      • IndexerEvent

        public IndexerEvent​(Indexer source)
        Construct a new IndexerEvent.
        Parameters:
        source - the indexer that made the change.
    • Method Detail

      • getIndexer

        public Indexer getIndexer()
        Returns:
        Indexer
      • getIndex

        public ProductIndex getIndex()
        Returns:
        Product Index
      • setIndex

        public void setIndex​(ProductIndex index)
        Parameters:
        index - to set
      • getSummary

        public ProductSummary getSummary()
        Returns:
        product summary
      • setSummary

        public void setSummary​(ProductSummary summary)
        Parameters:
        summary - to add
      • addIndexerChange

        public void addIndexerChange​(IndexerChange change)
        Parameters:
        change - to add
      • addIndexerChanges

        public void addIndexerChanges​(java.util.List<IndexerChange> changes)
        Parameters:
        changes - list of changes to add
      • getIndexerChanges

        public java.util.Vector<IndexerChange> getIndexerChanges()
        Returns:
        vector of Indexer Changes
      • getProduct

        public Product getProduct()
                           throws java.lang.Exception
        Convenience method to retrieve Product from Indexer storage.
        Returns:
        Product object corresponding to ProductSummary.
        Throws:
        java.lang.Exception - if error occurs
      • getEvents

        public java.util.List<Event> getEvents()
        Retrieve a distinct list of events that were changed as part of this IndexerEvent.
        Returns:
        list of events