Interface SystemNotifications
@ProviderType
public interface SystemNotifications
-
Method Summary
Modifier and TypeMethodDescriptiongetMessage(String message, String onTime, String offTime) Gets the notification message injecting the onTime into {{ onTime }} and offTime into {{ offTime }}.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.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 Details
-
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
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
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
-