org.olat.core.util.notifications
Class SubscriptionInfo
java.lang.Object
org.olat.core.util.notifications.SubscriptionInfo
- Direct Known Subclasses:
- NoSubscriptionInfo
public class SubscriptionInfo
- extends java.lang.Object
Description:
this object holds the items-description/title
the list is used for multiple elements (all the news-item itself)
they know how to be rendered (either html or plain-text)
Initial Date: 25.10.2004
- Author:
- Felix Jost
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MIME_HTML
public static final java.lang.String MIME_HTML
- See Also:
- Constant Field Values
MIME_PLAIN
public static final java.lang.String MIME_PLAIN
- See Also:
- Constant Field Values
SubscriptionInfo
public SubscriptionInfo(TitleItem title,
java.util.List<SubscriptionListItem> subsList)
getSpecificInfo
public java.lang.String getSpecificInfo(java.lang.String mimeType,
java.util.Locale locale)
- looping over List with all contained items for this subs-info
- Parameters:
mimeType - the mimetype of the desired output; supported are currently
text/plain and text/html
- Returns:
- the specific (subscriber and type) info for a notification entry.
e.g. "5 new posts" for a forum subscription, or "10 new uploads"
for a folder subscription
hasNews
public boolean hasNews()
- Returns:
- true if there is any news
getTitle
public java.lang.String getTitle(java.lang.String mimeType)
- Parameters:
mimeType - the mimetype of the desired output; supported are currently text/plain and text/html
- Returns:
- the title of a notification entry. e.g. "5 new posts" for a forum subscription, or "10 new uploads" for a folder subscription
addSubscriptionListItem
public void addSubscriptionListItem(SubscriptionListItem sI)
getCustomUrl
public java.lang.String getCustomUrl()
- Returns:
- Returns the customUrl.
setCustomUrl
public void setCustomUrl(java.lang.String customUrl)
- Parameters:
customUrl - The customUrl to set.
countSubscriptionListItems
public int countSubscriptionListItems()
- Returns:
- The number of subscription list items, meaning the number of news
items for this subscription