java.lang.Object
com.inductiveautomation.ignition.designer.findreplace.AbstractSearchProvider
com.inductiveautomation.ignition.designer.tags.search.TagSearchProvider
All Implemented Interfaces:
SearchProvider

public class TagSearchProvider extends AbstractSearchProvider
Performs a gateway-side Tag search
  • Field Details

  • Constructor Details

  • Method Details

    • getCategories

      public List<Object> getCategories()
      Description copied from interface: SearchProvider
      Returns a list of "categories", or sub-selectable units, supported by this search provider. The actual objects will be passed back in to retrieveSearchableObjects when the search is executed.
    • getContext

      protected DesignerContext getContext()
    • getName

      public String getName()
      Description copied from interface: SearchProvider
      Returns the name of the search provider, which will be used in the gateway and a UI to uniquely identify the provider. It is expected to be in the current session's language.
    • getId

      public String getId()
      Description copied from interface: SearchProvider
      Returns an ID for this search provider. Should be globally unique (e.g. a module ID) and static regardless of locale.
    • getSelectableObjectBaseKey

      public String getSelectableObjectBaseKey()
      Description copied from class: AbstractSearchProvider
      Returns a key that will be used with BundleUtil to get various descriptions of the selectable objects. It is expected that the following keys exist:
      '{Key}.One' - "%d object"
      '{Key}.Many' - "%d objects"
      '{Key}.Default' - what will be searched if no objects are selected. For example, "All groups" or "Default provider"
      Specified by:
      getSelectableObjectBaseKey in class AbstractSearchProvider
      Returns:
      a BundleUtil key corresponding to a description for a selectable object.
    • hasSelectableObjects

      public boolean hasSelectableObjects()
      Description copied from interface: SearchProvider
      Whether or not the set of objects searched by this provider is selectable- for examples, which groups or windows are to be searched.
    • selectObjects

      public void selectObjects(SearchProvider.SelectedObjectsHandler handler)
      Description copied from interface: SearchProvider
      Instructs the SearchProvider to show a dialog in order to select the objects to search. The object are returned through the passed in handler, and will later be passed into executeSearch.
    • addAsyncReplaceListener

      public void addAsyncReplaceListener(AsyncReplaceListener listener)
      Description copied from interface: SearchProvider
      Add a listener that will be notified when a replace operation that happens asynchronously has completed.
    • notifySearchClosed

      public void notifySearchClosed()
      Description copied from interface: SearchProvider
      Called when the search dialog box is closed, so that the search provider can release any cached resources
      Specified by:
      notifySearchClosed in interface SearchProvider
      Overrides:
      notifySearchClosed in class AbstractSearchProvider
    • retrieveSearchableObjects

      public Iterator<SearchObject> retrieveSearchableObjects(Collection<Object> categories, List<Object> searchObjects, TaskProgressListener progress)
      The entire search is gateway-side, so we don't do anything here.
      Parameters:
      categories - indicates the user selection (if applicable) of which categories should be searched.
      searchObjects - the user selected objects (if applicable) to be searched.
      progress - a progress listener for this provider, which can be updated as the returned Iterator is used. If not supported, the provider should call setIndeterminate(true).
    • getExecutor

      public Optional<SearchExecutor> getExecutor(SearchObjectPredicate predicate)
    • selectedObjectsToString

      public String selectedObjectsToString(List<Object> selectedObjects)
      Description copied from interface: SearchProvider
      Formats the list of selected objects as a brief string.
      Specified by:
      selectedObjectsToString in interface SearchProvider
      Overrides:
      selectedObjectsToString in class AbstractSearchProvider
    • maybeStartEditTask

      protected void maybeStartEditTask()
    • runTagEdit

      protected void runTagEdit(TaskProgressListener progress)