net.fckeditor.localization
Class LocalizedMessages

java.lang.Object
  extended by net.fckeditor.localization.LocalizedMessages

public class LocalizedMessages
extends Object

Provides access to localized messages (properties).

Localized messages are loaded for a particular locale from a HTTP request. The locale is resolved by the current LocaleResolver instance/singleton. If a locale or a bundle for a locale cannot be found, default messages are used.

Note: Loaded messages are cached per locale, any subsequent call of the same locale will be served by the cache instead of another resource bundle retrieval.

Version:
$Id: LocalizedMessages.java 4785 2009-12-21 20:10:28Z mosipov $

Method Summary
 String getCompatibleBrowserNo()
          Returns localized editor.compatibleBrowser.no property.
 String getCompatibleBrowserYes()
          Returns localized editor.compatibleBrowser.yes property.
 String getCreateFolderDisabled()
          Returns localized connector.createFolder.disabled property.
 String getCreateFolderEnabled()
          Returns localized connector.createFolder.enabled property.
 String getCreateFolderWriteError()
          Returns localized connector.createFolder.write_error property.
 String getFileRenamedWarning(String newFileName)
          Returns localized connector.file_renamed_warning property.
 String getFileUploadDisabled()
          Returns localized connector.fileUpload.disabled property.
 String getFileUploadEnabled()
          Returns localized connector.fileUpload.enabled property.
 String getFileUploadWriteError()
          Returns localized connector.fileUpload.write_error property.
 String getFolderAlreadyExistsError()
          Returns localized connector.createFolder.folder_already_exists_error property.
 String getGetResourcesDisabled()
          Returns localized connector.getResources.disabled property.
 String getGetResourcesEnabled()
          Returns localized connector.getResources.enabled property.
 String getGetResourcesReadError()
          Returns localized connector.getResources.read_error property.
static LocalizedMessages getInstance(HttpServletRequest request)
          Returns an instance of LocalizedMessages for a given request.
 String getInvalidCommandSpecified()
          Returns localized connector.invalid_command_specified property.
 String getInvalidCurrentFolderSpecified()
          Returns localized connector.invalid_current_folder_specified property.
 String getInvalidFileTypeSpecified()
          Returns localized connector.fileUpload.invalid_file_type_specified property.
 String getInvalidNewFolderNameSpecified()
          Returns localized connector.createFolder.invalid_new_folder_name_specified property.
 String getInvalidResouceTypeSpecified()
          Returns localized connector.invalid_resource_type_specified property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static LocalizedMessages getInstance(HttpServletRequest request)
Returns an instance of LocalizedMessages for a given request. This method automatically determines the locale of this request and loads the appropriate bundle. If locale is null or not available, the default locale will be used.

Parameters:
request - the current request instance
Returns:
instance with localized messages

getCompatibleBrowserYes

public String getCompatibleBrowserYes()
Returns localized editor.compatibleBrowser.yes property.


getCompatibleBrowserNo

public String getCompatibleBrowserNo()
Returns localized editor.compatibleBrowser.no property.


getFileUploadEnabled

public String getFileUploadEnabled()
Returns localized connector.fileUpload.enabled property.


getFileUploadDisabled

public String getFileUploadDisabled()
Returns localized connector.fileUpload.disabled property.


getFileRenamedWarning

public String getFileRenamedWarning(String newFileName)
Returns localized connector.file_renamed_warning property.

Parameters:
newFileName - the new filename of the warning
Returns:
localized message with new filename

getInvalidFileTypeSpecified

public String getInvalidFileTypeSpecified()
Returns localized connector.fileUpload.invalid_file_type_specified property.


getFileUploadWriteError

public String getFileUploadWriteError()
Returns localized connector.fileUpload.write_error property.


getGetResourcesEnabled

public String getGetResourcesEnabled()
Returns localized connector.getResources.enabled property.


getGetResourcesDisabled

public String getGetResourcesDisabled()
Returns localized connector.getResources.disabled property.


getGetResourcesReadError

public String getGetResourcesReadError()
Returns localized connector.getResources.read_error property.


getCreateFolderEnabled

public String getCreateFolderEnabled()
Returns localized connector.createFolder.enabled property.


getCreateFolderDisabled

public String getCreateFolderDisabled()
Returns localized connector.createFolder.disabled property.


getInvalidCommandSpecified

public String getInvalidCommandSpecified()
Returns localized connector.invalid_command_specified property.


getFolderAlreadyExistsError

public String getFolderAlreadyExistsError()
Returns localized connector.createFolder.folder_already_exists_error property.


getInvalidNewFolderNameSpecified

public String getInvalidNewFolderNameSpecified()
Returns localized connector.createFolder.invalid_new_folder_name_specified property.


getCreateFolderWriteError

public String getCreateFolderWriteError()
Returns localized connector.createFolder.write_error property.


getInvalidResouceTypeSpecified

public String getInvalidResouceTypeSpecified()
Returns localized connector.invalid_resource_type_specified property.


getInvalidCurrentFolderSpecified

public String getInvalidCurrentFolderSpecified()
Returns localized connector.invalid_current_folder_specified property.



Copyright © 2004-2010 Frederico Caldeira Knabben. All Rights Reserved.