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
      • getAuthoringUIModeFromUserPreferences

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

        AuthoringUIMode getAuthoringUIModeFromOSGIConfig​(SlingHttpServletRequest slingRequest)
        Get authoring UI mode from OSGI config
        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 javax.jcr.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:
        javax.jcr.RepositoryException