public String getPageName(final PortalPage portalPage) {
   if (portalPage != null) {
     return portalPage.getName();
   } else {
     return null;
   }
 }
 private void updatePortalPage(final PortalPage portalPage, final DashboardState dashboardState) {
   // update the portalPageStore's title and layout if they changed.
   if (!portalPage.getLayout().equals(dashboardState.getLayout())
       || !StringUtils.equals(portalPage.getName(), dashboardState.getTitle())) {
     final PortalPage.Builder builder = PortalPage.portalPage(portalPage);
     builder.name(dashboardState.getTitle());
     builder.layout(dashboardState.getLayout());
     portalPageStore.update(builder.build());
   }
 }
 public String getPageName() {
   final PortalPage page = getPortalPage();
   return page != null ? page.getName() : null;
 }