Interface SystemNotifications
-
@ProviderType public interface SystemNotifications
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetMessage(String message, String onTime, String offTime)Gets the notification message injecting the onTime into {{ onTime }} and offTime into {{ offTime }}.StringgetNotificationId(com.day.cq.wcm.api.Page notificationPage)Gets the UID identifying this page; UID is based on path and last modified date so will change with modifications and resource moves.List<org.apache.sling.api.resource.Resource>getNotifications(org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.api.resource.Resource notifications)Gets the activate notifications.
-
-
-
Method Detail
-
getNotifications
List<org.apache.sling.api.resource.Resource> getNotifications(org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.api.resource.Resource notifications)
Gets the activate notifications.- Parameters:
request- The request objectnotifications- the notifications folder resource containing the notification pages- Returns:
- a list of active notification pages (as resources)
-
getNotificationId
String getNotificationId(com.day.cq.wcm.api.Page notificationPage)
Gets the UID identifying this page; UID is based on path and last modified date so will change with modifications and resource moves.- Parameters:
notificationPage- the notification Page- Returns:
- the uid
-
getMessage
String getMessage(String message, String onTime, String offTime)
Gets the notification message injecting the onTime into {{ onTime }} and offTime into {{ offTime }}. Also converts CRLF into- Parameters:
message- the raw message; may include HTML but CRLF are converted toonTime- the string to be injected into {{ onTime }}offTime- the string to be injected into {{ offTime }}- Returns:
- The formatted message
-
-