Interface UniqueDocumentReferenceGenerator


@Role @Unstable public interface UniqueDocumentReferenceGenerator
Interface used to generate a unique DocumentReference, i.e. a reference to a document that doesn't exist.
Since:
2.0RC1
Version:
$Id$
  • Method Summary

    Modifier and Type
    Method
    Description
    org.xwiki.model.reference.DocumentReference
    generate(org.xwiki.model.reference.SpaceReference spaceReference, Iterator<String> documentNameSequence)
    Iterates the given sequence of document names until it finds one that doesn't exist already in the specified space or that isn't already reserved.
  • Method Details

    • generate

      org.xwiki.model.reference.DocumentReference generate(org.xwiki.model.reference.SpaceReference spaceReference, Iterator<String> documentNameSequence)
      Iterates the given sequence of document names until it finds one that doesn't exist already in the specified space or that isn't already reserved.
      Parameters:
      spaceReference - the space where the generated document name must be unique
      documentNameSequence - a sequence of document names that will be iterated until a document name that is unique in the specified space is found
      Returns:
      the reference to the first document in the given sequence that doesn't exist already in the specified space, or that isn't already reserved