Package com.day.cq.wcm.foundation
Class Placeholder
- java.lang.Object
-
- com.day.cq.wcm.foundation.Placeholder
-
public class Placeholder extends java.lang.Object
Class to handle placeholders
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ATTRIBUTE_EMTPYTEXT
static java.lang.String
DEFAULT_PLACEHOLDER_TOUCH
-
Constructor Summary
Constructors Constructor Description Placeholder()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
getComponentTitle(Component component)
Get title of componentstatic java.lang.String
getDefaultPlaceholder(ServletRequest slingRequest, Component component, java.lang.String defaultPlaceholder)
Get default placeholder for any component incl.static java.lang.String
getDefaultPlaceholder(ServletRequest slingRequest, Component component, java.lang.String defaultPlaceholder, java.lang.String... addClasses)
Get default placeholder for any component incl.static java.lang.String
getDefaultPlaceholder(ServletRequest slingRequest, java.lang.String title, java.lang.String defaultPlaceholder, java.lang.String... addClasses)
Get default placeholder for any component incl.static boolean
isAuthoringUIModeTouch(ServletRequest slingRequest)
Check if UI is in authoring mode TOUCH
-
-
-
Field Detail
-
DEFAULT_PLACEHOLDER_TOUCH
public static final java.lang.String DEFAULT_PLACEHOLDER_TOUCH
- See Also:
- Constant Field Values
-
ATTRIBUTE_EMTPYTEXT
public static final java.lang.String ATTRIBUTE_EMTPYTEXT
- See Also:
- Constant Field Values
-
-
Method Detail
-
isAuthoringUIModeTouch
public static boolean isAuthoringUIModeTouch(ServletRequest slingRequest)
Check if UI is in authoring mode TOUCH- Parameters:
slingRequest
- request- Returns:
- true if UI authoring is in TOUCH mode
-
getDefaultPlaceholder
public static java.lang.String getDefaultPlaceholder(ServletRequest slingRequest, java.lang.String title, java.lang.String defaultPlaceholder, java.lang.String... addClasses)
Get default placeholder for any component incl. title as text information- Parameters:
slingRequest
- requesttitle
- text information for placeholderdefaultPlaceholder
- default placeholderaddClasses
- add additional classes to the placeholder div- Returns:
- default placeholder for component
-
getDefaultPlaceholder
public static java.lang.String getDefaultPlaceholder(ServletRequest slingRequest, Component component, java.lang.String defaultPlaceholder, java.lang.String... addClasses)
Get default placeholder for any component incl. title as text information- Parameters:
slingRequest
- requestcomponent
- component to read title fromdefaultPlaceholder
- default placeholderaddClasses
- add additional classes to the placeholder div- Returns:
- default placeholder for component
-
getDefaultPlaceholder
public static java.lang.String getDefaultPlaceholder(ServletRequest slingRequest, Component component, java.lang.String defaultPlaceholder)
Get default placeholder for any component incl. title as text information- Parameters:
slingRequest
- requestcomponent
- component to read title fromdefaultPlaceholder
- default placeholder- Returns:
- default placeholder for component
-
getComponentTitle
public static java.lang.String getComponentTitle(Component component)
Get title of component- Parameters:
component
- Component- Returns:
- component title
-
-