Class PIASearchPanel

All Implemented Interfaces:
PSearchProducer, PAppComponent, PClientComponent, PCollectDataListener, PComponent, PComponentAttribute, PViewDataChangeListener, ContainerListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible
Direct Known Subclasses:
PAccountsEntryPanel, PDeviceSearchEntryPanelBase, PNumberEntryPanel, PSettopEntryPanel, PSIMEntryPanel

public class PIASearchPanel extends PIACustomizablePanel implements PSearchProducer
The base search panel class - contains the real logic for searching This panel supports remote listening, which means its possible for the search results to be sent to a search results component's controller directly on the server side. Otherwise, the search results will come back to the client side and be sent to interested parties. Those parties will most likely need to then send it back to their controllers for processing. All those round trips slow things down.
See Also:
  • Field Details

    • mClass

      protected String mClass
    • forceStop

      protected boolean forceStop
    • stopLock

      protected Object stopLock
    • isBranded

      protected boolean isBranded
    • selectedBrand

      protected PScopeEntryPoint selectedBrand
    • allBrandsSelected

      protected boolean allBrandsSelected
    • brandTree

      protected PBrandTree brandTree
    • allowBrandActs

      protected boolean allowBrandActs
    • filterNonBrandHostAccounts

      protected boolean filterNonBrandHostAccounts
    • resultsLimit

      protected int resultsLimit
  • Constructor Details

    • PIASearchPanel

      public PIASearchPanel()
  • Method Details

    • getControllerClassName

      public String getControllerClassName() throws RemoteException
      Description copied from class: PIACustomizablePanel
      Retrieves the class name of this component's controller, in this case, null.
      Specified by:
      getControllerClassName in interface PComponent
      Overrides:
      getControllerClassName in class PIACustomizablePanel
      Returns:
      A null String.
      Throws:
      RemoteException - thrown for errors
    • setStorableClass

      public void setStorableClass(String sclass) throws RemoteException
      Set the class used by the component for searches. The default is "/account".
      Parameters:
      class - The storable class name to search for
      Throws:
      RemoteException
    • getStorableClass

      public String getStorableClass() throws RemoteException
      Get the storable class searched for by this component
      Returns:
      The storable class used
      Throws:
      RemoteException
    • addSearchResultsListener

      public void addSearchResultsListener(PSearchResultsListener l)
      Connects the search panel to a class that is interested in the results of the search.
      Parameters:
      l - the interested class
    • removeSearchResultsListener

      public void removeSearchResultsListener(PSearchResultsListener l)
      Disconnects the search panel from a class that is interested in the results of the search.
      Parameters:
      l - the disinterested class
    • addSearchInfoListener

      public void addSearchInfoListener(PSearchInfoListener l)
      Adds a listener for the results of this search
      Specified by:
      addSearchInfoListener in interface PSearchProducer
      Parameters:
      l - the listener
    • removeSearchInfoListener

      public void removeSearchInfoListener(PSearchInfoListener l)
      Removes a listener for the results of this search
      Specified by:
      removeSearchInfoListener in interface PSearchProducer
      Parameters:
      l - the listener
    • collectData

      public void collectData(PCollectDataEvent event)
      Override collectData(), turning it into a no-op. This panel uses an internal mechanism for collecting search criteria which is similar, but differnt, than the regular collectData() methodology. At the same time, if/when this panel is embedded amongst regular display-type panels it shouldn't really do anything when collectData() is called.
      Specified by:
      collectData in interface PCollectDataListener
      Overrides:
      collectData in class PIACustomizablePanel
      Parameters:
      event - the PCollectDataEvent event
    • viewDataChange

      public void viewDataChange(PViewDataChangeEvent event) throws RemoteException
      Implements the PViewDataChangeListener interface
      Specified by:
      viewDataChange in interface PViewDataChangeListener
      Overrides:
      viewDataChange in class PIACustomizablePanel
      Parameters:
      event - the data change event
      Throws:
      RemoteException - e
    • stopSearch

      public void stopSearch()
    • hasBrandHost

      public boolean hasBrandHost()
    • startSearch

      public void startSearch()
      Called to really start the search process in motion. Note that this method will issue PCollectDataEvents to the PIA components that exist in a subclass. It behaves slightly differently than the traditional collectData() process in the sense that each component is issued a separate PModelHandle. This is because the controller needs to have an array of PModelHandles so it can build a complex search. What this means is that any subclass cannot override collectData() and expect it to get called. Only individual components will have their collectData() methods called.
    • getTools

      public Vector getTools()
      Returns the commands available on this panel. Currently these are start/end search, and a command to clear the fields in the panel
      Specified by:
      getTools in interface PClientComponent
      Overrides:
      getTools in class PIACustomizablePanel
      Returns:
      A Vector that contains Action objects.
    • fireSearchResults

      protected void fireSearchResults(PModelHandle[] results)
      Send an event containing the results of the search
      Parameters:
      results - the search results array
    • fireProgress

      protected void fireProgress(int progress)
      Sends out a progress report, typically to the main application
      Parameters:
      the - progress status - typically a type in PSearchResultsEvent
    • fireColumns

      protected void fireColumns(String[] cols)
      Sends an event to the search listeners
      Parameters:
      cols -
    • getDesiredResults

      protected String[] getDesiredResults()
      Retrieves the column display field descriptions. This allows the search component to retrieve only those fields directly requested by the component that will display the search results.
    • collectDataFromPanelWidgets

      protected void collectDataFromPanelWidgets(Component c, Vector models, Vector assocClasses)
    • setSingleDBSearchEnabled

      public void setSingleDBSearchEnabled(boolean flag)
      Description copied from interface: PSearchProducer
      Enables the single DB Search
      Specified by:
      setSingleDBSearchEnabled in interface PSearchProducer
    • setSingleDBSearchID

      public void setSingleDBSearchID(long id)
      Specified by:
      setSingleDBSearchID in interface PSearchProducer
    • setSingleDBSearchID

      public void setSingleDBSearchID(PModelHandle acct)
      Sets the scope for the single db search to be the database associated with the given account.
      Specified by:
      setSingleDBSearchID in interface PSearchProducer
      Parameters:
      acct - the account the contains the database to use
    • stop

      public void stop()
      Description copied from interface: PSearchProducer
      Stops the search process
      Specified by:
      stop in interface PSearchProducer
    • search

      public void search()
      Description copied from interface: PSearchProducer
      Starts the search process
      Specified by:
      search in interface PSearchProducer
    • clear

      public void clear()
      Description copied from class: PIACustomizablePanel
      A convenience method that clears all Portal-aware descendants of this panel.
      Specified by:
      clear in interface PComponentAttribute
      Specified by:
      clear in interface PSearchProducer
      Overrides:
      clear in class PIACustomizablePanel
    • setSpreadSheet

      public void setSpreadSheet(PIASpecSpreadSheet s)
      Implements the abstract method from the PSearchProducer interface. Registers the results table with the producer
      Specified by:
      setSpreadSheet in interface PSearchProducer
    • setBrandStatus

      public void setBrandStatus(boolean status)
      Assigns status if the system is branded or not.
      Specified by:
      setBrandStatus in interface PSearchProducer
    • setSelectedBrand

      public void setSelectedBrand(PScopeEntryPoint newBrand)
      Assigns the selected brand
      Specified by:
      setSelectedBrand in interface PSearchProducer
    • setAllBrandsStatus

      public void setAllBrandsStatus(boolean status)
      Description copied from interface: PSearchProducer
      Assigns all brands selected status
      Specified by:
      setAllBrandsStatus in interface PSearchProducer
    • setBrandTree

      public void setBrandTree(PBrandTree bTree)
      Description copied from interface: PSearchProducer
      Provides the brand tree object
      Specified by:
      setBrandTree in interface PSearchProducer
    • setBrandAccountsDisplayed

      public void setBrandAccountsDisplayed(boolean b)
    • filterNonBrandHostAccounts

      public void filterNonBrandHostAccounts(boolean b)
    • isLoginRoot

      public boolean isLoginRoot()
    • setResultsDisplayLimit

      public void setResultsDisplayLimit(int i)