Interface AuthoringUIModeService


  • public interface AuthoringUIModeService
    Authoring UI mode service provides helpers to get and edit authoring UI mode, as well as to get the corresponding editor URL.
    • Method Detail

      • getAuthoringUIMode

        AuthoringUIMode getAuthoringUIMode​(SlingHttpServletRequest slingRequest)
        Get authoring UI mode
        Parameters:
        slingRequest - The Sling HTTP request
        Returns:
        Authoring UI mode
      • getAuthoringUIModeFromCookie

        AuthoringUIMode getAuthoringUIModeFromCookie​(SlingHttpServletRequest slingRequest)
        Get authoring UI mode from the sent cookie
        Parameters:
        slingRequest - SlingHttpServletRequest
        Returns:
        Authoring UI mode
      • getAuthoringUIModeFromUserPreferences

        AuthoringUIMode getAuthoringUIModeFromUserPreferences​(SlingHttpServletRequest slingRequest)
        Get authoring UI mode from the user preferences
        Parameters:
        slingRequest - SlingHttpServletRequest
        Returns:
        Authoring UI mode
      • getAuthoringUIModeFromOSGIConfig

        AuthoringUIMode getAuthoringUIModeFromOSGIConfig​(SlingHttpServletRequest slingRequest)
        Get authoring UI mode from OSGI config
        Parameters:
        slingRequest - SlingHttpServletRequest
        Returns:
        Authoring UI mode
      • getEditorURL

        java.lang.String getEditorURL​(AuthoringUIMode authoringUIMode)
        Get editor URL for provided authoring UI mode
        Parameters:
        authoringUIMode - The authoring UI mode
        Returns:
        Editor URL for provided authoring UI mode
      • setUserAuthoringUIMode

        void setUserAuthoringUIMode​(ResourceResolver resolver,
                                    java.lang.String userId,
                                    AuthoringUIMode authoringUIMode,
                                    boolean save)
                             throws RepositoryException
        Permanently set user's authoring UI mode
        Parameters:
        resolver - The Sling resource resolver
        userId - The ID of the user which authoring UI mode should be changed
        authoringUIMode - The user's new authoring UI mode
        save - Set to true if the change should be saved immediately.
        Throws:
        RepositoryException - This exception is thrown for repository access related issues.