Package com.day.cq.wcm.api
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 Summary
Modifier and TypeMethodDescriptiongetAuthoringUIMode(SlingHttpServletRequest slingRequest) Get authoring UI modegetAuthoringUIModeFromCookie(SlingHttpServletRequest slingRequest) Get authoring UI mode from the sent cookiegetAuthoringUIModeFromOSGIConfig(SlingHttpServletRequest slingRequest) Get authoring UI mode from OSGI configgetAuthoringUIModeFromUserPreferences(SlingHttpServletRequest slingRequest) Get authoring UI mode from the user preferencesgetEditorURL(AuthoringUIMode authoringUIMode) Get editor URL for provided authoring UI modevoidsetUserAuthoringUIMode(ResourceResolver resolver, String userId, AuthoringUIMode authoringUIMode, boolean save) Permanently set user's authoring UI mode
-
Method Details
-
getAuthoringUIMode
Get authoring UI mode- Parameters:
slingRequest- The Sling HTTP request- Returns:
- Authoring UI mode
-
getAuthoringUIModeFromCookie
Get authoring UI mode from the sent cookie- Parameters:
slingRequest-SlingHttpServletRequest- Returns:
- Authoring UI mode
-
getAuthoringUIModeFromUserPreferences
Get authoring UI mode from the user preferences- Parameters:
slingRequest-SlingHttpServletRequest- Returns:
- Authoring UI mode
-
getAuthoringUIModeFromOSGIConfig
Get authoring UI mode from OSGI config- Parameters:
slingRequest-SlingHttpServletRequest- Returns:
- Authoring UI mode
-
getEditorURL
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, String userId, AuthoringUIMode authoringUIMode, boolean save) throws RepositoryException Permanently set user's authoring UI mode- Parameters:
resolver- The Sling resource resolveruserId- The ID of the user which authoring UI mode should be changedauthoringUIMode- The user's new authoring UI modesave- Set totrueif the change should be saved immediately.- Throws:
RepositoryException- This exception is thrown for repository access related issues.
-