Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (C) 2014 Philip Helger (www.helger.com) philip[at]helger[dot]com Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
 
 package com.helger.appbasics.app.request;
 
 
 
 
 public interface IRequestManager
 {
  
The default name of the parameter selecting the current menu item
 
   String DEFAULT_REQUEST_PARAMETER_MENUITEM = "menuitem";

  
The default name of the parameter selecting the current display locale
 
 
   @Nonnull
   @Nonempty
 
   void setRequestParamNameMenuItem (@Nonnull @Nonempty String sRequestParamMenuItem);
 
   @Nonnull
   @Nonempty
 
   void setRequestParamNameLocale (@Nonnull @Nonempty String sRequestParamDisplayLocale);

  
To be called upon the beginning of each request. Checks for the content of the request parameter DEFAULT_REQUEST_PARAMETER_MENUITEM to determine the selected menu item. Checks for the content of the request parameter DEFAULT_REQUEST_PARAMETER_DISPLAY_LOCALE to determine any changes in the display locale.

Parameters:
aRequestScope The request scope that just begun
 
   void onRequestBegin (@Nonnull IRequestScope aRequestScope);

  

Returns:
The menu tree to be used. May not be null.
 
   @Nonnull
   IMenuTree getMenuTree ();

  

Returns:
The ID of the last requested menu item, or null if the corresponding session parameter is not present.
 
   @Nullable
Resolve the request parameter for the menu item to an com.helger.appbasics.app.menu.IMenuItem object. If no parameter is present, return the default menu item.

Returns:
The resolved menu item object from the request parameter. Never null.
 
   @Nonnull

Returns:
The ID of the current request menu item. May not be null.
 
   @Nonnull
Get the locale to be used for this request. If no parameter is present, the one from the session is used. If neither request nor session data is present, the default locale is returned.

Returns:
The locale to be used for the current request. Never null.
 
Get the country to be used for this request. If no parameter is present, the one from the session is used. If neither request nor session data is present, the country of the default locale is returned.

Returns:
The country-Locale of the request display locale. Never null.
See also:
getRequestDisplayLocale()

Returns:
The language name from the current request display locale. Never null.
See also:
getRequestDisplayLocale()
New to GrepCode? Check out our FAQ X