Class WorkspaceLanguageConfiguration


  • public class WorkspaceLanguageConfiguration
    extends java.lang.Object
    Provides programmatic access to language mappings for the workspace.
    Restriction:
    This class is not intended to be subclassed by clients.
    Restriction:
    This class is not intended to be instantiated by clients.
    • Constructor Summary

      Constructors 
      Constructor Description
      WorkspaceLanguageConfiguration()
      Creates a new WorkspaceLanguageConfiguration with no language mappings defined.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addWorkspaceMapping​(java.lang.String contentType, java.lang.String language)
      Maps a content type id to a language id.
      java.lang.String getLanguageForContentType​(java.lang.String contentTypeId)
      Returns the language id that is mapped to the given content type.
      java.util.Map<java.lang.String,​java.lang.String> getWorkspaceMappings()
      Returns a read-only copy of the workspace-wide language mappings.
      void removeWorkspaceMapping​(java.lang.String contentType)
      Removes the given content type mapping (if it exists).
      void setWorkspaceMappings​(java.util.Map<java.lang.String,​java.lang.String> mappings)
      Replaces the existing language mappings with the given mappings.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • WorkspaceLanguageConfiguration

        public WorkspaceLanguageConfiguration()
        Creates a new WorkspaceLanguageConfiguration with no language mappings defined.
    • Method Detail

      • addWorkspaceMapping

        public void addWorkspaceMapping​(java.lang.String contentType,
                                        java.lang.String language)
        Maps a content type id to a language id.
        Parameters:
        contentType -
        language -
      • removeWorkspaceMapping

        public void removeWorkspaceMapping​(java.lang.String contentType)
        Removes the given content type mapping (if it exists).
        Parameters:
        contentType -
      • setWorkspaceMappings

        public void setWorkspaceMappings​(java.util.Map<java.lang.String,​java.lang.String> mappings)
        Replaces the existing language mappings with the given mappings. The given mappings should be between content type ids (String) and language ids (String)
        Parameters:
        mappings -
      • getWorkspaceMappings

        public java.util.Map<java.lang.String,​java.lang.String> getWorkspaceMappings()
        Returns a read-only copy of the workspace-wide language mappings.
        Returns:
        a read-only copy of the workspace-wide language mappings.
      • getLanguageForContentType

        public java.lang.String getLanguageForContentType​(java.lang.String contentTypeId)
        Returns the language id that is mapped to the given content type.
        Parameters:
        contentTypeId -
        Returns:
        the language id that is mapped to the given content type.