java.lang.Object
com.atlassian.confluence.api.service.pagination.CursorFactory

public class CursorFactory extends Object
Factory to create cursor entities
Since:
7.18
  • Method Details

    • registerCursorInstanceCreator

      public static void registerCursorInstanceCreator(String cursorType, Function<String,Cursor> function)
      Additional cursor types could be registered through this method.
      Parameters:
      cursorType - Cursor type (name)
      function - Function that could create instance of the cursor from string
      Since:
      9.2.5
    • buildFrom

      public static Cursor buildFrom(String cursorString)
      Create cursor from string
      Parameters:
      cursorString - Cursor in string format
      Returns:
      Cursor entity or null if string is null or empty
    • getEmptyCursorBy

      public static Cursor getEmptyCursorBy(ContentType contentType)
      Parameters:
      contentType - the ContentType to get the empty cursor for
      Returns:
      the empty ContentCursor for that content type
      Since:
      9.2.5