Class LocalizationVar

public class LocalizationVar extends MultipartVar
Localized string variable resolver.

The format for this var is "$L{key[,args...]}".

This variable resolver requires that a RestRequest bean be available in the session bean store.

Values are pulled from the RestRequest.getMessage(String,Object[]) method. These in turn are pulled from the resource bundle associated with the servlet class where the request was made.

Since this is a SimpleVar, any variables contained in the result will be recursively resolved. Likewise, if the arguments contain any variables, those will be resolved before they are passed to this var.

See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • resolve

      public String resolve(VarResolverSession session, String[] args)
      Description copied from class: MultipartVar
      The interface that needs to be implemented for this interface.
      Specified by:
      resolve in class MultipartVar
      session - The session object used for a single instance of a string resolution.
      args - The arguments inside the variable.
      The resolved variable.
    • canResolve

      public boolean canResolve(VarResolverSession session)
      Description copied from class: Var
      Returns true if this variable can be resolved in the specified session.

      For example, some variable cannot resolve unless specific context or session objects are available.

      canResolve in class Var
      session - The current session.
      true if this variable can be resolved in the specified session.