citizen-intelligence-agency/src/main/java/com/hack23/cia/web/impl/ui/application/views/common/menufactory/impl/AbstractMenuItemFactoryImpl.java
protected final void initApplicationMenuBar(final MenuBar menuBar) {
		menuBar.removeItems();
		menuBar.setWidth(MENU_BAR_WIDTH);
		menuBar.setStyleName(HEADER_STYLE_NAME);
		final MenuItem mainViewItem = menuBar.addItem(APPLICATION, VaadinIcons.SERVER, null);

		mainViewItem.addItem(START_TEXT, VaadinIcons.STAR, COMMAND_MAINVIEW_OVERVIEW);

		final MenuItem mainItem = mainViewItem.addItem(MAIN, VaadinIcons.STAR, null);

		mainItem.addItem(PAGE_VISIT_HISTORY_TEXT, VaadinIcons.LINE_CHART, COMMAND_MAINVIEW_PAGEVISITHISTORY);


		if (UserContextUtil.allowRoleInSecurityContext(ROLE_ADMIN) || UserContextUtil.allowRoleInSecurityContext(ROLE_USER)) {
			mainViewItem.addItem(USERHOME, VaadinIcons.USER,COMMAND_USERHOME);
			createAdminMenu(mainViewItem);
			mainViewItem.addItem(LOGOUT, VaadinIcons.SIGN_OUT, COMMAND_LOGOUT);
		} else {
			mainViewItem.addItem(LOGIN, VaadinIcons.SIGN_IN, COMMAND_LOGIN);
			mainViewItem.addItem(REGISTER, VaadinIcons.FILE_ADD, COMMAND_REGISTER);
		}

	}
protected final void initApplicationMenuBar(final MenuBar menuBar) {
		menuBar.removeItems();
		menuBar.setWidth(MENU_BAR_WIDTH);
		menuBar.setStyleName(HEADER_STYLE_NAME);
		final MenuItem mainViewItem = menuBar.addItem(APPLICATION, VaadinIcons.SERVER, null);

		mainViewItem.addItem(START_TEXT, VaadinIcons.STAR, COMMAND_MAINVIEW_OVERVIEW);

		final MenuItem mainItem = mainViewItem.addItem(MAIN, VaadinIcons.STAR, null);

		mainItem.addItem(PAGE_VISIT_HISTORY_TEXT, VaadinIcons.LINE_CHART, COMMAND_MAINVIEW_PAGEVISITHISTORY);


		if (UserContextUtil.allowRoleInSecurityContext(ROLE_ADMIN) || UserContextUtil.allowRoleInSecurityContext(ROLE_USER)) {
			mainViewItem.addItem(USERHOME, VaadinIcons.USER,COMMAND_USERHOME);
			createAdminMenu(mainViewItem);
			mainViewItem.addItem(LOGOUT, VaadinIcons.SIGN_OUT, COMMAND_LOGOUT);
		} else {
			mainViewItem.addItem(LOGIN, VaadinIcons.SIGN_IN, COMMAND_LOGIN);
			mainViewItem.addItem(REGISTER, VaadinIcons.FILE_ADD, COMMAND_REGISTER);
		}

	}
protected final void initApplicationMenuBar ( final MenuBar menuBar ) { menuBar . removeItems ( ) ; menuBar . setWidth ( MENU_BAR_WIDTH ) ; menuBar . setStyleName ( HEADER_STYLE_NAME ) ; final MenuItem mainViewItem = menuBar . addItem ( APPLICATION , VaadinIcons . SERVER , null ) ; mainViewItem . addItem ( START_TEXT , VaadinIcons . STAR , COMMAND_MAINVIEW_OVERVIEW ) ; final MenuItem mainItem = mainViewItem . addItem ( MAIN , VaadinIcons . STAR , null ) ; mainItem . addItem ( PAGE_VISIT_HISTORY_TEXT , VaadinIcons . LINE_CHART , COMMAND_MAINVIEW_PAGEVISITHISTORY ) ; if ( UserContextUtil . allowRoleInSecurityContext ( ROLE_ADMIN ) || UserContextUtil . allowRoleInSecurityContext ( ROLE_USER ) ) { mainViewItem . addItem ( USERHOME , VaadinIcons . USER , COMMAND_USERHOME ) ; createAdminMenu ( mainViewItem ) ; mainViewItem . addItem ( LOGOUT , VaadinIcons . SIGN_OUT , COMMAND_LOGOUT ) ; } else { mainViewItem . addItem ( LOGIN , VaadinIcons . SIGN_IN , COMMAND_LOGIN ) ; mainViewItem . addItem ( REGISTER , VaadinIcons . FILE_ADD , COMMAND_REGISTER ) ; } }
Inits the application menu bar.

@param menuBar
the menu bar
Inits the application menu bar .