Package org.lightadmin.page

Source Code of org.lightadmin.page.SecuredPage

package org.lightadmin.page;

import org.lightadmin.SeleniumContext;
import org.lightadmin.component.BreadcrumbsComponent;
import org.lightadmin.component.NavigationMenuComponent;
import org.lightadmin.component.TopNavigationComponent;
import org.lightadmin.data.Domain;

public abstract class SecuredPage<P extends BasePage<P>> extends BasePage<P> {

  private final NavigationMenuComponent navigationMenuComponent;

  private final BreadcrumbsComponent breadcrumbsComponent;

  private final TopNavigationComponent topNavigationComponent;

  protected SecuredPage( SeleniumContext seleniumContext ) {
    super( seleniumContext );

    navigationMenuComponent = new NavigationMenuComponent( seleniumContext );
    breadcrumbsComponent = new BreadcrumbsComponent( seleniumContext );
    topNavigationComponent = new TopNavigationComponent( seleniumContext );
  }

  public boolean dashboardBreadcrumbItemLinkPresent() {
    return breadcrumbsComponent.dashboardBreadcrumbLinkPresent();
  }

  public ListViewPage navigateToDomain( Domain domain ) {
    return navigationMenuComponent.navigateToDomain( domain );
  }

  public DashboardPage navigateToDashboard() {
    return navigationMenuComponent.navigateToDashboard();
  }

  public boolean isLoggedIn() {
    return topNavigationComponent.isLoggedIn();
  }

  public LoginPage logout() {
    return topNavigationComponent.logout();
  }
}
TOP

Related Classes of org.lightadmin.page.SecuredPage

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.