Class CmsDialogCopyLanguage


  • public class CmsDialogCopyLanguage
    extends CmsDialog
    Provides methods for the editor copy language dialog.

    The following files use this class:

    • /jsp/editors/dialogs/copylanguage.html

    Since:
    6.5.6
    • Constructor Detail

      • CmsDialogCopyLanguage

        public CmsDialogCopyLanguage​(javax.servlet.jsp.PageContext context,
                                     javax.servlet.http.HttpServletRequest req,
                                     javax.servlet.http.HttpServletResponse res)
        Public constructor with JSP variables.

        Parameters:
        context - the JSP page context
        req - the JSP request
        res - the JSP response
    • Method Detail

      • actionUpdateLanguages

        public void actionUpdateLanguages()
                                   throws javax.servlet.jsp.JspException
        Updates the languages of the current xmlcontent by copying from the current language.

        Throws:
        javax.servlet.jsp.JspException - if there is an error including the error page
      • buildLanguageList

        public java.lang.String buildLanguageList()
        Builds the html String for a form list of all possible page elements.

        Returns:
        the html String for a form list
      • getElementLocale

        public java.util.Locale getElementLocale()
        Returns the current element locale.

        Returns:
        the current element locale
      • getParamElementLanguage

        public java.lang.String getParamElementLanguage()
        Returns the current element language.

        Returns:
        the current element language
      • getParamTempfile

        public java.lang.String getParamTempfile()
        Returns the name of the temporary file.

        Returns:
        the name of the temporary file
      • setParamElementLanguage

        public void setParamElementLanguage​(java.lang.String elementLanguage)
        Sets the current language.

        Parameters:
        elementLanguage - the current element language
      • setParamLanguage

        public void setParamLanguage​(java.lang.String language)
        Sets the list of selected languages.

        Parameters:
        language - a selected language
      • setParamTempfile

        public void setParamTempfile​(java.lang.String fileName)
        Sets the name of the temporary file.

        Parameters:
        fileName - the name of the temporary file
      • transferContents

        protected void transferContents​(CmsXmlContent content,
                                        java.util.Locale sourceLocale,
                                        java.util.List<java.util.Locale> destLocales)
                                 throws CmsException
        Copies the contents from a source locale to a number of destination locales by overwriting them.

        Parameters:
        content - the xml content
        sourceLocale - the source locale
        destLocales - a list of destination locales
        Throws:
        CmsException - if something goes wrong