Class ChangeDocumentIdBuilder


  • @LuceneIndependent
    public class ChangeDocumentIdBuilder
    extends Object
    This class is used to generate the ids used to identify change documents and groups of change document in the Lucene index
    • Constructor Detail

      • ChangeDocumentIdBuilder

        public ChangeDocumentIdBuilder()
    • Method Detail

      • getChangeDocumentAndAuthorId

        public String getChangeDocumentAndAuthorId​(Searchable entityObject)
        Creates an id that uniquely identifies a change document in the index. The format of the id is "[handle-of-latest-version]-[author-of-the-change]", for example "com.atlassian.confluence.pages.Page-123-foo"
      • getGroupId

        public String getGroupId​(Handle handle)
        Creates an id that uniquely identifies a group of change documents in the index. The format of the id is "[handle-of-latest-version]", for example "com.atlassian.confluence.pages.Page-123"
        Parameters:
        handle - the handle of an entity. Note:If the referenced entity is an instance of Versioned it expects the handle for the latest version of that entity
      • getGroupId

        public String getGroupId​(Searchable searchable)
        Creates an id that uniquely identifies a group of change documents in the index. The format of the id is "[handle-of-latest-version]", for example "com.atlassian.confluence.pages.Page-123"
        Parameters:
        searchable - an entity.