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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AuthoringUIMode
getAuthoringUIMode(SlingHttpServletRequest slingRequest)
Get authoring UI modeAuthoringUIMode
getAuthoringUIModeFromCookie(SlingHttpServletRequest slingRequest)
Get authoring UI mode from the sent cookieAuthoringUIMode
getAuthoringUIModeFromOSGIConfig(SlingHttpServletRequest slingRequest)
Get authoring UI mode from OSGI configAuthoringUIMode
getAuthoringUIModeFromUserPreferences(SlingHttpServletRequest slingRequest)
Get authoring UI mode from the user preferencesjava.lang.String
getEditorURL(AuthoringUIMode authoringUIMode)
Get editor URL for provided authoring UI modevoid
setUserAuthoringUIMode(ResourceResolver resolver, java.lang.String userId, AuthoringUIMode authoringUIMode, boolean save)
Permanently set user's authoring UI mode
-
-
-
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 resolveruserId
- The ID of the user which authoring UI mode should be changedauthoringUIMode
- The user's new authoring UI modesave
- Set totrue
if the change should be saved immediately.- Throws:
RepositoryException
- This exception is thrown for repository access related issues.
-
-