Class GlobalRepository

  • All Implemented Interfaces:
    WebSearchWatcher

    public class GlobalRepository
    extends UserRepository
    A representation of an object that knows how to index global objects, and also how to respond to changes to those objects.
    Author:
    Alex Kalderimis
    • Constructor Detail

      • GlobalRepository

        public GlobalRepository​(Profile profile)
        Build a new global search repository and register it with the list of global repositories available.
        Parameters:
        profile - The profile of the user whose items we are to index.
    • Method Detail

      • handleCreation

        protected void handleCreation​(CreationEvent e)
        Description copied from class: SearchRepository
        Respond in some way to the creation of a web searchable object.
        Overrides:
        handleCreation in class UserRepository
        Parameters:
        e - The notification of the change event.
      • handleTagAddition

        protected void handleTagAddition​(TaggingEvent e)
        Description copied from class: SearchRepository
        Respond in some way to the addition of a tag to a web searchable object.
        Overrides:
        handleTagAddition in class UserRepository
        Parameters:
        e - The notification of the change event.
      • handleTagRemoval

        protected void handleTagRemoval​(TaggingEvent e)
        Description copied from class: SearchRepository
        Respond in some way to the removal of a tag from a web searchable object.
        Overrides:
        handleTagRemoval in class UserRepository
        Parameters:
        e - The notification of the change event.
      • populateSearchItems

        protected void populateSearchItems()
        Description copied from class: SearchRepository
        Collect the search items we are interested in initially. The profile associated with this repository is a good place to start looking, but each implementation may decide it is interested in a different subset of the available objects.
        Overrides:
        populateSearchItems in class UserRepository
      • handleMassTagging

        protected void handleMassTagging()
        Description copied from class: SearchRepository
        Respond to the fact that multiple tags have been added and that we do not know what they are.
        Overrides:
        handleMassTagging in class UserRepository
      • getWebSearchableMap

        public java.util.Map<java.lang.String,​WebSearchable> getWebSearchableMap​(java.lang.String type)
        Get a map from name -> object for all the websearchables of the given type.
        Overrides:
        getWebSearchableMap in class SearchRepository
        Parameters:
        type - A valid TagType.
        Returns:
        A new unmodifiable map containing the requested information.
      • deleteGlobalRepository

        public void deleteGlobalRepository​(Profile userprofile)
        Parameters:
        userprofile - user profile