1 package com.atlassian.pageobjects.component; 2 3 import com.atlassian.pageobjects.Page; 4 5 /** 6 * WebSudoBanner component interface so that products can add WebSudoBanner functionality to PageObjects 7 * @since 2.1.0 8 */ 9 public interface WebSudoBanner 10 { 11 /** 12 * Checks the websudo banner is showing 13 * @return boolean indicating whether the websudo banner is showing 14 */ 15 boolean isShowing(); 16 17 /** 18 * Retrieves the websudo message from the banner. 19 * @return The message in the websudo banner. Returns null if there is no message. 20 */ 21 String getMessage(); 22 23 /** 24 * Drops the websudo privilege if the websudo banner is displayed otherwise just navigates 25 * to the next page. 26 * @param nextPage the page to navigate to after websudo privileges have been dropped. 27 * Cannot be null. 28 * @param <P> The page class type. 29 * @return The nextPage pageObject 30 */ 31 <P extends Page> P dropWebSudo(Class<P> nextPage); 32 }